Add call operand
This commit is contained in:
@@ -27,7 +27,7 @@ namespace Execute
|
||||
Registers const & GetRegisters() const;
|
||||
State const & GetState() const;
|
||||
Interpret::Statement const * const GetCurrentStatement() const;
|
||||
|
||||
|
||||
bool IsTerminated() const;
|
||||
|
||||
static VirtualMachine CreateFromCode(Interpret::Code const & code);
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace Interpret
|
||||
void (* function)(Execute::State & state, int argument1, int argument2);
|
||||
Value firstArgument;
|
||||
Value secondArgument;
|
||||
|
||||
|
||||
void Execute(Execute::Flags & flags, Execute::State & state, Execute::Registers & registers) override;
|
||||
};
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace Interpret
|
||||
Value firstArgument;
|
||||
Value secondArgument;
|
||||
Value thirdArgument;
|
||||
|
||||
|
||||
void Execute(Execute::Flags & flags, Execute::State & state, Execute::Registers & registers) override;
|
||||
};
|
||||
|
||||
@@ -55,6 +55,17 @@ namespace Interpret
|
||||
JumpStatement(std::string const & label);
|
||||
};
|
||||
|
||||
struct FunctionCallStatement : Statement
|
||||
{
|
||||
private:
|
||||
std::string const label;
|
||||
|
||||
public:
|
||||
void Execute(Execute::Flags & flags, Execute::State & state, Execute::Registers & registers) override;
|
||||
|
||||
FunctionCallStatement(std::string const & label);
|
||||
};
|
||||
|
||||
struct SetStatement : Statement
|
||||
{
|
||||
Value firstArgument;
|
||||
|
||||
@@ -13,6 +13,7 @@ namespace Token
|
||||
ShiftIntegerLeft,
|
||||
ShiftIntegerRight,
|
||||
Jump,
|
||||
CallFunction,
|
||||
LessThanInteger,
|
||||
GreaterThanInteger,
|
||||
EqualInteger,
|
||||
|
||||
Reference in New Issue
Block a user