diff options
author | chriseth <chris@ethereum.org> | 2017-05-31 18:15:43 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2017-06-08 21:52:45 +0800 |
commit | fefd3b866d982d95d05e5956d1af48b357162cc8 (patch) | |
tree | e5d9cd9a778fe5c3f0723a3b07cd4b400c4ffc46 /libjulia/backends/evm/EVMCodeTransform.h | |
parent | 64ddb176bb71498f3a129e0cc549797f4138ec1f (diff) | |
download | dexon-solidity-fefd3b866d982d95d05e5956d1af48b357162cc8.tar.gz dexon-solidity-fefd3b866d982d95d05e5956d1af48b357162cc8.tar.zst dexon-solidity-fefd3b866d982d95d05e5956d1af48b357162cc8.zip |
Introduce machine-dependent stack adjustment.
Diffstat (limited to 'libjulia/backends/evm/EVMCodeTransform.h')
-rw-r--r-- | libjulia/backends/evm/EVMCodeTransform.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/libjulia/backends/evm/EVMCodeTransform.h b/libjulia/backends/evm/EVMCodeTransform.h index d82462a7..a817efea 100644 --- a/libjulia/backends/evm/EVMCodeTransform.h +++ b/libjulia/backends/evm/EVMCodeTransform.h @@ -80,14 +80,14 @@ protected: solidity::assembly::AsmAnalysisInfo& _analysisInfo, bool _evm15, ExternalIdentifierAccess const& _identifierAccess, - int _initialStackHeight + int _stackAdjustment ): m_errorReporter(_errorReporter), m_assembly(_assembly), m_info(_analysisInfo), m_evm15(_evm15), m_identifierAccess(_identifierAccess), - m_initialStackHeight(_initialStackHeight) + m_stackAdjustment(_stackAdjustment) {} public: @@ -128,7 +128,11 @@ public: solidity::assembly::Scope* m_scope = nullptr; bool m_evm15 = false; ExternalIdentifierAccess m_identifierAccess; - int const m_initialStackHeight; + /// Adjustment between the stack height as determined during the analysis phase + /// and the stack height in the assembly. This is caused by an initial stack being present + /// for inline assembly and different stack heights depending on the EVM backend used + /// (EVM 1.0 or 1.5). + int m_stackAdjustment = 0; }; } |