aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity
diff options
context:
space:
mode:
authorJared Wasinger <j-wasinger@hotmail.com>2018-07-31 08:54:43 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2018-09-26 23:11:02 +0800
commitc6bd2979b1265cb81d35124a2785e3828658f7cc (patch)
treed2c57db0ac0509eba0342ce71ac819758fb62664 /libsolidity
parenta86e1d187b929124c27365a8f2e185545c4157b1 (diff)
downloaddexon-solidity-c6bd2979b1265cb81d35124a2785e3828658f7cc.tar.gz
dexon-solidity-c6bd2979b1265cb81d35124a2785e3828658f7cc.tar.zst
dexon-solidity-c6bd2979b1265cb81d35124a2785e3828658f7cc.zip
Add assembly support for EXTCODEHASH (EIP-1052)
Diffstat (limited to 'libsolidity')
-rw-r--r--libsolidity/inlineasm/AsmAnalysis.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/libsolidity/inlineasm/AsmAnalysis.cpp b/libsolidity/inlineasm/AsmAnalysis.cpp
index 0f2c0f56..947b6d05 100644
--- a/libsolidity/inlineasm/AsmAnalysis.cpp
+++ b/libsolidity/inlineasm/AsmAnalysis.cpp
@@ -568,7 +568,17 @@ void AsmAnalyzer::warnOnInstructions(solidity::Instruction _instr, SourceLocatio
// Similarly we assume bitwise shifting and create2 go together.
solAssert(m_evmVersion.hasBitwiseShifting() == m_evmVersion.hasCreate2(), "");
- if ((
+ if (_instr == solidity::Instruction::EXTCODEHASH)
+ 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 ((
_instr == solidity::Instruction::RETURNDATACOPY ||
_instr == solidity::Instruction::RETURNDATASIZE ||
_instr == solidity::Instruction::STATICCALL