diff options
author | chriseth <chris@ethereum.org> | 2018-03-01 19:06:36 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2018-03-05 18:36:33 +0800 |
commit | 6ec4517929e8c0eca022f4771ba217db5d80beed (patch) | |
tree | ece2e275ee9bb190d33e05cef5cc549b21abf8e3 /libsolidity/codegen/ContractCompiler.cpp | |
parent | 5a54cd5c708227ad6982b06de7b799ece5065917 (diff) | |
download | dexon-solidity-6ec4517929e8c0eca022f4771ba217db5d80beed.tar.gz dexon-solidity-6ec4517929e8c0eca022f4771ba217db5d80beed.tar.zst dexon-solidity-6ec4517929e8c0eca022f4771ba217db5d80beed.zip |
Use EVM version in gas meter and optimizer.
Diffstat (limited to 'libsolidity/codegen/ContractCompiler.cpp')
-rw-r--r-- | libsolidity/codegen/ContractCompiler.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libsolidity/codegen/ContractCompiler.cpp b/libsolidity/codegen/ContractCompiler.cpp index ebb718a5..5a9498f0 100644 --- a/libsolidity/codegen/ContractCompiler.cpp +++ b/libsolidity/codegen/ContractCompiler.cpp @@ -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; |