diff options
author | chriseth <chris@ethereum.org> | 2018-05-02 22:50:15 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-02 22:50:15 +0800 |
commit | a856135bbf709d17732ce610e086c2300783b0a9 (patch) | |
tree | c52cc5f5c2b7f263b18ac78ef3cc3760155a4726 /libsolidity/codegen/ABIFunctions.h | |
parent | de2c8fd684dd7c2a29460f64ffc891f1d6353cc8 (diff) | |
parent | 971941b3f6402665662d85eb9b31060f0ae230fb (diff) | |
download | dexon-solidity-a856135bbf709d17732ce610e086c2300783b0a9.tar dexon-solidity-a856135bbf709d17732ce610e086c2300783b0a9.tar.gz dexon-solidity-a856135bbf709d17732ce610e086c2300783b0a9.tar.bz2 dexon-solidity-a856135bbf709d17732ce610e086c2300783b0a9.tar.lz dexon-solidity-a856135bbf709d17732ce610e086c2300783b0a9.tar.xz dexon-solidity-a856135bbf709d17732ce610e086c2300783b0a9.tar.zst dexon-solidity-a856135bbf709d17732ce610e086c2300783b0a9.zip |
Merge pull request #3797 from ethereum/shift-constantinople
Use native shift instructions on Constantinople
Diffstat (limited to 'libsolidity/codegen/ABIFunctions.h')
-rw-r--r-- | libsolidity/codegen/ABIFunctions.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libsolidity/codegen/ABIFunctions.h b/libsolidity/codegen/ABIFunctions.h index 2b582e84..db4d40f5 100644 --- a/libsolidity/codegen/ABIFunctions.h +++ b/libsolidity/codegen/ABIFunctions.h @@ -22,6 +22,8 @@ #pragma once +#include <libsolidity/interface/EVMVersion.h> + #include <libsolidity/ast/ASTForward.h> #include <vector> @@ -48,6 +50,8 @@ using TypePointers = std::vector<TypePointer>; class ABIFunctions { public: + explicit ABIFunctions(EVMVersion _evmVersion = EVMVersion{}) : m_evmVersion(_evmVersion) {} + /// @returns name of an assembly function to ABI-encode values of @a _givenTypes /// into memory, converting the types to @a _targetTypes on the fly. /// Parameters are: <headStart> <value_n> ... <value_1>, i.e. @@ -191,7 +195,7 @@ private: std::string copyToMemoryFunction(bool _fromCalldata); std::string shiftLeftFunction(size_t _numBits); - std::string shiftRightFunction(size_t _numBits, bool _signed); + std::string shiftRightFunction(size_t _numBits); /// @returns the name of a function that rounds its input to the next multiple /// of 32 or the input if it is a multiple of 32. std::string roundUpFunction(); @@ -225,6 +229,8 @@ private: /// Map from function name to code for a multi-use function. std::map<std::string, std::string> m_requestedFunctions; + + EVMVersion m_evmVersion; }; } |