Documentation
¶
Index ¶
- Variables
- type BasicBlock
- func (*BasicBlock) Descriptor() ([]byte, []int)deprecated
- func (x *BasicBlock) GetComment() string
- func (x *BasicBlock) GetIndex() int32
- func (x *BasicBlock) GetInstrs() []*Instruction
- func (x *BasicBlock) GetPreds() []int32
- func (x *BasicBlock) GetSuccs() []int32
- func (*BasicBlock) ProtoMessage()
- func (x *BasicBlock) ProtoReflect() protoreflect.Message
- func (x *BasicBlock) Reset()
- func (x *BasicBlock) String() string
- type BasicTypeKind
- func (BasicTypeKind) Descriptor() protoreflect.EnumDescriptor
- func (x BasicTypeKind) Enum() *BasicTypeKind
- func (BasicTypeKind) EnumDescriptor() ([]byte, []int)deprecated
- func (x BasicTypeKind) Number() protoreflect.EnumNumber
- func (x BasicTypeKind) String() string
- func (BasicTypeKind) Type() protoreflect.EnumType
- type BinOpKind
- type CallCommon
- func (*CallCommon) Descriptor() ([]byte, []int)deprecated
- func (x *CallCommon) GetArgs() []*Value
- func (x *CallCommon) GetCallee() string
- func (x *CallCommon) GetIsInvoke() bool
- func (x *CallCommon) GetMethodName() string
- func (x *CallCommon) GetUntypedDispatch() bool
- func (x *CallCommon) GetValue() *Value
- func (*CallCommon) ProtoMessage()
- func (x *CallCommon) ProtoReflect() protoreflect.Message
- func (x *CallCommon) Reset()
- func (x *CallCommon) String() string
- type Case
- type Constant
- func (*Constant) Descriptor() ([]byte, []int)deprecated
- func (x *Constant) GetBoolVal() bool
- func (x *Constant) GetFloatVal() float64
- func (x *Constant) GetIntVal() int64
- func (x *Constant) GetIsNil() bool
- func (x *Constant) GetStringVal() string
- func (x *Constant) GetType() *Type
- func (x *Constant) GetValue() isConstant_Value
- func (*Constant) ProtoMessage()
- func (x *Constant) ProtoReflect() protoreflect.Message
- func (x *Constant) Reset()
- func (x *Constant) String() string
- type Constant_BoolVal
- type Constant_FloatVal
- type Constant_IntVal
- type Constant_StringVal
- type Field
- func (*Field) Descriptor() ([]byte, []int)deprecated
- func (x *Field) GetEmbedded() bool
- func (x *Field) GetName() string
- func (x *Field) GetTag() string
- func (x *Field) GetType() *Type
- func (*Field) ProtoMessage()
- func (x *Field) ProtoReflect() protoreflect.Message
- func (x *Field) Reset()
- func (x *Field) String() string
- type Function
- func (*Function) Descriptor() ([]byte, []int)deprecated
- func (x *Function) GetBlocks() []*BasicBlock
- func (x *Function) GetCanonicalName() string
- func (x *Function) GetFreeVars() []*Value
- func (x *Function) GetLocals() []*Value
- func (x *Function) GetMethodName() string
- func (x *Function) GetName() string
- func (x *Function) GetObjectName() string
- func (x *Function) GetPackageName() string
- func (x *Function) GetParams() []*Value
- func (x *Function) GetParent() *Type
- func (x *Function) GetPos() *Position
- func (x *Function) GetSignature() *Signature
- func (x *Function) GetSynthetic() bool
- func (*Function) ProtoMessage()
- func (x *Function) ProtoReflect() protoreflect.Message
- func (x *Function) Reset()
- func (x *Function) String() string
- type Global
- func (*Global) Descriptor() ([]byte, []int)deprecated
- func (x *Global) GetInitValue() *Constant
- func (x *Global) GetName() string
- func (x *Global) GetPos() *Position
- func (x *Global) GetType() *Type
- func (*Global) ProtoMessage()
- func (x *Global) ProtoReflect() protoreflect.Message
- func (x *Global) Reset()
- func (x *Global) String() string
- type Instruction
- func (*Instruction) Descriptor() ([]byte, []int)deprecated
- func (x *Instruction) GetBinOp() BinOpKind
- func (x *Instruction) GetBlocks() []string
- func (x *Instruction) GetCall() *CallCommon
- func (x *Instruction) GetCases() []*Case
- func (x *Instruction) GetComment() string
- func (x *Instruction) GetFalseBlock() string
- func (x *Instruction) GetFieldIndex() int32
- func (x *Instruction) GetHeap() bool
- func (x *Instruction) GetIntrinsic() string
- func (x *Instruction) GetJumpBlock() string
- func (x *Instruction) GetName() string
- func (x *Instruction) GetOp() OpCode
- func (x *Instruction) GetOperands() []*Value
- func (x *Instruction) GetPos() *Position
- func (x *Instruction) GetTrueBlock() string
- func (x *Instruction) GetType() *Type
- func (x *Instruction) GetUnOp() UnOpKind
- func (*Instruction) ProtoMessage()
- func (x *Instruction) ProtoReflect() protoreflect.Message
- func (x *Instruction) Reset()
- func (x *Instruction) String() string
- type Method
- type Module
- func (*Module) Descriptor() ([]byte, []int)deprecated
- func (x *Module) GetFunctions() []*Function
- func (x *Module) GetGlobals() []*Global
- func (x *Module) GetImports() []string
- func (x *Module) GetLanguage() string
- func (x *Module) GetName() string
- func (x *Module) GetTypes() []*Type
- func (*Module) ProtoMessage()
- func (x *Module) ProtoReflect() protoreflect.Message
- func (x *Module) Reset()
- func (x *Module) String() string
- type OpCode
- type Position
- func (*Position) Descriptor() ([]byte, []int)deprecated
- func (x *Position) GetColumn() int32
- func (x *Position) GetFilename() string
- func (x *Position) GetLine() int32
- func (*Position) ProtoMessage()
- func (x *Position) ProtoReflect() protoreflect.Message
- func (x *Position) Reset()
- func (x *Position) String() string
- type Program
- func (*Program) Descriptor() ([]byte, []int)deprecated
- func (x *Program) GetMainPkg() *Function
- func (x *Program) GetMode() string
- func (x *Program) GetModules() []*Module
- func (*Program) ProtoMessage()
- func (x *Program) ProtoReflect() protoreflect.Message
- func (x *Program) Reset()
- func (x *Program) String() string
- type Signature
- func (*Signature) Descriptor() ([]byte, []int)deprecated
- func (x *Signature) GetParams() []*Type
- func (x *Signature) GetRecv() *Type
- func (x *Signature) GetResults() []*Type
- func (x *Signature) GetVariadic() bool
- func (*Signature) ProtoMessage()
- func (x *Signature) ProtoReflect() protoreflect.Message
- func (x *Signature) Reset()
- func (x *Signature) String() string
- type Type
- func (*Type) Descriptor() ([]byte, []int)deprecated
- func (x *Type) GetArrayLen() int64
- func (x *Type) GetBasicKind() BasicTypeKind
- func (x *Type) GetElemType() *Type
- func (x *Type) GetFields() []*Field
- func (x *Type) GetKeyType() *Type
- func (x *Type) GetKind() TypeKind
- func (x *Type) GetMethodSet() []*Method
- func (x *Type) GetMethods() []*Method
- func (x *Type) GetName() string
- func (x *Type) GetPos() *Position
- func (x *Type) GetSignature() *Signature
- func (x *Type) GetUnderlyingType() *Type
- func (*Type) ProtoMessage()
- func (x *Type) ProtoReflect() protoreflect.Message
- func (x *Type) Reset()
- func (x *Type) String() string
- type TypeKind
- type UnOpKind
- type Value
- func (*Value) Descriptor() ([]byte, []int)deprecated
- func (x *Value) GetConstant() *Constant
- func (x *Value) GetFuncName() string
- func (x *Value) GetGlobalName() string
- func (x *Value) GetKind() isValue_Kind
- func (x *Value) GetRegName() string
- func (*Value) ProtoMessage()
- func (x *Value) ProtoReflect() protoreflect.Message
- func (x *Value) Reset()
- func (x *Value) String() string
- type Value_Constant
- type Value_FuncName
- type Value_GlobalName
- type Value_RegName
Constants ¶
This section is empty.
Variables ¶
var ( TypeKind_name = map[int32]string{ 0: "TYPE_KIND_UNSPECIFIED", 1: "TYPE_KIND_BASIC", 2: "TYPE_KIND_POINTER", 3: "TYPE_KIND_STRUCT", 4: "TYPE_KIND_ARRAY", 5: "TYPE_KIND_SLICE", 6: "TYPE_KIND_MAP", 7: "TYPE_KIND_INTERFACE", 8: "TYPE_KIND_FUNC", 9: "TYPE_KIND_CHAN", 10: "TYPE_KIND_TUPLE", 11: "TYPE_KIND_NAMED", } TypeKind_value = map[string]int32{ "TYPE_KIND_UNSPECIFIED": 0, "TYPE_KIND_BASIC": 1, "TYPE_KIND_POINTER": 2, "TYPE_KIND_STRUCT": 3, "TYPE_KIND_ARRAY": 4, "TYPE_KIND_SLICE": 5, "TYPE_KIND_MAP": 6, "TYPE_KIND_INTERFACE": 7, "TYPE_KIND_FUNC": 8, "TYPE_KIND_CHAN": 9, "TYPE_KIND_TUPLE": 10, "TYPE_KIND_NAMED": 11, } )
Enum value maps for TypeKind.
var ( BasicTypeKind_name = map[int32]string{ 0: "BASIC_TYPE_KIND_UNSPECIFIED", 1: "BASIC_TYPE_KIND_BOOL", 2: "BASIC_TYPE_KIND_INT", 3: "BASIC_TYPE_KIND_INT8", 4: "BASIC_TYPE_KIND_INT16", 5: "BASIC_TYPE_KIND_INT32", 6: "BASIC_TYPE_KIND_INT64", 7: "BASIC_TYPE_KIND_UINT", 8: "BASIC_TYPE_KIND_UINT8", 9: "BASIC_TYPE_KIND_UINT16", 10: "BASIC_TYPE_KIND_UINT32", 11: "BASIC_TYPE_KIND_UINT64", 12: "BASIC_TYPE_KIND_UINTPTR", 13: "BASIC_TYPE_KIND_FLOAT32", 14: "BASIC_TYPE_KIND_FLOAT64", 15: "BASIC_TYPE_KIND_COMPLEX64", 16: "BASIC_TYPE_KIND_COMPLEX128", 17: "BASIC_TYPE_KIND_STRING", 18: "BASIC_TYPE_KIND_UNSAFE_POINTER", 19: "BASIC_TYPE_KIND_UNTYPED_BOOL", 20: "BASIC_TYPE_KIND_UNTYPED_INT", 21: "BASIC_TYPE_KIND_UNTYPED_RUNE", 22: "BASIC_TYPE_KIND_UNTYPED_FLOAT", 23: "BASIC_TYPE_KIND_UNTYPED_COMPLEX", 24: "BASIC_TYPE_KIND_UNTYPED_STRING", 25: "BASIC_TYPE_KIND_UNTYPED_NIL", } BasicTypeKind_value = map[string]int32{ "BASIC_TYPE_KIND_UNSPECIFIED": 0, "BASIC_TYPE_KIND_BOOL": 1, "BASIC_TYPE_KIND_INT": 2, "BASIC_TYPE_KIND_INT8": 3, "BASIC_TYPE_KIND_INT16": 4, "BASIC_TYPE_KIND_INT32": 5, "BASIC_TYPE_KIND_INT64": 6, "BASIC_TYPE_KIND_UINT": 7, "BASIC_TYPE_KIND_UINT8": 8, "BASIC_TYPE_KIND_UINT16": 9, "BASIC_TYPE_KIND_UINT32": 10, "BASIC_TYPE_KIND_UINT64": 11, "BASIC_TYPE_KIND_UINTPTR": 12, "BASIC_TYPE_KIND_FLOAT32": 13, "BASIC_TYPE_KIND_FLOAT64": 14, "BASIC_TYPE_KIND_COMPLEX64": 15, "BASIC_TYPE_KIND_COMPLEX128": 16, "BASIC_TYPE_KIND_STRING": 17, "BASIC_TYPE_KIND_UNSAFE_POINTER": 18, "BASIC_TYPE_KIND_UNTYPED_BOOL": 19, "BASIC_TYPE_KIND_UNTYPED_INT": 20, "BASIC_TYPE_KIND_UNTYPED_RUNE": 21, "BASIC_TYPE_KIND_UNTYPED_FLOAT": 22, "BASIC_TYPE_KIND_UNTYPED_COMPLEX": 23, "BASIC_TYPE_KIND_UNTYPED_STRING": 24, "BASIC_TYPE_KIND_UNTYPED_NIL": 25, } )
Enum value maps for BasicTypeKind.
var ( OpCode_name = map[int32]string{ 0: "OP_CODE_UNSPECIFIED", 1: "OP_CODE_RET", 2: "OP_CODE_JUMP", 3: "OP_CODE_IF", 4: "OP_CODE_SWITCH", 5: "OP_CODE_PANIC", 6: "OP_CODE_UNREACHABLE", 10: "OP_CODE_ALLOC", 11: "OP_CODE_LOAD", 12: "OP_CODE_STORE", 13: "OP_CODE_FIELD", 14: "OP_CODE_FIELD_ADDR", 15: "OP_CODE_INDEX", 16: "OP_CODE_INDEX_ADDR", 20: "OP_CODE_BIN_OP", 21: "OP_CODE_UN_OP", 22: "OP_CODE_PHI", 30: "OP_CODE_CALL", 31: "OP_CODE_INVOKE", 40: "OP_CODE_CONVERT", 41: "OP_CODE_TYPE_ASSERT", 42: "OP_CODE_MAKE_INTERFACE", 43: "OP_CODE_EXTRACT", 50: "OP_CODE_INTRINSIC", } OpCode_value = map[string]int32{ "OP_CODE_UNSPECIFIED": 0, "OP_CODE_RET": 1, "OP_CODE_JUMP": 2, "OP_CODE_IF": 3, "OP_CODE_SWITCH": 4, "OP_CODE_PANIC": 5, "OP_CODE_UNREACHABLE": 6, "OP_CODE_ALLOC": 10, "OP_CODE_LOAD": 11, "OP_CODE_STORE": 12, "OP_CODE_FIELD": 13, "OP_CODE_FIELD_ADDR": 14, "OP_CODE_INDEX": 15, "OP_CODE_INDEX_ADDR": 16, "OP_CODE_BIN_OP": 20, "OP_CODE_UN_OP": 21, "OP_CODE_PHI": 22, "OP_CODE_CALL": 30, "OP_CODE_INVOKE": 31, "OP_CODE_CONVERT": 40, "OP_CODE_TYPE_ASSERT": 41, "OP_CODE_MAKE_INTERFACE": 42, "OP_CODE_EXTRACT": 43, "OP_CODE_INTRINSIC": 50, } )
Enum value maps for OpCode.
var ( BinOpKind_name = map[int32]string{ 0: "BIN_OP_UNSPECIFIED", 1: "BIN_OP_ADD", 2: "BIN_OP_SUB", 3: "BIN_OP_MUL", 4: "BIN_OP_QUO", 5: "BIN_OP_REM", 6: "BIN_OP_AND", 7: "BIN_OP_OR", 8: "BIN_OP_XOR", 9: "BIN_OP_SHL", 10: "BIN_OP_SHR", 11: "BIN_OP_AND_NOT", 12: "BIN_OP_EQL", 13: "BIN_OP_NEQ", 14: "BIN_OP_LSS", 15: "BIN_OP_LEQ", 16: "BIN_OP_GTR", 17: "BIN_OP_GEQ", } BinOpKind_value = map[string]int32{ "BIN_OP_UNSPECIFIED": 0, "BIN_OP_ADD": 1, "BIN_OP_SUB": 2, "BIN_OP_MUL": 3, "BIN_OP_QUO": 4, "BIN_OP_REM": 5, "BIN_OP_AND": 6, "BIN_OP_OR": 7, "BIN_OP_XOR": 8, "BIN_OP_SHL": 9, "BIN_OP_SHR": 10, "BIN_OP_AND_NOT": 11, "BIN_OP_EQL": 12, "BIN_OP_NEQ": 13, "BIN_OP_LSS": 14, "BIN_OP_LEQ": 15, "BIN_OP_GTR": 16, "BIN_OP_GEQ": 17, } )
Enum value maps for BinOpKind.
var ( UnOpKind_name = map[int32]string{ 0: "UN_OP_UNSPECIFIED", 1: "UN_OP_NOT", 2: "UN_OP_BIT_NOT", 3: "UN_OP_NEG", 4: "UN_OP_POS", 5: "UN_OP_ADDR", 6: "UN_OP_DEREF", 7: "UN_OP_ARROW", } UnOpKind_value = map[string]int32{ "UN_OP_UNSPECIFIED": 0, "UN_OP_NOT": 1, "UN_OP_BIT_NOT": 2, "UN_OP_NEG": 3, "UN_OP_POS": 4, "UN_OP_ADDR": 5, "UN_OP_DEREF": 6, "UN_OP_ARROW": 7, } )
Enum value maps for UnOpKind.
var File_proto_common_proto protoreflect.FileDescriptor
var File_proto_function_proto protoreflect.FileDescriptor
var File_proto_instruction_proto protoreflect.FileDescriptor
var File_proto_module_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type BasicBlock ¶
type BasicBlock struct {
Index int32 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"`
Comment string `protobuf:"bytes,2,opt,name=comment,proto3" json:"comment,omitempty"` // e.g. "entry", "cond.true"
Instrs []*Instruction `protobuf:"bytes,3,rep,name=instrs,proto3" json:"instrs,omitempty"`
Preds []int32 `protobuf:"varint,4,rep,packed,name=preds,proto3" json:"preds,omitempty"` // Predecessor block indices
Succs []int32 `protobuf:"varint,5,rep,packed,name=succs,proto3" json:"succs,omitempty"` // Successor block indices
// contains filtered or unexported fields
}
BasicBlock represents a sequence of instructions with single entry and exit.
func (*BasicBlock) Descriptor
deprecated
func (*BasicBlock) Descriptor() ([]byte, []int)
Deprecated: Use BasicBlock.ProtoReflect.Descriptor instead.
func (*BasicBlock) GetComment ¶
func (x *BasicBlock) GetComment() string
func (*BasicBlock) GetIndex ¶
func (x *BasicBlock) GetIndex() int32
func (*BasicBlock) GetInstrs ¶
func (x *BasicBlock) GetInstrs() []*Instruction
func (*BasicBlock) GetPreds ¶
func (x *BasicBlock) GetPreds() []int32
func (*BasicBlock) GetSuccs ¶
func (x *BasicBlock) GetSuccs() []int32
func (*BasicBlock) ProtoMessage ¶
func (*BasicBlock) ProtoMessage()
func (*BasicBlock) ProtoReflect ¶
func (x *BasicBlock) ProtoReflect() protoreflect.Message
func (*BasicBlock) Reset ¶
func (x *BasicBlock) Reset()
func (*BasicBlock) String ¶
func (x *BasicBlock) String() string
type BasicTypeKind ¶
type BasicTypeKind int32
BasicTypeKind refines TYPE_KIND_BASIC.
const ( BasicTypeKind_BASIC_TYPE_KIND_UNSPECIFIED BasicTypeKind = 0 BasicTypeKind_BASIC_TYPE_KIND_BOOL BasicTypeKind = 1 BasicTypeKind_BASIC_TYPE_KIND_INT BasicTypeKind = 2 BasicTypeKind_BASIC_TYPE_KIND_INT8 BasicTypeKind = 3 BasicTypeKind_BASIC_TYPE_KIND_INT16 BasicTypeKind = 4 BasicTypeKind_BASIC_TYPE_KIND_INT32 BasicTypeKind = 5 BasicTypeKind_BASIC_TYPE_KIND_INT64 BasicTypeKind = 6 BasicTypeKind_BASIC_TYPE_KIND_UINT BasicTypeKind = 7 BasicTypeKind_BASIC_TYPE_KIND_UINT8 BasicTypeKind = 8 BasicTypeKind_BASIC_TYPE_KIND_UINT16 BasicTypeKind = 9 BasicTypeKind_BASIC_TYPE_KIND_UINT32 BasicTypeKind = 10 BasicTypeKind_BASIC_TYPE_KIND_UINT64 BasicTypeKind = 11 BasicTypeKind_BASIC_TYPE_KIND_UINTPTR BasicTypeKind = 12 BasicTypeKind_BASIC_TYPE_KIND_FLOAT32 BasicTypeKind = 13 BasicTypeKind_BASIC_TYPE_KIND_FLOAT64 BasicTypeKind = 14 BasicTypeKind_BASIC_TYPE_KIND_COMPLEX64 BasicTypeKind = 15 BasicTypeKind_BASIC_TYPE_KIND_COMPLEX128 BasicTypeKind = 16 BasicTypeKind_BASIC_TYPE_KIND_STRING BasicTypeKind = 17 BasicTypeKind_BASIC_TYPE_KIND_UNSAFE_POINTER BasicTypeKind = 18 BasicTypeKind_BASIC_TYPE_KIND_UNTYPED_BOOL BasicTypeKind = 19 BasicTypeKind_BASIC_TYPE_KIND_UNTYPED_INT BasicTypeKind = 20 BasicTypeKind_BASIC_TYPE_KIND_UNTYPED_RUNE BasicTypeKind = 21 BasicTypeKind_BASIC_TYPE_KIND_UNTYPED_FLOAT BasicTypeKind = 22 BasicTypeKind_BASIC_TYPE_KIND_UNTYPED_COMPLEX BasicTypeKind = 23 BasicTypeKind_BASIC_TYPE_KIND_UNTYPED_STRING BasicTypeKind = 24 BasicTypeKind_BASIC_TYPE_KIND_UNTYPED_NIL BasicTypeKind = 25 )
func (BasicTypeKind) Descriptor ¶
func (BasicTypeKind) Descriptor() protoreflect.EnumDescriptor
func (BasicTypeKind) Enum ¶
func (x BasicTypeKind) Enum() *BasicTypeKind
func (BasicTypeKind) EnumDescriptor
deprecated
func (BasicTypeKind) EnumDescriptor() ([]byte, []int)
Deprecated: Use BasicTypeKind.Descriptor instead.
func (BasicTypeKind) Number ¶
func (x BasicTypeKind) Number() protoreflect.EnumNumber
func (BasicTypeKind) String ¶
func (x BasicTypeKind) String() string
func (BasicTypeKind) Type ¶
func (BasicTypeKind) Type() protoreflect.EnumType
type BinOpKind ¶
type BinOpKind int32
BinOpKind defines binary operators.
const ( BinOpKind_BIN_OP_UNSPECIFIED BinOpKind = 0 BinOpKind_BIN_OP_ADD BinOpKind = 1 BinOpKind_BIN_OP_SUB BinOpKind = 2 BinOpKind_BIN_OP_MUL BinOpKind = 3 BinOpKind_BIN_OP_QUO BinOpKind = 4 BinOpKind_BIN_OP_REM BinOpKind = 5 BinOpKind_BIN_OP_AND BinOpKind = 6 BinOpKind_BIN_OP_OR BinOpKind = 7 BinOpKind_BIN_OP_XOR BinOpKind = 8 BinOpKind_BIN_OP_SHL BinOpKind = 9 BinOpKind_BIN_OP_SHR BinOpKind = 10 BinOpKind_BIN_OP_AND_NOT BinOpKind = 11 BinOpKind_BIN_OP_EQL BinOpKind = 12 BinOpKind_BIN_OP_NEQ BinOpKind = 13 BinOpKind_BIN_OP_LSS BinOpKind = 14 BinOpKind_BIN_OP_LEQ BinOpKind = 15 BinOpKind_BIN_OP_GTR BinOpKind = 16 BinOpKind_BIN_OP_GEQ BinOpKind = 17 )
func (BinOpKind) Descriptor ¶
func (BinOpKind) Descriptor() protoreflect.EnumDescriptor
func (BinOpKind) EnumDescriptor
deprecated
func (BinOpKind) Number ¶
func (x BinOpKind) Number() protoreflect.EnumNumber
func (BinOpKind) Type ¶
func (BinOpKind) Type() protoreflect.EnumType
type CallCommon ¶
type CallCommon struct {
Value *Value `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` // Function to call (func_name for static, receiver reg for invoke)
Args []*Value `protobuf:"bytes,2,rep,name=args,proto3" json:"args,omitempty"`
IsInvoke bool `protobuf:"varint,3,opt,name=is_invoke,json=isInvoke,proto3" json:"is_invoke,omitempty"` // True if dynamic dispatch (interface method)
MethodName string `protobuf:"bytes,4,opt,name=method_name,json=methodName,proto3" json:"method_name,omitempty"` // Only for is_invoke=true
Callee string `protobuf:"bytes,5,opt,name=callee,proto3" json:"callee,omitempty"` // Resolved canonical callee name when statically known
// (e.g. "go:net/http.HandleFunc", "builtin.append"); empty if fully dynamic.
UntypedDispatch bool `protobuf:"varint,6,opt,name=untyped_dispatch,json=untypedDispatch,proto3" json:"untyped_dispatch,omitempty"` // is_invoke resolution is by bare method NAME with no static
// contains filtered or unexported fields
}
func (*CallCommon) Descriptor
deprecated
func (*CallCommon) Descriptor() ([]byte, []int)
Deprecated: Use CallCommon.ProtoReflect.Descriptor instead.
func (*CallCommon) GetArgs ¶
func (x *CallCommon) GetArgs() []*Value
func (*CallCommon) GetCallee ¶
func (x *CallCommon) GetCallee() string
func (*CallCommon) GetIsInvoke ¶
func (x *CallCommon) GetIsInvoke() bool
func (*CallCommon) GetMethodName ¶
func (x *CallCommon) GetMethodName() string
func (*CallCommon) GetUntypedDispatch ¶
func (x *CallCommon) GetUntypedDispatch() bool
func (*CallCommon) GetValue ¶
func (x *CallCommon) GetValue() *Value
func (*CallCommon) ProtoMessage ¶
func (*CallCommon) ProtoMessage()
func (*CallCommon) ProtoReflect ¶
func (x *CallCommon) ProtoReflect() protoreflect.Message
func (*CallCommon) Reset ¶
func (x *CallCommon) Reset()
func (*CallCommon) String ¶
func (x *CallCommon) String() string
type Case ¶
type Case struct {
Value *Value `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` // Case value (constant)
Block string `protobuf:"bytes,2,opt,name=block,proto3" json:"block,omitempty"` // Target block
// contains filtered or unexported fields
}
func (*Case) Descriptor
deprecated
func (*Case) ProtoMessage ¶
func (*Case) ProtoMessage()
func (*Case) ProtoReflect ¶
func (x *Case) ProtoReflect() protoreflect.Message
type Constant ¶
type Constant struct {
Type *Type `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
// Types that are valid to be assigned to Value:
//
// *Constant_BoolVal
// *Constant_IntVal
// *Constant_FloatVal
// *Constant_StringVal
Value isConstant_Value `protobuf_oneof:"value"`
IsNil bool `protobuf:"varint,6,opt,name=is_nil,json=isNil,proto3" json:"is_nil,omitempty"`
// contains filtered or unexported fields
}
Constant represents a literal value.
func (*Constant) Descriptor
deprecated
func (*Constant) GetBoolVal ¶
func (*Constant) GetFloatVal ¶
func (*Constant) GetStringVal ¶
func (*Constant) ProtoMessage ¶
func (*Constant) ProtoMessage()
func (*Constant) ProtoReflect ¶
func (x *Constant) ProtoReflect() protoreflect.Message
type Constant_BoolVal ¶
type Constant_BoolVal struct {
BoolVal bool `protobuf:"varint,2,opt,name=bool_val,json=boolVal,proto3,oneof"`
}
type Constant_FloatVal ¶
type Constant_FloatVal struct {
FloatVal float64 `protobuf:"fixed64,4,opt,name=float_val,json=floatVal,proto3,oneof"` // Store all floats as double
}
type Constant_IntVal ¶
type Constant_IntVal struct {
IntVal int64 `protobuf:"varint,3,opt,name=int_val,json=intVal,proto3,oneof"` // Store all integers as 64-bit
}
type Constant_StringVal ¶
type Constant_StringVal struct {
StringVal string `protobuf:"bytes,5,opt,name=string_val,json=stringVal,proto3,oneof"` // Complex numbers can be stored as real/imag parts if needed, omitting for brevity
}
type Field ¶
type Field struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Type *Type `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
Tag string `protobuf:"bytes,3,opt,name=tag,proto3" json:"tag,omitempty"` // Struct tag (e.g. for Go/JSON)
Embedded bool `protobuf:"varint,4,opt,name=embedded,proto3" json:"embedded,omitempty"` // Anonymous field
// contains filtered or unexported fields
}
Field represents a struct field.
func (*Field) Descriptor
deprecated
func (*Field) GetEmbedded ¶
func (*Field) ProtoMessage ¶
func (*Field) ProtoMessage()
func (*Field) ProtoReflect ¶
func (x *Field) ProtoReflect() protoreflect.Message
type Function ¶
type Function struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Unique name within the frontend (e.g. main.main)
ObjectName string `protobuf:"bytes,2,opt,name=object_name,json=objectName,proto3" json:"object_name,omitempty"` // Original source name (e.g. main)
MethodName string `protobuf:"bytes,3,opt,name=method_name,json=methodName,proto3" json:"method_name,omitempty"` // If method, the method name.
PackageName string `protobuf:"bytes,4,opt,name=package_name,json=packageName,proto3" json:"package_name,omitempty"` // Package path.
Signature *Signature `protobuf:"bytes,5,opt,name=signature,proto3" json:"signature,omitempty"`
Pos *Position `protobuf:"bytes,6,opt,name=pos,proto3" json:"pos,omitempty"`
Params []*Value `protobuf:"bytes,7,rep,name=params,proto3" json:"params,omitempty"` // Function parameters
FreeVars []*Value `protobuf:"bytes,8,rep,name=free_vars,json=freeVars,proto3" json:"free_vars,omitempty"` // Captured variables (closure)
Blocks []*BasicBlock `protobuf:"bytes,9,rep,name=blocks,proto3" json:"blocks,omitempty"` // Basic blocks forming the function body
Locals []*Value `protobuf:"bytes,10,rep,name=locals,proto3" json:"locals,omitempty"` // Local variables (allocs) that might be lifted
Parent *Type `protobuf:"bytes,11,opt,name=parent,proto3" json:"parent,omitempty"` // If method, the receiver type
Synthetic bool `protobuf:"varint,12,opt,name=synthetic,proto3" json:"synthetic,omitempty"` // True if generated by compiler/wrapper
// Canonical fully-qualified name used by rules to match across languages.
// Scheme: "<lang>:<module/path>.<Type>.<member>", e.g.
//
// "go:net/http.(*Request).FormValue", "py:flask.request.args.get".
CanonicalName string `protobuf:"bytes,13,opt,name=canonical_name,json=canonicalName,proto3" json:"canonical_name,omitempty"`
// contains filtered or unexported fields
}
Function represents a function definition.
func (*Function) Descriptor
deprecated
func (*Function) GetBlocks ¶
func (x *Function) GetBlocks() []*BasicBlock
func (*Function) GetCanonicalName ¶
func (*Function) GetFreeVars ¶
func (*Function) GetMethodName ¶
func (*Function) GetObjectName ¶
func (*Function) GetPackageName ¶
func (*Function) GetSignature ¶
func (*Function) GetSynthetic ¶
func (*Function) ProtoMessage ¶
func (*Function) ProtoMessage()
func (*Function) ProtoReflect ¶
func (x *Function) ProtoReflect() protoreflect.Message
type Global ¶
type Global struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Type *Type `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
InitValue *Constant `protobuf:"bytes,3,opt,name=init_value,json=initValue,proto3" json:"init_value,omitempty"` // Optional initialization value
Pos *Position `protobuf:"bytes,4,opt,name=pos,proto3" json:"pos,omitempty"`
// contains filtered or unexported fields
}
Global represents a global variable.
func (*Global) Descriptor
deprecated
func (*Global) GetInitValue ¶
func (*Global) ProtoMessage ¶
func (*Global) ProtoMessage()
func (*Global) ProtoReflect ¶
func (x *Global) ProtoReflect() protoreflect.Message
type Instruction ¶
type Instruction struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Result register name (if any), e.g. "t0". Empty for void.
Op OpCode `protobuf:"varint,2,opt,name=op,proto3,enum=godzilla.ir.v1.OpCode" json:"op,omitempty"`
Type *Type `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` // Result type
Pos *Position `protobuf:"bytes,4,opt,name=pos,proto3" json:"pos,omitempty"`
Comment string `protobuf:"bytes,5,opt,name=comment,proto3" json:"comment,omitempty"`
// Generic operands.
Operands []*Value `protobuf:"bytes,6,rep,name=operands,proto3" json:"operands,omitempty"`
// For BIN_OP / UN_OP.
BinOp BinOpKind `protobuf:"varint,7,opt,name=bin_op,json=binOp,proto3,enum=godzilla.ir.v1.BinOpKind" json:"bin_op,omitempty"`
UnOp UnOpKind `protobuf:"varint,8,opt,name=un_op,json=unOp,proto3,enum=godzilla.ir.v1.UnOpKind" json:"un_op,omitempty"`
// For FIELD / FIELD_ADDR / EXTRACT (element index).
FieldIndex int32 `protobuf:"varint,9,opt,name=field_index,json=fieldIndex,proto3" json:"field_index,omitempty"`
// For CALL / INVOKE, and for call-carrying intrinsics (go.defer, go.goroutine).
Call *CallCommon `protobuf:"bytes,10,opt,name=call,proto3" json:"call,omitempty"`
// For PHI: predecessor block ids, parallel to `operands`.
Blocks []string `protobuf:"bytes,11,rep,name=blocks,proto3" json:"blocks,omitempty"`
// For IF.
TrueBlock string `protobuf:"bytes,12,opt,name=true_block,json=trueBlock,proto3" json:"true_block,omitempty"`
FalseBlock string `protobuf:"bytes,13,opt,name=false_block,json=falseBlock,proto3" json:"false_block,omitempty"`
// For JUMP.
JumpBlock string `protobuf:"bytes,14,opt,name=jump_block,json=jumpBlock,proto3" json:"jump_block,omitempty"`
// For ALLOC: hint that the allocation escapes to the heap.
Heap bool `protobuf:"varint,15,opt,name=heap,proto3" json:"heap,omitempty"`
// For SWITCH.
Cases []*Case `protobuf:"bytes,17,rep,name=cases,proto3" json:"cases,omitempty"`
// For OP_CODE_INTRINSIC: the canonical intrinsic name, e.g. "go.chan.send".
Intrinsic string `protobuf:"bytes,18,opt,name=intrinsic,proto3" json:"intrinsic,omitempty"`
// contains filtered or unexported fields
}
Instruction represents a single SSA instruction.
func (*Instruction) Descriptor
deprecated
func (*Instruction) Descriptor() ([]byte, []int)
Deprecated: Use Instruction.ProtoReflect.Descriptor instead.
func (*Instruction) GetBinOp ¶
func (x *Instruction) GetBinOp() BinOpKind
func (*Instruction) GetBlocks ¶
func (x *Instruction) GetBlocks() []string
func (*Instruction) GetCall ¶
func (x *Instruction) GetCall() *CallCommon
func (*Instruction) GetCases ¶
func (x *Instruction) GetCases() []*Case
func (*Instruction) GetComment ¶
func (x *Instruction) GetComment() string
func (*Instruction) GetFalseBlock ¶
func (x *Instruction) GetFalseBlock() string
func (*Instruction) GetFieldIndex ¶
func (x *Instruction) GetFieldIndex() int32
func (*Instruction) GetHeap ¶
func (x *Instruction) GetHeap() bool
func (*Instruction) GetIntrinsic ¶
func (x *Instruction) GetIntrinsic() string
func (*Instruction) GetJumpBlock ¶
func (x *Instruction) GetJumpBlock() string
func (*Instruction) GetName ¶
func (x *Instruction) GetName() string
func (*Instruction) GetOp ¶
func (x *Instruction) GetOp() OpCode
func (*Instruction) GetOperands ¶
func (x *Instruction) GetOperands() []*Value
func (*Instruction) GetPos ¶
func (x *Instruction) GetPos() *Position
func (*Instruction) GetTrueBlock ¶
func (x *Instruction) GetTrueBlock() string
func (*Instruction) GetType ¶
func (x *Instruction) GetType() *Type
func (*Instruction) GetUnOp ¶
func (x *Instruction) GetUnOp() UnOpKind
func (*Instruction) ProtoMessage ¶
func (*Instruction) ProtoMessage()
func (*Instruction) ProtoReflect ¶
func (x *Instruction) ProtoReflect() protoreflect.Message
func (*Instruction) Reset ¶
func (x *Instruction) Reset()
func (*Instruction) String ¶
func (x *Instruction) String() string
type Method ¶
type Method struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Signature *Type `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` // Must be TYPE_KIND_FUNC
// contains filtered or unexported fields
}
Method represents a method in an interface or named type.
func (*Method) Descriptor
deprecated
func (*Method) GetSignature ¶
func (*Method) ProtoMessage ¶
func (*Method) ProtoMessage()
func (*Method) ProtoReflect ¶
func (x *Method) ProtoReflect() protoreflect.Message
type Module ¶
type Module struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Package path/name
Functions []*Function `protobuf:"bytes,2,rep,name=functions,proto3" json:"functions,omitempty"` // All functions (methods, init, main)
Types []*Type `protobuf:"bytes,3,rep,name=types,proto3" json:"types,omitempty"` // Named types defined in this module
Globals []*Global `protobuf:"bytes,4,rep,name=globals,proto3" json:"globals,omitempty"` // Global variables
// Dependency information
Imports []string `protobuf:"bytes,5,rep,name=imports,proto3" json:"imports,omitempty"` // Imported module names/paths
// Source language that produced this module: "go", "python", "javascript".
Language string `protobuf:"bytes,6,opt,name=language,proto3" json:"language,omitempty"`
// contains filtered or unexported fields
}
Module represents a compilation unit (e.g. Go package).
func (*Module) Descriptor
deprecated
func (*Module) GetFunctions ¶
func (*Module) GetGlobals ¶
func (*Module) GetImports ¶
func (*Module) GetLanguage ¶
func (*Module) ProtoMessage ¶
func (*Module) ProtoMessage()
func (*Module) ProtoReflect ¶
func (x *Module) ProtoReflect() protoreflect.Message
type OpCode ¶
type OpCode int32
OpCode defines the operation to perform.
gIR v2 keeps a deliberately SMALL, language-neutral core. Anything specific to a source language (Go channels/defer/goroutines/select, Python magic methods, JS dynamic property access, language builtins, ...) is expressed as an OP_CODE_INTRINSIC carrying a canonical `intrinsic` name that the analysis engine and rules interpret. Adding a language must NOT require new opcodes.
const ( OpCode_OP_CODE_UNSPECIFIED OpCode = 0 // Basic Block Terminators OpCode_OP_CODE_RET OpCode = 1 OpCode_OP_CODE_JUMP OpCode = 2 OpCode_OP_CODE_IF OpCode = 3 OpCode_OP_CODE_SWITCH OpCode = 4 OpCode_OP_CODE_PANIC OpCode = 5 // abnormal termination / throw OpCode_OP_CODE_UNREACHABLE OpCode = 6 // Memory Operations OpCode_OP_CODE_ALLOC OpCode = 10 OpCode_OP_CODE_LOAD OpCode = 11 OpCode_OP_CODE_STORE OpCode = 12 // Aggregate access OpCode_OP_CODE_FIELD OpCode = 13 // struct/object field read (by index) OpCode_OP_CODE_FIELD_ADDR OpCode = 14 // address of a struct/object field OpCode_OP_CODE_INDEX OpCode = 15 // array/slice/string element read OpCode_OP_CODE_INDEX_ADDR OpCode = 16 // address of an array/slice element // Arithmetic / Logic OpCode_OP_CODE_BIN_OP OpCode = 20 OpCode_OP_CODE_UN_OP OpCode = 21 OpCode_OP_CODE_PHI OpCode = 22 // SSA phi node // Calls OpCode_OP_CODE_CALL OpCode = 30 // statically-resolved call OpCode_OP_CODE_INVOKE OpCode = 31 // dynamic / virtual dispatch (interface, vtable) // Type operations OpCode_OP_CODE_CONVERT OpCode = 40 // numeric/string conversion, cast, change-type/interface OpCode_OP_CODE_TYPE_ASSERT OpCode = 41 OpCode_OP_CODE_MAKE_INTERFACE OpCode = 42 // box a concrete value into an interface / any OpCode_OP_CODE_EXTRACT OpCode = 43 // extract element i from a tuple (multi-value result) // Escape hatch: any language-specific operation, named by `intrinsic`. // e.g. "go.chan.send", "go.defer", "go.map.update", "builtin.make_closure", // // "py.attr.get", "js.property.get". Operands/call carry its arguments. OpCode_OP_CODE_INTRINSIC OpCode = 50 )
func (OpCode) Descriptor ¶
func (OpCode) Descriptor() protoreflect.EnumDescriptor
func (OpCode) EnumDescriptor
deprecated
func (OpCode) Number ¶
func (x OpCode) Number() protoreflect.EnumNumber
func (OpCode) Type ¶
func (OpCode) Type() protoreflect.EnumType
type Position ¶
type Position struct {
Filename string `protobuf:"bytes,1,opt,name=filename,proto3" json:"filename,omitempty"`
Line int32 `protobuf:"varint,2,opt,name=line,proto3" json:"line,omitempty"`
Column int32 `protobuf:"varint,3,opt,name=column,proto3" json:"column,omitempty"`
// contains filtered or unexported fields
}
Position represents a source code location.
func (*Position) Descriptor
deprecated
func (*Position) GetFilename ¶
func (*Position) ProtoMessage ¶
func (*Position) ProtoMessage()
func (*Position) ProtoReflect ¶
func (x *Position) ProtoReflect() protoreflect.Message
type Program ¶
type Program struct {
Modules []*Module `protobuf:"bytes,1,rep,name=modules,proto3" json:"modules,omitempty"`
MainPkg *Function `protobuf:"bytes,2,opt,name=main_pkg,json=mainPkg,proto3" json:"main_pkg,omitempty"` // Entry point package/function
Mode string `protobuf:"bytes,3,opt,name=mode,proto3" json:"mode,omitempty"` // e.g., "ssa", "source"
// contains filtered or unexported fields
}
Program represents the entire application (multiple modules).
func (*Program) Descriptor
deprecated
func (*Program) GetMainPkg ¶
func (*Program) GetModules ¶
func (*Program) ProtoMessage ¶
func (*Program) ProtoMessage()
func (*Program) ProtoReflect ¶
func (x *Program) ProtoReflect() protoreflect.Message
type Signature ¶
type Signature struct {
Params []*Type `protobuf:"bytes,1,rep,name=params,proto3" json:"params,omitempty"`
Results []*Type `protobuf:"bytes,2,rep,name=results,proto3" json:"results,omitempty"`
Variadic bool `protobuf:"varint,3,opt,name=variadic,proto3" json:"variadic,omitempty"`
Recv *Type `protobuf:"bytes,4,opt,name=recv,proto3" json:"recv,omitempty"` // Receiver type (for methods), optional
// contains filtered or unexported fields
}
Signature represents a function signature.
func (*Signature) Descriptor
deprecated
func (*Signature) GetResults ¶
func (*Signature) GetVariadic ¶
func (*Signature) ProtoMessage ¶
func (*Signature) ProtoMessage()
func (*Signature) ProtoReflect ¶
func (x *Signature) ProtoReflect() protoreflect.Message
type Type ¶
type Type struct {
Kind TypeKind `protobuf:"varint,1,opt,name=kind,proto3,enum=godzilla.ir.v1.TypeKind" json:"kind,omitempty"`
// Only set if kind == TYPE_KIND_BASIC
BasicKind BasicTypeKind `protobuf:"varint,2,opt,name=basic_kind,json=basicKind,proto3,enum=godzilla.ir.v1.BasicTypeKind" json:"basic_kind,omitempty"`
// Only set if kind == TYPE_KIND_POINTER, ARRAY, SLICE, CHAN, MAP (key/elem)
ElemType *Type `protobuf:"bytes,3,opt,name=elem_type,json=elemType,proto3" json:"elem_type,omitempty"`
KeyType *Type `protobuf:"bytes,4,opt,name=key_type,json=keyType,proto3" json:"key_type,omitempty"` // For maps
// Only set if kind == TYPE_KIND_ARRAY
ArrayLen int64 `protobuf:"varint,5,opt,name=array_len,json=arrayLen,proto3" json:"array_len,omitempty"`
// Only set if kind == TYPE_KIND_STRUCT
Fields []*Field `protobuf:"bytes,6,rep,name=fields,proto3" json:"fields,omitempty"`
// Only set if kind == TYPE_KIND_INTERFACE
Methods []*Method `protobuf:"bytes,7,rep,name=methods,proto3" json:"methods,omitempty"`
// Only set if kind == TYPE_KIND_FUNC
Signature *Signature `protobuf:"bytes,8,opt,name=signature,proto3" json:"signature,omitempty"`
// Only set if kind == TYPE_KIND_NAMED
Name string `protobuf:"bytes,9,opt,name=name,proto3" json:"name,omitempty"`
UnderlyingType *Type `protobuf:"bytes,10,opt,name=underlying_type,json=underlyingType,proto3" json:"underlying_type,omitempty"` // The underlying type definition
MethodSet []*Method `protobuf:"bytes,11,rep,name=method_set,json=methodSet,proto3" json:"method_set,omitempty"` // Methods associated with this named type
Pos *Position `protobuf:"bytes,12,opt,name=pos,proto3" json:"pos,omitempty"` // Definition position for named types
// contains filtered or unexported fields
}
Type represents a type in the IR.
func (*Type) Descriptor
deprecated
func (*Type) GetArrayLen ¶
func (*Type) GetBasicKind ¶
func (x *Type) GetBasicKind() BasicTypeKind
func (*Type) GetElemType ¶
func (*Type) GetKeyType ¶
func (*Type) GetMethodSet ¶
func (*Type) GetMethods ¶
func (*Type) GetSignature ¶
func (*Type) GetUnderlyingType ¶
func (*Type) ProtoMessage ¶
func (*Type) ProtoMessage()
func (*Type) ProtoReflect ¶
func (x *Type) ProtoReflect() protoreflect.Message
type TypeKind ¶
type TypeKind int32
TypeKind defines the high-level category of a type.
const ( TypeKind_TYPE_KIND_UNSPECIFIED TypeKind = 0 TypeKind_TYPE_KIND_BASIC TypeKind = 1 // int, float, bool, string, etc. TypeKind_TYPE_KIND_POINTER TypeKind = 2 TypeKind_TYPE_KIND_STRUCT TypeKind = 3 TypeKind_TYPE_KIND_ARRAY TypeKind = 4 TypeKind_TYPE_KIND_SLICE TypeKind = 5 TypeKind_TYPE_KIND_MAP TypeKind = 6 TypeKind_TYPE_KIND_INTERFACE TypeKind = 7 TypeKind_TYPE_KIND_FUNC TypeKind = 8 TypeKind_TYPE_KIND_CHAN TypeKind = 9 TypeKind_TYPE_KIND_TUPLE TypeKind = 10 // Multiple return values TypeKind_TYPE_KIND_NAMED TypeKind = 11 // Defined type (e.g. type MyInt int) )
func (TypeKind) Descriptor ¶
func (TypeKind) Descriptor() protoreflect.EnumDescriptor
func (TypeKind) EnumDescriptor
deprecated
func (TypeKind) Number ¶
func (x TypeKind) Number() protoreflect.EnumNumber
func (TypeKind) Type ¶
func (TypeKind) Type() protoreflect.EnumType
type UnOpKind ¶
type UnOpKind int32
UnOpKind defines unary operators.
const ( UnOpKind_UN_OP_UNSPECIFIED UnOpKind = 0 UnOpKind_UN_OP_NOT UnOpKind = 1 // !x UnOpKind_UN_OP_BIT_NOT UnOpKind = 2 // ^x UnOpKind_UN_OP_NEG UnOpKind = 3 // -x UnOpKind_UN_OP_POS UnOpKind = 4 // +x UnOpKind_UN_OP_ADDR UnOpKind = 5 // &x UnOpKind_UN_OP_DEREF UnOpKind = 6 // *x UnOpKind_UN_OP_ARROW UnOpKind = 7 // <-x )
func (UnOpKind) Descriptor ¶
func (UnOpKind) Descriptor() protoreflect.EnumDescriptor
func (UnOpKind) EnumDescriptor
deprecated
func (UnOpKind) Number ¶
func (x UnOpKind) Number() protoreflect.EnumNumber
func (UnOpKind) Type ¶
func (UnOpKind) Type() protoreflect.EnumType
type Value ¶
type Value struct {
// Types that are valid to be assigned to Kind:
//
// *Value_RegName
// *Value_Constant
// *Value_GlobalName
// *Value_FuncName
Kind isValue_Kind `protobuf_oneof:"kind"`
// contains filtered or unexported fields
}
Value represents an operand: a register (SSA result), a constant, a global, or a direct function reference (by canonical name).
func (*Value) Descriptor
deprecated
func (*Value) GetConstant ¶
func (*Value) GetFuncName ¶
func (*Value) GetGlobalName ¶
func (*Value) GetRegName ¶
func (*Value) ProtoMessage ¶
func (*Value) ProtoMessage()
func (*Value) ProtoReflect ¶
func (x *Value) ProtoReflect() protoreflect.Message
type Value_Constant ¶
type Value_Constant struct {
Constant *Constant `protobuf:"bytes,2,opt,name=constant,proto3,oneof"`
}
type Value_FuncName ¶
type Value_FuncName struct {
FuncName string `protobuf:"bytes,4,opt,name=func_name,json=funcName,proto3,oneof"` // direct function reference (canonical name)
}
type Value_GlobalName ¶
type Value_GlobalName struct {
GlobalName string `protobuf:"bytes,3,opt,name=global_name,json=globalName,proto3,oneof"` // a Global variable by name
}
type Value_RegName ¶
type Value_RegName struct {
RegName string `protobuf:"bytes,1,opt,name=reg_name,json=regName,proto3,oneof"` // result of another instruction in this function
}