MCPcopy Create free account
hub / github.com/argotorg/solidity / propagateStackThroughBlock

Method propagateStackThroughBlock

libyul/backends/evm/StackLayoutGenerator.cpp:345–358  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

343}
344
345Stack StackLayoutGenerator::propagateStackThroughBlock(Stack _exitStack, CFG::BasicBlock const& _block, bool _aggressiveStackCompression)
346{
347 Stack stack = _exitStack;
348 for (auto&& [idx, operation]: _block.operations | ranges::views::enumerate | ranges::views::reverse)
349 {
350 Stack newStack = propagateStackThroughOperation(stack, operation, _aggressiveStackCompression);
351 if (!_aggressiveStackCompression && !findStackTooDeep(newStack, stack, reachableStackDepth()).empty())
352 // If we had stack errors, run again with aggressive stack compression.
353 return propagateStackThroughBlock(std::move(_exitStack), _block, true);
354 stack = std::move(newStack);
355 }
356
357 return stack;
358}
359
360void StackLayoutGenerator::processEntryPoint(CFG::BasicBlock const& _entry, CFG::FunctionInfo const* _functionInfo)
361{

Callers

nothing calls this directly

Calls 2

findStackTooDeepFunction · 0.85
emptyMethod · 0.45

Tested by

no test coverage detected