mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Use EVM version in gas meter and optimizer.
This commit is contained in:
1 parent
5a54cd5c70
commit
6ec4517929
28 files changed
+328
-201
No files matched your search
@@ -1059,7 +1059,7 @@ void ContractCompiler::compileExpression(Expression const& _expression, TypePoin
|
||||
CompilerUtils(m_context).convertType(*_expression.annotation().type, *_targetType);
|
||||
}
|
||||
|
||||
eth::AssemblyPointer ContractCompiler::cloneRuntime()
|
||||
eth::AssemblyPointer ContractCompiler::cloneRuntime() const
|
||||
{
|
||||
eth::Assembly a;
|
||||
a << Instruction::CALLDATASIZE;
|
||||
@@ -1070,7 +1070,7 @@ eth::AssemblyPointer ContractCompiler::cloneRuntime()
|
||||
// this is the address which has to be substituted by the linker.
|
||||
//@todo implement as special "marker" AssemblyItem.
|
||||
a << u256("0xcafecafecafecafecafecafecafecafecafecafe");
|
||||
a << u256(eth::GasCosts::callGas + 10) << Instruction::GAS << Instruction::SUB;
|
||||
a << u256(eth::GasCosts::callGas(m_context.evmVersion()) + 10) << Instruction::GAS << Instruction::SUB;
|
||||
a << Instruction::DELEGATECALL;
|
||||
//Propagate error condition (if DELEGATECALL pushes 0 on stack).
|
||||
a << Instruction::ISZERO;
|
||||
|
||||
Reference in new issue
Block a user