ir

package
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 23, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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.

View Source
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.

View Source
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.

View Source
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.

View Source
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.

View Source
var File_proto_common_proto protoreflect.FileDescriptor
View Source
var File_proto_function_proto protoreflect.FileDescriptor
View Source
var File_proto_instruction_proto protoreflect.FileDescriptor
View Source
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) Enum

func (x BasicTypeKind) Enum() *BasicTypeKind

func (BasicTypeKind) EnumDescriptor deprecated

func (BasicTypeKind) EnumDescriptor() ([]byte, []int)

Deprecated: Use BasicTypeKind.Descriptor instead.

func (BasicTypeKind) Number

func (BasicTypeKind) String

func (x BasicTypeKind) String() string

func (BasicTypeKind) Type

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) Enum

func (x BinOpKind) Enum() *BinOpKind

func (BinOpKind) EnumDescriptor deprecated

func (BinOpKind) EnumDescriptor() ([]byte, []int)

Deprecated: Use BinOpKind.Descriptor instead.

func (BinOpKind) Number

func (x BinOpKind) Number() protoreflect.EnumNumber

func (BinOpKind) String

func (x BinOpKind) String() string

func (BinOpKind) Type

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) Descriptor() ([]byte, []int)

Deprecated: Use Case.ProtoReflect.Descriptor instead.

func (*Case) GetBlock

func (x *Case) GetBlock() string

func (*Case) GetValue

func (x *Case) GetValue() *Value

func (*Case) ProtoMessage

func (*Case) ProtoMessage()

func (*Case) ProtoReflect

func (x *Case) ProtoReflect() protoreflect.Message

func (*Case) Reset

func (x *Case) Reset()

func (*Case) String

func (x *Case) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Constant.ProtoReflect.Descriptor instead.

func (*Constant) GetBoolVal

func (x *Constant) GetBoolVal() bool

func (*Constant) GetFloatVal

func (x *Constant) GetFloatVal() float64

func (*Constant) GetIntVal

func (x *Constant) GetIntVal() int64

func (*Constant) GetIsNil

func (x *Constant) GetIsNil() bool

func (*Constant) GetStringVal

func (x *Constant) GetStringVal() string

func (*Constant) GetType

func (x *Constant) GetType() *Type

func (*Constant) GetValue

func (x *Constant) GetValue() isConstant_Value

func (*Constant) ProtoMessage

func (*Constant) ProtoMessage()

func (*Constant) ProtoReflect

func (x *Constant) ProtoReflect() protoreflect.Message

func (*Constant) Reset

func (x *Constant) Reset()

func (*Constant) String

func (x *Constant) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Field.ProtoReflect.Descriptor instead.

func (*Field) GetEmbedded

func (x *Field) GetEmbedded() bool

func (*Field) GetName

func (x *Field) GetName() string

func (*Field) GetTag

func (x *Field) GetTag() string

func (*Field) GetType

func (x *Field) GetType() *Type

func (*Field) ProtoMessage

func (*Field) ProtoMessage()

func (*Field) ProtoReflect

func (x *Field) ProtoReflect() protoreflect.Message

func (*Field) Reset

func (x *Field) Reset()

func (*Field) String

func (x *Field) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Function.ProtoReflect.Descriptor instead.

func (*Function) GetBlocks

func (x *Function) GetBlocks() []*BasicBlock

func (*Function) GetCanonicalName

func (x *Function) GetCanonicalName() string

func (*Function) GetFreeVars

func (x *Function) GetFreeVars() []*Value

func (*Function) GetLocals

func (x *Function) GetLocals() []*Value

func (*Function) GetMethodName

func (x *Function) GetMethodName() string

func (*Function) GetName

func (x *Function) GetName() string

func (*Function) GetObjectName

func (x *Function) GetObjectName() string

func (*Function) GetPackageName

func (x *Function) GetPackageName() string

func (*Function) GetParams

func (x *Function) GetParams() []*Value

func (*Function) GetParent

func (x *Function) GetParent() *Type

func (*Function) GetPos

func (x *Function) GetPos() *Position

func (*Function) GetSignature

func (x *Function) GetSignature() *Signature

func (*Function) GetSynthetic

func (x *Function) GetSynthetic() bool

func (*Function) ProtoMessage

func (*Function) ProtoMessage()

func (*Function) ProtoReflect

func (x *Function) ProtoReflect() protoreflect.Message

func (*Function) Reset

func (x *Function) Reset()

func (*Function) String

func (x *Function) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Global.ProtoReflect.Descriptor instead.

func (*Global) GetInitValue

func (x *Global) GetInitValue() *Constant

func (*Global) GetName

func (x *Global) GetName() string

func (*Global) GetPos

func (x *Global) GetPos() *Position

func (*Global) GetType

func (x *Global) GetType() *Type

func (*Global) ProtoMessage

func (*Global) ProtoMessage()

func (*Global) ProtoReflect

func (x *Global) ProtoReflect() protoreflect.Message

func (*Global) Reset

func (x *Global) Reset()

func (*Global) String

func (x *Global) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Method.ProtoReflect.Descriptor instead.

func (*Method) GetName

func (x *Method) GetName() string

func (*Method) GetSignature

func (x *Method) GetSignature() *Type

func (*Method) ProtoMessage

func (*Method) ProtoMessage()

func (*Method) ProtoReflect

func (x *Method) ProtoReflect() protoreflect.Message

func (*Method) Reset

func (x *Method) Reset()

func (*Method) String

func (x *Method) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Module.ProtoReflect.Descriptor instead.

func (*Module) GetFunctions

func (x *Module) GetFunctions() []*Function

func (*Module) GetGlobals

func (x *Module) GetGlobals() []*Global

func (*Module) GetImports

func (x *Module) GetImports() []string

func (*Module) GetLanguage

func (x *Module) GetLanguage() string

func (*Module) GetName

func (x *Module) GetName() string

func (*Module) GetTypes

func (x *Module) GetTypes() []*Type

func (*Module) ProtoMessage

func (*Module) ProtoMessage()

func (*Module) ProtoReflect

func (x *Module) ProtoReflect() protoreflect.Message

func (*Module) Reset

func (x *Module) Reset()

func (*Module) String

func (x *Module) String() string

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) Enum

func (x OpCode) Enum() *OpCode

func (OpCode) EnumDescriptor deprecated

func (OpCode) EnumDescriptor() ([]byte, []int)

Deprecated: Use OpCode.Descriptor instead.

func (OpCode) Number

func (x OpCode) Number() protoreflect.EnumNumber

func (OpCode) String

func (x OpCode) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Position.ProtoReflect.Descriptor instead.

func (*Position) GetColumn

func (x *Position) GetColumn() int32

func (*Position) GetFilename

func (x *Position) GetFilename() string

func (*Position) GetLine

func (x *Position) GetLine() int32

func (*Position) ProtoMessage

func (*Position) ProtoMessage()

func (*Position) ProtoReflect

func (x *Position) ProtoReflect() protoreflect.Message

func (*Position) Reset

func (x *Position) Reset()

func (*Position) String

func (x *Position) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Program.ProtoReflect.Descriptor instead.

func (*Program) GetMainPkg

func (x *Program) GetMainPkg() *Function

func (*Program) GetMode

func (x *Program) GetMode() string

func (*Program) GetModules

func (x *Program) GetModules() []*Module

func (*Program) ProtoMessage

func (*Program) ProtoMessage()

func (*Program) ProtoReflect

func (x *Program) ProtoReflect() protoreflect.Message

func (*Program) Reset

func (x *Program) Reset()

func (*Program) String

func (x *Program) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Signature.ProtoReflect.Descriptor instead.

func (*Signature) GetParams

func (x *Signature) GetParams() []*Type

func (*Signature) GetRecv

func (x *Signature) GetRecv() *Type

func (*Signature) GetResults

func (x *Signature) GetResults() []*Type

func (*Signature) GetVariadic

func (x *Signature) GetVariadic() bool

func (*Signature) ProtoMessage

func (*Signature) ProtoMessage()

func (*Signature) ProtoReflect

func (x *Signature) ProtoReflect() protoreflect.Message

func (*Signature) Reset

func (x *Signature) Reset()

func (*Signature) String

func (x *Signature) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Type.ProtoReflect.Descriptor instead.

func (*Type) GetArrayLen

func (x *Type) GetArrayLen() int64

func (*Type) GetBasicKind

func (x *Type) GetBasicKind() BasicTypeKind

func (*Type) GetElemType

func (x *Type) GetElemType() *Type

func (*Type) GetFields

func (x *Type) GetFields() []*Field

func (*Type) GetKeyType

func (x *Type) GetKeyType() *Type

func (*Type) GetKind

func (x *Type) GetKind() TypeKind

func (*Type) GetMethodSet

func (x *Type) GetMethodSet() []*Method

func (*Type) GetMethods

func (x *Type) GetMethods() []*Method

func (*Type) GetName

func (x *Type) GetName() string

func (*Type) GetPos

func (x *Type) GetPos() *Position

func (*Type) GetSignature

func (x *Type) GetSignature() *Signature

func (*Type) GetUnderlyingType

func (x *Type) GetUnderlyingType() *Type

func (*Type) ProtoMessage

func (*Type) ProtoMessage()

func (*Type) ProtoReflect

func (x *Type) ProtoReflect() protoreflect.Message

func (*Type) Reset

func (x *Type) Reset()

func (*Type) String

func (x *Type) String() string

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) Enum

func (x TypeKind) Enum() *TypeKind

func (TypeKind) EnumDescriptor deprecated

func (TypeKind) EnumDescriptor() ([]byte, []int)

Deprecated: Use TypeKind.Descriptor instead.

func (TypeKind) Number

func (x TypeKind) Number() protoreflect.EnumNumber

func (TypeKind) String

func (x TypeKind) String() string

func (TypeKind) Type

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) Enum

func (x UnOpKind) Enum() *UnOpKind

func (UnOpKind) EnumDescriptor deprecated

func (UnOpKind) EnumDescriptor() ([]byte, []int)

Deprecated: Use UnOpKind.Descriptor instead.

func (UnOpKind) Number

func (x UnOpKind) Number() protoreflect.EnumNumber

func (UnOpKind) String

func (x UnOpKind) String() string

func (UnOpKind) Type

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) Descriptor() ([]byte, []int)

Deprecated: Use Value.ProtoReflect.Descriptor instead.

func (*Value) GetConstant

func (x *Value) GetConstant() *Constant

func (*Value) GetFuncName

func (x *Value) GetFuncName() string

func (*Value) GetGlobalName

func (x *Value) GetGlobalName() string

func (*Value) GetKind

func (x *Value) GetKind() isValue_Kind

func (*Value) GetRegName

func (x *Value) GetRegName() string

func (*Value) ProtoMessage

func (*Value) ProtoMessage()

func (*Value) ProtoReflect

func (x *Value) ProtoReflect() protoreflect.Message

func (*Value) Reset

func (x *Value) Reset()

func (*Value) String

func (x *Value) String() string

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
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL