YulRunner: Add support for external calls to the same contract

This commit is contained in:
Marenz
2022-09-14 11:40:02 +02:00
parent 53b67334c5
commit 4b69b5fdc1
9 changed files with 187 additions and 27 deletions
+15
View File
@@ -188,6 +188,21 @@ enum class Instruction: uint8_t
SELFDESTRUCT = 0xff ///< halt execution and register account for later deletion
};
/// @returns true if the instruction is of the CALL opcode family
constexpr bool isCallInstruction(Instruction _inst) noexcept
{
switch (_inst)
{
case Instruction::CALL:
case Instruction::CALLCODE:
case Instruction::DELEGATECALL:
case Instruction::STATICCALL:
return true;
default:
return false;
}
}
/// @returns true if the instruction is a PUSH
inline bool isPushInstruction(Instruction _inst)
{