| 3222 | } |
| 3223 | |
| 3224 | std::string YulUtilFunctions::allocationFunction() |
| 3225 | { |
| 3226 | std::string functionName = "allocate_memory"; |
| 3227 | return m_functionCollector.createFunction(functionName, [&]() { |
| 3228 | return Whiskers(R"( |
| 3229 | function <functionName>(size) -> memPtr { |
| 3230 | memPtr := <allocateUnbounded>() |
| 3231 | <finalizeAllocation>(memPtr, size) |
| 3232 | } |
| 3233 | )") |
| 3234 | ("functionName", functionName) |
| 3235 | ("allocateUnbounded", allocateUnboundedFunction()) |
| 3236 | ("finalizeAllocation", finalizeAllocationFunction()) |
| 3237 | .render(); |
| 3238 | }); |
| 3239 | } |
| 3240 | |
| 3241 | std::string YulUtilFunctions::allocateUnboundedFunction() |
| 3242 | { |
no test coverage detected