174 const Box& resultType,
175 const String& functionOrOp,
bool isOperator,
182 ,
qtyArgs (uint16_t(qtyFunctionArgs) )
JumpType
Denotes the two different jump types (used only as parameter, not stored.)
@ Unconditional
Denotes Jump.
@ Conditional
Denotes JumpIfFalse.
void SetEndOfConditionalFlag()
Marks the command as the end of a conditional term.
bool IsIdentifier() const
ListingTypes
Denotes the type of parsing de-compilation information attached to the command.
@ Identifier
Command results from a function call with no parenthesis given.
@ LiteralConstant
Command results from a literal constant.
@ FunctionCall
Command results from a function call.
@ BinaryOp
Command results from a binary operator.
@ UnaryOp
Command results from an unary operator.
@ AutoCast
Command results from an automatically inserted cast.
@ NestedExpression
Command results from a nested expression.
@ OptimizationConstant
Command results from a constant resulting from an optimization.
DbgInformation DbgInfo
Operation code of this command. Available only with debug-builds.
Command(CallbackDecl callback, bool isIdentifier, int qtyFunctionArgs, const Box &resultType, const String &functionOrOp, bool isOperator, integer idxOriginal, integer idxNormalized)
Command(integer idxOriginal, integer idxNormalized, JumpType jumpType)
OperationParam Parameter
The parameter of the operation.
OpCodes
The opcode type of VM commands.
@ Subroutine
Invokes another program.
@ Function
Invokes a C++ callback function.
@ JumpIfFalse
Jumps if top of the stack indicates false.
@ Constant
Pushes a constant to the stack.
uinteger ExpressionPositions
Command(const Box &value, bool isOptimization, integer idxOriginal, integer idxNormalized)
constexpr OpCodes OpCode() const
int16_t bits
Operation code of this command.
Bits
Some meanings and masks of field bits.
@ FlagEOC
Flags a command to be the last of a conditional.
@ CMD_MASK
Used to mask the command out of an opcode.
@ TYPE_MASK
The mask for the ListingTypes.
constexpr ListingTypes TerminalType() const
#define ALIB_ENUMS_ASSIGN_RECORD(TEnum, TRecord)
#define ALIB_BOXING_VTABLE_DECLARE(TMapped, Identifier)
Box(*)(Scope &scope, ArgIterator argsBegin, ArgIterator argsEnd) CallbackDecl
strings::TAString< character, lang::HeapAllocator > AString
Type alias in namespace alib.
lang::integer integer
Type alias in namespace alib.
monomem::TMonoAllocator< lang::HeapAllocator > MonoAllocator
boxing::Box Box
Type alias in namespace alib.
strings::TString< character > String
Type alias in namespace alib.
lang::uinteger uinteger
Type alias in namespace alib.
Base class exported by the main module ALib.Expressions.H for technical reasons.
static ALIB_DLL AST * Decompile(Program &program, MonoAllocator &allocator)
static ALIB_DLL alib::Box Run(Program &program, Scope &scope)
static ALIB_DLL void run(Program &program, Scope &scope)
static ALIB_DLL AString DbgList(Program &program)
integer PC
Type definition for a program counter.
A union of different parameter types for the commands.
OperationParam(integer distance)
PC Distance
A distance to jump.
OperationParam(CallbackDecl callback)
OperationParam(Program *program)
CallbackDecl Callback
A C++ callback function to invoke.
OperationParam()
Default constructor leaving this instance uninitialized.
Program * NestedProgram
The nested virtual machine program to invoke.