| 3364 | } |
| 3365 | |
| 3366 | std::string YulUtilFunctions::allocateMemoryStructFunction(StructType const& _type) |
| 3367 | { |
| 3368 | std::string functionName = "allocate_memory_struct_" + _type.identifier(); |
| 3369 | return m_functionCollector.createFunction(functionName, [&]() { |
| 3370 | Whiskers templ(R"( |
| 3371 | function <functionName>() -> memPtr { |
| 3372 | memPtr := <alloc>(<allocSize>) |
| 3373 | } |
| 3374 | )"); |
| 3375 | templ("functionName", functionName); |
| 3376 | templ("alloc", allocationFunction()); |
| 3377 | templ("allocSize", _type.memoryDataSize().str()); |
| 3378 | |
| 3379 | return templ.render(); |
| 3380 | }); |
| 3381 | } |
| 3382 | |
| 3383 | std::string YulUtilFunctions::allocateAndInitializeMemoryStructFunction(StructType const& _type) |
| 3384 | { |
no test coverage detected