TorqueScript
0.2
|
Base instruction class. All instructions in the interpreter should dervive from this class and implement all virtual members. More...
#include <instructions.hpp>
Public Member Functions | |
virtual AddressOffsetType | execute (std::shared_ptr< ExecutionState > state)=0 |
Main execution method of the instruction. This serves as our switching statement that determines how opcodes will behave. More... | |
virtual std::string | disassemble ()=0 |
Helper routine to produce a disassembly for this instruction. | |
Public Attributes | |
std::string | mComment |
Compiler generated comment, used for generating easier to follow disassembly. | |
Base instruction class. All instructions in the interpreter should dervive from this class and implement all virtual members.
|
pure virtual |
Main execution method of the instruction. This serves as our switching statement that determines how opcodes will behave.
state | The current execution state to act upon. |
Implemented in TorqueScript::Instructions::PopObjectInstantiationInstruction, TorqueScript::Instructions::PushObjectFieldInstruction, TorqueScript::Instructions::PushObjectInstantiationInstruction, TorqueScript::Instructions::CallBoundFunctionInstruction, TorqueScript::Instructions::AccessArrayInstruction, TorqueScript::Instructions::BreakInstruction, TorqueScript::Instructions::PopLoopInstruction, TorqueScript::Instructions::PushLoopInstruction, TorqueScript::Instructions::ReturnInstruction, TorqueScript::Instructions::SubReferenceInstruction, TorqueScript::Instructions::FunctionDeclarationInstruction, TorqueScript::Instructions::NOPInstruction, TorqueScript::Instructions::JumpFalseInstruction, TorqueScript::Instructions::JumpTrueInstruction, TorqueScript::Instructions::JumpInstruction, TorqueScript::Instructions::PopInstruction, TorqueScript::Instructions::DivideInstruction, TorqueScript::Instructions::MultiplyInstruction, TorqueScript::Instructions::BitwiseAndInstruction, TorqueScript::Instructions::EqualsInstruction, TorqueScript::Instructions::LessThanInstruction, TorqueScript::Instructions::AddInstruction, TorqueScript::Instructions::CallFunctionInstruction, TorqueScript::Instructions::NotInstruction, TorqueScript::Instructions::NegateInstruction, TorqueScript::Instructions::ConcatInstruction, TorqueScript::Instructions::AssignmentInstruction, TorqueScript::Instructions::AddAssignmentInstruction, TorqueScript::Instructions::PushGlobalReferenceInstruction, TorqueScript::Instructions::PushLocalReferenceInstruction, TorqueScript::Instructions::PushStringInstruction, TorqueScript::Instructions::PushIntegerInstruction, and TorqueScript::Instructions::PushFloatInstruction.