diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2018-09-19 06:42:33 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2018-09-26 08:58:10 +0800 |
commit | 8cfc6c98d631308c4ad9b677c3b6ab254fadc6bd (patch) | |
tree | df10ccb208ad08ca1ea043ef702e076888940f3a /libsolidity/inlineasm | |
parent | 608f36d77b0dc6d908d89fe3a1b8e1626df8391c (diff) | |
download | dexon-solidity-8cfc6c98d631308c4ad9b677c3b6ab254fadc6bd.tar.gz dexon-solidity-8cfc6c98d631308c4ad9b677c3b6ab254fadc6bd.tar.zst dexon-solidity-8cfc6c98d631308c4ad9b677c3b6ab254fadc6bd.zip |
CREATE2 is part of Constantinople now
Also add hasCreate2 to EVMVersion
Diffstat (limited to 'libsolidity/inlineasm')
-rw-r--r-- | libsolidity/inlineasm/AsmAnalysis.cpp | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/libsolidity/inlineasm/AsmAnalysis.cpp b/libsolidity/inlineasm/AsmAnalysis.cpp index 9a0110cf..0f2c0f56 100644 --- a/libsolidity/inlineasm/AsmAnalysis.cpp +++ b/libsolidity/inlineasm/AsmAnalysis.cpp @@ -565,18 +565,10 @@ void AsmAnalyzer::warnOnInstructions(solidity::Instruction _instr, SourceLocatio // We assume that returndatacopy, returndatasize and staticcall are either all available // or all not available. solAssert(m_evmVersion.supportsReturndata() == m_evmVersion.hasStaticCall(), ""); + // Similarly we assume bitwise shifting and create2 go together. + solAssert(m_evmVersion.hasBitwiseShifting() == m_evmVersion.hasCreate2(), ""); - if (_instr == solidity::Instruction::CREATE2) - m_errorReporter.warning( - _location, - "The \"" + - boost::to_lower_copy(instructionInfo(_instr).name) - + "\" instruction is not supported by the VM version \"" + - "" + m_evmVersion.name() + - "\" you are currently compiling for. " + - "It will be interpreted as an invalid instruction on this VM." - ); - else if (( + if (( _instr == solidity::Instruction::RETURNDATACOPY || _instr == solidity::Instruction::RETURNDATASIZE || _instr == solidity::Instruction::STATICCALL @@ -593,7 +585,8 @@ void AsmAnalyzer::warnOnInstructions(solidity::Instruction _instr, SourceLocatio else if (( _instr == solidity::Instruction::SHL || _instr == solidity::Instruction::SHR || - _instr == solidity::Instruction::SAR + _instr == solidity::Instruction::SAR || + _instr == solidity::Instruction::CREATE2 ) && !m_evmVersion.hasBitwiseShifting()) m_errorReporter.warning( _location, |