@@ -26,28 +26,25 @@ using namespace solidity;
2626using namespace solidity ::evmasm;
2727using namespace solidity ::langutil;
2828
29- bool EVMVersion::hasOpcode (Instruction _opcode, std::optional< uint8_t > _eofVersion ) const
29+ bool EVMVersion::hasOpcode (Instruction _opcode) const
3030{
31- // EOF version can be only defined since osaka
32- assert (!_eofVersion.has_value () || *this >= EVMVersion::firstWithEOF ());
33-
3431 switch (_opcode)
3532 {
3633 case Instruction::RETURNDATACOPY :
3734 case Instruction::RETURNDATASIZE :
3835 return supportsReturndata ();
3936 case Instruction::STATICCALL :
40- return !_eofVersion. has_value () && hasStaticCall ();
37+ return hasStaticCall ();
4138 case Instruction::SHL :
4239 case Instruction::SHR :
4340 case Instruction::SAR :
4441 return hasBitwiseShifting ();
4542 case Instruction::CLZ :
4643 return hasCLZ ();
4744 case Instruction::CREATE2 :
48- return !_eofVersion. has_value () && hasCreate2 ();
45+ return hasCreate2 ();
4946 case Instruction::EXTCODEHASH :
50- return !_eofVersion. has_value () && hasExtCodeHash ();
47+ return hasExtCodeHash ();
5148 case Instruction::CHAINID :
5249 return hasChainID ();
5350 case Instruction::SELFBALANCE :
@@ -63,21 +60,6 @@ bool EVMVersion::hasOpcode(Instruction _opcode, std::optional<uint8_t> _eofVersi
6360 case Instruction::TSTORE :
6461 case Instruction::TLOAD :
6562 return supportsTransientStorage ();
66- // Instructions below are deprecated in EOF
67- case Instruction::CALL :
68- case Instruction::CALLCODE :
69- case Instruction::DELEGATECALL :
70- case Instruction::SELFDESTRUCT :
71- case Instruction::JUMP :
72- case Instruction::JUMPI :
73- case Instruction::PC :
74- case Instruction::CREATE :
75- case Instruction::CODESIZE :
76- case Instruction::CODECOPY :
77- case Instruction::EXTCODESIZE :
78- case Instruction::EXTCODECOPY :
79- case Instruction::GAS :
80- return !_eofVersion.has_value ();
8163 // Instructions below available only in EOF
8264 case Instruction::EOFCREATE :
8365 case Instruction::RETURNCONTRACT :
@@ -92,7 +74,7 @@ bool EVMVersion::hasOpcode(Instruction _opcode, std::optional<uint8_t> _eofVersi
9274 case Instruction::EXTCALL :
9375 case Instruction::EXTSTATICCALL :
9476 case Instruction::EXTDELEGATECALL :
95- return _eofVersion. has_value () ;
77+ return false ;
9678 default :
9779 return true ;
9880 }
0 commit comments