From c3608eaf90b49771b2785d86bb0c73dca6e61046 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Thu, 5 Apr 2018 16:56:02 +0200 Subject: Use native shift instructions in ABIFunctions on Constantinople --- libsolidity/codegen/ABIFunctions.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libsolidity/codegen/ABIFunctions.h') diff --git a/libsolidity/codegen/ABIFunctions.h b/libsolidity/codegen/ABIFunctions.h index 2b582e84..41bb70b2 100644 --- a/libsolidity/codegen/ABIFunctions.h +++ b/libsolidity/codegen/ABIFunctions.h @@ -22,6 +22,8 @@ #pragma once +#include + #include #include @@ -48,6 +50,8 @@ using TypePointers = std::vector; 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: ... , i.e. @@ -225,6 +229,8 @@ private: /// Map from function name to code for a multi-use function. std::map m_requestedFunctions; + + EVMVersion m_evmVersion; }; } -- cgit v1.2.3 From 2968639406888d97bfae70e4adf41674ac60fd83 Mon Sep 17 00:00:00 2001 From: chriseth Date: Fri, 6 Apr 2018 16:25:13 +0200 Subject: Removed signed shift right from the utilities. --- libsolidity/codegen/ABIFunctions.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libsolidity/codegen/ABIFunctions.h') diff --git a/libsolidity/codegen/ABIFunctions.h b/libsolidity/codegen/ABIFunctions.h index 41bb70b2..db4d40f5 100644 --- a/libsolidity/codegen/ABIFunctions.h +++ b/libsolidity/codegen/ABIFunctions.h @@ -195,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(); -- cgit v1.2.3