ballerina/bir module
Type Definitions
Type | Values | Description | |
---|---|---|---|
ArgVarKind | ARG | ||
ArrayState | ARRAY_STATE_UNSEALED | ARRAY_STATE_OPEN_SEALED | ARRAY_STATE_CLOSED_SEALED | ||
BJSONType | TYPE_JSON | ||
BType | Self | BUnionType | BTypeString | BTypeNone | BTypeNil | BTypeInt | BTypeFloat | BTypeByte | BTypeBoolean | BTypeAnyData | BTypeAny | BTupleType | BRecordType | BObjectType | BMapType | BJSONType | BInvokableType | BFutureType | BErrorType | BArrayType | ||
BTypeAny | TYPE_ANY | ||
BTypeAnyData | TYPE_ANYDATA | ||
BTypeBoolean | TYPE_BOOLEAN | ||
BTypeByte | TYPE_BYTE | ||
BTypeFloat | TYPE_FLOAT | ||
BTypeInt | TYPE_INT | ||
BTypeNil | TYPE_NIL | ||
BTypeNone | TYPE_NONE | ||
BTypeString | TYPE_STRING | ||
BinaryOpInstructionKind | BINARY_SUB | BINARY_OR | BINARY_NOT_EQUAL | BINARY_MUL | BINARY_LESS_THAN | BINARY_LESS_EQUAL | BINARY_GREATER_THAN | BINARY_GREATER_EQUAL | BINARY_EQUAL | BINARY_DIV | BINARY_AND | BINARY_ADD | ||
GlobalVarKind | GLOBAL | ||
InstructionKind | INS_KIND_TYPE_TEST | INS_KIND_TYPE_CAST | INS_KIND_NEW_MAP | INS_KIND_NEW_INST | INS_KIND_NEW_ERROR | INS_KIND_NEW_ARRAY | INS_KIND_MOVE | INS_KIND_MAP_STORE | INS_KIND_MAP_LOAD | INS_KIND_IS_LIKE | INS_KIND_CONST_LOAD | INS_KIND_ARRAY_STORE | INS_KIND_ARRAY_LOAD | BinaryOpInstructionKind | ||
LocalVarKind | LOCAL | ||
ReturnVarKind | RETURN | ||
TempVarKind | TEMP | ||
TerminatorKind | TERMINATOR_RETURN | TERMINATOR_PANIC | TERMINATOR_GOTO | TERMINATOR_CALL | TERMINATOR_BRANCH | TERMINATOR_ASYNC_CALL | ||
VarKind | TempVarKind | ReturnVarKind | LocalVarKind | GlobalVarKind | ArgVarKind | ||
VarScope | VAR_SCOPE_GLOBAL | VAR_SCOPE_FUNCTION | ||
Visibility | VISIBILITY_PUBLIC | VISIBILITY_PRIVATE | VISIBILITY_PACKAGE_PRIVATE |
Records Summary
Objects Summary
Object | Description | ||
---|---|---|---|
BIRContext | TODO Docs |
||
BirChannelReader | |||
BirEmitter | |||
ChannelReader | |||
ConstPoolParser | |||
FuncBodyParser | |||
PackageParser | |||
TypeParser |
Functions Summary
Constants
Name | Data Type | Value | Description | |
---|---|---|---|---|
BINARY_ADD | ADD | |||
BINARY_SUB | SUB | |||
BINARY_MUL | MUL | |||
BINARY_DIV | DIV | |||
BINARY_EQUAL | EQUAL | |||
BINARY_NOT_EQUAL | NOT_EQUAL | |||
BINARY_GREATER_THAN | GREATER_THAN | |||
BINARY_GREATER_EQUAL | GREATER_EQUAL | |||
BINARY_LESS_THAN | LESS_THAN | |||
BINARY_LESS_EQUAL | LESS_EQUAL | |||
BINARY_AND | AND | |||
BINARY_OR | OR | |||
INS_KIND_MOVE | MOVE | |||
INS_KIND_CONST_LOAD | CONST_LOAD | |||
INS_KIND_NEW_MAP | NEW_MAP | |||
INS_KIND_NEW_INST | NEW_INST | |||
INS_KIND_MAP_STORE | MAP_STORE | |||
INS_KIND_NEW_ARRAY | NEW_ARRAY | |||
INS_KIND_ARRAY_STORE | ARRAY_STORE | |||
INS_KIND_MAP_LOAD | MAP_LOAD | |||
INS_KIND_ARRAY_LOAD | ARRAY_LOAD | |||
INS_KIND_NEW_ERROR | NEW_ERROR | |||
INS_KIND_TYPE_CAST | TYPE_CAST | |||
INS_KIND_IS_LIKE | IS_LIKE | |||
INS_KIND_TYPE_TEST | TYPE_TEST | |||
TERMINATOR_GOTO | GOTO | |||
TERMINATOR_CALL | CALL | |||
TERMINATOR_ASYNC_CALL | ASYNC_CALL | |||
TERMINATOR_BRANCH | BRANCH | |||
TERMINATOR_RETURN | RETURN | |||
TERMINATOR_PANIC | PANIC | |||
VAR_SCOPE_GLOBAL | GLOBAL_SCOPE | |||
VAR_SCOPE_FUNCTION | FUNCTION_SCOPE | |||
ARRAY_STATE_CLOSED_SEALED | CLOSED_SEALED | |||
ARRAY_STATE_OPEN_SEALED | OPEN_SEALED | |||
ARRAY_STATE_UNSEALED | UNSEALED | |||
TYPE_ANY | any | |||
TYPE_ANYDATA | anydata | |||
TYPE_NONE | none | |||
TYPE_NIL | () | |||
TYPE_INT | int | |||
TYPE_FLOAT | float | |||
TYPE_BOOLEAN | boolean | |||
TYPE_STRING | string | |||
TYPE_BYTE | byte | |||
TYPE_JSON | json | |||
VISIBILITY_PACKAGE_PRIVATE | PACKAGE_PRIVATE | |||
VISIBILITY_PRIVATE | PRIVATE | |||
VISIBILITY_PUBLIC | PUBLIC | |||
INS_GOTO | int | 1 | ||
INS_CALL | int | 2 | ||
INS_BRANCH | int | 3 | ||
INS_RETURN | int | 4 | ||
INS_ASYNC_CALL | int | 5 | ||
INS_MOVE | int | 20 | ||
INS_CONST_LOAD | int | 21 | ||
INS_NEW_MAP | int | 22 | ||
INS_MAP_STORE | int | 23 | ||
INS_MAP_LOAD | int | 24 | ||
INS_NEW_ARRAY | int | 25 | ||
INS_ARRAY_STORE | int | 26 | ||
INS_ARRAY_LOAD | int | 27 | ||
INS_NEW_ERROR | int | 28 | ||
INS_TYPE_CAST | int | 29 | ||
INS_IS_LIKE | int | 30 | ||
INS_TYPE_TEST | int | 31 | ||
INS_NEW_INST | int | 32 | ||
INS_PANIC | int | 33 | ||
INS_ADD | int | 50 | ||
INS_SUB | int | 51 | ||
INS_MUL | int | 52 | ||
INS_DIV | int | 53 | ||
INS_MOD | int | 54 | ||
INS_EQUAL | int | 55 | ||
INS_NOT_EQUAL | int | 56 | ||
INS_GREATER_THAN | int | 57 | ||
INS_GREATER_EQUAL | int | 58 | ||
INS_LESS_THAN | int | 59 | ||
INS_LESS_EQUAL | int | 60 |
public type AsyncCall record
Field Name | Data Type | Default Value | Description |
---|---|---|---|
args | bir:VarRef?[] | ||
kind | GOTO|CALL|BRANCH|RETURN|ASYNC_CALL|PANIC | ||
lhsOp | bir:VarRef? | ||
pkgID | bir:ModuleID | ||
name | bir:Name | ||
thenBB | bir:BasicBlock |
public type BArrayType record
Field Name | Data Type | Default Value | Description |
---|---|---|---|
state | CLOSED_SEALED|OPEN_SEALED|UNSEALED | ||
eType | int|boolean|any|()|byte|float|string|bir:BUnionType|bir:BTupleType|bir:BInvokableType|bir:BArrayType|bir:BRecordType|bir:BObjectType|bir:BMapType|bir:BErrorType|anydata|none|bir:BFutureType|json|bir:Self? |
public type BAttachedFunction record
Field Name | Data Type | Default Value | Description |
---|---|---|---|
name | bir:Name | {} | |
funcType | bir:BInvokableType | ||
visibility | PACKAGE_PRIVATE|PRIVATE|PUBLIC |
public type BErrorType record
Field Name | Data Type | Default Value | Description |
---|---|---|---|
reasonType | int|boolean|any|()|byte|float|string|bir:BUnionType|bir:BTupleType|bir:BInvokableType|bir:BArrayType|bir:BRecordType|bir:BObjectType|bir:BMapType|bir:BErrorType|anydata|none|bir:BFutureType|json|bir:Self? | ||
detailType | int|boolean|any|()|byte|float|string|bir:BUnionType|bir:BTupleType|bir:BInvokableType|bir:BArrayType|bir:BRecordType|bir:BObjectType|bir:BMapType|bir:BErrorType|anydata|none|bir:BFutureType|json|bir:Self? |
public type BFutureType record
Field Name | Data Type | Default Value | Description |
---|---|---|---|
returnType | int|boolean|any|()|byte|float|string|bir:BUnionType|bir:BTupleType|bir:BInvokableType|bir:BArrayType|bir:BRecordType|bir:BObjectType|bir:BMapType|bir:BErrorType|anydata|none|bir:BFutureType|json|bir:Self? |
public type BInvokableType record
Field Name | Data Type | Default Value | Description |
---|---|---|---|
paramTypes | int|boolean|any|()|byte|float|string|bir:BUnionType|bir:BTupleType|bir:BInvokableType|bir:BArrayType|bir:BRecordType|bir:BObjectType|bir:BMapType|bir:BErrorType|anydata|none|bir:BFutureType|json|bir:Self?[] | [] | |
retType | int|boolean|any|()|byte|float|string|bir:BUnionType|bir:BTupleType|bir:BInvokableType|bir:BArrayType|bir:BRecordType|bir:BObjectType|bir:BMapType|bir:BErrorType|anydata|none|bir:BFutureType|json|bir:Self? |
public type BMapType record
Field Name | Data Type | Default Value | Description |
---|---|---|---|
constraint | int|boolean|any|()|byte|float|string|bir:BUnionType|bir:BTupleType|bir:BInvokableType|bir:BArrayType|bir:BRecordType|bir:BObjectType|bir:BMapType|bir:BErrorType|anydata|none|bir:BFutureType|json|bir:Self? |
public type BObjectField record
Field Name | Data Type | Default Value | Description |
---|---|---|---|
name | bir:Name | ||
visibility | PACKAGE_PRIVATE|PRIVATE|PUBLIC | ||
typeValue | int|boolean|any|()|byte|float|string|bir:BUnionType|bir:BTupleType|bir:BInvokableType|bir:BArrayType|bir:BRecordType|bir:BObjectType|bir:BMapType|bir:BErrorType|anydata|none|bir:BFutureType|json|bir:Self? |
public type BObjectType record
Field Name | Data Type | Default Value | Description |
---|---|---|---|
name | bir:Name | {} | |
fields | bir:BObjectField?[] | [] | |
attachedFunctions | bir:BAttachedFunction?[] | [] |
public type BRecordField record
Field Name | Data Type | Default Value | Description |
---|---|---|---|
name | bir:Name | ||
typeValue | int|boolean|any|()|byte|float|string|bir:BUnionType|bir:BTupleType|bir:BInvokableType|bir:BArrayType|bir:BRecordType|bir:BObjectType|bir:BMapType|bir:BErrorType|anydata|none|bir:BFutureType|json|bir:Self? |
public type BRecordType record
Field Name | Data Type | Default Value | Description |
---|---|---|---|
name | bir:Name | {} | |
sealed | boolean | ||
restFieldType | int|boolean|any|()|byte|float|string|bir:BUnionType|bir:BTupleType|bir:BInvokableType|bir:BArrayType|bir:BRecordType|bir:BObjectType|bir:BMapType|bir:BErrorType|anydata|none|bir:BFutureType|json|bir:Self? | ||
fields | bir:BRecordField?[] | [] |
public type BTupleType record
Field Name | Data Type | Default Value | Description |
---|---|---|---|
tupleTypes | int|boolean|any|()|byte|float|string|bir:BUnionType|bir:BTupleType|bir:BInvokableType|bir:BArrayType|bir:BRecordType|bir:BObjectType|bir:BMapType|bir:BErrorType|anydata|none|bir:BFutureType|json|bir:Self?[] |
public type BUnionType record
Field Name | Data Type | Default Value | Description |
---|---|---|---|
members | int|boolean|any|()|byte|float|string|bir:BUnionType|bir:BTupleType|bir:BInvokableType|bir:BArrayType|bir:BRecordType|bir:BObjectType|bir:BMapType|bir:BErrorType|anydata|none|bir:BFutureType|json|bir:Self?[] |
public type BasicBlock record
Field Name | Data Type | Default Value | Description |
---|---|---|---|
id | bir:Name | {} | |
instructions | bir:Instruction?[] | [] | |
terminator | bir:Terminator | {kind: RETURN} |
public type BinaryOp record
Field Name | Data Type | Default Value | Description |
---|---|---|---|
kind | MOVE|CONST_LOAD|NEW_MAP|NEW_INST|MAP_STORE|NEW_ARRAY|NEW_ERROR|ARRAY_STORE|MAP_LOAD|ARRAY_LOAD|TYPE_CAST|IS_LIKE|TYPE_TEST|ADD|SUB|MUL|DIV|EQUAL|NOT_EQUAL|GREATER_THAN|GREATER_EQUAL|LESS_THAN|LESS_EQUAL|AND|OR | ||
lhsOp | bir:VarRef | ||
rhsOp1 | bir:VarRef | ||
rhsOp2 | bir:VarRef |
public type Branch record
Field Name | Data Type | Default Value | Description |
---|---|---|---|
falseBB | bir:BasicBlock | ||
kind | GOTO|CALL|BRANCH|RETURN|ASYNC_CALL|PANIC | ||
op | bir:VarRef | ||
trueBB | bir:BasicBlock |
public type Call record
Field Name | Data Type | Default Value | Description |
---|---|---|---|
args | bir:VarRef?[] | ||
kind | GOTO|CALL|BRANCH|RETURN|ASYNC_CALL|PANIC | ||
lhsOp | bir:VarRef? | ||
pkgID | bir:ModuleID | ||
name | bir:Name | ||
isVirtual | boolean | ||
thenBB | bir:BasicBlock |
public type ConstPool record
Field Name | Data Type | Default Value | Description |
---|---|---|---|
packages | bir:ModuleID[] | [] | |
strings | string[] | [] | |
ints | int[] | [] | |
floats | float[] | [] |
public type ConstantLoad record
Field Name | Data Type | Default Value | Description |
---|---|---|---|
kind | MOVE|CONST_LOAD|NEW_MAP|NEW_INST|MAP_STORE|NEW_ARRAY|NEW_ERROR|ARRAY_STORE|MAP_LOAD|ARRAY_LOAD|TYPE_CAST|IS_LIKE|TYPE_TEST|ADD|SUB|MUL|DIV|EQUAL|NOT_EQUAL|GREATER_THAN|GREATER_EQUAL|LESS_THAN|LESS_EQUAL|AND|OR | ||
lhsOp | bir:VarRef | ||
typeValue | int|boolean|any|()|byte|float|string|bir:BUnionType|bir:BTupleType|bir:BInvokableType|bir:BArrayType|bir:BRecordType|bir:BObjectType|bir:BMapType|bir:BErrorType|anydata|none|bir:BFutureType|json|bir:Self? | ||
value | int|string|boolean|float? |
public type ErrorEntry record
Field Name | Data Type | Default Value | Description |
---|---|---|---|
trapBB | bir:BasicBlock | ||
errorOp | bir:VarRef |
public type FieldAccess record
Field Name | Data Type | Default Value | Description |
---|---|---|---|
kind | MOVE|CONST_LOAD|NEW_MAP|NEW_INST|MAP_STORE|NEW_ARRAY|NEW_ERROR|ARRAY_STORE|MAP_LOAD|ARRAY_LOAD|TYPE_CAST|IS_LIKE|TYPE_TEST|ADD|SUB|MUL|DIV|EQUAL|NOT_EQUAL|GREATER_THAN|GREATER_EQUAL|LESS_THAN|LESS_EQUAL|AND|OR | ||
lhsOp | bir:VarRef | ||
keyOp | bir:VarRef | ||
rhsOp | bir:VarRef |
public type Function record
Field Name | Data Type | Default Value | Description |
---|---|---|---|
argsCount | int | 0 | |
basicBlocks | bir:BasicBlock?[] | [] | |
errorEntries | bir:ErrorEntry?[] | [] | |
isDeclaration | boolean | false | |
localVars | bir:VariableDcl?[] | [] | |
name | bir:Name | {} | |
typeValue | bir:BInvokableType | {} | |
visibility | PACKAGE_PRIVATE|PRIVATE|PUBLIC | PACKAGE_PRIVATE |
public type GOTO record
Field Name | Data Type | Default Value | Description |
---|---|---|---|
kind | GOTO|CALL|BRANCH|RETURN|ASYNC_CALL|PANIC | ||
targetBB | bir:BasicBlock |
public type GlobalVariableDcl record
Field Name | Data Type | Default Value | Description |
---|---|---|---|
kind | LOCAL|TEMP|RETURN|ARG|GLOBAL | GLOBAL | |
varScope | GLOBAL_SCOPE|FUNCTION_SCOPE | VAR_SCOPE_GLOBAL | |
name | bir:Name | {} | |
typeValue | int|boolean|any|()|byte|float|string|bir:BUnionType|bir:BTupleType|bir:BInvokableType|bir:BArrayType|bir:BRecordType|bir:BObjectType|bir:BMapType|bir:BErrorType|anydata|none|bir:BFutureType|json|bir:Self? | () | |
visibility | PACKAGE_PRIVATE|PRIVATE|PUBLIC | PACKAGE_PRIVATE |
public type ImportModule record
Field Name | Data Type | Default Value | Description |
---|---|---|---|
modOrg | bir:Name | ||
modName | bir:Name | ||
modVersion | bir:Name |
public type Instruction record
Field Name | Data Type | Default Value | Description |
---|---|---|---|
kind | MOVE|CONST_LOAD|NEW_MAP|NEW_INST|MAP_STORE|NEW_ARRAY|NEW_ERROR|ARRAY_STORE|MAP_LOAD|ARRAY_LOAD|TYPE_CAST|IS_LIKE|TYPE_TEST|ADD|SUB|MUL|DIV|EQUAL|NOT_EQUAL|GREATER_THAN|GREATER_EQUAL|LESS_THAN|LESS_EQUAL|AND|OR |
public type IsLike record
Field Name | Data Type | Default Value | Description |
---|---|---|---|
kind | MOVE|CONST_LOAD|NEW_MAP|NEW_INST|MAP_STORE|NEW_ARRAY|NEW_ERROR|ARRAY_STORE|MAP_LOAD|ARRAY_LOAD|TYPE_CAST|IS_LIKE|TYPE_TEST|ADD|SUB|MUL|DIV|EQUAL|NOT_EQUAL|GREATER_THAN|GREATER_EQUAL|LESS_THAN|LESS_EQUAL|AND|OR | ||
lhsOp | bir:VarRef | ||
rhsOp | bir:VarRef | ||
typeValue | int|boolean|any|()|byte|float|string|bir:BUnionType|bir:BTupleType|bir:BInvokableType|bir:BArrayType|bir:BRecordType|bir:BObjectType|bir:BMapType|bir:BErrorType|anydata|none|bir:BFutureType|json|bir:Self? |
public type ModuleID record
Field Name | Data Type | Default Value | Description |
---|---|---|---|
org | string | ||
name | string | ||
modVersion | string | ||
isUnnamed | boolean | false | |
sourceFilename | string |
public type Move record
Field Name | Data Type | Default Value | Description |
---|---|---|---|
kind | MOVE|CONST_LOAD|NEW_MAP|NEW_INST|MAP_STORE|NEW_ARRAY|NEW_ERROR|ARRAY_STORE|MAP_LOAD|ARRAY_LOAD|TYPE_CAST|IS_LIKE|TYPE_TEST|ADD|SUB|MUL|DIV|EQUAL|NOT_EQUAL|GREATER_THAN|GREATER_EQUAL|LESS_THAN|LESS_EQUAL|AND|OR | ||
lhsOp | bir:VarRef | ||
rhsOp | bir:VarRef |
public type Name record
Field Name | Data Type | Default Value | Description |
---|---|---|---|
value | string |
public type NewArray record
Field Name | Data Type | Default Value | Description |
---|---|---|---|
kind | MOVE|CONST_LOAD|NEW_MAP|NEW_INST|MAP_STORE|NEW_ARRAY|NEW_ERROR|ARRAY_STORE|MAP_LOAD|ARRAY_LOAD|TYPE_CAST|IS_LIKE|TYPE_TEST|ADD|SUB|MUL|DIV|EQUAL|NOT_EQUAL|GREATER_THAN|GREATER_EQUAL|LESS_THAN|LESS_EQUAL|AND|OR | ||
lhsOp | bir:VarRef | ||
sizeOp | bir:VarRef | ||
typeValue | int|boolean|any|()|byte|float|string|bir:BUnionType|bir:BTupleType|bir:BInvokableType|bir:BArrayType|bir:BRecordType|bir:BObjectType|bir:BMapType|bir:BErrorType|anydata|none|bir:BFutureType|json|bir:Self? |
public type NewError record
Field Name | Data Type | Default Value | Description |
---|---|---|---|
kind | MOVE|CONST_LOAD|NEW_MAP|NEW_INST|MAP_STORE|NEW_ARRAY|NEW_ERROR|ARRAY_STORE|MAP_LOAD|ARRAY_LOAD|TYPE_CAST|IS_LIKE|TYPE_TEST|ADD|SUB|MUL|DIV|EQUAL|NOT_EQUAL|GREATER_THAN|GREATER_EQUAL|LESS_THAN|LESS_EQUAL|AND|OR | ||
lhsOp | bir:VarRef | ||
reasonOp | bir:VarRef | ||
detailsOp | bir:VarRef |
public type NewInstance record
Field Name | Data Type | Default Value | Description |
---|---|---|---|
kind | MOVE|CONST_LOAD|NEW_MAP|NEW_INST|MAP_STORE|NEW_ARRAY|NEW_ERROR|ARRAY_STORE|MAP_LOAD|ARRAY_LOAD|TYPE_CAST|IS_LIKE|TYPE_TEST|ADD|SUB|MUL|DIV|EQUAL|NOT_EQUAL|GREATER_THAN|GREATER_EQUAL|LESS_THAN|LESS_EQUAL|AND|OR | ||
typeDef | bir:TypeDef | ||
lhsOp | bir:VarRef |
public type NewMap record
Field Name | Data Type | Default Value | Description |
---|---|---|---|
kind | MOVE|CONST_LOAD|NEW_MAP|NEW_INST|MAP_STORE|NEW_ARRAY|NEW_ERROR|ARRAY_STORE|MAP_LOAD|ARRAY_LOAD|TYPE_CAST|IS_LIKE|TYPE_TEST|ADD|SUB|MUL|DIV|EQUAL|NOT_EQUAL|GREATER_THAN|GREATER_EQUAL|LESS_THAN|LESS_EQUAL|AND|OR | ||
lhsOp | bir:VarRef | ||
typeValue | int|boolean|any|()|byte|float|string|bir:BUnionType|bir:BTupleType|bir:BInvokableType|bir:BArrayType|bir:BRecordType|bir:BObjectType|bir:BMapType|bir:BErrorType|anydata|none|bir:BFutureType|json|bir:Self? |
public type Package record
Field Name | Data Type | Default Value | Description |
---|---|---|---|
importModules | bir:ImportModule[] | [] | |
typeDefs | bir:TypeDef?[] | [] | |
globalVars | bir:GlobalVariableDcl?[] | ||
functions | bir:Function?[] | [] | |
name | bir:Name | {} | |
org | bir:Name | {} | |
types | int|boolean|any|()|byte|float|string|bir:BUnionType|bir:BTupleType|bir:BInvokableType|bir:BArrayType|bir:BRecordType|bir:BObjectType|bir:BMapType|bir:BErrorType|anydata|none|bir:BFutureType|json|bir:Self?[] | [] | |
versionValue | bir:Name | {} |
public type Panic record
Field Name | Data Type | Default Value | Description |
---|---|---|---|
kind | GOTO|CALL|BRANCH|RETURN|ASYNC_CALL|PANIC | ||
errorOp | bir:VarRef |
public type Return record
Field Name | Data Type | Default Value | Description |
---|---|---|---|
kind | GOTO|CALL|BRANCH|RETURN|ASYNC_CALL|PANIC |
public type Self record
Field Name | Data Type | Default Value | Description |
---|---|---|---|
bType | int|boolean|any|()|byte|float|string|bir:BUnionType|bir:BTupleType|bir:BInvokableType|bir:BArrayType|bir:BRecordType|bir:BObjectType|bir:BMapType|bir:BErrorType|anydata|none|bir:BFutureType|json|bir:Self? |
public type Terminator record
Field Name | Data Type | Default Value | Description |
---|---|---|---|
kind | GOTO|CALL|BRANCH|RETURN|ASYNC_CALL|PANIC |
public type TypeCast record
Field Name | Data Type | Default Value | Description |
---|---|---|---|
kind | MOVE|CONST_LOAD|NEW_MAP|NEW_INST|MAP_STORE|NEW_ARRAY|NEW_ERROR|ARRAY_STORE|MAP_LOAD|ARRAY_LOAD|TYPE_CAST|IS_LIKE|TYPE_TEST|ADD|SUB|MUL|DIV|EQUAL|NOT_EQUAL|GREATER_THAN|GREATER_EQUAL|LESS_THAN|LESS_EQUAL|AND|OR | ||
lhsOp | bir:VarRef | ||
rhsOp | bir:VarRef |
public type TypeDef record
Field Name | Data Type | Default Value | Description |
---|---|---|---|
name | bir:Name | {} | |
visibility | PACKAGE_PRIVATE|PRIVATE|PUBLIC | PACKAGE_PRIVATE | |
typeValue | int|boolean|any|()|byte|float|string|bir:BUnionType|bir:BTupleType|bir:BInvokableType|bir:BArrayType|bir:BRecordType|bir:BObjectType|bir:BMapType|bir:BErrorType|anydata|none|bir:BFutureType|json|bir:Self? | () | |
attachedFuncs | bir:Function?[]? | () |
public type TypeTest record
Field Name | Data Type | Default Value | Description |
---|---|---|---|
kind | MOVE|CONST_LOAD|NEW_MAP|NEW_INST|MAP_STORE|NEW_ARRAY|NEW_ERROR|ARRAY_STORE|MAP_LOAD|ARRAY_LOAD|TYPE_CAST|IS_LIKE|TYPE_TEST|ADD|SUB|MUL|DIV|EQUAL|NOT_EQUAL|GREATER_THAN|GREATER_EQUAL|LESS_THAN|LESS_EQUAL|AND|OR | ||
lhsOp | bir:VarRef | ||
rhsOp | bir:VarRef | ||
typeValue | int|boolean|any|()|byte|float|string|bir:BUnionType|bir:BTupleType|bir:BInvokableType|bir:BArrayType|bir:BRecordType|bir:BObjectType|bir:BMapType|bir:BErrorType|anydata|none|bir:BFutureType|json|bir:Self? |
public type VarRef record
Field Name | Data Type | Default Value | Description |
---|---|---|---|
typeValue | int|boolean|any|()|byte|float|string|bir:BUnionType|bir:BTupleType|bir:BInvokableType|bir:BArrayType|bir:BRecordType|bir:BObjectType|bir:BMapType|bir:BErrorType|anydata|none|bir:BFutureType|json|bir:Self? | ||
variableDcl | bir:VariableDcl |
public type VariableDcl record
Field Name | Data Type | Default Value | Description |
---|---|---|---|
kind | LOCAL|TEMP|RETURN|ARG|GLOBAL | LOCAL | |
varScope | GLOBAL_SCOPE|FUNCTION_SCOPE | VAR_SCOPE_FUNCTION | |
name | bir:Name | {} | |
typeValue | int|boolean|any|()|byte|float|string|bir:BUnionType|bir:BTupleType|bir:BInvokableType|bir:BArrayType|bir:BRecordType|bir:BObjectType|bir:BMapType|bir:BErrorType|anydata|none|bir:BFutureType|json|bir:Self? | () |
public function parseVarKind(bir:BirChannelReader reader) returns (VarKind)
Parameter Name | Data Type | Default Value | Description |
---|---|---|---|
reader | bir:BirChannelReader |
Return Type | Description | ||
---|---|---|---|
VarKind |
public function parseVarScope(bir:BirChannelReader reader) returns (VarScope)
Parameter Name | Data Type | Default Value | Description |
---|---|---|---|
reader | bir:BirChannelReader |
Return Type | Description | ||
---|---|---|---|
VarScope |
public function parseVisibility(bir:BirChannelReader reader) returns (Visibility)
Parameter Name | Data Type | Default Value | Description |
---|---|---|---|
reader | bir:BirChannelReader |
Return Type | Description | ||
---|---|---|---|
Visibility |
public function serialize(int|boolean|any|()|byte|float|string|bir:BUnionType|bir:BTupleType|bir:BInvokableType|bir:BArrayType|bir:BRecordType|bir:BObjectType|bir:BMapType|bir:BErrorType|anydata|none|bir:BFutureType|json|bir:Self? bType) returns (string)
Parameter Name | Data Type | Default Value | Description |
---|---|---|---|
bType | int|boolean|any|()|byte|float|string|bir:BUnionType|bir:BTupleType|bir:BInvokableType|bir:BArrayType|bir:BRecordType|bir:BObjectType|bir:BMapType|bir:BErrorType|anydata|none|bir:BFutureType|json|bir:Self? |
Return Type | Description | ||
---|---|---|---|
string |
public type BIRContext object
TODO Docs
-
<BIRContext> lookupBIRModule(bir:ModuleID modId) returns (Package)
Parameter Name Data Type Default Value Description modId bir:ModuleID Return Type Description Package
public type BirChannelReader object
-
<BirChannelReader> __init(bir:ChannelReader reader, bir:ConstPool cp)
Parameter Name Data Type Default Value Description reader bir:ChannelReader cp bir:ConstPool -
<BirChannelReader> readBType() returns (BType)
Return Type Description BType -
<BirChannelReader> readStringCpRef() returns (string)
Return Type Description string -
<BirChannelReader> readIntCpRef() returns (int)
Return Type Description int -
<BirChannelReader> readFloatCpRef() returns (float)
Return Type Description float -
<BirChannelReader> readModuleIDCpRef() returns (ModuleID)
Return Type Description ModuleID -
<BirChannelReader> readBoolean() returns (boolean)
Return Type Description boolean -
<BirChannelReader> readInt8() returns (int)
Return Type Description int -
<BirChannelReader> readInt32() returns (int)
Return Type Description int -
<BirChannelReader> readInt64() returns (int)
Return Type Description int -
<BirChannelReader> readString() returns (string)
Return Type Description string -
<BirChannelReader> readByteArray(int len) returns (byte[])
Parameter Name Data Type Default Value Description len int Return Type Description byte[]
public type BirEmitter object
-
<BirEmitter> __init(bir:Package pkg)
Parameter Name Data Type Default Value Description pkg bir:Package -
<BirEmitter> emitPackage()
public type ChannelReader object
-
<ChannelReader> __init(io:ReadableByteChannel byteChannel)
Parameter Name Data Type Default Value Description byteChannel io:ReadableByteChannel -
<ChannelReader> readBoolean() returns (boolean)
Return Type Description boolean -
<ChannelReader> readInt8() returns (int)
Return Type Description int -
<ChannelReader> readInt32() returns (int)
Return Type Description int -
<ChannelReader> readInt64() returns (int)
Return Type Description int -
<ChannelReader> readFloat64() returns (float)
Return Type Description float -
<ChannelReader> readString() returns (string)
Return Type Description string -
<ChannelReader> readByteArray(int len) returns (byte[])
Parameter Name Data Type Default Value Description len int Return Type Description byte[]
public type ConstPoolParser object
-
<ConstPoolParser> __init(bir:ChannelReader reader)
Parameter Name Data Type Default Value Description reader bir:ChannelReader -
<ConstPoolParser> parse() returns (ConstPool)
Return Type Description ConstPool -
<ConstPoolParser> parseConstPoolEntry()
public type FuncBodyParser object
-
<FuncBodyParser> __init(bir:BirChannelReader reader, bir:TypeParser typeParser, map<bir:VariableDcl> globalVarMap, map<bir:VariableDcl> localVarMap, bir:TypeDef?[] typeDefs)
Parameter Name Data Type Default Value Description reader bir:BirChannelReader typeParser bir:TypeParser globalVarMap map localVarMap map typeDefs bir:TypeDef?[] -
<FuncBodyParser> parseBB() returns (BasicBlock)
Return Type Description BasicBlock -
<FuncBodyParser> parseEE() returns (ErrorEntry)
Return Type Description ErrorEntry -
<FuncBodyParser> parseInstruction() returns (Instruction)
Return Type Description Instruction -
<FuncBodyParser> parseTerminator() returns (Terminator)
Return Type Description Terminator -
<FuncBodyParser> parseVarRef() returns (VarRef)
Return Type Description VarRef -
<FuncBodyParser> parseBBRef() returns (BasicBlock)
Return Type Description BasicBlock -
<FuncBodyParser> parseBinaryOpInstruction(int kindTag) returns (BinaryOp)
Parameter Name Data Type Default Value Description kindTag int Return Type Description BinaryOp
public type PackageParser object
-
<PackageParser> __init(bir:BirChannelReader reader, bir:TypeParser typeParser)
Parameter Name Data Type Default Value Description reader bir:BirChannelReader typeParser bir:TypeParser -
<PackageParser> parseVariableDcl() returns (VariableDcl)
Return Type Description VariableDcl -
<PackageParser> parseFunction(bir:TypeDef?[] typeDefs) returns (Function)
Parameter Name Data Type Default Value Description typeDefs bir:TypeDef?[] Return Type Description Function -
<PackageParser> parsePackage() returns (Package)
Return Type Description Package -
<PackageParser> parseSig(string sig) returns (BInvokableType)
Parameter Name Data Type Default Value Description sig string Return Type Description BInvokableType
public type TypeParser object
Field Name | Data Type | Default Value | Description |
---|---|---|---|
TYPE_TAG_INT | int | 1 | |
TYPE_TAG_BYTE | int | TYPE_TAG_INT + 1 | |
TYPE_TAG_FLOAT | int | TYPE_TAG_BYTE + 1 | |
TYPE_TAG_DECIMAL | int | TYPE_TAG_FLOAT + 1 | |
TYPE_TAG_STRING | int | TYPE_TAG_DECIMAL + 1 | |
TYPE_TAG_BOOLEAN | int | TYPE_TAG_STRING + 1 | |
TYPE_TAG_JSON | int | TYPE_TAG_BOOLEAN + 1 | |
TYPE_TAG_XML | int | TYPE_TAG_JSON + 1 | |
TYPE_TAG_TABLE | int | TYPE_TAG_XML + 1 | |
TYPE_TAG_NIL | int | TYPE_TAG_TABLE + 1 | |
TYPE_TAG_ANYDATA | int | TYPE_TAG_NIL + 1 | |
TYPE_TAG_RECORD | int | TYPE_TAG_ANYDATA + 1 | |
TYPE_TAG_TYPEDESC | int | TYPE_TAG_RECORD + 1 | |
TYPE_TAG_STREAM | int | TYPE_TAG_TYPEDESC + 1 | |
TYPE_TAG_MAP | int | TYPE_TAG_STREAM + 1 | |
TYPE_TAG_INVOKABLE | int | TYPE_TAG_MAP + 1 | |
TYPE_TAG_ANY | int | TYPE_TAG_INVOKABLE + 1 | |
TYPE_TAG_ENDPOINT | int | TYPE_TAG_ANY + 1 | |
TYPE_TAG_ARRAY | int | TYPE_TAG_ENDPOINT + 1 | |
TYPE_TAG_UNION | int | TYPE_TAG_ARRAY + 1 | |
TYPE_TAG_PACKAGE | int | TYPE_TAG_UNION + 1 | |
TYPE_TAG_NONE | int | TYPE_TAG_PACKAGE + 1 | |
TYPE_TAG_VOID | int | TYPE_TAG_NONE + 1 | |
TYPE_TAG_XMLNS | int | TYPE_TAG_VOID + 1 | |
TYPE_TAG_ANNOTATION | int | TYPE_TAG_XMLNS + 1 | |
TYPE_TAG_XML_ATTRIBUTES | int | TYPE_TAG_ANNOTATION + 1 | |
TYPE_TAG_SEMANTIC_ERROR | int | TYPE_TAG_XML_ATTRIBUTES + 1 | |
TYPE_TAG_ERROR | int | TYPE_TAG_SEMANTIC_ERROR + 1 | |
TYPE_TAG_ITERATOR | int | TYPE_TAG_ERROR + 1 | |
TYPE_TAG_TUPLE | int | TYPE_TAG_ITERATOR + 1 | |
TYPE_TAG_FUTURE | int | TYPE_TAG_TUPLE + 1 | |
TYPE_TAG_INTERMEDIATE_COLLECTION | int | TYPE_TAG_FUTURE + 1 | |
TYPE_TAG_FINITE | int | TYPE_TAG_INTERMEDIATE_COLLECTION + 1 | |
TYPE_TAG_OBJECT | int | TYPE_TAG_FINITE + 1 | |
TYPE_TAG_BYTE_ARRAY | int | TYPE_TAG_OBJECT + 1 | |
TYPE_TAG_FUNCTION_POINTER | int | TYPE_TAG_BYTE_ARRAY + 1 | |
TYPE_TAG_CHANNEL | int | TYPE_TAG_BYTE_ARRAY + 1 | |
TYPE_TAG_SERVICE | int | TYPE_TAG_OBJECT | |
TYPE_TAG_SELF | int | 50 |
-
<TypeParser> __init(bir:BirChannelReader reader)
Parameter Name Data Type Default Value Description reader bir:BirChannelReader -
<TypeParser> parseType() returns (BType)
Return Type Description BType