diff options
author | chriseth <c@ethdev.com> | 2015-06-05 23:34:20 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2015-06-05 23:35:51 +0800 |
commit | cad767de61dc53b9b297f08ee09cb5a3c0821782 (patch) | |
tree | 896f30847436a67d1eb694a13f45a3d5ccf343e5 | |
parent | 81ed5612bc33caa4cd1dd0bf1741637afa070e4c (diff) | |
download | dexon-solidity-cad767de61dc53b9b297f08ee09cb5a3c0821782.tar.gz dexon-solidity-cad767de61dc53b9b297f08ee09cb5a3c0821782.tar.zst dexon-solidity-cad767de61dc53b9b297f08ee09cb5a3c0821782.zip |
Remove namespace prefixes.
-rw-r--r-- | ConstantOptimiser.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/ConstantOptimiser.cpp b/ConstantOptimiser.cpp index 80a2dc18..88874d81 100644 --- a/ConstantOptimiser.cpp +++ b/ConstantOptimiser.cpp @@ -73,7 +73,7 @@ bigint ConstantOptimisationMethod::simpleRunGas(AssemblyItems const& _items) bigint gas = 0; for (AssemblyItem const& item: _items) if (item.type() == Push) - gas += GasMeter::runGas(eth::Instruction::PUSH1); + gas += GasMeter::runGas(Instruction::PUSH1); else if (item.type() == Operation) gas += GasMeter::runGas(item.instruction()); return gas; @@ -119,7 +119,7 @@ void ConstantOptimisationMethod::replaceConstants( bigint LiteralMethod::gasNeeded() { return combineGas( - simpleRunGas({eth::Instruction::PUSH1}), + simpleRunGas({Instruction::PUSH1}), // PUSHX plus data (m_params.isCreation ? c_txDataNonZeroGas : c_createDataGas) + dataGas(), 0 @@ -131,16 +131,16 @@ CodeCopyMethod::CodeCopyMethod(Params const& _params, u256 const& _value): { m_copyRoutine = AssemblyItems{ u256(0), - eth::Instruction::DUP1, - eth::Instruction::MLOAD, // back up memory + Instruction::DUP1, + Instruction::MLOAD, // back up memory u256(32), AssemblyItem(PushData, u256(1) << 16), // has to be replaced - eth::Instruction::DUP4, - eth::Instruction::CODECOPY, - eth::Instruction::DUP2, - eth::Instruction::MLOAD, - eth::Instruction::SWAP2, - eth::Instruction::MSTORE + Instruction::DUP4, + Instruction::CODECOPY, + Instruction::DUP2, + Instruction::MLOAD, + Instruction::SWAP2, + Instruction::MSTORE }; } @@ -200,7 +200,7 @@ AssemblyItems ComputeMethod::findRepresentation(u256 const& _value) if (lowerPart > 0) newRoutine += AssemblyItems{Instruction::ADD}; else if (lowerPart < 0) - newRoutine.push_back(eth::Instruction::SUB); + newRoutine.push_back(Instruction::SUB); bigint newGas = gasNeeded(newRoutine); if (newGas < bestGas) @@ -215,7 +215,7 @@ AssemblyItems ComputeMethod::findRepresentation(u256 const& _value) bigint ComputeMethod::gasNeeded(AssemblyItems const& _routine) { - size_t numExps = count(_routine.begin(), _routine.end(), eth::Instruction::EXP); + size_t numExps = count(_routine.begin(), _routine.end(), Instruction::EXP); return combineGas( simpleRunGas(_routine) + numExps * (c_expGas + c_expByteGas), // Data gas for routine: Some bytes are zero, but we ignore them. |