diff options
author | Yoichi Hirai <i@yoichihirai.com> | 2017-05-17 19:29:42 +0800 |
---|---|---|
committer | Yoichi Hirai <i@yoichihirai.com> | 2017-06-13 22:57:07 +0800 |
commit | 9ff3064d032cdd732dd186a643285b96d51eea94 (patch) | |
tree | 466d8351336ed193cd357cac8d3204ea13df4f0d | |
parent | 55737213d1b528ca629511a9944266f99b08cb35 (diff) | |
download | dexon-solidity-9ff3064d032cdd732dd186a643285b96d51eea94.tar.gz dexon-solidity-9ff3064d032cdd732dd186a643285b96d51eea94.tar.zst dexon-solidity-9ff3064d032cdd732dd186a643285b96d51eea94.zip |
Mention RETURNDATACOPY in GasMeter and SemanticInformation
-rw-r--r-- | libevmasm/GasMeter.cpp | 1 | ||||
-rw-r--r-- | libevmasm/SemanticInformation.cpp | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/libevmasm/GasMeter.cpp b/libevmasm/GasMeter.cpp index 260b7439..31a7d13e 100644 --- a/libevmasm/GasMeter.cpp +++ b/libevmasm/GasMeter.cpp @@ -103,6 +103,7 @@ GasMeter::GasConsumption GasMeter::estimateMax(AssemblyItem const& _item, bool _ break; case Instruction::CALLDATACOPY: case Instruction::CODECOPY: + case Instruction::RETURNDATACOPY: gas += memoryGas(0, -2); gas += wordGas(GasCosts::copyGas, m_state->relativeStackElement(-2)); break; diff --git a/libevmasm/SemanticInformation.cpp b/libevmasm/SemanticInformation.cpp index 61586e7b..86feb1d2 100644 --- a/libevmasm/SemanticInformation.cpp +++ b/libevmasm/SemanticInformation.cpp @@ -143,6 +143,8 @@ bool SemanticInformation::isDeterministic(AssemblyItem const& _item) case Instruction::MSIZE: // depends on previous writes and reads, not only on content case Instruction::BALANCE: // depends on previous calls case Instruction::EXTCODESIZE: + case Instruction::RETURNDATACOPY: // depends on previous calls + case Instruction::RETURNDATASIZE: return false; default: return true; @@ -156,6 +158,7 @@ bool SemanticInformation::invalidatesMemory(Instruction _instruction) case Instruction::CALLDATACOPY: case Instruction::CODECOPY: case Instruction::EXTCODECOPY: + case Instruction::RETURNDATACOPY: case Instruction::MSTORE: case Instruction::MSTORE8: case Instruction::CALL: |