Bond 0.9
C++ Bond Runtime Library API Documentation
Loading...
Searching...
No Matches
Types

Various basic types used throughout the Bond Runtime Library. More...

Classes

class  Bond::DataView
 An immutable object that encapsulates a pointer to a constant contiguous block of memory representing arbitrary binary data and a count of the number of bytes of data. More...
 
class  Bond::DataViewIndex
 An immutable object that encapsulates an array of named constant DataView objects. More...
 
class  Bond::QualifiedName
 An immutable wrapper around a constant array of C-style strings to represent the fully qualified name of a symbol in compiled Bond bytecode. More...
 
union  Bond::Value
 Union of all value types representable by a Token in the Bond compiler. More...
 
union  Bond::Value16
 Union of all 16 bit value types used within the Bond compiler, the CBO file format, and the Bond Virtual Machine. More...
 
union  Bond::Value32
 Union of all 32 bit value types used within the Bond compiler, the CBO file format, and the Bond Virtual Machine. More...
 
union  Bond::Value64
 Union of all 64 bit value types used within the Bond compiler, the CBO file format, and the Bond Virtual Machine. More...
 

Macros

#define BOND_OPCODE_LIST
 

Enumerations

enum  Bond::OpCode {
  Bond::OPCODE_NOP , Bond::OPCODE_CONSTC , Bond::OPCODE_CONSTUC , Bond::OPCODE_CONSTS ,
  Bond::OPCODE_CONSTUS , Bond::OPCODE_CONST32 , Bond::OPCODE_CONST64 , Bond::OPCODE_CONSTI_N2 ,
  Bond::OPCODE_CONSTI_N1 , Bond::OPCODE_CONSTI_0 , Bond::OPCODE_CONSTI_1 , Bond::OPCODE_CONSTI_2 ,
  Bond::OPCODE_CONSTI_3 , Bond::OPCODE_CONSTI_4 , Bond::OPCODE_CONSTI_8 , Bond::OPCODE_CONSTL_N2 ,
  Bond::OPCODE_CONSTL_N1 , Bond::OPCODE_CONSTL_0 , Bond::OPCODE_CONSTL_1 , Bond::OPCODE_CONSTL_2 ,
  Bond::OPCODE_CONSTL_3 , Bond::OPCODE_CONSTL_4 , Bond::OPCODE_CONSTL_8 , Bond::OPCODE_CONSTF_N2 ,
  Bond::OPCODE_CONSTF_N1 , Bond::OPCODE_CONSTF_NH , Bond::OPCODE_CONSTF_0 , Bond::OPCODE_CONSTF_H ,
  Bond::OPCODE_CONSTF_1 , Bond::OPCODE_CONSTF_2 , Bond::OPCODE_CONSTD_N2 , Bond::OPCODE_CONSTD_N1 ,
  Bond::OPCODE_CONSTD_NH , Bond::OPCODE_CONSTD_0 , Bond::OPCODE_CONSTD_H , Bond::OPCODE_CONSTD_1 ,
  Bond::OPCODE_CONSTD_2 , Bond::OPCODE_LOADFP , Bond::OPCODE_LOADFPW , Bond::OPCODE_LOADEA ,
  Bond::OPCODE_LOADSTR , Bond::OPCODE_LOADC , Bond::OPCODE_LOADUC , Bond::OPCODE_LOADS ,
  Bond::OPCODE_LOADUS , Bond::OPCODE_LOAD32 , Bond::OPCODE_LOAD64 , Bond::OPCODE_LOADMEMW ,
  Bond::OPCODE_STOREC , Bond::OPCODE_STORES , Bond::OPCODE_STORE32 , Bond::OPCODE_STORE64 ,
  Bond::OPCODE_PUSHC , Bond::OPCODE_PUSHCW , Bond::OPCODE_PUSHUC , Bond::OPCODE_PUSHUCW ,
  Bond::OPCODE_PUSHS , Bond::OPCODE_PUSHSW , Bond::OPCODE_PUSHUS , Bond::OPCODE_PUSHUSW ,
  Bond::OPCODE_PUSH32 , Bond::OPCODE_PUSH32W , Bond::OPCODE_PUSH32_P0 , Bond::OPCODE_PUSH32_P1 ,
  Bond::OPCODE_PUSH32_P2 , Bond::OPCODE_PUSH32_P3 , Bond::OPCODE_PUSH32_L0 , Bond::OPCODE_PUSH32_L1 ,
  Bond::OPCODE_PUSH32_L2 , Bond::OPCODE_PUSH32_L3 , Bond::OPCODE_PUSH64 , Bond::OPCODE_PUSH64W ,
  Bond::OPCODE_PUSH64_P0 , Bond::OPCODE_PUSH64_P1 , Bond::OPCODE_PUSH64_P2 , Bond::OPCODE_PUSH64_P3 ,
  Bond::OPCODE_PUSH64_L0 , Bond::OPCODE_PUSH64_L1 , Bond::OPCODE_PUSH64_L2 , Bond::OPCODE_PUSH64_L3 ,
  Bond::OPCODE_POP , Bond::OPCODE_POPC , Bond::OPCODE_POPCW , Bond::OPCODE_POPS ,
  Bond::OPCODE_POPSW , Bond::OPCODE_POP32 , Bond::OPCODE_POP32W , Bond::OPCODE_POP32_P0 ,
  Bond::OPCODE_POP32_P1 , Bond::OPCODE_POP32_P2 , Bond::OPCODE_POP32_P3 , Bond::OPCODE_POP32_L0 ,
  Bond::OPCODE_POP32_L1 , Bond::OPCODE_POP32_L2 , Bond::OPCODE_POP32_L3 , Bond::OPCODE_POP64 ,
  Bond::OPCODE_POP64W , Bond::OPCODE_POP64_P0 , Bond::OPCODE_POP64_P1 , Bond::OPCODE_POP64_P2 ,
  Bond::OPCODE_POP64_P3 , Bond::OPCODE_POP64_L0 , Bond::OPCODE_POP64_L1 , Bond::OPCODE_POP64_L2 ,
  Bond::OPCODE_POP64_L3 , Bond::OPCODE_MEMCOPYW , Bond::OPCODE_MEMZEROW , Bond::OPCODE_DUP ,
  Bond::OPCODE_DUPINS , Bond::OPCODE_SWAP , Bond::OPCODE_ITOC , Bond::OPCODE_UITOUC ,
  Bond::OPCODE_ITOS , Bond::OPCODE_UITOUS , Bond::OPCODE_ITOL , Bond::OPCODE_UITOUL ,
  Bond::OPCODE_ITOF , Bond::OPCODE_UITOF , Bond::OPCODE_ITOD , Bond::OPCODE_UITOD ,
  Bond::OPCODE_LTOI , Bond::OPCODE_LTOF , Bond::OPCODE_ULTOF , Bond::OPCODE_LTOD ,
  Bond::OPCODE_ULTOD , Bond::OPCODE_FTOI , Bond::OPCODE_FTOUI , Bond::OPCODE_FTOL ,
  Bond::OPCODE_FTOUL , Bond::OPCODE_FTOD , Bond::OPCODE_DTOI , Bond::OPCODE_DTOUI ,
  Bond::OPCODE_DTOL , Bond::OPCODE_DTOUL , Bond::OPCODE_DTOF , Bond::OPCODE_PTROFF ,
  Bond::OPCODE_PTRDIFF , Bond::OPCODE_INCI , Bond::OPCODE_INCL , Bond::OPCODE_ADDI ,
  Bond::OPCODE_ADDL , Bond::OPCODE_ADDF , Bond::OPCODE_ADDD , Bond::OPCODE_SUBI ,
  Bond::OPCODE_SUBL , Bond::OPCODE_SUBF , Bond::OPCODE_SUBD , Bond::OPCODE_MULI ,
  Bond::OPCODE_MULUI , Bond::OPCODE_MULL , Bond::OPCODE_MULUL , Bond::OPCODE_MULF ,
  Bond::OPCODE_MULD , Bond::OPCODE_DIVI , Bond::OPCODE_DIVUI , Bond::OPCODE_DIVL ,
  Bond::OPCODE_DIVUL , Bond::OPCODE_DIVF , Bond::OPCODE_DIVD , Bond::OPCODE_REMI ,
  Bond::OPCODE_REMUI , Bond::OPCODE_REML , Bond::OPCODE_REMUL , Bond::OPCODE_LSHI ,
  Bond::OPCODE_LSHL , Bond::OPCODE_RSHI , Bond::OPCODE_RSHUI , Bond::OPCODE_RSHL ,
  Bond::OPCODE_RSHUL , Bond::OPCODE_ANDI , Bond::OPCODE_ANDL , Bond::OPCODE_ORI ,
  Bond::OPCODE_ORL , Bond::OPCODE_XORI , Bond::OPCODE_XORL , Bond::OPCODE_NEGI ,
  Bond::OPCODE_NEGL , Bond::OPCODE_NEGF , Bond::OPCODE_NEGD , Bond::OPCODE_NOT ,
  Bond::OPCODE_CMPEQI , Bond::OPCODE_CMPEQL , Bond::OPCODE_CMPEQF , Bond::OPCODE_CMPEQD ,
  Bond::OPCODE_CMPNEQI , Bond::OPCODE_CMPNEQL , Bond::OPCODE_CMPNEQF , Bond::OPCODE_CMPNEQD ,
  Bond::OPCODE_CMPLTI , Bond::OPCODE_CMPLTUI , Bond::OPCODE_CMPLTL , Bond::OPCODE_CMPLTUL ,
  Bond::OPCODE_CMPLTF , Bond::OPCODE_CMPLTD , Bond::OPCODE_CMPLEI , Bond::OPCODE_CMPLEUI ,
  Bond::OPCODE_CMPLEL , Bond::OPCODE_CMPLEUL , Bond::OPCODE_CMPLEF , Bond::OPCODE_CMPLED ,
  Bond::OPCODE_CMPGTI , Bond::OPCODE_CMPGTUI , Bond::OPCODE_CMPGTL , Bond::OPCODE_CMPGTUL ,
  Bond::OPCODE_CMPGTF , Bond::OPCODE_CMPGTD , Bond::OPCODE_CMPGEI , Bond::OPCODE_CMPGEUI ,
  Bond::OPCODE_CMPGEL , Bond::OPCODE_CMPGEUL , Bond::OPCODE_CMPGEF , Bond::OPCODE_CMPGED ,
  Bond::OPCODE_BRZ , Bond::OPCODE_BRZW , Bond::OPCODE_BRNZ , Bond::OPCODE_BRNZW ,
  Bond::OPCODE_NBRZ , Bond::OPCODE_NBRZW , Bond::OPCODE_NBRNZ , Bond::OPCODE_NBRNZW ,
  Bond::OPCODE_IFZ , Bond::OPCODE_IFZW , Bond::OPCODE_IFNZ , Bond::OPCODE_IFNZW ,
  Bond::OPCODE_GOTO , Bond::OPCODE_GOTOW , Bond::OPCODE_LOOKUPSWITCH , Bond::OPCODE_TABLESWITCH ,
  Bond::OPCODE_INVOKE , Bond::OPCODE_RETURN , Bond::OPCODE_RETURN32 , Bond::OPCODE_RETURN64 ,
  Bond::OPCODE_RETURNMEMW , Bond::OPCODE_MAX
}
 Enumeration of all opcodes in the Bond Virtual Machine instruction set. More...
 
enum  Bond::OpCodeParam {
  Bond::OC_PARAM_NONE , Bond::OC_PARAM_CHAR , Bond::OC_PARAM_UCHAR , Bond::OC_PARAM_UCHAR_CHAR ,
  Bond::OC_PARAM_SHORT , Bond::OC_PARAM_USHORT , Bond::OC_PARAM_INT , Bond::OC_PARAM_VAL32 ,
  Bond::OC_PARAM_VAL64 , Bond::OC_PARAM_OFF16 , Bond::OC_PARAM_OFF32 , Bond::OC_PARAM_STRING ,
  Bond::OC_PARAM_NAME , Bond::OC_PARAM_LOOKUPSWITCH , Bond::OC_PARAM_TABLESWITCH
}
 Enumeration describing all combinations of parameter types for the instructions in the Bond Virtual Machine instruction set. More...
 

Functions

const char * Bond::GetOpCodeMnemonic (OpCode opCode)
 Returns a string representation of the given opcode. More...
 
OpCodeParam Bond::GetOpCodeParamType (OpCode opCode)
 Returns a value of the OpCodeParam enumeration describing the parameter types for the given opcode. More...
 
int32_t Bond::GetStackDelta (OpCode opCode)
 Returns the how much the given opcode moves the stack pointer in multiples of BOND_SLOT_SIZE bytes. More...
 
bool Bond::operator< (const Value16 &a, const Value16 &b)
 Returns the result of the expression: a.mUShort < b.mUShort. More...
 
bool Bond::operator< (const Value32 &a, const Value32 &b)
 Returns the result of the expression: a.mUInt < b.mUInt. More...
 
bool Bond::operator< (const Value64 &a, const Value64 &b)
 Returns the result of the expression: a.mULong < b.mULong. More...
 

Detailed Description

Various basic types used throughout the Bond Runtime Library.

Macro Definition Documentation

◆ BOND_OPCODE_LIST

#define BOND_OPCODE_LIST

Enumeration Type Documentation

◆ OpCode

Enumeration of all opcodes in the Bond Virtual Machine instruction set.

Enumerator
OPCODE_NOP 
OPCODE_CONSTC 
OPCODE_CONSTUC 
OPCODE_CONSTS 
OPCODE_CONSTUS 
OPCODE_CONST32 
OPCODE_CONST64 
OPCODE_CONSTI_N2 
OPCODE_CONSTI_N1 
OPCODE_CONSTI_0 
OPCODE_CONSTI_1 
OPCODE_CONSTI_2 
OPCODE_CONSTI_3 
OPCODE_CONSTI_4 
OPCODE_CONSTI_8 
OPCODE_CONSTL_N2 
OPCODE_CONSTL_N1 
OPCODE_CONSTL_0 
OPCODE_CONSTL_1 
OPCODE_CONSTL_2 
OPCODE_CONSTL_3 
OPCODE_CONSTL_4 
OPCODE_CONSTL_8 
OPCODE_CONSTF_N2 
OPCODE_CONSTF_N1 
OPCODE_CONSTF_NH 
OPCODE_CONSTF_0 
OPCODE_CONSTF_H 
OPCODE_CONSTF_1 
OPCODE_CONSTF_2 
OPCODE_CONSTD_N2 
OPCODE_CONSTD_N1 
OPCODE_CONSTD_NH 
OPCODE_CONSTD_0 
OPCODE_CONSTD_H 
OPCODE_CONSTD_1 
OPCODE_CONSTD_2 
OPCODE_LOADFP 
OPCODE_LOADFPW 
OPCODE_LOADEA 
OPCODE_LOADSTR 
OPCODE_LOADC 
OPCODE_LOADUC 
OPCODE_LOADS 
OPCODE_LOADUS 
OPCODE_LOAD32 
OPCODE_LOAD64 
OPCODE_LOADMEMW 
OPCODE_STOREC 
OPCODE_STORES 
OPCODE_STORE32 
OPCODE_STORE64 
OPCODE_PUSHC 
OPCODE_PUSHCW 
OPCODE_PUSHUC 
OPCODE_PUSHUCW 
OPCODE_PUSHS 
OPCODE_PUSHSW 
OPCODE_PUSHUS 
OPCODE_PUSHUSW 
OPCODE_PUSH32 
OPCODE_PUSH32W 
OPCODE_PUSH32_P0 
OPCODE_PUSH32_P1 
OPCODE_PUSH32_P2 
OPCODE_PUSH32_P3 
OPCODE_PUSH32_L0 
OPCODE_PUSH32_L1 
OPCODE_PUSH32_L2 
OPCODE_PUSH32_L3 
OPCODE_PUSH64 
OPCODE_PUSH64W 
OPCODE_PUSH64_P0 
OPCODE_PUSH64_P1 
OPCODE_PUSH64_P2 
OPCODE_PUSH64_P3 
OPCODE_PUSH64_L0 
OPCODE_PUSH64_L1 
OPCODE_PUSH64_L2 
OPCODE_PUSH64_L3 
OPCODE_POP 
OPCODE_POPC 
OPCODE_POPCW 
OPCODE_POPS 
OPCODE_POPSW 
OPCODE_POP32 
OPCODE_POP32W 
OPCODE_POP32_P0 
OPCODE_POP32_P1 
OPCODE_POP32_P2 
OPCODE_POP32_P3 
OPCODE_POP32_L0 
OPCODE_POP32_L1 
OPCODE_POP32_L2 
OPCODE_POP32_L3 
OPCODE_POP64 
OPCODE_POP64W 
OPCODE_POP64_P0 
OPCODE_POP64_P1 
OPCODE_POP64_P2 
OPCODE_POP64_P3 
OPCODE_POP64_L0 
OPCODE_POP64_L1 
OPCODE_POP64_L2 
OPCODE_POP64_L3 
OPCODE_MEMCOPYW 
OPCODE_MEMZEROW 
OPCODE_DUP 
OPCODE_DUPINS 
OPCODE_SWAP 
OPCODE_ITOC 
OPCODE_UITOUC 
OPCODE_ITOS 
OPCODE_UITOUS 
OPCODE_ITOL 
OPCODE_UITOUL 
OPCODE_ITOF 
OPCODE_UITOF 
OPCODE_ITOD 
OPCODE_UITOD 
OPCODE_LTOI 
OPCODE_LTOF 
OPCODE_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E_CMPGTUL 
OPCODE_CMPGTF 
OPCODE_CMPGTD 
OPCODE_CMPGEI 
OPCODE_CMPGEUI 
OPCODE_CMPGEL 
OPCODE_CMPGEUL 
OPCODE_CMPGEF 
OPCODE_CMPGED 
OPCODE_BRZ 
OPCODE_BRZW 
OPCODE_BRNZ 
OPCODE_BRNZW 
OPCODE_NBRZ 
OPCODE_NBRZW 
OPCODE_NBRNZ 
OPCODE_NBRNZW 
OPCODE_IFZ 
OPCODE_IFZW 
OPCODE_IFNZ 
OPCODE_IFNZW 
OPCODE_GOTO 
OPCODE_GOTOW 
OPCODE_LOOKUPSWITCH 
OPCODE_TABLESWITCH 
OPCODE_INVOKE 
OPCODE_RETURN 
OPCODE_RETURN32 
OPCODE_RETURN64 
OPCODE_RETURNMEMW 
OPCODE_MAX 

◆ OpCodeParam

Enumeration describing all combinations of parameter types for the instructions in the Bond Virtual Machine instruction set.

Enumerator
OC_PARAM_NONE 
OC_PARAM_CHAR 
OC_PARAM_UCHAR 
OC_PARAM_UCHAR_CHAR 
OC_PARAM_SHORT 
OC_PARAM_USHORT 
OC_PARAM_INT 
OC_PARAM_VAL32 
OC_PARAM_VAL64 
OC_PARAM_OFF16 
OC_PARAM_OFF32 
OC_PARAM_STRING 
OC_PARAM_NAME 
OC_PARAM_LOOKUPSWITCH 
OC_PARAM_TABLESWITCH 

Function Documentation

◆ GetOpCodeMnemonic()

const char * Bond::GetOpCodeMnemonic ( OpCode  opCode)

Returns a string representation of the given opcode.

◆ GetOpCodeParamType()

OpCodeParam Bond::GetOpCodeParamType ( OpCode  opCode)

Returns a value of the OpCodeParam enumeration describing the parameter types for the given opcode.

◆ GetStackDelta()

int32_t Bond::GetStackDelta ( OpCode  opCode)

Returns the how much the given opcode moves the stack pointer in multiples of BOND_SLOT_SIZE bytes.

◆ operator<() [1/3]

bool Bond::operator< ( const Value16 a,
const Value16 b 
)
inline

Returns the result of the expression: a.mUShort < b.mUShort.

◆ operator<() [2/3]

bool Bond::operator< ( const Value32 a,
const Value32 b 
)
inline

Returns the result of the expression: a.mUInt < b.mUInt.

◆ operator<() [3/3]

bool Bond::operator< ( const Value64 a,
const Value64 b 
)
inline

Returns the result of the expression: a.mULong < b.mULong.