mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Emit PUSH0 as junk in evm code transform, if available.
This commit is contained in:
@@ -351,7 +351,10 @@ void OptimizedEVMCodeTransform::createStackLayout(std::shared_ptr<DebugData cons
|
||||
[&](JunkSlot const&)
|
||||
{
|
||||
// Note: this will always be popped, so we can push anything.
|
||||
m_assembly.appendInstruction(evmasm::Instruction::CODESIZE);
|
||||
if (m_assembly.evmVersion().hasPush0())
|
||||
m_assembly.appendConstant(0);
|
||||
else
|
||||
m_assembly.appendInstruction(evmasm::Instruction::CODESIZE);
|
||||
}
|
||||
}, _slot);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user