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 /libevmasm/PathGasMeter.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 'libevmasm/PathGasMeter.cpp')
-rw-r--r-- | libevmasm/PathGasMeter.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libevmasm/PathGasMeter.cpp b/libevmasm/PathGasMeter.cpp index c56e2f8b..3fe682b7 100644 --- a/libevmasm/PathGasMeter.cpp +++ b/libevmasm/PathGasMeter.cpp @@ -27,8 +27,8 @@ using namespace std; using namespace dev; using namespace dev::eth; -PathGasMeter::PathGasMeter(AssemblyItems const& _items): - m_items(_items) +PathGasMeter::PathGasMeter(AssemblyItems const& _items, solidity::EVMVersion _evmVersion): + m_items(_items), m_evmVersion(_evmVersion) { for (size_t i = 0; i < m_items.size(); ++i) if (m_items[i].type() == Tag) @@ -59,7 +59,7 @@ GasMeter::GasConsumption PathGasMeter::handleQueueItem() m_queue.pop_back(); shared_ptr<KnownState> state = path->state; - GasMeter meter(state, path->largestMemoryAccess); + GasMeter meter(state, m_evmVersion, path->largestMemoryAccess); ExpressionClasses& classes = state->expressionClasses(); GasMeter::GasConsumption gas = path->gas; size_t index = path->index; |