Consider extcodehash as part of Constantinople

This commit is contained in:
Alex Beregszaszi
2019-02-26 12:40:31 +00:00
parent 5fc8e29fff
commit cb7b053a4a
4 changed files with 13 additions and 17 deletions
+5 -13
View File
@@ -655,19 +655,7 @@ void AsmAnalyzer::warnOnInstructions(solidity::Instruction _instr, SourceLocatio
);
};
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 ((
if ((
_instr == solidity::Instruction::RETURNDATACOPY ||
_instr == solidity::Instruction::RETURNDATASIZE
) && !m_evmVersion.supportsReturndata())
@@ -690,6 +678,10 @@ void AsmAnalyzer::warnOnInstructions(solidity::Instruction _instr, SourceLocatio
{
warningForVM("only available for Constantinople-compatible");
}
else if (_instr == solidity::Instruction::EXTCODEHASH && !m_evmVersion.hasExtCodeHash())
{
warningForVM("only available for Constantinople-compatible");
}
else if (_instr == solidity::Instruction::JUMP || _instr == solidity::Instruction::JUMPI || _instr == solidity::Instruction::JUMPDEST)
{
if (m_dialect->flavour == AsmFlavour::Loose)