Documentation ¶
Index ¶
- Variables
- func CheckTransForm(from, to Type)
- func CheckUpdateType(address, value []Type)
- func GetReg(I Instruction, f *Function) string
- func GetTypeStr(n Node) string
- func NewBlockId() string
- func ReplaceValue(v Value, to Value)
- type BasicBlock
- func (b *BasicBlock) AddSucc(succ *BasicBlock)
- func (b *BasicBlock) AddUser(u User)
- func (b *BasicBlock) GetType() Types
- func (b *BasicBlock) GetUsers() []User
- func (b *BasicBlock) GetValues() []Value
- func (b *BasicBlock) LastInst() Instruction
- func (b *BasicBlock) RemoveUser(u User)
- func (b *BasicBlock) Sealed()
- func (b *BasicBlock) SetType(ts Types)
- func (b *BasicBlock) String() string
- type BasicType
- type BinOp
- func (b *BinOp) AddUser(u User)
- func (b *BinOp) AddValue(v Value)
- func (a *BinOp) GetBlock() *BasicBlock
- func (a *BinOp) GetParent() *Function
- func (a *BinOp) GetType() Types
- func (b *BinOp) GetUsers() []User
- func (b *BinOp) GetValues() []Value
- func (b *BinOp) InferenceType()
- func (an BinOp) NewError(kind ErrorKind, format string, arg ...any)
- func (a *BinOp) Pos() string
- func (b *BinOp) RemoveUser(u User)
- func (b *BinOp) ReplaceValue(v Value, to Value)
- func (a *BinOp) SetType(ts Types)
- func (b *BinOp) String() string
- type BinaryOpcode
- type Builder
- type Call
- func (c *Call) AddUser(u User)
- func (c *Call) AddValue(v Value)
- func (a *Call) GetBlock() *BasicBlock
- func (a *Call) GetParent() *Function
- func (a *Call) GetType() Types
- func (c *Call) GetUsers() []User
- func (c *Call) GetValues() []Value
- func (c *Call) InferenceType()
- func (an Call) NewError(kind ErrorKind, format string, arg ...any)
- func (a *Call) Pos() string
- func (c *Call) RemoveUser(u User)
- func (c *Call) ReplaceValue(v Value, to Value)
- func (a *Call) SetType(ts Types)
- func (c *Call) String() string
- type ChanType
- type Const
- type ErrorKind
- type Field
- func (f *Field) AddUser(u User)
- func (f *Field) AddValue(v Value)
- func (field *Field) Assign(v Value, f *FunctionBuilder)
- func (a *Field) GetBlock() *BasicBlock
- func (f *Field) GetLastValue() Value
- func (a *Field) GetParent() *Function
- func (a *Field) GetType() Types
- func (f *Field) GetUsers() []User
- func (f *Field) GetValue(_ *FunctionBuilder) Value
- func (f *Field) GetValues() []Value
- func (f *Field) InferenceType()
- func (an Field) NewError(kind ErrorKind, format string, arg ...any)
- func (a *Field) Pos() string
- func (f *Field) RemoveUser(u User)
- func (f *Field) ReplaceValue(v, to Value)
- func (a *Field) SetType(ts Types)
- func (f *Field) String() string
- type Function
- func (f *Function) AddUser(u User)
- func (f *Function) DisAsm(flag FunctionAsmFlag) string
- func (f *Function) Finish()
- func (f *Function) GetParent() *Function
- func (f *Function) GetSymbol() *Interface
- func (f *Function) GetType() Types
- func (f *Function) GetUsers() []User
- func (f *Function) GetValues() []Value
- func (f *Function) InspectVariable(varName string) *InspectVariableResult
- func (f *Function) NewBasicBlock(name string) *BasicBlock
- func (f *Function) NewBasicBlockUnSealed(name string) *BasicBlock
- func (f *Function) NewErrorWithPos(kind ErrorKind, Pos *Position, format string, arg ...any)
- func (f *Function) NewParam(name string)
- func (f *Function) RemoveUser(u User)
- func (f *Function) ReturnValue() []Value
- func (f *Function) SetReg(i Instruction)
- func (f *Function) SetType(ts Types)
- func (f *Function) String() string
- func (f *Function) WriteVariable(variable string, value Value)
- type FunctionAsmFlag
- type FunctionBuilder
- func (b *FunctionBuilder) AddDefer(call *Call)
- func (f *FunctionBuilder) BuildFreeValue(variable string) Value
- func (b *FunctionBuilder) CanBuildFreeValue(variable string) bool
- func (b *FunctionBuilder) CreateInterfaceWithVs(keys []Value, vs []Value) *Interface
- func (f *FunctionBuilder) EmitArith(op BinaryOpcode, x, y Value) *BinOp
- func (f *FunctionBuilder) EmitCall(c *Call) *Call
- func (f *FunctionBuilder) EmitField(i Value, key Value) *Field
- func (f *FunctionBuilder) EmitIf(cond Value) *If
- func (f *FunctionBuilder) EmitInterfaceBuildWithType(typ Types, Len, Cap Value) *Interface
- func (f *FunctionBuilder) EmitInterfaceSlice(i *Interface, low, high, max Value) *Interface
- func (f *FunctionBuilder) EmitJump(to *BasicBlock) *Jump
- func (f *FunctionBuilder) EmitReturn(vs []Value) *Return
- func (f *FunctionBuilder) EmitSwitch(cond Value, defaultb *BasicBlock, label []SwitchLabel) *Switch
- func (b *FunctionBuilder) Finish()
- func (b *FunctionBuilder) GetBreak() *BasicBlock
- func (b *FunctionBuilder) GetContinue() *BasicBlock
- func (b *FunctionBuilder) GetFallthrough() *BasicBlock
- func (b FunctionBuilder) GetParentBuilder() *FunctionBuilder
- func (b FunctionBuilder) HandlerEllipsis()
- func (b *FunctionBuilder) MapBlockSymbolTable(text string) string
- func (f *FunctionBuilder) NewCall(target Value, args []Value, isDropError bool) *Call
- func (b *FunctionBuilder) NewError(kind ErrorKind, format string, arg ...any)
- func (b *FunctionBuilder) NewField(key string) *Field
- func (b *FunctionBuilder) NewFunc() *Function
- func (b *FunctionBuilder) PopBlockSymbolTable()
- func (b *FunctionBuilder) PopFunction() *FunctionBuilder
- func (b *FunctionBuilder) PopTarget() bool
- func (b *FunctionBuilder) PushBlockSymbolTable()
- func (b *FunctionBuilder) PushFunction(newfunc *Function) *FunctionBuilder
- func (b *FunctionBuilder) PushTarget(_break, _continue, _fallthrough *BasicBlock)
- func (b *FunctionBuilder) ReadField(key string) *Field
- func (b *FunctionBuilder) ReadVariable(variable string) Value
- func (b *FunctionBuilder) SetPosition(pos *Position) *Position
- type IdentifierLV
- type If
- func (i *If) AddFalse(f *BasicBlock)
- func (i *If) AddTrue(t *BasicBlock)
- func (i *If) AddValue(v Value)
- func (a *If) GetBlock() *BasicBlock
- func (a *If) GetParent() *Function
- func (a *If) GetType() Types
- func (i *If) GetUsers() []User
- func (i *If) GetValues() []Value
- func (i *If) InferenceType()
- func (an If) NewError(kind ErrorKind, format string, arg ...any)
- func (a *If) Pos() string
- func (i *If) ReplaceValue(v Value, to Value)
- func (a *If) SetType(ts Types)
- func (i *If) String() string
- type InspectVariableResult
- type Instruction
- type Interface
- func (i *Interface) AddUser(u User)
- func (i *Interface) AddValue(_ Value)
- func (a *Interface) GetBlock() *BasicBlock
- func (a *Interface) GetParent() *Function
- func (a *Interface) GetType() Types
- func (i *Interface) GetUsers() []User
- func (i *Interface) GetValues() []Value
- func (i *Interface) InferenceType()
- func (an Interface) NewError(kind ErrorKind, format string, arg ...any)
- func (a *Interface) Pos() string
- func (i *Interface) RemoveUser(u User)
- func (i *Interface) ReplaceValue(v, to Value)
- func (a *Interface) SetType(ts Types)
- func (i *Interface) String() string
- type InterfaceType
- type InterfaceTypeKind
- type Jump
- type LeftValue
- type Node
- type Package
- type Parameter
- type Phi
- func (p *Phi) AddUser(u User)
- func (p *Phi) AddValue(v Value)
- func (phi *Phi) Build() Value
- func (a *Phi) GetBlock() *BasicBlock
- func (a *Phi) GetParent() *Function
- func (a *Phi) GetType() Types
- func (p *Phi) GetUsers() []User
- func (p *Phi) GetValues() []Value
- func (phi *Phi) InferenceType()
- func (phi *Phi) Name() string
- func (an Phi) NewError(kind ErrorKind, format string, arg ...any)
- func (a *Phi) Pos() string
- func (p *Phi) RemoveUser(u User)
- func (p *Phi) ReplaceValue(v Value, to Value)
- func (a *Phi) SetType(ts Types)
- func (p *Phi) String() string
- type Position
- type Program
- type Return
- func (r *Return) AddValue(v Value)
- func (a *Return) GetBlock() *BasicBlock
- func (a *Return) GetParent() *Function
- func (a *Return) GetType() Types
- func (r *Return) GetUsers() []User
- func (r *Return) GetValues() []Value
- func (r *Return) InferenceType()
- func (an Return) NewError(kind ErrorKind, format string, arg ...any)
- func (a *Return) Pos() string
- func (r *Return) ReplaceValue(v Value, to Value)
- func (a *Return) SetType(ts Types)
- func (r *Return) String() string
- type SSAError
- type SSAErrors
- type Switch
- func (sw *Switch) AddValue(v Value)
- func (a *Switch) GetBlock() *BasicBlock
- func (a *Switch) GetParent() *Function
- func (a *Switch) GetType() Types
- func (sw *Switch) GetUsers() []User
- func (sw *Switch) GetValues() []Value
- func (sw *Switch) InferenceType()
- func (an Switch) NewError(kind ErrorKind, format string, arg ...any)
- func (a *Switch) Pos() string
- func (sw *Switch) ReplaceValue(v Value, to Value)
- func (a *Switch) SetType(ts Types)
- func (sw *Switch) String() string
- type SwitchLabel
- type Type
- type TypeKind
- type Types
- type UnOp
- type UnaryOpcode
- type Update
- func (s *Update) AddUser(u User)
- func (s *Update) AddValue(_ Value)
- func (a *Update) GetBlock() *BasicBlock
- func (a *Update) GetParent() *Function
- func (a *Update) GetType() Types
- func (s *Update) GetUsers() []User
- func (s *Update) GetValues() []Value
- func (u *Update) InferenceType()
- func (an Update) NewError(kind ErrorKind, format string, arg ...any)
- func (a *Update) Pos() string
- func (s *Update) RemoveUser(u User)
- func (s *Update) ReplaceValue(v, to Value)
- func (a *Update) SetType(ts Types)
- func (s *Update) String() string
- type User
- type Value
Constants ¶
This section is empty.
Variables ¶
var ( ConstMap = make(map[any]*Const) UnDefineConst = &Const{ user: []User{}, value: nil, typ: []Type{BasicTypesKind[Undefine]}, str: "Undefine", Unary: 0, } )
var BasicTypesKind = []BasicType{ Number: {Number, "number"}, String: {String, "string"}, Boolean: {Boolean, "boolean"}, Undefine: {Undefine, "undefine"}, Null: {Null, "null"}, Any: {Any, "any"}, }
var BinaryOpcodeName = map[BinaryOpcode]string{
OpAnd: `and`,
OpAndNot: `and-not`,
OpOr: `or`,
OpXor: `xor`,
OpShl: `shl`,
OpShr: `shr`,
OpAdd: `add`,
OpSub: `sub`,
OpMod: `mod`,
OpMul: `mul`,
OpDiv: `div`,
OpGt: `gt`,
OpLt: `lt`,
OpLtEq: `lt-eq`,
OpGtEq: `gt-eq`,
OpNotEq: `neq`,
OpEq: `eq`,
}
----------- BinOp
Functions ¶
func CheckTransForm ¶
func CheckTransForm(from, to Type)
func CheckUpdateType ¶
func CheckUpdateType(address, value []Type)
func GetReg ¶
func GetReg(I Instruction, f *Function) string
func GetTypeStr ¶
func NewBlockId ¶
func NewBlockId() string
func ReplaceValue ¶
Types ¶
type BasicBlock ¶
type BasicBlock struct { Index int Name string // function Parent *Function // basicblock graph Preds, Succs []*BasicBlock // instruction list Instrs []Instruction Phis []*Phi // contains filtered or unexported fields }
implement Value
func (*BasicBlock) AddSucc ¶
func (b *BasicBlock) AddSucc(succ *BasicBlock)
func (*BasicBlock) AddUser ¶
func (b *BasicBlock) AddUser(u User)
func (*BasicBlock) GetType ¶
func (b *BasicBlock) GetType() Types
func (*BasicBlock) GetUsers ¶
func (b *BasicBlock) GetUsers() []User
func (*BasicBlock) LastInst ¶
func (b *BasicBlock) LastInst() Instruction
func (*BasicBlock) RemoveUser ¶
func (b *BasicBlock) RemoveUser(u User)
func (*BasicBlock) Sealed ¶
func (b *BasicBlock) Sealed()
func (*BasicBlock) SetType ¶
func (b *BasicBlock) SetType(ts Types)
type BinOp ¶
type BinOp struct { Op BinaryOpcode X, Y Value // contains filtered or unexported fields }
----------- BinOp
func (*BinOp) InferenceType ¶
func (b *BinOp) InferenceType()
func (*BinOp) RemoveUser ¶
type BinaryOpcode ¶
type BinaryOpcode int
const ( // Binary OpShl BinaryOpcode = iota // << OpShr // >> OpAnd // & OpAndNot // &^ OpOr // | OpXor // ^ OpAdd // + OpSub // - OpMul // * OpDiv // / OpMod // % OpGt // > OpLt // < OpGtEq // >= OpLtEq // <= OpEq // == OpNotEq // != <> )
type Call ¶
type Call struct { // for call function Method Value Args []Value // contains filtered or unexported fields }
----------- Call call instruction call method function with args as argument
func (*Call) InferenceType ¶
func (c *Call) InferenceType()
func (*Call) RemoveUser ¶
type ChanType ¶
type ChanType struct {
// contains filtered or unexported fields
}
====================== chan type
func NewChanType ¶
type Const ¶
type Const struct { // other Unary int // contains filtered or unexported fields }
----------- Const only Value
func (*Const) RemoveUser ¶
type Field ¶
type Field struct { // field Key Value I Value // capture by other function OutCapture bool // contains filtered or unexported fields }
instruction ----------- Field
func (*Field) Assign ¶
func (field *Field) Assign(v Value, f *FunctionBuilder)
--------------- point variable to value `f.symbol[variable]value` --------------- it's memory address, not SSA value
func (*Field) GetLastValue ¶
func (*Field) GetValue ¶
func (f *Field) GetValue(_ *FunctionBuilder) Value
func (*Field) InferenceType ¶
func (f *Field) InferenceType()
func (*Field) RemoveUser ¶
type Function ¶
type Function struct { Name string // package Package *Package Param []*Parameter Return []*Return // type ParamTyp []Types ReturnTyp []Types // BasicBlock list Blocks []*BasicBlock EnterBlock *BasicBlock ExitBlock *BasicBlock // anonymous function in this function AnonFuncs []*Function FreeValues []Value // the value, captured variable form parent-function, Pos *Position // current position // contains filtered or unexported fields }
implement Value
func NewFunctionDefine ¶
just create a function define, only function parameter type \ return type \ ellipsis
func (*Function) DisAsm ¶
func (f *Function) DisAsm(flag FunctionAsmFlag) string
func (*Function) InspectVariable ¶
func (f *Function) InspectVariable(varName string) *InspectVariableResult
func (*Function) NewBasicBlock ¶
func (f *Function) NewBasicBlock(name string) *BasicBlock
func (*Function) NewBasicBlockUnSealed ¶
func (f *Function) NewBasicBlockUnSealed(name string) *BasicBlock
func (*Function) NewErrorWithPos ¶
func (*Function) RemoveUser ¶
func (*Function) ReturnValue ¶
func (*Function) SetReg ¶
func (f *Function) SetReg(i Instruction)
func (*Function) WriteVariable ¶
--------------- `f.currentDef` hanlder, read && write
type FunctionAsmFlag ¶
type FunctionAsmFlag int
const ( DisAsmDefault FunctionAsmFlag = 1 << iota DisAsmWithoutSource )
type FunctionBuilder ¶
type FunctionBuilder struct { *Function CurrentBlock *BasicBlock // current block to build // contains filtered or unexported fields }
Function builder API
func NewBuilder ¶
func NewBuilder(f *Function, next *FunctionBuilder) *FunctionBuilder
func (*FunctionBuilder) AddDefer ¶
func (b *FunctionBuilder) AddDefer(call *Call)
add current function defer function
func (*FunctionBuilder) BuildFreeValue ¶
func (f *FunctionBuilder) BuildFreeValue(variable string) Value
func (*FunctionBuilder) CanBuildFreeValue ¶
func (b *FunctionBuilder) CanBuildFreeValue(variable string) bool
func (*FunctionBuilder) CreateInterfaceWithVs ¶
func (b *FunctionBuilder) CreateInterfaceWithVs(keys []Value, vs []Value) *Interface
func (*FunctionBuilder) EmitArith ¶
func (f *FunctionBuilder) EmitArith(op BinaryOpcode, x, y Value) *BinOp
func (*FunctionBuilder) EmitCall ¶
func (f *FunctionBuilder) EmitCall(c *Call) *Call
func (*FunctionBuilder) EmitIf ¶
func (f *FunctionBuilder) EmitIf(cond Value) *If
func (*FunctionBuilder) EmitInterfaceBuildWithType ¶
func (f *FunctionBuilder) EmitInterfaceBuildWithType(typ Types, Len, Cap Value) *Interface
func (*FunctionBuilder) EmitInterfaceSlice ¶
func (f *FunctionBuilder) EmitInterfaceSlice(i *Interface, low, high, max Value) *Interface
func (*FunctionBuilder) EmitJump ¶
func (f *FunctionBuilder) EmitJump(to *BasicBlock) *Jump
func (*FunctionBuilder) EmitReturn ¶
func (f *FunctionBuilder) EmitReturn(vs []Value) *Return
func (*FunctionBuilder) EmitSwitch ¶
func (f *FunctionBuilder) EmitSwitch(cond Value, defaultb *BasicBlock, label []SwitchLabel) *Switch
func (*FunctionBuilder) GetBreak ¶
func (b *FunctionBuilder) GetBreak() *BasicBlock
get target feild
func (*FunctionBuilder) GetContinue ¶
func (b *FunctionBuilder) GetContinue() *BasicBlock
func (*FunctionBuilder) GetFallthrough ¶
func (b *FunctionBuilder) GetFallthrough() *BasicBlock
func (FunctionBuilder) GetParentBuilder ¶
func (b FunctionBuilder) GetParentBuilder() *FunctionBuilder
get parent function
func (*FunctionBuilder) MapBlockSymbolTable ¶
func (b *FunctionBuilder) MapBlockSymbolTable(text string) string
use block symbol table map variable -> variable+blockid
func (*FunctionBuilder) NewCall ¶
func (f *FunctionBuilder) NewCall(target Value, args []Value, isDropError bool) *Call
func (*FunctionBuilder) NewError ¶
func (b *FunctionBuilder) NewError(kind ErrorKind, format string, arg ...any)
func (*FunctionBuilder) NewField ¶
func (b *FunctionBuilder) NewField(key string) *Field
func (*FunctionBuilder) PopBlockSymbolTable ¶
func (b *FunctionBuilder) PopBlockSymbolTable()
func (*FunctionBuilder) PopFunction ¶
func (b *FunctionBuilder) PopFunction() *FunctionBuilder
func (*FunctionBuilder) PopTarget ¶
func (b *FunctionBuilder) PopTarget() bool
func (*FunctionBuilder) PushBlockSymbolTable ¶
func (b *FunctionBuilder) PushBlockSymbolTable()
block symboltable stack
func (*FunctionBuilder) PushFunction ¶
func (b *FunctionBuilder) PushFunction(newfunc *Function) *FunctionBuilder
func (*FunctionBuilder) PushTarget ¶
func (b *FunctionBuilder) PushTarget(_break, _continue, _fallthrough *BasicBlock)
target stack
func (*FunctionBuilder) ReadField ¶
func (b *FunctionBuilder) ReadField(key string) *Field
func (*FunctionBuilder) ReadVariable ¶
func (b *FunctionBuilder) ReadVariable(variable string) Value
func (*FunctionBuilder) SetPosition ¶
func (b *FunctionBuilder) SetPosition(pos *Position) *Position
handler position: set new position and return original position for backup
type IdentifierLV ¶
type IdentifierLV struct {
// contains filtered or unexported fields
}
--------------- only point variable to value with `f.currentDef` --------------- is SSA value
func NewIndentifierLV ¶
func NewIndentifierLV(variable string) *IdentifierLV
func (*IdentifierLV) Assign ¶
func (i *IdentifierLV) Assign(v Value, f *FunctionBuilder)
func (*IdentifierLV) GetValue ¶
func (i *IdentifierLV) GetValue(f *FunctionBuilder) Value
type If ¶
type If struct { Cond Value True *BasicBlock False *BasicBlock // contains filtered or unexported fields }
----------- IF The If instruction transfers control to one of the two successors of its owning block, depending on the boolean Cond: the first if true, the second if false.
func (*If) AddFalse ¶
func (i *If) AddFalse(f *BasicBlock)
func (*If) AddTrue ¶
func (i *If) AddTrue(t *BasicBlock)
func (*If) InferenceType ¶
func (i *If) InferenceType()
type InspectVariableResult ¶
type InspectVariableResult struct { VariableName string ProbablyTypes []string ProbablyValues []string }
func (*InspectVariableResult) Merge ¶
func (r *InspectVariableResult) Merge(other *InspectVariableResult)
type Instruction ¶
type Instruction interface { GetParent() *Function GetBlock() *BasicBlock String() string // pos Pos() string }
type Interface ¶
type Interface struct {
// when slice or map
Len, Cap Value
// contains filtered or unexported fields
}
----------- Interface instruction + value + user
func (*Interface) InferenceType ¶
func (i *Interface) InferenceType()
func (*Interface) RemoveUser ¶
func (*Interface) ReplaceValue ¶
----------- Interface
type InterfaceType ¶
type InterfaceType struct { Kind InterfaceTypeKind Key []Value Field []Types // contains filtered or unexported fields }
func NewInterfaceType ¶
func NewInterfaceType() *InterfaceType
func NewMapType ¶
func NewMapType(key, field Types) *InterfaceType
func (*InterfaceType) AddField ¶
func (s *InterfaceType) AddField(key Value, field Types)
for struct build
func (*InterfaceType) GetField ¶
func (s *InterfaceType) GetField(key Value) Types
func (InterfaceType) String ¶
func (itype InterfaceType) String() string
func (*InterfaceType) Transform ¶
func (s *InterfaceType) Transform()
===================== transform
type InterfaceTypeKind ¶
type InterfaceTypeKind int
==================== interface type
const ( Slice InterfaceTypeKind = iota Map Struct )
type Jump ¶
type Jump struct { To *BasicBlock // contains filtered or unexported fields }
----------- Jump The Jump instruction transfers control to the sole successor of its owning block.
the block containing Jump instruction only have one successor block
type LeftValue ¶
type LeftValue interface { Assign(Value, *FunctionBuilder) GetValue(*FunctionBuilder) Value }
--------------- for assign
type Package ¶
type Package struct { Name string // point to program Prog *Program // function list Funcs []*Function }
func (*Package) NewFunction ¶
type Parameter ¶
type Parameter struct { Func *Function // contains filtered or unexported fields }
----------- Parameter
func (*Parameter) RemoveUser ¶
type Phi ¶
type Phi struct { Edge []Value // edge[i] from phi.Block.Preds[i] // contains filtered or unexported fields }
----------- Phi
func (*Phi) InferenceType ¶
func (phi *Phi) InferenceType()
func (*Phi) RemoveUser ¶
type Position ¶
type Program ¶
type Program struct { // package list Packages []*Package // contains filtered or unexported fields }
func NewProgram ¶
func NewProgram() *Program
func (*Program) InspectVariable ¶
func (p *Program) InspectVariable(varName string) *InspectVariableResult
func (*Program) NewPackage ¶
func (*Program) ShowWithSource ¶
func (p *Program) ShowWithSource()
type Return ¶
type Return struct { Results []Value // contains filtered or unexported fields }
----------- Return The Return instruction returns values and control back to the calling function.
func (*Return) InferenceType ¶
func (r *Return) InferenceType()
type Switch ¶
type Switch struct {
// contains filtered or unexported fields
}
func (*Switch) InferenceType ¶
func (sw *Switch) InferenceType()
type SwitchLabel ¶
type SwitchLabel struct {
// contains filtered or unexported fields
}
----------- Switch
func NewSwitchLabel ¶
func NewSwitchLabel(v Value, dest *BasicBlock) SwitchLabel
type Types ¶
type Types []Type // each value can have multiple type possible
func ParseTypesFromValues ¶
type UnOp ¶
type UnOp struct { Op UnaryOpcode X Value // contains filtered or unexported fields }
type Update ¶
type Update struct {
// contains filtered or unexported fields
}
----------- Update
func (*Update) InferenceType ¶
func (u *Update) InferenceType()