Reverse the order of the memory offsets assigned to variables.

This commit is contained in:
Daniel Kirchner
2020-09-17 22:13:27 +02:00
parent 976abf4715
commit 48f620fb50
7 changed files with 70 additions and 57 deletions
+1 -1
View File
@@ -132,7 +132,7 @@ void StackLimitEvader::run(
MemoryOffsetAllocator memoryOffsetAllocator{_unreachableVariables, callGraph.functionCalls};
uint64_t requiredSlots = memoryOffsetAllocator.run();
StackToMemoryMover::run(_context, reservedMemory, memoryOffsetAllocator.slotAllocations, *_object.code);
StackToMemoryMover::run(_context, reservedMemory, memoryOffsetAllocator.slotAllocations, requiredSlots, *_object.code);
yulAssert(requiredSlots < std::numeric_limits<uint64_t>::max() / 32, "");
reservedMemory += 32 * requiredSlots;