Documentation
¶
Overview ¶
Package op defines opcodes used by the Risor compiler and virtual machine.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BinaryOpType ¶
type BinaryOpType uint16
BinaryOpType describes a type of binary operation.
const ( Add BinaryOpType = iota + 1 Subtract Multiply Divide Modulo And Or Xor Power LShift RShift BitwiseAnd BitwiseOr )
type Code ¶
type Code uint16
Code is an integer opcode that indicates an operation to execute.
const ( Nop Code = iota BinaryOp BinarySubscr BuildList BuildMap BuildSet BuildString Call CallDeferred CompareOp ContainsOp Copy Defer DeleteSubscr False ForIter GetIter Go Halt Import FromImport JumpBackward JumpForward Length LoadAttr LoadClosure LoadConst LoadFast LoadFree LoadGlobal LoadName MakeCell Nil Partial PopJumpBackwardIfFalse PopJumpBackwardIfTrue PopJumpForwardIfFalse PopJumpForwardIfTrue PopTop Print PushNil Range Receive ReturnValue Send Slice StoreAttr StoreFast StoreFree StoreGlobal StoreName StoreSubscr Swap True UnaryInvert UnaryNegative UnaryNot UnaryPositive Unpack )
type CompareOpType ¶
type CompareOpType uint16
CompareOpType describes a type of comparison operation.
const ( LessThan CompareOpType = iota + 1 LessThanOrEqual Equal NotEqual GreaterThan GreaterThanOrEqual )
Click to show internal directories.
Click to hide internal directories.