Documentation ¶
Index ¶
- Constants
- Variables
- func BindingNotFound(v string, r *Range) string
- func BindingNotFoundInCall(v string) string
- func CallAssignmentMismatch(left int, right string) string
- func CallAssignmentMismatchDropError(left int, right string) string
- func CombineMemberCallVariableName(caller, callee Value) (string, bool)
- func ContAssignExtern(name string) string
- func DeleteInst(i Instruction)
- func ExternFieldError(instance, name, key, want string) string
- func FunctionContReturnError() string
- func GetAllKey(t Type) []string
- func GetKeyString(v Value) string
- func GetMethodsName(t Type) []string
- func GetTypeStr(n Value) string
- func IsConst(v Instruction) bool
- func IsControlInstruction(i Instruction) bool
- func IsObjectType(t Type) bool
- func LineDisasm(v Instruction) string
- func LineShortDisasm(v Instruction) string
- func NewInstruction() anInstruction
- func NewValue() anValue
- func NewVariable(globalIndex int, name string, local bool, ...) ssautil.VersionedIF[Value]
- func NoCheckMustInFirst() string
- func ReplaceAllValue(v Value, to Value)
- func ReplaceMemberCall(v, to Value) map[string]Value
- func ReplaceValue(v Value, to Value, skip func(Instruction) bool)
- func RunOnCoverOr[T, U Instruction](insts []U, cover func(Instruction) (T, bool), f func(T), or func(U))
- func SetMemberCall(obj, key, member Value)
- func SpinHandle(name string, phiValue, origin, latch Value) map[string]Value
- func TryGetSimilarityKey(table []string, name string) string
- func TypeCompare(t1, t2 Type) bool
- func ValueIsNull() string
- func ValueUndefined(v string) string
- type AliasType
- func (b *AliasType) AddMethod(id string, f *FunctionType)
- func (a *AliasType) GetMethod() map[string]*FunctionType
- func (a *AliasType) GetTypeKind() TypeKind
- func (b *AliasType) PkgPathString() string
- func (a *AliasType) RawString() string
- func (a *AliasType) SetMethod(m map[string]*FunctionType)
- func (a *AliasType) String() string
- type Assert
- func (i *Assert) AddMask(v Value)
- func (a *Assert) AddVariable(v *Variable)
- func (a *Assert) GetAllVariables() map[string]*Variable
- func (a *Assert) GetBlock() *BasicBlock
- func (a *Assert) GetFunc() *Function
- func (a *Assert) GetId() int
- func (a *Assert) GetLastVariable() *Variable
- func (i *Assert) GetMask() []Value
- func (a *Assert) GetName() string
- func (i *Assert) GetOpcode() Opcode
- func (a *Assert) GetOperand(i int) Value
- func (a *Assert) GetOperandNum() int
- func (a *Assert) GetOperands() Values
- func (a *Assert) GetProgram() *Program
- func (c *Assert) GetRange() *Range
- func (r *Assert) GetUsers() Users
- func (a *Assert) GetValues() Values
- func (a *Assert) GetVariable(name string) *Variable
- func (i *Assert) GetVerboseName() string
- func (r *Assert) HasUsers() bool
- func (a *Assert) HasValues() bool
- func (c *Assert) IsExtern() bool
- func (i *Assert) IsUndefined() bool
- func (a *Assert) LineDisasm() string
- func (i *Assert) Masked() bool
- func (c *Assert) NewError(kind ErrorKind, tag ErrorTag, msg string)
- func (a *Assert) ReplaceValue(v, to Value)
- func (i *Assert) SelfDelete()
- func (a *Assert) SetBlock(block *BasicBlock)
- func (c *Assert) SetExtern(b bool)
- func (a *Assert) SetFunc(f *Function)
- func (a *Assert) SetId(id int)
- func (a *Assert) SetName(v string)
- func (c *Assert) SetRange(pos *Range)
- func (i *Assert) SetVerboseName(verbose string)
- func (a *Assert) String() string
- type BasicBlock
- func (i *BasicBlock) AddMask(v Value)
- func (n *BasicBlock) AddMember(k, v Value)
- func (b *BasicBlock) AddSucc(succ *BasicBlock)
- func (n *BasicBlock) AddUser(u User)
- func (a *BasicBlock) AddVariable(v *Variable)
- func (n *BasicBlock) DeleteMember(k Value)
- func (b *BasicBlock) EmitInst(i Instruction)
- func (n *BasicBlock) GetAllMember() map[Value]Value
- func (a *BasicBlock) GetAllVariables() map[string]*Variable
- func (a *BasicBlock) GetBlock() *BasicBlock
- func (b *BasicBlock) GetBlockById(name string) *BasicBlock
- func (a *BasicBlock) GetFunc() *Function
- func (a *BasicBlock) GetId() int
- func (n *BasicBlock) GetIndexMember(i int) (Value, bool)
- func (n *BasicBlock) GetKey() Value
- func (a *BasicBlock) GetLastVariable() *Variable
- func (i *BasicBlock) GetMask() []Value
- func (n *BasicBlock) GetMember(key Value) (Value, bool)
- func (a *BasicBlock) GetName() string
- func (n *BasicBlock) GetObject() Value
- func (i *BasicBlock) GetOpcode() Opcode
- func (a *BasicBlock) GetOperand(i int) Value
- func (a *BasicBlock) GetOperandNum() int
- func (a *BasicBlock) GetOperands() Values
- func (a *BasicBlock) GetProgram() *Program
- func (c *BasicBlock) GetRange() *Range
- func (n *BasicBlock) GetStringMember(key string) (Value, bool)
- func (b *BasicBlock) GetType() Type
- func (n *BasicBlock) GetUsers() Users
- func (b *BasicBlock) GetValues() Values
- func (a *BasicBlock) GetVariable(name string) *Variable
- func (i *BasicBlock) GetVerboseName() string
- func (n *BasicBlock) HasUsers() bool
- func (b *BasicBlock) HasValues() bool
- func (b *BasicBlock) IsBlock(name string) bool
- func (c *BasicBlock) IsExtern() bool
- func (n *BasicBlock) IsMember() bool
- func (n *BasicBlock) IsMemberCallVariable() bool
- func (n *BasicBlock) IsObject() bool
- func (i *BasicBlock) IsUndefined() bool
- func (b *BasicBlock) LastInst() Instruction
- func (a *BasicBlock) LineDisasm() string
- func (i *BasicBlock) Masked() bool
- func (c *BasicBlock) NewError(kind ErrorKind, tag ErrorTag, msg string)
- func (b *BasicBlock) Reachable() int
- func (n *BasicBlock) RemoveUser(u User)
- func (i *BasicBlock) ReplaceValue(Value, Value)
- func (i *BasicBlock) SelfDelete()
- func (a *BasicBlock) SetBlock(block *BasicBlock)
- func (c *BasicBlock) SetExtern(b bool)
- func (a *BasicBlock) SetFunc(f *Function)
- func (a *BasicBlock) SetId(id int)
- func (n *BasicBlock) SetKey(k Value)
- func (a *BasicBlock) SetName(v string)
- func (n *BasicBlock) SetObject(v Value)
- func (c *BasicBlock) SetRange(pos *Range)
- func (b *BasicBlock) SetType(ts Type)
- func (i *BasicBlock) SetVerboseName(verbose string)
- func (b *BasicBlock) String() string
- type BasicType
- func (b *BasicType) AddMethod(id string, f *FunctionType)
- func (b *BasicType) GetMethod() map[string]*FunctionType
- func (b *BasicType) GetTypeKind() TypeKind
- func (b *BasicType) PkgPathString() string
- func (b *BasicType) RawString() string
- func (b *BasicType) SetMethod(method map[string]*FunctionType)
- func (b *BasicType) String() string
- type BinOp
- func (i *BinOp) AddMask(v Value)
- func (n *BinOp) AddMember(k, v Value)
- func (n *BinOp) AddUser(u User)
- func (a *BinOp) AddVariable(v *Variable)
- func (n *BinOp) DeleteMember(k Value)
- func (n *BinOp) GetAllMember() map[Value]Value
- func (a *BinOp) GetAllVariables() map[string]*Variable
- func (a *BinOp) GetBlock() *BasicBlock
- func (a *BinOp) GetFunc() *Function
- func (a *BinOp) GetId() int
- func (n *BinOp) GetIndexMember(i int) (Value, bool)
- func (n *BinOp) GetKey() Value
- func (a *BinOp) GetLastVariable() *Variable
- func (i *BinOp) GetMask() []Value
- func (n *BinOp) GetMember(key Value) (Value, bool)
- func (a *BinOp) GetName() string
- func (n *BinOp) GetObject() Value
- func (i *BinOp) GetOpcode() Opcode
- func (a *BinOp) GetOperand(i int) Value
- func (a *BinOp) GetOperandNum() int
- func (a *BinOp) GetOperands() Values
- func (a *BinOp) GetProgram() *Program
- func (c *BinOp) GetRange() *Range
- func (n *BinOp) GetStringMember(key string) (Value, bool)
- func (n *BinOp) GetType() Type
- func (n *BinOp) GetUsers() Users
- func (b *BinOp) GetValues() Values
- func (a *BinOp) GetVariable(name string) *Variable
- func (i *BinOp) GetVerboseName() string
- func (n *BinOp) HasUsers() bool
- func (b *BinOp) HasValues() bool
- func (c *BinOp) IsExtern() bool
- func (n *BinOp) IsMember() bool
- func (n *BinOp) IsMemberCallVariable() bool
- func (n *BinOp) IsObject() bool
- func (i *BinOp) IsUndefined() bool
- func (a *BinOp) LineDisasm() string
- func (i *BinOp) Masked() bool
- func (c *BinOp) NewError(kind ErrorKind, tag ErrorTag, msg string)
- func (n *BinOp) RemoveUser(u User)
- func (b *BinOp) ReplaceValue(v Value, to Value)
- func (i *BinOp) SelfDelete()
- func (a *BinOp) SetBlock(block *BasicBlock)
- func (c *BinOp) SetExtern(b bool)
- func (a *BinOp) SetFunc(f *Function)
- func (a *BinOp) SetId(id int)
- func (n *BinOp) SetKey(k Value)
- func (a *BinOp) SetName(v string)
- func (n *BinOp) SetObject(v Value)
- func (c *BinOp) SetRange(pos *Range)
- func (n *BinOp) SetType(typ Type)
- func (i *BinOp) SetVerboseName(verbose string)
- func (b *BinOp) String() string
- type BinaryOpcode
- type Call
- func (i *Call) AddMask(v Value)
- func (n *Call) AddMember(k, v Value)
- func (n *Call) AddUser(u User)
- func (a *Call) AddVariable(v *Variable)
- func (n *Call) DeleteMember(k Value)
- func (n *Call) GetAllMember() map[Value]Value
- func (a *Call) GetAllVariables() map[string]*Variable
- func (a *Call) GetBlock() *BasicBlock
- func (a *Call) GetFunc() *Function
- func (a *Call) GetId() int
- func (n *Call) GetIndexMember(i int) (Value, bool)
- func (n *Call) GetKey() Value
- func (a *Call) GetLastVariable() *Variable
- func (i *Call) GetMask() []Value
- func (n *Call) GetMember(key Value) (Value, bool)
- func (a *Call) GetName() string
- func (n *Call) GetObject() Value
- func (i *Call) GetOpcode() Opcode
- func (a *Call) GetOperand(i int) Value
- func (a *Call) GetOperandNum() int
- func (a *Call) GetOperands() Values
- func (a *Call) GetProgram() *Program
- func (c *Call) GetRange() *Range
- func (n *Call) GetStringMember(key string) (Value, bool)
- func (n *Call) GetType() Type
- func (n *Call) GetUsers() Users
- func (c *Call) GetValues() Values
- func (a *Call) GetVariable(name string) *Variable
- func (i *Call) GetVerboseName() string
- func (c *Call) HandleFreeValue(fvs []*FunctionFreeValue)
- func (n *Call) HasUsers() bool
- func (c *Call) HasValues() bool
- func (c *Call) IsExtern() bool
- func (n *Call) IsMember() bool
- func (n *Call) IsMemberCallVariable() bool
- func (n *Call) IsObject() bool
- func (i *Call) IsUndefined() bool
- func (a *Call) LineDisasm() string
- func (i *Call) Masked() bool
- func (c *Call) NewError(kind ErrorKind, tag ErrorTag, msg string)
- func (n *Call) RemoveUser(u User)
- func (c *Call) ReplaceValue(v Value, to Value)
- func (i *Call) SelfDelete()
- func (a *Call) SetBlock(block *BasicBlock)
- func (c *Call) SetExtern(b bool)
- func (a *Call) SetFunc(f *Function)
- func (a *Call) SetId(id int)
- func (n *Call) SetKey(k Value)
- func (a *Call) SetName(v string)
- func (n *Call) SetObject(v Value)
- func (c *Call) SetRange(pos *Range)
- func (n *Call) SetType(typ Type)
- func (i *Call) SetVerboseName(verbose string)
- func (c *Call) String() string
- type ChanType
- func (b *ChanType) AddMethod(id string, f *FunctionType)
- func (c *ChanType) GetMethod() map[string]*FunctionType
- func (c *ChanType) GetTypeKind() TypeKind
- func (c ChanType) PkgPathString() string
- func (c ChanType) RawString() string
- func (c *ChanType) SetMethod(m map[string]*FunctionType)
- func (c ChanType) String() string
- type Const
- func (c *Const) Boolean() bool
- func (c *Const) Float() float64
- func (c *Const) GetRawValue() any
- func (c *Const) GetType() Type
- func (c *Const) GetTypeKind() TypeKind
- func (c *Const) IsBoolean() bool
- func (c *Const) IsFloat() bool
- func (c *Const) IsNumber() bool
- func (c *Const) IsString() bool
- func (c *Const) Number() int64
- func (c *Const) SetType(ts Type)
- func (c Const) String() string
- func (c *Const) VarString() string
- type ConstInst
- func CalcConstBinary(x, y *ConstInst, op BinaryOpcode) *ConstInst
- func CalcConstUnary(x *ConstInst, op UnaryOpcode) *ConstInst
- func NewAny() *ConstInst
- func NewConst(i any) *ConstInst
- func NewConstInst(c *Const) *ConstInst
- func NewConstWithUnary(i any, un int) *ConstInst
- func NewNil() *ConstInst
- func ToConst(v Instruction) (*ConstInst, bool)
- func (i *ConstInst) AddMask(v Value)
- func (n *ConstInst) AddMember(k, v Value)
- func (n *ConstInst) AddUser(u User)
- func (a *ConstInst) AddVariable(v *Variable)
- func (n *ConstInst) DeleteMember(k Value)
- func (n *ConstInst) GetAllMember() map[Value]Value
- func (a *ConstInst) GetAllVariables() map[string]*Variable
- func (a *ConstInst) GetBlock() *BasicBlock
- func (a *ConstInst) GetFunc() *Function
- func (a *ConstInst) GetId() int
- func (n *ConstInst) GetIndexMember(i int) (Value, bool)
- func (n *ConstInst) GetKey() Value
- func (a *ConstInst) GetLastVariable() *Variable
- func (i *ConstInst) GetMask() []Value
- func (n *ConstInst) GetMember(key Value) (Value, bool)
- func (a *ConstInst) GetName() string
- func (n *ConstInst) GetObject() Value
- func (i *ConstInst) GetOpcode() Opcode
- func (a *ConstInst) GetOperand(i int) Value
- func (a *ConstInst) GetOperandNum() int
- func (a *ConstInst) GetOperands() Values
- func (a *ConstInst) GetProgram() *Program
- func (c *ConstInst) GetRange() *Range
- func (n *ConstInst) GetStringMember(key string) (Value, bool)
- func (c *ConstInst) GetType() Type
- func (n *ConstInst) GetUsers() Users
- func (c *ConstInst) GetValues() Values
- func (a *ConstInst) GetVariable(name string) *Variable
- func (i *ConstInst) GetVerboseName() string
- func (n *ConstInst) HasUsers() bool
- func (c *ConstInst) HasValues() bool
- func (c *ConstInst) IsExtern() bool
- func (n *ConstInst) IsMember() bool
- func (n *ConstInst) IsMemberCallVariable() bool
- func (n *ConstInst) IsObject() bool
- func (i *ConstInst) IsUndefined() bool
- func (a *ConstInst) LineDisasm() string
- func (i *ConstInst) Masked() bool
- func (c *ConstInst) NewError(kind ErrorKind, tag ErrorTag, msg string)
- func (n *ConstInst) RemoveUser(u User)
- func (c *ConstInst) ReplaceValue(v Value, to Value)
- func (i *ConstInst) SelfDelete()
- func (a *ConstInst) SetBlock(block *BasicBlock)
- func (c *ConstInst) SetExtern(b bool)
- func (a *ConstInst) SetFunc(f *Function)
- func (a *ConstInst) SetId(id int)
- func (n *ConstInst) SetKey(k Value)
- func (a *ConstInst) SetName(v string)
- func (n *ConstInst) SetObject(v Value)
- func (c *ConstInst) SetRange(pos *Range)
- func (c *ConstInst) SetType(ts Type)
- func (i *ConstInst) SetVerboseName(verbose string)
- func (c *ConstInst) String() string
- type DisasmLiner
- type ErrorComment
- type ErrorCommentId
- type ErrorHandler
- func (e *ErrorHandler) AddDone(d *BasicBlock)
- func (e *ErrorHandler) AddFinal(f *BasicBlock)
- func (i *ErrorHandler) AddMask(v Value)
- func (a *ErrorHandler) AddVariable(v *Variable)
- func (a *ErrorHandler) GetAllVariables() map[string]*Variable
- func (a *ErrorHandler) GetBlock() *BasicBlock
- func (a *ErrorHandler) GetFunc() *Function
- func (a *ErrorHandler) GetId() int
- func (a *ErrorHandler) GetLastVariable() *Variable
- func (i *ErrorHandler) GetMask() []Value
- func (a *ErrorHandler) GetName() string
- func (i *ErrorHandler) GetOpcode() Opcode
- func (a *ErrorHandler) GetOperand(i int) Value
- func (a *ErrorHandler) GetOperandNum() int
- func (a *ErrorHandler) GetOperands() Values
- func (a *ErrorHandler) GetProgram() *Program
- func (c *ErrorHandler) GetRange() *Range
- func (a *ErrorHandler) GetVariable(name string) *Variable
- func (i *ErrorHandler) GetVerboseName() string
- func (c *ErrorHandler) IsExtern() bool
- func (i *ErrorHandler) IsUndefined() bool
- func (a *ErrorHandler) LineDisasm() string
- func (i *ErrorHandler) Masked() bool
- func (c *ErrorHandler) NewError(kind ErrorKind, tag ErrorTag, msg string)
- func (i *ErrorHandler) ReplaceValue(Value, Value)
- func (i *ErrorHandler) SelfDelete()
- func (a *ErrorHandler) SetBlock(block *BasicBlock)
- func (c *ErrorHandler) SetExtern(b bool)
- func (a *ErrorHandler) SetFunc(f *Function)
- func (a *ErrorHandler) SetId(id int)
- func (a *ErrorHandler) SetName(v string)
- func (c *ErrorHandler) SetRange(pos *Range)
- func (i *ErrorHandler) SetVerboseName(verbose string)
- func (e *ErrorHandler) String() string
- type ErrorKind
- type ErrorLogger
- type ErrorTag
- type ExternLib
- func (i *ExternLib) AddMask(v Value)
- func (n *ExternLib) AddMember(k, v Value)
- func (n *ExternLib) AddUser(u User)
- func (a *ExternLib) AddVariable(v *Variable)
- func (ex *ExternLib) BuildField(key string) Value
- func (n *ExternLib) DeleteMember(k Value)
- func (n *ExternLib) GetAllMember() map[Value]Value
- func (a *ExternLib) GetAllVariables() map[string]*Variable
- func (a *ExternLib) GetBlock() *BasicBlock
- func (a *ExternLib) GetFunc() *Function
- func (a *ExternLib) GetId() int
- func (n *ExternLib) GetIndexMember(i int) (Value, bool)
- func (n *ExternLib) GetKey() Value
- func (a *ExternLib) GetLastVariable() *Variable
- func (i *ExternLib) GetMask() []Value
- func (n *ExternLib) GetMember(key Value) (Value, bool)
- func (a *ExternLib) GetName() string
- func (n *ExternLib) GetObject() Value
- func (i *ExternLib) GetOpcode() Opcode
- func (a *ExternLib) GetOperand(i int) Value
- func (a *ExternLib) GetOperandNum() int
- func (a *ExternLib) GetOperands() Values
- func (a *ExternLib) GetProgram() *Program
- func (c *ExternLib) GetRange() *Range
- func (n *ExternLib) GetStringMember(key string) (Value, bool)
- func (n *ExternLib) GetType() Type
- func (n *ExternLib) GetUsers() Users
- func (e *ExternLib) GetValues() Values
- func (a *ExternLib) GetVariable(name string) *Variable
- func (i *ExternLib) GetVerboseName() string
- func (n *ExternLib) HasUsers() bool
- func (e *ExternLib) HasValues() bool
- func (c *ExternLib) IsExtern() bool
- func (n *ExternLib) IsMember() bool
- func (n *ExternLib) IsMemberCallVariable() bool
- func (n *ExternLib) IsObject() bool
- func (i *ExternLib) IsUndefined() bool
- func (a *ExternLib) LineDisasm() string
- func (i *ExternLib) Masked() bool
- func (c *ExternLib) NewError(kind ErrorKind, tag ErrorTag, msg string)
- func (n *ExternLib) RemoveUser(u User)
- func (e *ExternLib) ReplaceValue(v Value, to Value)
- func (i *ExternLib) SelfDelete()
- func (a *ExternLib) SetBlock(block *BasicBlock)
- func (c *ExternLib) SetExtern(b bool)
- func (a *ExternLib) SetFunc(f *Function)
- func (a *ExternLib) SetId(id int)
- func (n *ExternLib) SetKey(k Value)
- func (a *ExternLib) SetName(v string)
- func (n *ExternLib) SetObject(v Value)
- func (c *ExternLib) SetRange(pos *Range)
- func (n *ExternLib) SetType(typ Type)
- func (i *ExternLib) SetVerboseName(verbose string)
- func (e *ExternLib) String() string
- type FullDisasmLiner
- func (f *FullDisasmLiner) AddLevel() bool
- func (b FullDisasmLiner) DeleteName(i Instruction)
- func (f *FullDisasmLiner) DisasmValue(v Value) string
- func (b FullDisasmLiner) GetName(i Instruction) (string, bool)
- func (b FullDisasmLiner) SetName(i Instruction, name string)
- func (b *FullDisasmLiner) SkipLevelChecking() bool
- type Function
- func (f *Function) AddErrorComment(str string, line int) error
- func (i *Function) AddMask(v Value)
- func (n *Function) AddMember(k, v Value)
- func (f *Function) AddSideEffect(name *Variable, v Value)
- func (n *Function) AddUser(u User)
- func (a *Function) AddVariable(v *Variable)
- func (n *Function) DeleteMember(k Value)
- func (f *Function) DisAsm(flag FunctionAsmFlag) string
- func (f *Function) Finish()
- func (f *Function) FirstBlockInstruction() []Instruction
- func (n *Function) GetAllMember() map[Value]Value
- func (a *Function) GetAllVariables() map[string]*Variable
- func (a *Function) GetBlock() *BasicBlock
- func (f *Function) GetDeferBlock() *BasicBlock
- func (a *Function) GetFunc() *Function
- func (a *Function) GetId() int
- func (n *Function) GetIndexMember(i int) (Value, bool)
- func (n *Function) GetKey() Value
- func (a *Function) GetLastVariable() *Variable
- func (i *Function) GetMask() []Value
- func (n *Function) GetMember(key Value) (Value, bool)
- func (a *Function) GetName() string
- func (n *Function) GetObject() Value
- func (i *Function) GetOpcode() Opcode
- func (a *Function) GetOperand(i int) Value
- func (a *Function) GetOperandNum() int
- func (a *Function) GetOperands() Values
- func (f *Function) GetParent() *Function
- func (f *Function) GetProgram() *Program
- func (c *Function) GetRange() *Range
- func (f *Function) GetReferenceFiles() []string
- func (n *Function) GetStringMember(key string) (Value, bool)
- func (n *Function) GetType() Type
- func (n *Function) GetUsers() Users
- func (f *Function) GetValues() Values
- func (a *Function) GetVariable(name string) *Variable
- func (i *Function) GetVerboseName() string
- func (n *Function) HasUsers() bool
- func (f *Function) HasValues() bool
- func (c *Function) IsExtern() bool
- func (f *Function) IsMain() bool
- func (n *Function) IsMember() bool
- func (n *Function) IsMemberCallVariable() bool
- func (n *Function) IsObject() bool
- func (i *Function) IsUndefined() bool
- func (a *Function) LineDisasm() string
- func (i *Function) Masked() bool
- func (f *Function) NewBasicBlock(name string) *BasicBlock
- func (f *Function) NewBasicBlockNotAddBlocks(name string) *BasicBlock
- func (f *Function) NewBasicBlockNotAddUnSealed(name string) *BasicBlock
- func (f *Function) NewBasicBlockUnSealed(name string) *BasicBlock
- func (f *Function) NewError(kind ErrorKind, tag ErrorTag, format string)
- func (f *Function) NewErrorWithPos(kind ErrorKind, tag ErrorTag, Pos *Range, message string)
- func (f *Function) PushReferenceFile(file, code string)
- func (n *Function) RemoveUser(u User)
- func (i *Function) ReplaceValue(Value, Value)
- func (f *Function) ReturnValue() []Value
- func (i *Function) SelfDelete()
- func (a *Function) SetBlock(block *BasicBlock)
- func (c *Function) SetExtern(b bool)
- func (a *Function) SetFunc(f *Function)
- func (a *Function) SetId(id int)
- func (n *Function) SetKey(k Value)
- func (a *Function) SetName(v string)
- func (n *Function) SetObject(v Value)
- func (c *Function) SetRange(pos *Range)
- func (n *Function) SetType(typ Type)
- func (i *Function) SetVerboseName(verbose string)
- func (f *Function) String() string
- type FunctionAsmFlag
- type FunctionBuilder
- func (b *FunctionBuilder) AddDefer(call *Call)
- func (b *FunctionBuilder) AddLabel(name string, block *BasicBlock)
- func (i FunctionBuilder) AddMask(v Value)
- func (n FunctionBuilder) AddMember(k, v Value)
- func (n FunctionBuilder) AddUser(u User)
- func (a FunctionBuilder) AddVariable(v *Variable)
- func (b *FunctionBuilder) AssignVariable(variable *Variable, value Value)
- func (b *FunctionBuilder) Break() bool
- func (b *FunctionBuilder) BuildFreeValue(variable string) *Parameter
- func (b *FunctionBuilder) BuildSwitch() *SwitchBuilder
- func (b *FunctionBuilder) BuildSyntaxBlock(builder func())
- func (b *FunctionBuilder) BuildTry() *TryBuilder
- func (b *FunctionBuilder) BuildValueFromAny(id string, v any) (value Value)
- func (b *FunctionBuilder) Continue() bool
- func (f *FunctionBuilder) CoverReflectFunctionType(itype reflect.Type, level int) *FunctionType
- func (b *FunctionBuilder) CreateIfBuilder() *IfBuilder
- func (b *FunctionBuilder) CreateInterfaceWithMap(keys []Value, vs []Value) *Make
- func (b *FunctionBuilder) CreateInterfaceWithSlice(vs []Value) *Make
- func (b *FunctionBuilder) CreateLocalVariable(name string) *Variable
- func (b *FunctionBuilder) CreateLoopBuilder() *LoopBuilder
- func (b *FunctionBuilder) CreateMemberCallVariable(value, key Value) *Variable
- func (b *FunctionBuilder) CreateVariable(name string) *Variable
- func (b *FunctionBuilder) DeleteLabel(name string)
- func (n FunctionBuilder) DeleteMember(k Value)
- func (f *FunctionBuilder) EmitAssert(cond, msgValue Value, msg string) *Assert
- func (f *FunctionBuilder) EmitBinOp(op BinaryOpcode, x, y Value) Value
- func (f *FunctionBuilder) EmitCall(c *Call) *Call
- func (f *FunctionBuilder) EmitConstInst(i any) *ConstInst
- func (f *FunctionBuilder) EmitConstInstAny() *ConstInst
- func (f *FunctionBuilder) EmitConstInstNil() *ConstInst
- func (f *FunctionBuilder) EmitConstInstWithUnary(i any, un int) *ConstInst
- func (f *FunctionBuilder) EmitErrorHandler(try, catch *BasicBlock) *ErrorHandler
- func (b *FunctionBuilder) EmitFirst(i Instruction, block *BasicBlock)
- func (f *FunctionBuilder) EmitIf() *If
- func (f *FunctionBuilder) EmitInstructionAfter(i, after Instruction)
- func (f *FunctionBuilder) EmitInstructionBefore(i, before Instruction)
- func (f *FunctionBuilder) EmitJump(to *BasicBlock) *Jump
- func (f *FunctionBuilder) EmitLoop(body, exit *BasicBlock, cond Value) *Loop
- func (f *FunctionBuilder) EmitMakeBuildWithType(typ Type, Len, Cap Value) *Make
- func (f *FunctionBuilder) EmitMakeSlice(i Value, low, high, max Value) *Make
- func (f *FunctionBuilder) EmitMakeWithoutType(Len, Cap Value) *Make
- func (f *FunctionBuilder) EmitNext(iter Value, isIn bool) (key, field, ok Value)
- func (f *FunctionBuilder) EmitNextOnly(iter Value, isIn bool) *Next
- func (f *FunctionBuilder) EmitOnly(i Instruction)
- func (f *FunctionBuilder) EmitPanic(info Value) *Panic
- func (f *FunctionBuilder) EmitPhi(name string, vs []Value) *Phi
- func (f *FunctionBuilder) EmitRecover() *Recover
- func (f *FunctionBuilder) EmitReturn(vs []Value) *Return
- func (f *FunctionBuilder) EmitSideEffect(name string, call *Call, value Value) *SideEffect
- func (f *FunctionBuilder) EmitSwitch(cond Value, defaultb *BasicBlock, label []SwitchLabel) *Switch
- func (f *FunctionBuilder) EmitToBlock(i Instruction, block *BasicBlock)
- func (f *FunctionBuilder) EmitTypeCast(v Value, typ Type) *TypeCast
- func (f *FunctionBuilder) EmitTypeValue(typ Type) *TypeValue
- func (f *FunctionBuilder) EmitUnOp(op UnaryOpcode, v Value) Value
- func (f *FunctionBuilder) EmitUndefined(name string) *Undefined
- func (b *FunctionBuilder) Fallthrough() bool
- func (b *FunctionBuilder) Finish()
- func (n FunctionBuilder) GetAllMember() map[Value]Value
- func (a FunctionBuilder) GetAllVariables() map[string]*Variable
- func (a FunctionBuilder) GetBlock() *BasicBlock
- func (a FunctionBuilder) GetFunc() *Function
- func (a FunctionBuilder) GetId() int
- func (n FunctionBuilder) GetIndexMember(i int) (Value, bool)
- func (n FunctionBuilder) GetKey() Value
- func (b *FunctionBuilder) GetLabel(name string) *BasicBlock
- func (a FunctionBuilder) GetLastVariable() *Variable
- func (b *FunctionBuilder) GetMarkedFunction() *FunctionType
- func (i FunctionBuilder) GetMask() []Value
- func (n FunctionBuilder) GetMember(key Value) (Value, bool)
- func (a FunctionBuilder) GetName() string
- func (n FunctionBuilder) GetObject() Value
- func (a FunctionBuilder) GetOperand(i int) Value
- func (a FunctionBuilder) GetOperandNum() int
- func (a FunctionBuilder) GetOperands() Values
- func (c FunctionBuilder) GetRange() *Range
- func (n FunctionBuilder) GetStringMember(key string) (Value, bool)
- func (n FunctionBuilder) GetType() Type
- func (n FunctionBuilder) GetUsers() Users
- func (a FunctionBuilder) GetVariable(name string) *Variable
- func (i FunctionBuilder) GetVerboseName() string
- func (b FunctionBuilder) HandlerEllipsis()
- func (n FunctionBuilder) HasUsers() bool
- func (b *FunctionBuilder) InterfaceAddFieldBuild(size int, keys func(int) Value, value func(int) Value) *Make
- func (b *FunctionBuilder) IsBlockFinish() bool
- func (c FunctionBuilder) IsExtern() bool
- func (n FunctionBuilder) IsMember() bool
- func (n FunctionBuilder) IsMemberCallVariable() bool
- func (n FunctionBuilder) IsObject() bool
- func (b *FunctionBuilder) IsParentFunctionVariable(v *Variable) bool
- func (i FunctionBuilder) IsUndefined() bool
- func (a FunctionBuilder) LineDisasm() string
- func (i FunctionBuilder) Masked() bool
- func (f *FunctionBuilder) NewCall(target Value, args []Value) *Call
- func (b *FunctionBuilder) NewError(kind ErrorKind, tag ErrorTag, massage string, arg ...interface{})
- func (b *FunctionBuilder) NewFunc(name string) *Function
- func (f *FunctionBuilder) NewParam(name string) *Parameter
- func (b *FunctionBuilder) PeekValue(name string) Value
- func (b *FunctionBuilder) PeekValueByVariable(v *Variable) Value
- func (b *FunctionBuilder) PeekValueInThisFunction(name string) Value
- func (b *FunctionBuilder) PopFunction() *FunctionBuilder
- func (b *FunctionBuilder) PopTarget() bool
- func (b *FunctionBuilder) PushFunction(newFunc *Function) *FunctionBuilder
- func (b *FunctionBuilder) PushTarget(scope ssautil.LabelTarget[Value], _break, _continue, _fallthrough *BasicBlock)
- func (b *FunctionBuilder) ReadMemberCallVariable(value, key Value) Value
- func (b *FunctionBuilder) ReadOrCreateMemberCallVariable(caller, callee Value) Value
- func (b *FunctionBuilder) ReadOrCreateVariable(name string) Value
- func (b *FunctionBuilder) ReadValue(name string) Value
- func (b *FunctionBuilder) ReadValueByVariable(v *Variable) Value
- func (b *FunctionBuilder) ReadValueInThisFunction(name string) Value
- func (n FunctionBuilder) RemoveUser(u User)
- func (i FunctionBuilder) ReplaceValue(Value, Value)
- func (i FunctionBuilder) SelfDelete()
- func (a FunctionBuilder) SetBlock(block *BasicBlock)
- func (f *FunctionBuilder) SetCurrent(i Instruction) func()
- func (b *FunctionBuilder) SetDefineFunc()
- func (c FunctionBuilder) SetExtern(b bool)
- func (a FunctionBuilder) SetFunc(f *Function)
- func (a FunctionBuilder) SetId(id int)
- func (f *FunctionBuilder) SetInstructionPosition(i Instruction)
- func (n FunctionBuilder) SetKey(k Value)
- func (b *FunctionBuilder) SetMarkedFunction(name string)
- func (a FunctionBuilder) SetName(v string)
- func (n FunctionBuilder) SetObject(v Value)
- func (c FunctionBuilder) SetRange(pos *Range)
- func (n FunctionBuilder) SetType(typ Type)
- func (i FunctionBuilder) SetVerboseName(verbose string)
- func (b *FunctionBuilder) TryBuildExternValue(id string) Value
- func (b *FunctionBuilder) TryGetSimilarityKey(name, key string) string
- func (b *FunctionBuilder) WithDefineFunction(defineFunc map[string]any)
- func (b *FunctionBuilder) WithExternLib(lib map[string]map[string]any)
- func (b *FunctionBuilder) WithExternMethod(builder MethodBuilder)
- func (b *FunctionBuilder) WithExternValue(vs map[string]any)
- type FunctionFreeValue
- type FunctionSideEffect
- type FunctionType
- func GetMethod(t Type, id string) *FunctionType
- func NewFunctionType(name string, Parameter []Type, ReturnType Type, IsVariadic bool) *FunctionType
- func NewFunctionTypeDefine(name string, Parameter []Type, ReturnType []Type, IsVariadic bool) *FunctionType
- func ToFunctionType(t Type) (*FunctionType, bool)
- func (b *FunctionType) AddMethod(id string, f *FunctionType)
- func (f *FunctionType) GetMethod() map[string]*FunctionType
- func (s *FunctionType) GetParamString() string
- func (s *FunctionType) GetTypeKind() TypeKind
- func (s *FunctionType) PkgPathString() string
- func (s *FunctionType) RawString() string
- func (s *FunctionType) SetFreeValue(fv map[string]*Parameter)
- func (f *FunctionType) SetMethod(m map[string]*FunctionType)
- func (f *FunctionType) SetModifySelf(b bool)
- func (s *FunctionType) SetName(name string)
- func (s *FunctionType) SetSideEffect(se map[*Variable]Value)
- func (s *FunctionType) String() string
- type If
- func (i *If) AddFalse(f *BasicBlock)
- func (i *If) AddMask(v Value)
- func (i *If) AddTrue(t *BasicBlock)
- func (a *If) AddVariable(v *Variable)
- func (a *If) GetAllVariables() map[string]*Variable
- func (a *If) GetBlock() *BasicBlock
- func (a *If) GetFunc() *Function
- func (a *If) GetId() int
- func (a *If) GetLastVariable() *Variable
- func (i *If) GetMask() []Value
- func (a *If) GetName() string
- func (i *If) GetOpcode() Opcode
- func (a *If) GetOperand(i int) Value
- func (a *If) GetOperandNum() int
- func (a *If) GetOperands() Values
- func (a *If) GetProgram() *Program
- func (c *If) GetRange() *Range
- func (r *If) GetUsers() Users
- func (i *If) GetValues() Values
- func (a *If) GetVariable(name string) *Variable
- func (i *If) GetVerboseName() string
- func (r *If) HasUsers() bool
- func (i *If) HasValues() bool
- func (c *If) IsExtern() bool
- func (i *If) IsUndefined() bool
- func (a *If) LineDisasm() string
- func (i *If) Masked() bool
- func (c *If) NewError(kind ErrorKind, tag ErrorTag, msg string)
- func (i *If) ReplaceValue(v Value, to Value)
- func (i *If) SelfDelete()
- func (a *If) SetBlock(block *BasicBlock)
- func (i *If) SetCondition(t Value)
- func (c *If) SetExtern(b bool)
- func (a *If) SetFunc(f *Function)
- func (a *If) SetId(id int)
- func (a *If) SetName(v string)
- func (c *If) SetRange(pos *Range)
- func (i *If) SetVerboseName(verbose string)
- func (i *If) String() string
- type IfBuilder
- type IfBuilderItem
- type Instruction
- type InterfaceType
- func (b *InterfaceType) AddMethod(id string, f *FunctionType)
- func (i *InterfaceType) GetMethod() map[string]*FunctionType
- func (i *InterfaceType) GetTypeKind() TypeKind
- func (i *InterfaceType) PkgPathString() string
- func (i *InterfaceType) RawString() string
- func (i *InterfaceType) SetMethod(m map[string]*FunctionType)
- func (i *InterfaceType) String() string
- type Jump
- func (i *Jump) AddMask(v Value)
- func (a *Jump) AddVariable(v *Variable)
- func (a *Jump) GetAllVariables() map[string]*Variable
- func (a *Jump) GetBlock() *BasicBlock
- func (a *Jump) GetFunc() *Function
- func (a *Jump) GetId() int
- func (a *Jump) GetLastVariable() *Variable
- func (i *Jump) GetMask() []Value
- func (a *Jump) GetName() string
- func (i *Jump) GetOpcode() Opcode
- func (a *Jump) GetOperand(i int) Value
- func (a *Jump) GetOperandNum() int
- func (a *Jump) GetOperands() Values
- func (a *Jump) GetProgram() *Program
- func (c *Jump) GetRange() *Range
- func (a *Jump) GetVariable(name string) *Variable
- func (i *Jump) GetVerboseName() string
- func (c *Jump) IsExtern() bool
- func (i *Jump) IsUndefined() bool
- func (a *Jump) LineDisasm() string
- func (i *Jump) Masked() bool
- func (c *Jump) NewError(kind ErrorKind, tag ErrorTag, msg string)
- func (i *Jump) ReplaceValue(Value, Value)
- func (i *Jump) SelfDelete()
- func (a *Jump) SetBlock(block *BasicBlock)
- func (c *Jump) SetExtern(b bool)
- func (a *Jump) SetFunc(f *Function)
- func (a *Jump) SetId(id int)
- func (a *Jump) SetName(v string)
- func (c *Jump) SetRange(pos *Range)
- func (i *Jump) SetVerboseName(verbose string)
- func (j *Jump) String() string
- type Loop
- func (i *Loop) AddMask(v Value)
- func (a *Loop) AddVariable(v *Variable)
- func (l *Loop) Finish(init, step []Value)
- func (a *Loop) GetAllVariables() map[string]*Variable
- func (a *Loop) GetBlock() *BasicBlock
- func (a *Loop) GetFunc() *Function
- func (a *Loop) GetId() int
- func (a *Loop) GetLastVariable() *Variable
- func (i *Loop) GetMask() []Value
- func (a *Loop) GetName() string
- func (i *Loop) GetOpcode() Opcode
- func (a *Loop) GetOperand(i int) Value
- func (a *Loop) GetOperandNum() int
- func (a *Loop) GetOperands() Values
- func (a *Loop) GetProgram() *Program
- func (c *Loop) GetRange() *Range
- func (r *Loop) GetUsers() Users
- func (l *Loop) GetValues() Values
- func (a *Loop) GetVariable(name string) *Variable
- func (i *Loop) GetVerboseName() string
- func (r *Loop) HasUsers() bool
- func (l *Loop) HasValues() bool
- func (c *Loop) IsExtern() bool
- func (i *Loop) IsUndefined() bool
- func (a *Loop) LineDisasm() string
- func (i *Loop) Masked() bool
- func (c *Loop) NewError(kind ErrorKind, tag ErrorTag, msg string)
- func (l *Loop) ReplaceValue(v Value, to Value)
- func (i *Loop) SelfDelete()
- func (a *Loop) SetBlock(block *BasicBlock)
- func (c *Loop) SetExtern(b bool)
- func (a *Loop) SetFunc(f *Function)
- func (a *Loop) SetId(id int)
- func (a *Loop) SetName(v string)
- func (c *Loop) SetRange(pos *Range)
- func (i *Loop) SetVerboseName(verbose string)
- func (l *Loop) String() string
- type LoopBuilder
- type Make
- func (i *Make) AddMask(v Value)
- func (n *Make) AddMember(k, v Value)
- func (n *Make) AddUser(u User)
- func (a *Make) AddVariable(v *Variable)
- func (n *Make) DeleteMember(k Value)
- func (n *Make) GetAllMember() map[Value]Value
- func (a *Make) GetAllVariables() map[string]*Variable
- func (a *Make) GetBlock() *BasicBlock
- func (a *Make) GetFunc() *Function
- func (a *Make) GetId() int
- func (n *Make) GetIndexMember(i int) (Value, bool)
- func (n *Make) GetKey() Value
- func (a *Make) GetLastVariable() *Variable
- func (i *Make) GetMask() []Value
- func (n *Make) GetMember(key Value) (Value, bool)
- func (a *Make) GetName() string
- func (n *Make) GetObject() Value
- func (i *Make) GetOpcode() Opcode
- func (a *Make) GetOperand(i int) Value
- func (a *Make) GetOperandNum() int
- func (a *Make) GetOperands() Values
- func (a *Make) GetProgram() *Program
- func (c *Make) GetRange() *Range
- func (n *Make) GetStringMember(key string) (Value, bool)
- func (n *Make) GetType() Type
- func (n *Make) GetUsers() Users
- func (i *Make) GetValues() Values
- func (a *Make) GetVariable(name string) *Variable
- func (i *Make) GetVerboseName() string
- func (n *Make) HasUsers() bool
- func (i *Make) HasValues() bool
- func (c *Make) IsExtern() bool
- func (n *Make) IsMember() bool
- func (n *Make) IsMemberCallVariable() bool
- func (n *Make) IsObject() bool
- func (i *Make) IsUndefined() bool
- func (a *Make) LineDisasm() string
- func (i *Make) Masked() bool
- func (c *Make) NewError(kind ErrorKind, tag ErrorTag, msg string)
- func (n *Make) RemoveUser(u User)
- func (i *Make) ReplaceValue(v, to Value)
- func (i *Make) SelfDelete()
- func (a *Make) SetBlock(block *BasicBlock)
- func (c *Make) SetExtern(b bool)
- func (a *Make) SetFunc(f *Function)
- func (a *Make) SetId(id int)
- func (n *Make) SetKey(k Value)
- func (a *Make) SetName(v string)
- func (n *Make) SetObject(v Value)
- func (c *Make) SetRange(pos *Range)
- func (n *Make) SetType(typ Type)
- func (i *Make) SetVerboseName(verbose string)
- func (i *Make) String() string
- type Maskable
- type MemberCall
- type MethodBuilder
- type NameDisasmLiner
- func (n *NameDisasmLiner) AddLevel() bool
- func (b NameDisasmLiner) DeleteName(i Instruction)
- func (n *NameDisasmLiner) DisasmValue(v Value) string
- func (b NameDisasmLiner) GetName(i Instruction) (string, bool)
- func (b NameDisasmLiner) SetName(i Instruction, name string)
- func (b *NameDisasmLiner) SkipLevelChecking() bool
- type Next
- func (i *Next) AddMask(v Value)
- func (n *Next) AddMember(k, v Value)
- func (n *Next) AddUser(u User)
- func (a *Next) AddVariable(v *Variable)
- func (n *Next) DeleteMember(k Value)
- func (n *Next) GetAllMember() map[Value]Value
- func (a *Next) GetAllVariables() map[string]*Variable
- func (a *Next) GetBlock() *BasicBlock
- func (a *Next) GetFunc() *Function
- func (a *Next) GetId() int
- func (n *Next) GetIndexMember(i int) (Value, bool)
- func (n *Next) GetKey() Value
- func (a *Next) GetLastVariable() *Variable
- func (i *Next) GetMask() []Value
- func (n *Next) GetMember(key Value) (Value, bool)
- func (a *Next) GetName() string
- func (n *Next) GetObject() Value
- func (i *Next) GetOpcode() Opcode
- func (a *Next) GetOperand(i int) Value
- func (a *Next) GetOperandNum() int
- func (a *Next) GetOperands() Values
- func (a *Next) GetProgram() *Program
- func (c *Next) GetRange() *Range
- func (n *Next) GetStringMember(key string) (Value, bool)
- func (n *Next) GetType() Type
- func (n *Next) GetUsers() Users
- func (n *Next) GetValues() Values
- func (a *Next) GetVariable(name string) *Variable
- func (i *Next) GetVerboseName() string
- func (n *Next) HasUsers() bool
- func (n *Next) HasValues() bool
- func (c *Next) IsExtern() bool
- func (n *Next) IsMember() bool
- func (n *Next) IsMemberCallVariable() bool
- func (n *Next) IsObject() bool
- func (i *Next) IsUndefined() bool
- func (a *Next) LineDisasm() string
- func (i *Next) Masked() bool
- func (c *Next) NewError(kind ErrorKind, tag ErrorTag, msg string)
- func (n *Next) RemoveUser(u User)
- func (n *Next) ReplaceValue(v, to Value)
- func (i *Next) SelfDelete()
- func (a *Next) SetBlock(block *BasicBlock)
- func (c *Next) SetExtern(b bool)
- func (a *Next) SetFunc(f *Function)
- func (a *Next) SetId(id int)
- func (n *Next) SetKey(k Value)
- func (a *Next) SetName(v string)
- func (n *Next) SetObject(v Value)
- func (c *Next) SetRange(pos *Range)
- func (n *Next) SetType(typ Type)
- func (i *Next) SetVerboseName(verbose string)
- func (n *Next) String() string
- type Node
- type ObjectType
- func (s *ObjectType) AddField(key Value, field Type)
- func (b *ObjectType) AddMethod(id string, f *FunctionType)
- func (s *ObjectType) Finish()
- func (s *ObjectType) GetField(key Value) Type
- func (i *ObjectType) GetMethod() map[string]*FunctionType
- func (i *ObjectType) GetTypeKind() TypeKind
- func (i *ObjectType) PkgPathString() string
- func (itype *ObjectType) RawString() string
- func (i *ObjectType) SetMethod(m map[string]*FunctionType)
- func (i *ObjectType) SetName(name string)
- func (i *ObjectType) SetTypeKind(t TypeKind)
- func (itype *ObjectType) String() string
- type Opcode
- type Package
- type Panic
- func (i *Panic) AddMask(v Value)
- func (n *Panic) AddMember(k, v Value)
- func (n *Panic) AddUser(u User)
- func (a *Panic) AddVariable(v *Variable)
- func (n *Panic) DeleteMember(k Value)
- func (n *Panic) GetAllMember() map[Value]Value
- func (a *Panic) GetAllVariables() map[string]*Variable
- func (a *Panic) GetBlock() *BasicBlock
- func (a *Panic) GetFunc() *Function
- func (a *Panic) GetId() int
- func (n *Panic) GetIndexMember(i int) (Value, bool)
- func (n *Panic) GetKey() Value
- func (a *Panic) GetLastVariable() *Variable
- func (i *Panic) GetMask() []Value
- func (n *Panic) GetMember(key Value) (Value, bool)
- func (a *Panic) GetName() string
- func (n *Panic) GetObject() Value
- func (i *Panic) GetOpcode() Opcode
- func (a *Panic) GetOperand(i int) Value
- func (a *Panic) GetOperandNum() int
- func (a *Panic) GetOperands() Values
- func (a *Panic) GetProgram() *Program
- func (c *Panic) GetRange() *Range
- func (n *Panic) GetStringMember(key string) (Value, bool)
- func (n *Panic) GetType() Type
- func (n *Panic) GetUsers() Users
- func (p *Panic) GetValues() Values
- func (a *Panic) GetVariable(name string) *Variable
- func (i *Panic) GetVerboseName() string
- func (n *Panic) HasUsers() bool
- func (p *Panic) HasValues() bool
- func (c *Panic) IsExtern() bool
- func (n *Panic) IsMember() bool
- func (n *Panic) IsMemberCallVariable() bool
- func (n *Panic) IsObject() bool
- func (i *Panic) IsUndefined() bool
- func (a *Panic) LineDisasm() string
- func (i *Panic) Masked() bool
- func (c *Panic) NewError(kind ErrorKind, tag ErrorTag, msg string)
- func (n *Panic) RemoveUser(u User)
- func (p *Panic) ReplaceValue(v, to Value)
- func (i *Panic) SelfDelete()
- func (a *Panic) SetBlock(block *BasicBlock)
- func (c *Panic) SetExtern(b bool)
- func (a *Panic) SetFunc(f *Function)
- func (a *Panic) SetId(id int)
- func (n *Panic) SetKey(k Value)
- func (a *Panic) SetName(v string)
- func (n *Panic) SetObject(v Value)
- func (c *Panic) SetRange(pos *Range)
- func (n *Panic) SetType(typ Type)
- func (i *Panic) SetVerboseName(verbose string)
- func (p *Panic) String() string
- type Parameter
- func (i *Parameter) AddMask(v Value)
- func (n *Parameter) AddMember(k, v Value)
- func (n *Parameter) AddUser(u User)
- func (a *Parameter) AddVariable(v *Variable)
- func (n *Parameter) DeleteMember(k Value)
- func (n *Parameter) GetAllMember() map[Value]Value
- func (a *Parameter) GetAllVariables() map[string]*Variable
- func (a *Parameter) GetBlock() *BasicBlock
- func (p *Parameter) GetDefault() Value
- func (a *Parameter) GetFunc() *Function
- func (a *Parameter) GetId() int
- func (n *Parameter) GetIndexMember(i int) (Value, bool)
- func (n *Parameter) GetKey() Value
- func (a *Parameter) GetLastVariable() *Variable
- func (i *Parameter) GetMask() []Value
- func (n *Parameter) GetMember(key Value) (Value, bool)
- func (a *Parameter) GetName() string
- func (n *Parameter) GetObject() Value
- func (i *Parameter) GetOpcode() Opcode
- func (a *Parameter) GetOperand(i int) Value
- func (a *Parameter) GetOperandNum() int
- func (a *Parameter) GetOperands() Values
- func (a *Parameter) GetProgram() *Program
- func (c *Parameter) GetRange() *Range
- func (n *Parameter) GetStringMember(key string) (Value, bool)
- func (n *Parameter) GetType() Type
- func (n *Parameter) GetUsers() Users
- func (p *Parameter) GetValues() Values
- func (a *Parameter) GetVariable(name string) *Variable
- func (i *Parameter) GetVerboseName() string
- func (n *Parameter) HasUsers() bool
- func (p *Parameter) HasValues() bool
- func (c *Parameter) IsExtern() bool
- func (n *Parameter) IsMember() bool
- func (n *Parameter) IsMemberCallVariable() bool
- func (n *Parameter) IsObject() bool
- func (i *Parameter) IsUndefined() bool
- func (a *Parameter) LineDisasm() string
- func (i *Parameter) Masked() bool
- func (c *Parameter) NewError(kind ErrorKind, tag ErrorTag, msg string)
- func (n *Parameter) RemoveUser(u User)
- func (i *Parameter) ReplaceValue(Value, Value)
- func (i *Parameter) SelfDelete()
- func (a *Parameter) SetBlock(block *BasicBlock)
- func (p *Parameter) SetDefault(v Value)
- func (c *Parameter) SetExtern(b bool)
- func (a *Parameter) SetFunc(f *Function)
- func (a *Parameter) SetId(id int)
- func (n *Parameter) SetKey(k Value)
- func (a *Parameter) SetName(v string)
- func (n *Parameter) SetObject(v Value)
- func (c *Parameter) SetRange(pos *Range)
- func (n *Parameter) SetType(typ Type)
- func (i *Parameter) SetVerboseName(verbose string)
- func (p *Parameter) String() string
- type ParentScope
- type Phi
- func (i *Phi) AddMask(v Value)
- func (n *Phi) AddMember(k, v Value)
- func (n *Phi) AddUser(u User)
- func (a *Phi) AddVariable(v *Variable)
- func (n *Phi) DeleteMember(k Value)
- func (n *Phi) GetAllMember() map[Value]Value
- func (a *Phi) GetAllVariables() map[string]*Variable
- func (a *Phi) GetBlock() *BasicBlock
- func (a *Phi) GetFunc() *Function
- func (a *Phi) GetId() int
- func (n *Phi) GetIndexMember(i int) (Value, bool)
- func (n *Phi) GetKey() Value
- func (a *Phi) GetLastVariable() *Variable
- func (i *Phi) GetMask() []Value
- func (n *Phi) GetMember(key Value) (Value, bool)
- func (a *Phi) GetName() string
- func (n *Phi) GetObject() Value
- func (i *Phi) GetOpcode() Opcode
- func (a *Phi) GetOperand(i int) Value
- func (a *Phi) GetOperandNum() int
- func (a *Phi) GetOperands() Values
- func (a *Phi) GetProgram() *Program
- func (c *Phi) GetRange() *Range
- func (n *Phi) GetStringMember(key string) (Value, bool)
- func (n *Phi) GetType() Type
- func (n *Phi) GetUsers() Users
- func (p *Phi) GetValues() Values
- func (a *Phi) GetVariable(name string) *Variable
- func (i *Phi) GetVerboseName() string
- func (n *Phi) HasUsers() bool
- func (p *Phi) HasValues() bool
- func (c *Phi) IsExtern() bool
- func (n *Phi) IsMember() bool
- func (n *Phi) IsMemberCallVariable() bool
- func (n *Phi) IsObject() bool
- func (i *Phi) IsUndefined() bool
- func (a *Phi) LineDisasm() string
- func (i *Phi) Masked() bool
- func (c *Phi) NewError(kind ErrorKind, tag ErrorTag, msg string)
- func (n *Phi) RemoveUser(u User)
- func (p *Phi) ReplaceValue(v Value, to Value)
- func (i *Phi) SelfDelete()
- func (a *Phi) SetBlock(block *BasicBlock)
- func (c *Phi) SetExtern(b bool)
- func (a *Phi) SetFunc(f *Function)
- func (a *Phi) SetId(id int)
- func (n *Phi) SetKey(k Value)
- func (a *Phi) SetName(v string)
- func (n *Phi) SetObject(v Value)
- func (c *Phi) SetRange(pos *Range)
- func (n *Phi) SetType(typ Type)
- func (i *Phi) SetVerboseName(verbose string)
- func (p *Phi) String() string
- type Position
- type Program
- func (prog *Program) AddError(err *SSAError)
- func (prog *Program) AddPackage(pkg *Package)
- func (p *Program) DeleteInstruction(i Instruction)
- func (prog *Program) EachFunction(handler func(*Function))
- func (prog *Program) GetAndCreateMainFunction() *Function
- func (prog *Program) GetAndCreateMainFunctionBuilder() *FunctionBuilder
- func (prog *Program) GetErrors() SSAErrors
- func (p *Program) GetFunctionFast(paths ...string) *Function
- func (p *Program) GetInstructionById(id int) Instruction
- func (p *Program) GetInstructionsByName(name string) []Instruction
- func (prog *Program) GetPackage(name string) *Package
- func (p *Program) RemoveInstructionWithName(name string, i Instruction)
- func (p *Program) SetInstructionWithName(name string, i Instruction)
- func (p *Program) SetVirtualRegister(i Instruction)
- func (p *Program) Show() *Program
- func (p *Program) ShowWithSource()
- type Range
- type Recover
- func (i *Recover) AddMask(v Value)
- func (n *Recover) AddMember(k, v Value)
- func (n *Recover) AddUser(u User)
- func (a *Recover) AddVariable(v *Variable)
- func (n *Recover) DeleteMember(k Value)
- func (n *Recover) GetAllMember() map[Value]Value
- func (a *Recover) GetAllVariables() map[string]*Variable
- func (a *Recover) GetBlock() *BasicBlock
- func (a *Recover) GetFunc() *Function
- func (a *Recover) GetId() int
- func (n *Recover) GetIndexMember(i int) (Value, bool)
- func (n *Recover) GetKey() Value
- func (a *Recover) GetLastVariable() *Variable
- func (i *Recover) GetMask() []Value
- func (n *Recover) GetMember(key Value) (Value, bool)
- func (a *Recover) GetName() string
- func (n *Recover) GetObject() Value
- func (i *Recover) GetOpcode() Opcode
- func (a *Recover) GetOperand(i int) Value
- func (a *Recover) GetOperandNum() int
- func (a *Recover) GetOperands() Values
- func (a *Recover) GetProgram() *Program
- func (c *Recover) GetRange() *Range
- func (n *Recover) GetStringMember(key string) (Value, bool)
- func (n *Recover) GetType() Type
- func (n *Recover) GetUsers() Users
- func (r *Recover) GetValues() Values
- func (a *Recover) GetVariable(name string) *Variable
- func (i *Recover) GetVerboseName() string
- func (n *Recover) HasUsers() bool
- func (r *Recover) HasValues() bool
- func (c *Recover) IsExtern() bool
- func (n *Recover) IsMember() bool
- func (n *Recover) IsMemberCallVariable() bool
- func (n *Recover) IsObject() bool
- func (i *Recover) IsUndefined() bool
- func (a *Recover) LineDisasm() string
- func (i *Recover) Masked() bool
- func (c *Recover) NewError(kind ErrorKind, tag ErrorTag, msg string)
- func (n *Recover) RemoveUser(u User)
- func (i *Recover) ReplaceValue(Value, Value)
- func (i *Recover) SelfDelete()
- func (a *Recover) SetBlock(block *BasicBlock)
- func (c *Recover) SetExtern(b bool)
- func (a *Recover) SetFunc(f *Function)
- func (a *Recover) SetId(id int)
- func (n *Recover) SetKey(k Value)
- func (a *Recover) SetName(v string)
- func (n *Recover) SetObject(v Value)
- func (c *Recover) SetRange(pos *Range)
- func (n *Recover) SetType(typ Type)
- func (i *Recover) SetVerboseName(verbose string)
- func (r *Recover) String() string
- type Return
- func (i *Return) AddMask(v Value)
- func (n *Return) AddMember(k, v Value)
- func (n *Return) AddUser(u User)
- func (a *Return) AddVariable(v *Variable)
- func (n *Return) DeleteMember(k Value)
- func (n *Return) GetAllMember() map[Value]Value
- func (a *Return) GetAllVariables() map[string]*Variable
- func (a *Return) GetBlock() *BasicBlock
- func (a *Return) GetFunc() *Function
- func (a *Return) GetId() int
- func (n *Return) GetIndexMember(i int) (Value, bool)
- func (n *Return) GetKey() Value
- func (a *Return) GetLastVariable() *Variable
- func (i *Return) GetMask() []Value
- func (n *Return) GetMember(key Value) (Value, bool)
- func (a *Return) GetName() string
- func (n *Return) GetObject() Value
- func (i *Return) GetOpcode() Opcode
- func (a *Return) GetOperand(i int) Value
- func (a *Return) GetOperandNum() int
- func (a *Return) GetOperands() Values
- func (a *Return) GetProgram() *Program
- func (c *Return) GetRange() *Range
- func (n *Return) GetStringMember(key string) (Value, bool)
- func (n *Return) GetType() Type
- func (r *Return) GetUsers() Users
- func (r *Return) GetValues() Values
- func (a *Return) GetVariable(name string) *Variable
- func (i *Return) GetVerboseName() string
- func (r *Return) HasUsers() bool
- func (r *Return) HasValues() bool
- func (c *Return) IsExtern() bool
- func (n *Return) IsMember() bool
- func (n *Return) IsMemberCallVariable() bool
- func (n *Return) IsObject() bool
- func (i *Return) IsUndefined() bool
- func (a *Return) LineDisasm() string
- func (i *Return) Masked() bool
- func (c *Return) NewError(kind ErrorKind, tag ErrorTag, msg string)
- func (n *Return) RemoveUser(u User)
- func (r *Return) ReplaceValue(v Value, to Value)
- func (i *Return) SelfDelete()
- func (a *Return) SetBlock(block *BasicBlock)
- func (c *Return) SetExtern(b bool)
- func (a *Return) SetFunc(f *Function)
- func (a *Return) SetId(id int)
- func (n *Return) SetKey(k Value)
- func (a *Return) SetName(v string)
- func (n *Return) SetObject(v Value)
- func (c *Return) SetRange(pos *Range)
- func (n *Return) SetType(typ Type)
- func (i *Return) SetVerboseName(verbose string)
- func (r *Return) String() string
- type SSAError
- type SSAErrors
- type Scope
- type ScopeIF
- type SideEffect
- func (i *SideEffect) AddMask(v Value)
- func (n *SideEffect) AddMember(k, v Value)
- func (n *SideEffect) AddUser(u User)
- func (a *SideEffect) AddVariable(v *Variable)
- func (n *SideEffect) DeleteMember(k Value)
- func (n *SideEffect) GetAllMember() map[Value]Value
- func (a *SideEffect) GetAllVariables() map[string]*Variable
- func (a *SideEffect) GetBlock() *BasicBlock
- func (a *SideEffect) GetFunc() *Function
- func (a *SideEffect) GetId() int
- func (n *SideEffect) GetIndexMember(i int) (Value, bool)
- func (n *SideEffect) GetKey() Value
- func (a *SideEffect) GetLastVariable() *Variable
- func (i *SideEffect) GetMask() []Value
- func (n *SideEffect) GetMember(key Value) (Value, bool)
- func (a *SideEffect) GetName() string
- func (n *SideEffect) GetObject() Value
- func (i *SideEffect) GetOpcode() Opcode
- func (a *SideEffect) GetOperand(i int) Value
- func (a *SideEffect) GetOperandNum() int
- func (a *SideEffect) GetOperands() Values
- func (a *SideEffect) GetProgram() *Program
- func (c *SideEffect) GetRange() *Range
- func (n *SideEffect) GetStringMember(key string) (Value, bool)
- func (n *SideEffect) GetType() Type
- func (n *SideEffect) GetUsers() Users
- func (s *SideEffect) GetValues() Values
- func (a *SideEffect) GetVariable(name string) *Variable
- func (i *SideEffect) GetVerboseName() string
- func (n *SideEffect) HasUsers() bool
- func (s *SideEffect) HasValues() bool
- func (c *SideEffect) IsExtern() bool
- func (n *SideEffect) IsMember() bool
- func (n *SideEffect) IsMemberCallVariable() bool
- func (n *SideEffect) IsObject() bool
- func (i *SideEffect) IsUndefined() bool
- func (a *SideEffect) LineDisasm() string
- func (i *SideEffect) Masked() bool
- func (c *SideEffect) NewError(kind ErrorKind, tag ErrorTag, msg string)
- func (n *SideEffect) RemoveUser(u User)
- func (s *SideEffect) ReplaceValue(v Value, to Value)
- func (i *SideEffect) SelfDelete()
- func (a *SideEffect) SetBlock(block *BasicBlock)
- func (c *SideEffect) SetExtern(b bool)
- func (a *SideEffect) SetFunc(f *Function)
- func (a *SideEffect) SetId(id int)
- func (n *SideEffect) SetKey(k Value)
- func (a *SideEffect) SetName(v string)
- func (n *SideEffect) SetObject(v Value)
- func (c *SideEffect) SetRange(pos *Range)
- func (n *SideEffect) SetType(typ Type)
- func (i *SideEffect) SetVerboseName(verbose string)
- func (s *SideEffect) String() string
- type Switch
- func (i *Switch) AddMask(v Value)
- func (a *Switch) AddVariable(v *Variable)
- func (a *Switch) GetAllVariables() map[string]*Variable
- func (a *Switch) GetBlock() *BasicBlock
- func (a *Switch) GetFunc() *Function
- func (a *Switch) GetId() int
- func (a *Switch) GetLastVariable() *Variable
- func (i *Switch) GetMask() []Value
- func (a *Switch) GetName() string
- func (i *Switch) GetOpcode() Opcode
- func (a *Switch) GetOperand(i int) Value
- func (a *Switch) GetOperandNum() int
- func (a *Switch) GetOperands() Values
- func (a *Switch) GetProgram() *Program
- func (c *Switch) GetRange() *Range
- func (r *Switch) GetUsers() Users
- func (sw *Switch) GetValues() Values
- func (a *Switch) GetVariable(name string) *Variable
- func (i *Switch) GetVerboseName() string
- func (r *Switch) HasUsers() bool
- func (sw *Switch) HasValues() bool
- func (c *Switch) IsExtern() bool
- func (i *Switch) IsUndefined() bool
- func (a *Switch) LineDisasm() string
- func (i *Switch) Masked() bool
- func (c *Switch) NewError(kind ErrorKind, tag ErrorTag, msg string)
- func (sw *Switch) ReplaceValue(v Value, to Value)
- func (i *Switch) SelfDelete()
- func (a *Switch) SetBlock(block *BasicBlock)
- func (c *Switch) SetExtern(b bool)
- func (a *Switch) SetFunc(f *Function)
- func (a *Switch) SetId(id int)
- func (a *Switch) SetName(v string)
- func (c *Switch) SetRange(pos *Range)
- func (i *Switch) SetVerboseName(verbose string)
- func (sw *Switch) String() string
- type SwitchBuilder
- type SwitchLabel
- type TryBuilder
- type Type
- type TypeCast
- func (i *TypeCast) AddMask(v Value)
- func (n *TypeCast) AddMember(k, v Value)
- func (n *TypeCast) AddUser(u User)
- func (a *TypeCast) AddVariable(v *Variable)
- func (n *TypeCast) DeleteMember(k Value)
- func (n *TypeCast) GetAllMember() map[Value]Value
- func (a *TypeCast) GetAllVariables() map[string]*Variable
- func (a *TypeCast) GetBlock() *BasicBlock
- func (a *TypeCast) GetFunc() *Function
- func (a *TypeCast) GetId() int
- func (n *TypeCast) GetIndexMember(i int) (Value, bool)
- func (n *TypeCast) GetKey() Value
- func (a *TypeCast) GetLastVariable() *Variable
- func (i *TypeCast) GetMask() []Value
- func (n *TypeCast) GetMember(key Value) (Value, bool)
- func (a *TypeCast) GetName() string
- func (n *TypeCast) GetObject() Value
- func (i *TypeCast) GetOpcode() Opcode
- func (a *TypeCast) GetOperand(i int) Value
- func (a *TypeCast) GetOperandNum() int
- func (a *TypeCast) GetOperands() Values
- func (a *TypeCast) GetProgram() *Program
- func (c *TypeCast) GetRange() *Range
- func (n *TypeCast) GetStringMember(key string) (Value, bool)
- func (n *TypeCast) GetType() Type
- func (n *TypeCast) GetUsers() Users
- func (t *TypeCast) GetValues() Values
- func (a *TypeCast) GetVariable(name string) *Variable
- func (i *TypeCast) GetVerboseName() string
- func (n *TypeCast) HasUsers() bool
- func (t *TypeCast) HasValues() bool
- func (c *TypeCast) IsExtern() bool
- func (n *TypeCast) IsMember() bool
- func (n *TypeCast) IsMemberCallVariable() bool
- func (n *TypeCast) IsObject() bool
- func (i *TypeCast) IsUndefined() bool
- func (a *TypeCast) LineDisasm() string
- func (i *TypeCast) Masked() bool
- func (c *TypeCast) NewError(kind ErrorKind, tag ErrorTag, msg string)
- func (n *TypeCast) RemoveUser(u User)
- func (t *TypeCast) ReplaceValue(v, to Value)
- func (i *TypeCast) SelfDelete()
- func (a *TypeCast) SetBlock(block *BasicBlock)
- func (c *TypeCast) SetExtern(b bool)
- func (a *TypeCast) SetFunc(f *Function)
- func (a *TypeCast) SetId(id int)
- func (n *TypeCast) SetKey(k Value)
- func (a *TypeCast) SetName(v string)
- func (n *TypeCast) SetObject(v Value)
- func (c *TypeCast) SetRange(pos *Range)
- func (n *TypeCast) SetType(typ Type)
- func (i *TypeCast) SetVerboseName(verbose string)
- func (t *TypeCast) String() string
- type TypeKind
- type TypeValue
- func (i *TypeValue) AddMask(v Value)
- func (n *TypeValue) AddMember(k, v Value)
- func (n *TypeValue) AddUser(u User)
- func (a *TypeValue) AddVariable(v *Variable)
- func (n *TypeValue) DeleteMember(k Value)
- func (n *TypeValue) GetAllMember() map[Value]Value
- func (a *TypeValue) GetAllVariables() map[string]*Variable
- func (a *TypeValue) GetBlock() *BasicBlock
- func (a *TypeValue) GetFunc() *Function
- func (a *TypeValue) GetId() int
- func (n *TypeValue) GetIndexMember(i int) (Value, bool)
- func (n *TypeValue) GetKey() Value
- func (a *TypeValue) GetLastVariable() *Variable
- func (i *TypeValue) GetMask() []Value
- func (n *TypeValue) GetMember(key Value) (Value, bool)
- func (a *TypeValue) GetName() string
- func (n *TypeValue) GetObject() Value
- func (i *TypeValue) GetOpcode() Opcode
- func (a *TypeValue) GetOperand(i int) Value
- func (a *TypeValue) GetOperandNum() int
- func (a *TypeValue) GetOperands() Values
- func (a *TypeValue) GetProgram() *Program
- func (c *TypeValue) GetRange() *Range
- func (n *TypeValue) GetStringMember(key string) (Value, bool)
- func (n *TypeValue) GetType() Type
- func (n *TypeValue) GetUsers() Users
- func (t *TypeValue) GetValues() Values
- func (a *TypeValue) GetVariable(name string) *Variable
- func (i *TypeValue) GetVerboseName() string
- func (n *TypeValue) HasUsers() bool
- func (t *TypeValue) HasValues() bool
- func (c *TypeValue) IsExtern() bool
- func (n *TypeValue) IsMember() bool
- func (n *TypeValue) IsMemberCallVariable() bool
- func (n *TypeValue) IsObject() bool
- func (i *TypeValue) IsUndefined() bool
- func (a *TypeValue) LineDisasm() string
- func (i *TypeValue) Masked() bool
- func (c *TypeValue) NewError(kind ErrorKind, tag ErrorTag, msg string)
- func (n *TypeValue) RemoveUser(u User)
- func (i *TypeValue) ReplaceValue(Value, Value)
- func (i *TypeValue) SelfDelete()
- func (a *TypeValue) SetBlock(block *BasicBlock)
- func (c *TypeValue) SetExtern(b bool)
- func (a *TypeValue) SetFunc(f *Function)
- func (a *TypeValue) SetId(id int)
- func (n *TypeValue) SetKey(k Value)
- func (a *TypeValue) SetName(v string)
- func (n *TypeValue) SetObject(v Value)
- func (c *TypeValue) SetRange(pos *Range)
- func (n *TypeValue) SetType(typ Type)
- func (i *TypeValue) SetVerboseName(verbose string)
- func (t *TypeValue) String() string
- type Typed
- type Types
- type UnOp
- func (i *UnOp) AddMask(v Value)
- func (n *UnOp) AddMember(k, v Value)
- func (n *UnOp) AddUser(u User)
- func (a *UnOp) AddVariable(v *Variable)
- func (n *UnOp) DeleteMember(k Value)
- func (n *UnOp) GetAllMember() map[Value]Value
- func (a *UnOp) GetAllVariables() map[string]*Variable
- func (a *UnOp) GetBlock() *BasicBlock
- func (a *UnOp) GetFunc() *Function
- func (a *UnOp) GetId() int
- func (n *UnOp) GetIndexMember(i int) (Value, bool)
- func (n *UnOp) GetKey() Value
- func (a *UnOp) GetLastVariable() *Variable
- func (i *UnOp) GetMask() []Value
- func (n *UnOp) GetMember(key Value) (Value, bool)
- func (a *UnOp) GetName() string
- func (n *UnOp) GetObject() Value
- func (i *UnOp) GetOpcode() Opcode
- func (a *UnOp) GetOperand(i int) Value
- func (a *UnOp) GetOperandNum() int
- func (a *UnOp) GetOperands() Values
- func (a *UnOp) GetProgram() *Program
- func (c *UnOp) GetRange() *Range
- func (n *UnOp) GetStringMember(key string) (Value, bool)
- func (n *UnOp) GetType() Type
- func (n *UnOp) GetUsers() Users
- func (n *UnOp) GetValues() Values
- func (a *UnOp) GetVariable(name string) *Variable
- func (i *UnOp) GetVerboseName() string
- func (n *UnOp) HasUsers() bool
- func (n *UnOp) HasValues() bool
- func (c *UnOp) IsExtern() bool
- func (n *UnOp) IsMember() bool
- func (n *UnOp) IsMemberCallVariable() bool
- func (n *UnOp) IsObject() bool
- func (i *UnOp) IsUndefined() bool
- func (a *UnOp) LineDisasm() string
- func (i *UnOp) Masked() bool
- func (c *UnOp) NewError(kind ErrorKind, tag ErrorTag, msg string)
- func (n *UnOp) RemoveUser(u User)
- func (u *UnOp) ReplaceValue(v Value, to Value)
- func (i *UnOp) SelfDelete()
- func (a *UnOp) SetBlock(block *BasicBlock)
- func (c *UnOp) SetExtern(b bool)
- func (a *UnOp) SetFunc(f *Function)
- func (a *UnOp) SetId(id int)
- func (n *UnOp) SetKey(k Value)
- func (a *UnOp) SetName(v string)
- func (n *UnOp) SetObject(v Value)
- func (c *UnOp) SetRange(pos *Range)
- func (n *UnOp) SetType(typ Type)
- func (i *UnOp) SetVerboseName(verbose string)
- func (u *UnOp) String() string
- type UnaryOpcode
- type Undefined
- func (i *Undefined) AddMask(v Value)
- func (n *Undefined) AddMember(k, v Value)
- func (n *Undefined) AddUser(u User)
- func (a *Undefined) AddVariable(v *Variable)
- func (n *Undefined) DeleteMember(k Value)
- func (n *Undefined) GetAllMember() map[Value]Value
- func (a *Undefined) GetAllVariables() map[string]*Variable
- func (a *Undefined) GetBlock() *BasicBlock
- func (a *Undefined) GetFunc() *Function
- func (a *Undefined) GetId() int
- func (n *Undefined) GetIndexMember(i int) (Value, bool)
- func (n *Undefined) GetKey() Value
- func (a *Undefined) GetLastVariable() *Variable
- func (i *Undefined) GetMask() []Value
- func (n *Undefined) GetMember(key Value) (Value, bool)
- func (a *Undefined) GetName() string
- func (n *Undefined) GetObject() Value
- func (i *Undefined) GetOpcode() Opcode
- func (a *Undefined) GetOperand(i int) Value
- func (a *Undefined) GetOperandNum() int
- func (a *Undefined) GetOperands() Values
- func (a *Undefined) GetProgram() *Program
- func (c *Undefined) GetRange() *Range
- func (n *Undefined) GetStringMember(key string) (Value, bool)
- func (n *Undefined) GetType() Type
- func (n *Undefined) GetUsers() Users
- func (u *Undefined) GetValues() Values
- func (a *Undefined) GetVariable(name string) *Variable
- func (i *Undefined) GetVerboseName() string
- func (n *Undefined) HasUsers() bool
- func (u *Undefined) HasValues() bool
- func (c *Undefined) IsExtern() bool
- func (n *Undefined) IsMember() bool
- func (n *Undefined) IsMemberCallVariable() bool
- func (n *Undefined) IsObject() bool
- func (u *Undefined) IsUndefined() bool
- func (a *Undefined) LineDisasm() string
- func (i *Undefined) Masked() bool
- func (c *Undefined) NewError(kind ErrorKind, tag ErrorTag, msg string)
- func (n *Undefined) RemoveUser(u User)
- func (i *Undefined) ReplaceValue(Value, Value)
- func (i *Undefined) SelfDelete()
- func (a *Undefined) SetBlock(block *BasicBlock)
- func (c *Undefined) SetExtern(b bool)
- func (a *Undefined) SetFunc(f *Function)
- func (a *Undefined) SetId(id int)
- func (n *Undefined) SetKey(k Value)
- func (a *Undefined) SetName(v string)
- func (n *Undefined) SetObject(v Value)
- func (c *Undefined) SetRange(pos *Range)
- func (n *Undefined) SetType(typ Type)
- func (i *Undefined) SetVerboseName(verbose string)
- func (u *Undefined) String() string
- type UndefinedKind
- type User
- type Users
- type Value
- func CalcBinary(b *BinOp) Value
- func CalcConstBinarySide(c *ConstInst, v Value, op BinaryOpcode) Value
- func HandlerBinOp(b *BinOp) (ret Value)
- func HandlerUnOp(u *UnOp) (ret Value)
- func NewBinOp(op BinaryOpcode, x, y Value) Value
- func NewUnOp(op UnaryOpcode, x Value) Value
- func ToValue(n any) (Value, bool)
- type Values
- type Variable
- func (v *Variable) AddRange(p *Range, force bool)
- func (variable *Variable) Assign(value Value) error
- func (b *Variable) GetMemberCall() (Value, Value)
- func (b *Variable) IsMemberCall() bool
- func (v *Variable) NewError(kind ErrorKind, tag ErrorTag, msg string)
- func (v *Variable) SetDefRange(r *Range)
- func (v *Variable) SetMemberCall(obj, key Value)
Constants ¶
const ( // loop LoopHeader = "loop.header" // first LoopCondition = "loop.condition" // second // condition LoopBody = "loop.body" // body LoopExit = "loop.exit" // exit LoopLatch = "loop.latch" // third // latch // if IfDone = "if.done" IfTrue = "if.true" IfFalse = "if.false" IfElif = "if.elif" // try-catch TryStart = "error.try" TryCatch = "error.catch" TryFinally = "error.final" TryDone = "error.done" // switch SwitchDone = "switch.done" SwitchDefault = "switch.default" SwitchHandler = "switch.handler" )
const (
MAXTYPELEVEL = 15
)
const MAXTypeCompareDepth = 10
Variables ¶
var ( NextOk = NewConst("ok") NextField = NewConst("field") NextKey = NewConst("key") )
var BasicTypes = map[TypeKind]*BasicType{ NumberTypeKind: NewBasicType(NumberTypeKind, "number"), StringTypeKind: NewBasicType(StringTypeKind, "string"), BytesTypeKind: NewBasicType(BytesTypeKind, "bytes"), BooleanTypeKind: NewBasicType(BooleanTypeKind, "boolean"), UndefinedTypeKind: NewBasicType(UndefinedTypeKind, "undefined"), NullTypeKind: NewBasicType(NullTypeKind, "null"), AnyTypeKind: NewBasicType(AnyTypeKind, "any"), ErrorTypeKind: NewBasicType(ErrorTypeKind, "error"), }
var BinaryOpcodeName = map[BinaryOpcode]string{ OpLogicAnd: `LogicAnd`, OpLogicOr: `LogicOr`, 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: `ltEq`, OpGtEq: `gtEq`, OpNotEq: `neq`, OpEq: `eq`, OpIn: `in`, OpSend: `send`, }
var UnaryOpcodeName = map[UnaryOpcode]string{ OpNone: ``, OpNot: `not`, OpPlus: `plus`, OpNeg: `neg`, OpChan: `chan`, OpBitwiseNot: `bitwise-not`, }
Functions ¶
func BindingNotFound ¶ added in v1.2.8
func BindingNotFoundInCall ¶ added in v1.3.1
func CallAssignmentMismatch ¶ added in v1.3.1
func CallAssignmentMismatchDropError ¶ added in v1.3.1
func CombineMemberCallVariableName ¶ added in v1.3.1
func ContAssignExtern ¶ added in v1.2.8
func DeleteInst ¶ added in v1.2.8
func DeleteInst(i Instruction)
func ExternFieldError ¶ added in v1.2.8
func FunctionContReturnError ¶ added in v1.3.1
func FunctionContReturnError() string
func GetKeyString ¶ added in v1.3.1
func GetMethodsName ¶ added in v1.2.9
func GetTypeStr ¶
func IsConst ¶ added in v1.3.1
func IsConst(v Instruction) bool
func IsControlInstruction ¶ added in v1.2.9
func IsControlInstruction(i Instruction) bool
func IsObjectType ¶ added in v1.2.9
func LineDisasm ¶ added in v1.3.0
func LineDisasm(v Instruction) string
LineDisasm disasm a instruction to string
func LineShortDisasm ¶ added in v1.3.1
func LineShortDisasm(v Instruction) string
LineShortDisasm disasm a instruction to string, but will use id or name
func NewInstruction ¶ added in v1.2.8
func NewInstruction() anInstruction
func NewVariable ¶ added in v1.3.0
func NewVariable(globalIndex int, name string, local bool, scope ssautil.ScopedVersionedTableIF[Value]) ssautil.VersionedIF[Value]
func NoCheckMustInFirst ¶ added in v1.2.8
func NoCheckMustInFirst() string
func ReplaceAllValue ¶ added in v1.2.9
func ReplaceMemberCall ¶ added in v1.3.1
func ReplaceValue ¶
func ReplaceValue(v Value, to Value, skip func(Instruction) bool)
func RunOnCoverOr ¶ added in v1.2.8
func RunOnCoverOr[T, U Instruction](insts []U, cover func(Instruction) (T, bool), f func(T), or func(U))
func SpinHandle ¶ added in v1.3.1
func TryGetSimilarityKey ¶ added in v1.2.8
func TypeCompare ¶ added in v1.2.9
func ValueIsNull ¶ added in v1.3.1
func ValueIsNull() string
func ValueUndefined ¶ added in v1.3.1
Types ¶
type AliasType ¶ added in v1.2.8
type AliasType struct { Name string // contains filtered or unexported fields }
====================== alias type
func NewAliasType ¶ added in v1.2.8
func (*AliasType) AddMethod ¶ added in v1.2.9
func (b *AliasType) AddMethod(id string, f *FunctionType)
func (*AliasType) GetMethod ¶ added in v1.2.8
func (a *AliasType) GetMethod() map[string]*FunctionType
func (*AliasType) GetTypeKind ¶ added in v1.2.8
func (*AliasType) PkgPathString ¶ added in v1.3.1
func (*AliasType) SetMethod ¶ added in v1.2.8
func (a *AliasType) SetMethod(m map[string]*FunctionType)
type Assert ¶ added in v1.2.8
type Assert struct { Cond Value Msg string MsgValue Value // contains filtered or unexported fields }
----------- assert
func (*Assert) AddVariable ¶ added in v1.3.0
func (a *Assert) AddVariable(v *Variable)
func (*Assert) GetAllVariables ¶ added in v1.3.0
func (*Assert) GetBlock ¶ added in v1.2.8
func (a *Assert) GetBlock() *BasicBlock
func (*Assert) GetLastVariable ¶ added in v1.3.1
func (a *Assert) GetLastVariable() *Variable
func (*Assert) GetOperand ¶ added in v1.2.8
func (*Assert) GetOperandNum ¶ added in v1.2.8
func (a *Assert) GetOperandNum() int
func (*Assert) GetOperands ¶ added in v1.2.8
func (a *Assert) GetOperands() Values
func (*Assert) GetProgram ¶ added in v1.3.0
func (a *Assert) GetProgram() *Program
func (*Assert) GetVariable ¶ added in v1.2.8
func (*Assert) GetVerboseName ¶ added in v1.3.1
func (i *Assert) GetVerboseName() string
func (*Assert) IsUndefined ¶ added in v1.3.1
func (i *Assert) IsUndefined() bool
func (*Assert) LineDisasm ¶ added in v1.2.8
func (a *Assert) LineDisasm() string
func (*Assert) ReplaceValue ¶ added in v1.2.8
func (*Assert) SelfDelete ¶ added in v1.3.1
func (i *Assert) SelfDelete()
func (*Assert) SetBlock ¶ added in v1.2.8
func (a *Assert) SetBlock(block *BasicBlock)
func (*Assert) SetFunc ¶ added in v1.2.8
func (a *Assert) SetFunc(f *Function)
ssa function and block
func (*Assert) SetVerboseName ¶ added in v1.3.1
func (i *Assert) SetVerboseName(verbose string)
type BasicBlock ¶
type BasicBlock struct { Index int // BasicBlock graph Preds, Succs []*BasicBlock /* if Condition == true: this block reach */ Condition Value // instruction list Insts []Instruction Phis []*Phi // error catch Handler *ErrorHandler ScopeTable *Scope // contains filtered or unexported fields }
implement Value
func (*BasicBlock) AddSucc ¶
func (b *BasicBlock) AddSucc(succ *BasicBlock)
func (*BasicBlock) AddVariable ¶ added in v1.3.0
func (a *BasicBlock) AddVariable(v *Variable)
func (*BasicBlock) DeleteMember ¶ added in v1.3.1
func (n *BasicBlock) DeleteMember(k Value)
func (*BasicBlock) EmitInst ¶ added in v1.2.8
func (b *BasicBlock) EmitInst(i Instruction)
func (*BasicBlock) GetAllMember ¶ added in v1.3.1
func (*BasicBlock) GetAllVariables ¶ added in v1.3.0
func (*BasicBlock) GetBlock ¶ added in v1.2.8
func (a *BasicBlock) GetBlock() *BasicBlock
func (*BasicBlock) GetBlockById ¶ added in v1.2.8
func (b *BasicBlock) GetBlockById(name string) *BasicBlock
func (*BasicBlock) GetIndexMember ¶ added in v1.3.1
func (*BasicBlock) GetLastVariable ¶ added in v1.3.1
func (a *BasicBlock) GetLastVariable() *Variable
func (*BasicBlock) GetOpcode ¶ added in v1.2.8
func (i *BasicBlock) GetOpcode() Opcode
func (*BasicBlock) GetOperand ¶ added in v1.2.8
func (*BasicBlock) GetOperandNum ¶ added in v1.2.8
func (a *BasicBlock) GetOperandNum() int
func (*BasicBlock) GetOperands ¶ added in v1.2.8
func (a *BasicBlock) GetOperands() Values
func (*BasicBlock) GetProgram ¶ added in v1.3.0
func (a *BasicBlock) GetProgram() *Program
func (*BasicBlock) GetRange ¶ added in v1.3.0
func (c *BasicBlock) GetRange() *Range
source code position
func (*BasicBlock) GetStringMember ¶ added in v1.3.1
func (*BasicBlock) GetType ¶
func (b *BasicBlock) GetType() Type
func (*BasicBlock) GetValues ¶
func (b *BasicBlock) GetValues() Values
func (*BasicBlock) GetVariable ¶ added in v1.2.8
func (*BasicBlock) GetVerboseName ¶ added in v1.3.1
func (i *BasicBlock) GetVerboseName() string
func (*BasicBlock) HasUsers ¶ added in v1.2.8
func (n *BasicBlock) HasUsers() bool
has/get user and value
func (*BasicBlock) HasValues ¶ added in v1.2.8
func (b *BasicBlock) HasValues() bool
----------- BasicBlock
func (*BasicBlock) IsBlock ¶ added in v1.2.8
func (b *BasicBlock) IsBlock(name string) bool
func (*BasicBlock) IsMemberCallVariable ¶ added in v1.3.1
func (n *BasicBlock) IsMemberCallVariable() bool
func (*BasicBlock) IsUndefined ¶ added in v1.3.1
func (i *BasicBlock) IsUndefined() bool
func (*BasicBlock) LastInst ¶
func (b *BasicBlock) LastInst() Instruction
func (*BasicBlock) LineDisasm ¶ added in v1.2.8
func (a *BasicBlock) LineDisasm() string
func (*BasicBlock) Reachable ¶ added in v1.2.8
func (b *BasicBlock) Reachable() int
func (*BasicBlock) RemoveUser ¶
func (n *BasicBlock) RemoveUser(u User)
func (*BasicBlock) ReplaceValue ¶ added in v1.3.1
func (*BasicBlock) SelfDelete ¶ added in v1.3.1
func (i *BasicBlock) SelfDelete()
func (*BasicBlock) SetBlock ¶ added in v1.2.8
func (a *BasicBlock) SetBlock(block *BasicBlock)
func (*BasicBlock) SetFunc ¶ added in v1.2.8
func (a *BasicBlock) SetFunc(f *Function)
ssa function and block
func (*BasicBlock) SetType ¶
func (b *BasicBlock) SetType(ts Type)
func (*BasicBlock) SetVerboseName ¶ added in v1.3.1
func (i *BasicBlock) SetVerboseName(verbose string)
type BasicType ¶
type BasicType struct { Kind TypeKind // contains filtered or unexported fields }
func NewBasicType ¶ added in v1.3.1
func (*BasicType) AddMethod ¶ added in v1.2.9
func (b *BasicType) AddMethod(id string, f *FunctionType)
func (*BasicType) GetMethod ¶ added in v1.2.8
func (b *BasicType) GetMethod() map[string]*FunctionType
func (*BasicType) GetTypeKind ¶ added in v1.2.8
func (*BasicType) PkgPathString ¶ added in v1.3.1
func (*BasicType) SetMethod ¶ added in v1.2.8
func (b *BasicType) SetMethod(method map[string]*FunctionType)
type BinOp ¶
type BinOp struct { Op BinaryOpcode X, Y Value // contains filtered or unexported fields }
----------- BinOp
func NewBinOpOnly ¶ added in v1.2.8
func NewBinOpOnly(op BinaryOpcode, x, y Value) *BinOp
func ToBinOp ¶ added in v1.2.8
func ToBinOp(v Instruction) (*BinOp, bool)
func (*BinOp) AddVariable ¶ added in v1.3.0
func (a *BinOp) AddVariable(v *Variable)
func (*BinOp) DeleteMember ¶ added in v1.3.1
func (n *BinOp) DeleteMember(k Value)
func (*BinOp) GetAllMember ¶ added in v1.3.1
func (*BinOp) GetAllVariables ¶ added in v1.3.0
func (*BinOp) GetBlock ¶
func (a *BinOp) GetBlock() *BasicBlock
func (*BinOp) GetIndexMember ¶ added in v1.3.1
func (*BinOp) GetLastVariable ¶ added in v1.3.1
func (a *BinOp) GetLastVariable() *Variable
func (*BinOp) GetOperand ¶ added in v1.2.8
func (*BinOp) GetOperandNum ¶ added in v1.2.8
func (a *BinOp) GetOperandNum() int
func (*BinOp) GetOperands ¶ added in v1.2.8
func (a *BinOp) GetOperands() Values
func (*BinOp) GetProgram ¶ added in v1.3.0
func (a *BinOp) GetProgram() *Program
func (*BinOp) GetStringMember ¶ added in v1.3.1
func (*BinOp) GetVariable ¶ added in v1.2.8
func (*BinOp) GetVerboseName ¶ added in v1.3.1
func (i *BinOp) GetVerboseName() string
func (*BinOp) IsMemberCallVariable ¶ added in v1.3.1
func (n *BinOp) IsMemberCallVariable() bool
func (*BinOp) IsUndefined ¶ added in v1.3.1
func (i *BinOp) IsUndefined() bool
func (*BinOp) LineDisasm ¶ added in v1.2.8
func (a *BinOp) LineDisasm() string
func (*BinOp) RemoveUser ¶
func (n *BinOp) RemoveUser(u User)
func (*BinOp) ReplaceValue ¶
func (*BinOp) SelfDelete ¶ added in v1.3.1
func (i *BinOp) SelfDelete()
func (*BinOp) SetBlock ¶ added in v1.2.8
func (a *BinOp) SetBlock(block *BasicBlock)
func (*BinOp) SetVerboseName ¶ added in v1.3.1
func (i *BinOp) SetVerboseName(verbose string)
type BinaryOpcode ¶
type BinaryOpcode int
const ( // Binary OpShl BinaryOpcode = iota // << OpLogicAnd // && OpLogicOr // || OpShr // >> OpAnd // & OpAndNot // &^ OpOr // | OpXor // ^ OpAdd // + OpSub // - OpDiv // / OpMod // % // mul OpMul // * // boolean opcode OpGt // > OpLt // < OpGtEq // >= OpLtEq // <= OpEq // == OpNotEq // != <> OpIn // a in b OpSend // <- OpPow // ** )
type Call ¶
type Call struct { // for call function Method Value Args []Value // go function Async bool Unpack bool // caller // caller Value // ~ drop error IsDropError bool IsEllipsis bool // contains filtered or unexported fields }
----------- Call call instruction call method function with args as argument
func NewCall ¶ added in v1.2.8
func NewCall(target Value, args, binding []Value, block *BasicBlock) *Call
func ToCall ¶ added in v1.2.8
func ToCall(v Instruction) (*Call, bool)
func (*Call) AddVariable ¶ added in v1.3.0
func (a *Call) AddVariable(v *Variable)
func (*Call) DeleteMember ¶ added in v1.3.1
func (n *Call) DeleteMember(k Value)
func (*Call) GetAllMember ¶ added in v1.3.1
func (*Call) GetAllVariables ¶ added in v1.3.0
func (*Call) GetBlock ¶
func (a *Call) GetBlock() *BasicBlock
func (*Call) GetIndexMember ¶ added in v1.3.1
func (*Call) GetLastVariable ¶ added in v1.3.1
func (a *Call) GetLastVariable() *Variable
func (*Call) GetOperand ¶ added in v1.2.8
func (*Call) GetOperandNum ¶ added in v1.2.8
func (a *Call) GetOperandNum() int
func (*Call) GetOperands ¶ added in v1.2.8
func (a *Call) GetOperands() Values
func (*Call) GetProgram ¶ added in v1.3.0
func (a *Call) GetProgram() *Program
func (*Call) GetStringMember ¶ added in v1.3.1
func (*Call) GetVariable ¶ added in v1.2.8
func (*Call) GetVerboseName ¶ added in v1.3.1
func (i *Call) GetVerboseName() string
func (*Call) HandleFreeValue ¶ added in v1.2.8
func (c *Call) HandleFreeValue(fvs []*FunctionFreeValue)
func (*Call) IsMemberCallVariable ¶ added in v1.3.1
func (n *Call) IsMemberCallVariable() bool
func (*Call) IsUndefined ¶ added in v1.3.1
func (i *Call) IsUndefined() bool
func (*Call) LineDisasm ¶ added in v1.2.8
func (a *Call) LineDisasm() string
func (*Call) RemoveUser ¶
func (n *Call) RemoveUser(u User)
func (*Call) ReplaceValue ¶
func (*Call) SelfDelete ¶ added in v1.3.1
func (i *Call) SelfDelete()
func (*Call) SetBlock ¶ added in v1.2.8
func (a *Call) SetBlock(block *BasicBlock)
func (*Call) SetVerboseName ¶ added in v1.3.1
func (i *Call) SetVerboseName(verbose string)
type ChanType ¶
type ChanType struct { Elem Type // contains filtered or unexported fields }
====================== chan type
func NewChanType ¶
func (*ChanType) AddMethod ¶ added in v1.2.9
func (b *ChanType) AddMethod(id string, f *FunctionType)
func (*ChanType) GetMethod ¶ added in v1.2.8
func (c *ChanType) GetMethod() map[string]*FunctionType
func (*ChanType) GetTypeKind ¶ added in v1.2.8
func (ChanType) PkgPathString ¶ added in v1.3.1
func (*ChanType) SetMethod ¶ added in v1.2.8
func (c *ChanType) SetMethod(m map[string]*FunctionType)
type Const ¶
type Const struct {
// contains filtered or unexported fields
}
func (*Const) GetRawValue ¶ added in v1.2.9
func (*Const) GetTypeKind ¶ added in v1.2.8
type ConstInst ¶ added in v1.2.8
----------- Const ConstInst also have block pointer, which block set this const to variable
func CalcConstBinary ¶ added in v1.2.8
func CalcConstBinary(x, y *ConstInst, op BinaryOpcode) *ConstInst
func CalcConstUnary ¶ added in v1.2.8
func CalcConstUnary(x *ConstInst, op UnaryOpcode) *ConstInst
OpNone UnaryOpcode = iota OpNot // ! OpPlus // + OpNeg // - OpChan // ->
func NewConstInst ¶ added in v1.2.8
func (*ConstInst) AddVariable ¶ added in v1.3.0
func (a *ConstInst) AddVariable(v *Variable)
func (*ConstInst) DeleteMember ¶ added in v1.3.1
func (n *ConstInst) DeleteMember(k Value)
func (*ConstInst) GetAllMember ¶ added in v1.3.1
func (*ConstInst) GetAllVariables ¶ added in v1.3.0
func (*ConstInst) GetBlock ¶ added in v1.2.8
func (a *ConstInst) GetBlock() *BasicBlock
func (*ConstInst) GetIndexMember ¶ added in v1.3.1
func (*ConstInst) GetLastVariable ¶ added in v1.3.1
func (a *ConstInst) GetLastVariable() *Variable
func (*ConstInst) GetOperand ¶ added in v1.2.8
func (*ConstInst) GetOperandNum ¶ added in v1.2.8
func (a *ConstInst) GetOperandNum() int
func (*ConstInst) GetOperands ¶ added in v1.2.8
func (a *ConstInst) GetOperands() Values
func (*ConstInst) GetProgram ¶ added in v1.3.0
func (a *ConstInst) GetProgram() *Program
func (*ConstInst) GetRange ¶ added in v1.3.0
func (c *ConstInst) GetRange() *Range
source code position
func (*ConstInst) GetStringMember ¶ added in v1.3.1
func (*ConstInst) GetVariable ¶ added in v1.2.8
func (*ConstInst) GetVerboseName ¶ added in v1.3.1
func (i *ConstInst) GetVerboseName() string
func (*ConstInst) HasUsers ¶ added in v1.2.8
func (n *ConstInst) HasUsers() bool
has/get user and value
func (*ConstInst) IsMemberCallVariable ¶ added in v1.3.1
func (n *ConstInst) IsMemberCallVariable() bool
func (*ConstInst) IsUndefined ¶ added in v1.3.1
func (i *ConstInst) IsUndefined() bool
func (*ConstInst) LineDisasm ¶ added in v1.2.8
func (a *ConstInst) LineDisasm() string
func (*ConstInst) RemoveUser ¶ added in v1.2.8
func (n *ConstInst) RemoveUser(u User)
func (*ConstInst) ReplaceValue ¶ added in v1.3.0
func (*ConstInst) SelfDelete ¶ added in v1.3.1
func (i *ConstInst) SelfDelete()
func (*ConstInst) SetBlock ¶ added in v1.2.8
func (a *ConstInst) SetBlock(block *BasicBlock)
func (*ConstInst) SetFunc ¶ added in v1.2.8
func (a *ConstInst) SetFunc(f *Function)
ssa function and block
func (*ConstInst) SetVerboseName ¶ added in v1.3.1
func (i *ConstInst) SetVerboseName(verbose string)
type DisasmLiner ¶ added in v1.3.0
type DisasmLiner interface { DisasmValue(v Value) string // level += 1; and check should stop? // if this method return true, should stop AddLevel() bool SkipLevelChecking() bool // cache // those method should use `*cacheDisasmLiner` GetName(v Instruction) (string, bool) SetName(v Instruction, name string) DeleteName(v Instruction) }
type ErrorComment ¶ added in v1.2.8
type ErrorComment struct {
// contains filtered or unexported fields
}
func (ErrorComment) Skip ¶ added in v1.2.8
func (ec ErrorComment) Skip(pos *Range) bool
type ErrorCommentId ¶ added in v1.2.8
type ErrorCommentId string
const ( SSAIgnore ErrorCommentId = "// @ssa-ignore" SSANoCheck ErrorCommentId = "// @ssa-nocheck" )
type ErrorHandler ¶ added in v1.2.8
type ErrorHandler struct {
// contains filtered or unexported fields
}
------------- ErrorHandler
func NewErrorHandler ¶ added in v1.2.8
func NewErrorHandler(try, catch *BasicBlock) *ErrorHandler
func (*ErrorHandler) AddDone ¶ added in v1.2.8
func (e *ErrorHandler) AddDone(d *BasicBlock)
func (*ErrorHandler) AddFinal ¶ added in v1.2.8
func (e *ErrorHandler) AddFinal(f *BasicBlock)
func (*ErrorHandler) AddVariable ¶ added in v1.3.0
func (a *ErrorHandler) AddVariable(v *Variable)
func (*ErrorHandler) GetAllVariables ¶ added in v1.3.0
func (*ErrorHandler) GetBlock ¶ added in v1.2.8
func (a *ErrorHandler) GetBlock() *BasicBlock
func (*ErrorHandler) GetLastVariable ¶ added in v1.3.1
func (a *ErrorHandler) GetLastVariable() *Variable
func (*ErrorHandler) GetOpcode ¶ added in v1.2.8
func (i *ErrorHandler) GetOpcode() Opcode
func (*ErrorHandler) GetOperand ¶ added in v1.2.8
func (*ErrorHandler) GetOperandNum ¶ added in v1.2.8
func (a *ErrorHandler) GetOperandNum() int
func (*ErrorHandler) GetOperands ¶ added in v1.2.8
func (a *ErrorHandler) GetOperands() Values
func (*ErrorHandler) GetProgram ¶ added in v1.3.0
func (a *ErrorHandler) GetProgram() *Program
func (*ErrorHandler) GetRange ¶ added in v1.3.0
func (c *ErrorHandler) GetRange() *Range
source code position
func (*ErrorHandler) GetVariable ¶ added in v1.2.8
func (*ErrorHandler) GetVerboseName ¶ added in v1.3.1
func (i *ErrorHandler) GetVerboseName() string
func (*ErrorHandler) IsUndefined ¶ added in v1.3.1
func (i *ErrorHandler) IsUndefined() bool
func (*ErrorHandler) LineDisasm ¶ added in v1.2.8
func (a *ErrorHandler) LineDisasm() string
func (*ErrorHandler) ReplaceValue ¶ added in v1.3.1
func (*ErrorHandler) SelfDelete ¶ added in v1.3.1
func (i *ErrorHandler) SelfDelete()
func (*ErrorHandler) SetBlock ¶ added in v1.2.8
func (a *ErrorHandler) SetBlock(block *BasicBlock)
func (*ErrorHandler) SetFunc ¶ added in v1.2.8
func (a *ErrorHandler) SetFunc(f *Function)
ssa function and block
func (*ErrorHandler) SetVerboseName ¶ added in v1.3.1
func (i *ErrorHandler) SetVerboseName(verbose string)
func (*ErrorHandler) String ¶ added in v1.2.8
func (e *ErrorHandler) String() string
type ErrorLogger ¶ added in v1.2.8
type ExternLib ¶ added in v1.3.0
type ExternLib struct { MemberMap map[string]Value Member []Value // contains filtered or unexported fields }
----------- externLib
func NewExternLib ¶ added in v1.3.0
func NewExternLib(variable string, builder *FunctionBuilder, table map[string]any) *ExternLib
func ToExternLib ¶ added in v1.3.0
func ToExternLib(v Instruction) (*ExternLib, bool)
func (*ExternLib) AddVariable ¶ added in v1.3.0
func (a *ExternLib) AddVariable(v *Variable)
func (*ExternLib) BuildField ¶ added in v1.3.0
func (*ExternLib) DeleteMember ¶ added in v1.3.1
func (n *ExternLib) DeleteMember(k Value)
func (*ExternLib) GetAllMember ¶ added in v1.3.1
func (*ExternLib) GetAllVariables ¶ added in v1.3.0
func (*ExternLib) GetBlock ¶ added in v1.3.0
func (a *ExternLib) GetBlock() *BasicBlock
func (*ExternLib) GetIndexMember ¶ added in v1.3.1
func (*ExternLib) GetLastVariable ¶ added in v1.3.1
func (a *ExternLib) GetLastVariable() *Variable
func (*ExternLib) GetOperand ¶ added in v1.3.0
func (*ExternLib) GetOperandNum ¶ added in v1.3.0
func (a *ExternLib) GetOperandNum() int
func (*ExternLib) GetOperands ¶ added in v1.3.0
func (a *ExternLib) GetOperands() Values
func (*ExternLib) GetProgram ¶ added in v1.3.0
func (a *ExternLib) GetProgram() *Program
func (*ExternLib) GetRange ¶ added in v1.3.0
func (c *ExternLib) GetRange() *Range
source code position
func (*ExternLib) GetStringMember ¶ added in v1.3.1
func (*ExternLib) GetVariable ¶ added in v1.3.0
func (*ExternLib) GetVerboseName ¶ added in v1.3.1
func (i *ExternLib) GetVerboseName() string
func (*ExternLib) HasUsers ¶ added in v1.3.0
func (n *ExternLib) HasUsers() bool
has/get user and value
func (*ExternLib) IsMemberCallVariable ¶ added in v1.3.1
func (n *ExternLib) IsMemberCallVariable() bool
func (*ExternLib) IsUndefined ¶ added in v1.3.1
func (i *ExternLib) IsUndefined() bool
func (*ExternLib) LineDisasm ¶ added in v1.3.0
func (a *ExternLib) LineDisasm() string
func (*ExternLib) RemoveUser ¶ added in v1.3.0
func (n *ExternLib) RemoveUser(u User)
func (*ExternLib) ReplaceValue ¶ added in v1.3.0
func (*ExternLib) SelfDelete ¶ added in v1.3.1
func (i *ExternLib) SelfDelete()
func (*ExternLib) SetBlock ¶ added in v1.3.0
func (a *ExternLib) SetBlock(block *BasicBlock)
func (*ExternLib) SetFunc ¶ added in v1.3.0
func (a *ExternLib) SetFunc(f *Function)
ssa function and block
func (*ExternLib) SetVerboseName ¶ added in v1.3.1
func (i *ExternLib) SetVerboseName(verbose string)
type FullDisasmLiner ¶ added in v1.3.1
type FullDisasmLiner struct {
// contains filtered or unexported fields
}
func NewFullDisasmLiner ¶ added in v1.3.1
func NewFullDisasmLiner(max int) *FullDisasmLiner
func (*FullDisasmLiner) AddLevel ¶ added in v1.3.1
func (f *FullDisasmLiner) AddLevel() bool
func (FullDisasmLiner) DeleteName ¶ added in v1.3.1
func (b FullDisasmLiner) DeleteName(i Instruction)
func (*FullDisasmLiner) DisasmValue ¶ added in v1.3.1
func (f *FullDisasmLiner) DisasmValue(v Value) string
func (FullDisasmLiner) GetName ¶ added in v1.3.1
func (b FullDisasmLiner) GetName(i Instruction) (string, bool)
func (FullDisasmLiner) SetName ¶ added in v1.3.1
func (b FullDisasmLiner) SetName(i Instruction, name string)
func (*FullDisasmLiner) SkipLevelChecking ¶ added in v1.3.1
func (b *FullDisasmLiner) SkipLevelChecking() bool
type Function ¶
type Function struct { // package, double link Package *Package // just function parameter and all return instruction Param []*Parameter Return []*Return // BasicBlock list Blocks []*BasicBlock // First and End block EnterBlock *BasicBlock ExitBlock *BasicBlock // For Defer semantic // this block will always execute when the function exits, // regardless of whether the function returns normally or exits due to a panic. DeferBlock *BasicBlock // for closure function FreeValues map[string]*Parameter // store the captured variable form parent-function, just contain name, and type is Parameter // closure function side effects // TODO: currently, this value is not being used, but it should be utilized in the future. SideEffects map[*Variable]Value // (modified)value to value ChildFuncs []*Function // child function within this function // contains filtered or unexported fields }
implement Value
func NewFunctionWithType ¶ added in v1.2.8
func NewFunctionWithType(name string, typ *FunctionType) *Function
just create a function define, only function parameter type \ return type \ ellipsis
func ToFunction ¶ added in v1.2.8
func (*Function) AddErrorComment ¶ added in v1.2.8
func (*Function) AddSideEffect ¶ added in v1.2.9
func (*Function) AddVariable ¶ added in v1.3.0
func (a *Function) AddVariable(v *Variable)
func (*Function) DeleteMember ¶ added in v1.3.1
func (n *Function) DeleteMember(k Value)
func (*Function) DisAsm ¶
func (f *Function) DisAsm(flag FunctionAsmFlag) string
func (*Function) FirstBlockInstruction ¶ added in v1.3.0
func (f *Function) FirstBlockInstruction() []Instruction
func (*Function) GetAllMember ¶ added in v1.3.1
func (*Function) GetAllVariables ¶ added in v1.3.0
func (*Function) GetBlock ¶ added in v1.2.8
func (a *Function) GetBlock() *BasicBlock
func (*Function) GetDeferBlock ¶ added in v1.2.9
func (f *Function) GetDeferBlock() *BasicBlock
func (*Function) GetIndexMember ¶ added in v1.3.1
func (*Function) GetLastVariable ¶ added in v1.3.1
func (a *Function) GetLastVariable() *Variable
func (*Function) GetOperand ¶ added in v1.2.8
func (*Function) GetOperandNum ¶ added in v1.2.8
func (a *Function) GetOperandNum() int
func (*Function) GetOperands ¶ added in v1.2.8
func (a *Function) GetOperands() Values
func (*Function) GetProgram ¶ added in v1.3.0
func (*Function) GetRange ¶ added in v1.3.0
func (c *Function) GetRange() *Range
source code position
func (*Function) GetReferenceFiles ¶ added in v1.3.1
func (*Function) GetStringMember ¶ added in v1.3.1
func (*Function) GetVariable ¶ added in v1.2.8
func (*Function) GetVerboseName ¶ added in v1.3.1
func (i *Function) GetVerboseName() string
func (*Function) HasUsers ¶ added in v1.2.8
func (n *Function) HasUsers() bool
has/get user and value
func (*Function) IsMemberCallVariable ¶ added in v1.3.1
func (n *Function) IsMemberCallVariable() bool
func (*Function) IsUndefined ¶ added in v1.3.1
func (i *Function) IsUndefined() bool
func (*Function) LineDisasm ¶ added in v1.2.8
func (a *Function) LineDisasm() string
func (*Function) NewBasicBlock ¶
func (f *Function) NewBasicBlock(name string) *BasicBlock
func (*Function) NewBasicBlockNotAddBlocks ¶ added in v1.2.9
func (f *Function) NewBasicBlockNotAddBlocks(name string) *BasicBlock
func (*Function) NewBasicBlockNotAddUnSealed ¶ added in v1.2.9
func (f *Function) NewBasicBlockNotAddUnSealed(name string) *BasicBlock
func (*Function) NewBasicBlockUnSealed ¶
func (f *Function) NewBasicBlockUnSealed(name string) *BasicBlock
func (*Function) NewErrorWithPos ¶
func (*Function) PushReferenceFile ¶ added in v1.3.1
func (*Function) RemoveUser ¶
func (n *Function) RemoveUser(u User)
func (*Function) ReplaceValue ¶ added in v1.3.1
func (*Function) ReturnValue ¶
func (*Function) SelfDelete ¶ added in v1.3.1
func (i *Function) SelfDelete()
func (*Function) SetBlock ¶ added in v1.2.8
func (a *Function) SetBlock(block *BasicBlock)
func (*Function) SetFunc ¶ added in v1.2.8
func (a *Function) SetFunc(f *Function)
ssa function and block
func (*Function) SetVerboseName ¶ added in v1.3.1
func (i *Function) SetVerboseName(verbose string)
type FunctionAsmFlag ¶
type FunctionAsmFlag int
const ( DisAsmDefault FunctionAsmFlag = 1 << iota DisAsmWithSource )
type FunctionBuilder ¶
type FunctionBuilder struct { *Function // for build CurrentBlock *BasicBlock // current block to build CurrentRange *Range // current position in source code ExternInstance map[string]any ExternLib map[string]map[string]any DefineFunc map[string]any MarkedFunc *FunctionType MarkedVariable *Variable MarkedThisObject Value // contains filtered or unexported fields }
Function builder API
func NewBuilder ¶
func NewBuilder(f *Function, parent *FunctionBuilder) *FunctionBuilder
func (*FunctionBuilder) AddDefer ¶
func (b *FunctionBuilder) AddDefer(call *Call)
add current function defer function
func (*FunctionBuilder) AddLabel ¶ added in v1.2.8
func (b *FunctionBuilder) AddLabel(name string, block *BasicBlock)
for goto and label
func (FunctionBuilder) AddVariable ¶ added in v1.3.0
func (a FunctionBuilder) AddVariable(v *Variable)
func (*FunctionBuilder) AssignVariable ¶ added in v1.3.1
func (b *FunctionBuilder) AssignVariable(variable *Variable, value Value)
AssignVariable assign value to variable
func (*FunctionBuilder) Break ¶ added in v1.3.1
func (b *FunctionBuilder) Break() bool
func (*FunctionBuilder) BuildFreeValue ¶
func (b *FunctionBuilder) BuildFreeValue(variable string) *Parameter
func (*FunctionBuilder) BuildSwitch ¶ added in v1.2.8
func (b *FunctionBuilder) BuildSwitch() *SwitchBuilder
func (*FunctionBuilder) BuildSyntaxBlock ¶ added in v1.3.1
func (b *FunctionBuilder) BuildSyntaxBlock(builder func())
func (*FunctionBuilder) BuildTry ¶ added in v1.2.8
func (b *FunctionBuilder) BuildTry() *TryBuilder
func (*FunctionBuilder) BuildValueFromAny ¶ added in v1.2.8
func (b *FunctionBuilder) BuildValueFromAny(id string, v any) (value Value)
func (*FunctionBuilder) Continue ¶ added in v1.3.1
func (b *FunctionBuilder) Continue() bool
func (*FunctionBuilder) CoverReflectFunctionType ¶ added in v1.2.8
func (f *FunctionBuilder) CoverReflectFunctionType(itype reflect.Type, level int) *FunctionType
func (*FunctionBuilder) CreateIfBuilder ¶ added in v1.3.1
func (b *FunctionBuilder) CreateIfBuilder() *IfBuilder
CreateIfBuilder Create IfBuilder
func (*FunctionBuilder) CreateInterfaceWithMap ¶ added in v1.3.1
func (b *FunctionBuilder) CreateInterfaceWithMap(keys []Value, vs []Value) *Make
func (*FunctionBuilder) CreateInterfaceWithSlice ¶ added in v1.3.1
func (b *FunctionBuilder) CreateInterfaceWithSlice(vs []Value) *Make
func (*FunctionBuilder) CreateLocalVariable ¶ added in v1.3.1
func (b *FunctionBuilder) CreateLocalVariable(name string) *Variable
CreateVariable create variable
func (*FunctionBuilder) CreateLoopBuilder ¶ added in v1.3.1
func (b *FunctionBuilder) CreateLoopBuilder() *LoopBuilder
CreateLoopBuilder Create LoopBuilder
func (*FunctionBuilder) CreateMemberCallVariable ¶ added in v1.3.1
func (b *FunctionBuilder) CreateMemberCallVariable(value, key Value) *Variable
func (*FunctionBuilder) CreateVariable ¶ added in v1.3.1
func (b *FunctionBuilder) CreateVariable(name string) *Variable
func (*FunctionBuilder) DeleteLabel ¶ added in v1.2.8
func (b *FunctionBuilder) DeleteLabel(name string)
func (FunctionBuilder) DeleteMember ¶ added in v1.3.1
func (n FunctionBuilder) DeleteMember(k Value)
func (*FunctionBuilder) EmitAssert ¶ added in v1.2.8
func (f *FunctionBuilder) EmitAssert(cond, msgValue Value, msg string) *Assert
func (*FunctionBuilder) EmitBinOp ¶ added in v1.2.8
func (f *FunctionBuilder) EmitBinOp(op BinaryOpcode, x, y Value) Value
func (*FunctionBuilder) EmitCall ¶
func (f *FunctionBuilder) EmitCall(c *Call) *Call
func (*FunctionBuilder) EmitConstInst ¶ added in v1.2.8
func (f *FunctionBuilder) EmitConstInst(i any) *ConstInst
func (*FunctionBuilder) EmitConstInstAny ¶ added in v1.2.8
func (f *FunctionBuilder) EmitConstInstAny() *ConstInst
func (*FunctionBuilder) EmitConstInstNil ¶ added in v1.2.8
func (f *FunctionBuilder) EmitConstInstNil() *ConstInst
func (*FunctionBuilder) EmitConstInstWithUnary ¶ added in v1.2.8
func (f *FunctionBuilder) EmitConstInstWithUnary(i any, un int) *ConstInst
func (*FunctionBuilder) EmitErrorHandler ¶ added in v1.2.8
func (f *FunctionBuilder) EmitErrorHandler(try, catch *BasicBlock) *ErrorHandler
func (*FunctionBuilder) EmitFirst ¶ added in v1.3.1
func (b *FunctionBuilder) EmitFirst(i Instruction, block *BasicBlock)
func (*FunctionBuilder) EmitIf ¶
func (f *FunctionBuilder) EmitIf() *If
func (*FunctionBuilder) EmitInstructionAfter ¶ added in v1.2.8
func (f *FunctionBuilder) EmitInstructionAfter(i, after Instruction)
func (*FunctionBuilder) EmitInstructionBefore ¶ added in v1.2.8
func (f *FunctionBuilder) EmitInstructionBefore(i, before Instruction)
func (*FunctionBuilder) EmitJump ¶
func (f *FunctionBuilder) EmitJump(to *BasicBlock) *Jump
func (*FunctionBuilder) EmitLoop ¶ added in v1.2.8
func (f *FunctionBuilder) EmitLoop(body, exit *BasicBlock, cond Value) *Loop
func (*FunctionBuilder) EmitMakeBuildWithType ¶ added in v1.2.8
func (f *FunctionBuilder) EmitMakeBuildWithType(typ Type, Len, Cap Value) *Make
func (*FunctionBuilder) EmitMakeSlice ¶ added in v1.2.8
func (f *FunctionBuilder) EmitMakeSlice(i Value, low, high, max Value) *Make
func (*FunctionBuilder) EmitMakeWithoutType ¶ added in v1.2.8
func (f *FunctionBuilder) EmitMakeWithoutType(Len, Cap Value) *Make
func (*FunctionBuilder) EmitNext ¶ added in v1.2.8
func (f *FunctionBuilder) EmitNext(iter Value, isIn bool) (key, field, ok Value)
func (*FunctionBuilder) EmitNextOnly ¶ added in v1.2.8
func (f *FunctionBuilder) EmitNextOnly(iter Value, isIn bool) *Next
func (*FunctionBuilder) EmitOnly ¶ added in v1.2.9
func (f *FunctionBuilder) EmitOnly(i Instruction)
func (*FunctionBuilder) EmitPanic ¶ added in v1.2.8
func (f *FunctionBuilder) EmitPanic(info Value) *Panic
func (*FunctionBuilder) EmitPhi ¶ added in v1.3.1
func (f *FunctionBuilder) EmitPhi(name string, vs []Value) *Phi
func (*FunctionBuilder) EmitRecover ¶ added in v1.2.8
func (f *FunctionBuilder) EmitRecover() *Recover
func (*FunctionBuilder) EmitReturn ¶
func (f *FunctionBuilder) EmitReturn(vs []Value) *Return
func (*FunctionBuilder) EmitSideEffect ¶ added in v1.3.1
func (f *FunctionBuilder) EmitSideEffect(name string, call *Call, value Value) *SideEffect
func (*FunctionBuilder) EmitSwitch ¶
func (f *FunctionBuilder) EmitSwitch(cond Value, defaultb *BasicBlock, label []SwitchLabel) *Switch
func (*FunctionBuilder) EmitToBlock ¶ added in v1.2.8
func (f *FunctionBuilder) EmitToBlock(i Instruction, block *BasicBlock)
func (*FunctionBuilder) EmitTypeCast ¶ added in v1.2.8
func (f *FunctionBuilder) EmitTypeCast(v Value, typ Type) *TypeCast
func (*FunctionBuilder) EmitTypeValue ¶ added in v1.2.8
func (f *FunctionBuilder) EmitTypeValue(typ Type) *TypeValue
func (*FunctionBuilder) EmitUnOp ¶ added in v1.2.8
func (f *FunctionBuilder) EmitUnOp(op UnaryOpcode, v Value) Value
func (*FunctionBuilder) EmitUndefined ¶ added in v1.3.1
func (f *FunctionBuilder) EmitUndefined(name string) *Undefined
EmitUndefined emit undefined value the current block is finished. NOTE: the object/membercall will create vars in finished blocks
func (*FunctionBuilder) Fallthrough ¶ added in v1.3.1
func (b *FunctionBuilder) Fallthrough() bool
func (FunctionBuilder) GetAllMember ¶ added in v1.3.1
func (FunctionBuilder) GetAllVariables ¶ added in v1.3.0
func (FunctionBuilder) GetBlock ¶ added in v1.2.8
func (a FunctionBuilder) GetBlock() *BasicBlock
func (FunctionBuilder) GetIndexMember ¶ added in v1.3.1
func (*FunctionBuilder) GetLabel ¶ added in v1.2.8
func (b *FunctionBuilder) GetLabel(name string) *BasicBlock
func (FunctionBuilder) GetLastVariable ¶ added in v1.3.1
func (a FunctionBuilder) GetLastVariable() *Variable
func (*FunctionBuilder) GetMarkedFunction ¶ added in v1.3.1
func (b *FunctionBuilder) GetMarkedFunction() *FunctionType
func (FunctionBuilder) GetOperand ¶ added in v1.2.8
func (FunctionBuilder) GetOperandNum ¶ added in v1.2.8
func (a FunctionBuilder) GetOperandNum() int
func (FunctionBuilder) GetOperands ¶ added in v1.2.8
func (a FunctionBuilder) GetOperands() Values
func (FunctionBuilder) GetRange ¶ added in v1.3.0
func (c FunctionBuilder) GetRange() *Range
source code position
func (FunctionBuilder) GetStringMember ¶ added in v1.3.1
func (FunctionBuilder) GetType ¶ added in v1.2.8
func (n FunctionBuilder) GetType() Type
for Value : type
func (FunctionBuilder) GetVariable ¶ added in v1.2.8
func (FunctionBuilder) GetVerboseName ¶ added in v1.3.1
func (i FunctionBuilder) GetVerboseName() string
func (FunctionBuilder) HasUsers ¶ added in v1.2.8
func (n FunctionBuilder) HasUsers() bool
has/get user and value
func (*FunctionBuilder) InterfaceAddFieldBuild ¶ added in v1.3.1
func (*FunctionBuilder) IsBlockFinish ¶ added in v1.3.0
func (b *FunctionBuilder) IsBlockFinish() bool
current block is finish?
func (FunctionBuilder) IsMemberCallVariable ¶ added in v1.3.1
func (n FunctionBuilder) IsMemberCallVariable() bool
func (*FunctionBuilder) IsParentFunctionVariable ¶ added in v1.3.1
func (b *FunctionBuilder) IsParentFunctionVariable(v *Variable) bool
func (FunctionBuilder) IsUndefined ¶ added in v1.3.1
func (i FunctionBuilder) IsUndefined() bool
func (FunctionBuilder) LineDisasm ¶ added in v1.3.0
func (a FunctionBuilder) LineDisasm() string
func (*FunctionBuilder) NewCall ¶
func (f *FunctionBuilder) NewCall(target Value, args []Value) *Call
func (*FunctionBuilder) NewError ¶
func (b *FunctionBuilder) NewError(kind ErrorKind, tag ErrorTag, massage string, arg ...interface{})
func (*FunctionBuilder) NewFunc ¶
func (b *FunctionBuilder) NewFunc(name string) *Function
new function
func (*FunctionBuilder) NewParam ¶ added in v1.3.1
func (f *FunctionBuilder) NewParam(name string) *Parameter
func (*FunctionBuilder) PeekValue ¶ added in v1.3.1
func (b *FunctionBuilder) PeekValue(name string) Value
func (*FunctionBuilder) PeekValueByVariable ¶ added in v1.3.1
func (b *FunctionBuilder) PeekValueByVariable(v *Variable) Value
func (*FunctionBuilder) PeekValueInThisFunction ¶ added in v1.3.1
func (b *FunctionBuilder) PeekValueInThisFunction(name string) Value
func (*FunctionBuilder) PopFunction ¶
func (b *FunctionBuilder) PopFunction() *FunctionBuilder
func (*FunctionBuilder) PopTarget ¶
func (b *FunctionBuilder) PopTarget() bool
func (*FunctionBuilder) PushFunction ¶
func (b *FunctionBuilder) PushFunction(newFunc *Function) *FunctionBuilder
function stack
func (*FunctionBuilder) PushTarget ¶
func (b *FunctionBuilder) PushTarget(scope ssautil.LabelTarget[Value], _break, _continue, _fallthrough *BasicBlock)
target stack
func (*FunctionBuilder) ReadMemberCallVariable ¶ added in v1.3.1
func (b *FunctionBuilder) ReadMemberCallVariable(value, key Value) Value
func (*FunctionBuilder) ReadOrCreateMemberCallVariable ¶ added in v1.3.1
func (b *FunctionBuilder) ReadOrCreateMemberCallVariable(caller, callee Value) Value
func (*FunctionBuilder) ReadOrCreateVariable ¶ added in v1.3.1
func (b *FunctionBuilder) ReadOrCreateVariable(name string) Value
func (*FunctionBuilder) ReadValue ¶ added in v1.3.1
func (b *FunctionBuilder) ReadValue(name string) Value
ReadValue get value by name
func (*FunctionBuilder) ReadValueByVariable ¶ added in v1.3.1
func (b *FunctionBuilder) ReadValueByVariable(v *Variable) Value
ReadValueByVariable get value by variable
func (*FunctionBuilder) ReadValueInThisFunction ¶ added in v1.3.1
func (b *FunctionBuilder) ReadValueInThisFunction(name string) Value
func (FunctionBuilder) RemoveUser ¶ added in v1.2.8
func (n FunctionBuilder) RemoveUser(u User)
func (FunctionBuilder) ReplaceValue ¶ added in v1.3.1
func (FunctionBuilder) SelfDelete ¶ added in v1.3.1
func (i FunctionBuilder) SelfDelete()
func (FunctionBuilder) SetBlock ¶ added in v1.2.8
func (a FunctionBuilder) SetBlock(block *BasicBlock)
func (*FunctionBuilder) SetCurrent ¶ added in v1.2.8
func (f *FunctionBuilder) SetCurrent(i Instruction) func()
func (*FunctionBuilder) SetDefineFunc ¶ added in v1.3.1
func (b *FunctionBuilder) SetDefineFunc()
func (FunctionBuilder) SetFunc ¶ added in v1.2.8
func (a FunctionBuilder) SetFunc(f *Function)
ssa function and block
func (*FunctionBuilder) SetInstructionPosition ¶ added in v1.2.9
func (f *FunctionBuilder) SetInstructionPosition(i Instruction)
func (*FunctionBuilder) SetMarkedFunction ¶ added in v1.3.1
func (b *FunctionBuilder) SetMarkedFunction(name string)
func (FunctionBuilder) SetName ¶ added in v1.3.0
func (a FunctionBuilder) SetName(v string)
variable
func (FunctionBuilder) SetVerboseName ¶ added in v1.3.1
func (i FunctionBuilder) SetVerboseName(verbose string)
func (*FunctionBuilder) TryBuildExternValue ¶ added in v1.2.8
func (b *FunctionBuilder) TryBuildExternValue(id string) Value
func (*FunctionBuilder) TryGetSimilarityKey ¶ added in v1.2.8
func (b *FunctionBuilder) TryGetSimilarityKey(name, key string) string
func (*FunctionBuilder) WithDefineFunction ¶ added in v1.3.1
func (b *FunctionBuilder) WithDefineFunction(defineFunc map[string]any)
func (*FunctionBuilder) WithExternLib ¶ added in v1.2.8
func (b *FunctionBuilder) WithExternLib(lib map[string]map[string]any)
func (*FunctionBuilder) WithExternMethod ¶ added in v1.2.9
func (b *FunctionBuilder) WithExternMethod(builder MethodBuilder)
func (*FunctionBuilder) WithExternValue ¶ added in v1.2.8
func (b *FunctionBuilder) WithExternValue(vs map[string]any)
type FunctionFreeValue ¶ added in v1.3.1
type FunctionSideEffect ¶ added in v1.3.1
type FunctionType ¶ added in v1.2.8
type FunctionType struct { Name string ReturnType Type Parameter Types FreeValue []*FunctionFreeValue SideEffects []*FunctionSideEffect IsVariadic bool IsMethod bool IsModifySelf bool // if this is method function // contains filtered or unexported fields }
func GetMethod ¶ added in v1.2.9
func GetMethod(t Type, id string) *FunctionType
func NewFunctionType ¶ added in v1.2.8
func NewFunctionType(name string, Parameter []Type, ReturnType Type, IsVariadic bool) *FunctionType
func NewFunctionTypeDefine ¶ added in v1.2.9
func NewFunctionTypeDefine(name string, Parameter []Type, ReturnType []Type, IsVariadic bool) *FunctionType
func ToFunctionType ¶ added in v1.2.8
func ToFunctionType(t Type) (*FunctionType, bool)
func (*FunctionType) AddMethod ¶ added in v1.2.9
func (b *FunctionType) AddMethod(id string, f *FunctionType)
func (*FunctionType) GetMethod ¶ added in v1.2.8
func (f *FunctionType) GetMethod() map[string]*FunctionType
func (*FunctionType) GetParamString ¶ added in v1.2.8
func (s *FunctionType) GetParamString() string
func (*FunctionType) GetTypeKind ¶ added in v1.2.8
func (s *FunctionType) GetTypeKind() TypeKind
func (*FunctionType) PkgPathString ¶ added in v1.3.1
func (s *FunctionType) PkgPathString() string
func (*FunctionType) RawString ¶ added in v1.2.8
func (s *FunctionType) RawString() string
func (*FunctionType) SetFreeValue ¶ added in v1.2.8
func (s *FunctionType) SetFreeValue(fv map[string]*Parameter)
func (*FunctionType) SetMethod ¶ added in v1.2.8
func (f *FunctionType) SetMethod(m map[string]*FunctionType)
func (*FunctionType) SetModifySelf ¶ added in v1.2.9
func (f *FunctionType) SetModifySelf(b bool)
func (*FunctionType) SetName ¶ added in v1.2.8
func (s *FunctionType) SetName(name string)
func (*FunctionType) SetSideEffect ¶ added in v1.2.9
func (s *FunctionType) SetSideEffect(se map[*Variable]Value)
func (*FunctionType) String ¶ added in v1.2.8
func (s *FunctionType) String() string
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) AddVariable ¶ added in v1.3.0
func (a *If) AddVariable(v *Variable)
func (*If) GetAllVariables ¶ added in v1.3.0
func (*If) GetBlock ¶
func (a *If) GetBlock() *BasicBlock
func (*If) GetLastVariable ¶ added in v1.3.1
func (a *If) GetLastVariable() *Variable
func (*If) GetOperand ¶ added in v1.2.8
func (*If) GetOperandNum ¶ added in v1.2.8
func (a *If) GetOperandNum() int
func (*If) GetOperands ¶ added in v1.2.8
func (a *If) GetOperands() Values
func (*If) GetProgram ¶ added in v1.3.0
func (a *If) GetProgram() *Program
func (*If) GetVariable ¶ added in v1.2.8
func (*If) GetVerboseName ¶ added in v1.3.1
func (i *If) GetVerboseName() string
func (*If) IsUndefined ¶ added in v1.3.1
func (i *If) IsUndefined() bool
func (*If) LineDisasm ¶ added in v1.2.8
func (a *If) LineDisasm() string
func (*If) ReplaceValue ¶
func (*If) SelfDelete ¶ added in v1.3.1
func (i *If) SelfDelete()
func (*If) SetBlock ¶ added in v1.2.8
func (a *If) SetBlock(block *BasicBlock)
func (*If) SetCondition ¶ added in v1.3.1
func (*If) SetVerboseName ¶ added in v1.3.1
func (i *If) SetVerboseName(verbose string)
type IfBuilder ¶ added in v1.2.8
type IfBuilder struct {
// contains filtered or unexported fields
}
IfBuilder is a builder for if statement ssa control flow: if builder
func (*IfBuilder) AppendItem ¶ added in v1.3.1
AppendItem append IfBuilderItem to IfBuilder
func (*IfBuilder) SetCondition ¶ added in v1.3.1
SetCondition build if condition and body, short for append item
type IfBuilderItem ¶ added in v1.3.1
type IfBuilderItem struct { Condition func() Value Body func() }
IfBuilderItem is pair of condition and body, if condition is true, then run body
type Instruction ¶
type Instruction interface { ErrorLogger GetOpcode() Opcode // function GetFunc() *Function SetFunc(*Function) // block GetBlock() *BasicBlock SetBlock(*BasicBlock) // program GetProgram() *Program GetName() string SetName(variable string) GetVerboseName() string SetVerboseName(string) GetId() int // for identify SetId(int) // position GetRange() *Range SetRange(*Range) // extern IsExtern() bool SetExtern(bool) GetVariable(string) *Variable GetLastVariable() *Variable GetAllVariables() map[string]*Variable AddVariable(*Variable) ReplaceValue(Value, Value) SelfDelete() }
type InterfaceType ¶
type InterfaceType struct {
// contains filtered or unexported fields
}
====================== interface type
func NewInterfaceType ¶
func NewInterfaceType(name, pkgPath string) *InterfaceType
func (*InterfaceType) AddMethod ¶ added in v1.2.9
func (b *InterfaceType) AddMethod(id string, f *FunctionType)
func (*InterfaceType) GetMethod ¶ added in v1.2.8
func (i *InterfaceType) GetMethod() map[string]*FunctionType
func (*InterfaceType) GetTypeKind ¶ added in v1.2.8
func (i *InterfaceType) GetTypeKind() TypeKind
func (*InterfaceType) PkgPathString ¶ added in v1.3.1
func (i *InterfaceType) PkgPathString() string
func (*InterfaceType) RawString ¶ added in v1.2.8
func (i *InterfaceType) RawString() string
func (*InterfaceType) SetMethod ¶ added in v1.2.8
func (i *InterfaceType) SetMethod(m map[string]*FunctionType)
func (*InterfaceType) String ¶
func (i *InterfaceType) String() string
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
func NewJump ¶ added in v1.2.8
func NewJump(to *BasicBlock) *Jump
func (*Jump) AddVariable ¶ added in v1.3.0
func (a *Jump) AddVariable(v *Variable)
func (*Jump) GetAllVariables ¶ added in v1.3.0
func (*Jump) GetBlock ¶
func (a *Jump) GetBlock() *BasicBlock
func (*Jump) GetLastVariable ¶ added in v1.3.1
func (a *Jump) GetLastVariable() *Variable
func (*Jump) GetOperand ¶ added in v1.2.8
func (*Jump) GetOperandNum ¶ added in v1.2.8
func (a *Jump) GetOperandNum() int
func (*Jump) GetOperands ¶ added in v1.2.8
func (a *Jump) GetOperands() Values
func (*Jump) GetProgram ¶ added in v1.3.0
func (a *Jump) GetProgram() *Program
func (*Jump) GetVariable ¶ added in v1.2.8
func (*Jump) GetVerboseName ¶ added in v1.3.1
func (i *Jump) GetVerboseName() string
func (*Jump) IsUndefined ¶ added in v1.3.1
func (i *Jump) IsUndefined() bool
func (*Jump) LineDisasm ¶ added in v1.2.8
func (a *Jump) LineDisasm() string
func (*Jump) ReplaceValue ¶ added in v1.3.1
func (*Jump) SelfDelete ¶ added in v1.3.1
func (i *Jump) SelfDelete()
func (*Jump) SetBlock ¶ added in v1.2.8
func (a *Jump) SetBlock(block *BasicBlock)
func (*Jump) SetVerboseName ¶ added in v1.3.1
func (i *Jump) SetVerboseName(verbose string)
type Loop ¶ added in v1.2.8
type Loop struct {
Body, Exit *BasicBlock
Init, Cond, Step Value
Key Value
// contains filtered or unexported fields
}
----------- For for loop
func (*Loop) AddVariable ¶ added in v1.3.0
func (a *Loop) AddVariable(v *Variable)
func (*Loop) GetAllVariables ¶ added in v1.3.0
func (*Loop) GetBlock ¶ added in v1.2.8
func (a *Loop) GetBlock() *BasicBlock
func (*Loop) GetLastVariable ¶ added in v1.3.1
func (a *Loop) GetLastVariable() *Variable
func (*Loop) GetOperand ¶ added in v1.2.8
func (*Loop) GetOperandNum ¶ added in v1.2.8
func (a *Loop) GetOperandNum() int
func (*Loop) GetOperands ¶ added in v1.2.8
func (a *Loop) GetOperands() Values
func (*Loop) GetProgram ¶ added in v1.3.0
func (a *Loop) GetProgram() *Program
func (*Loop) GetVariable ¶ added in v1.2.8
func (*Loop) GetVerboseName ¶ added in v1.3.1
func (i *Loop) GetVerboseName() string
func (*Loop) IsUndefined ¶ added in v1.3.1
func (i *Loop) IsUndefined() bool
func (*Loop) LineDisasm ¶ added in v1.2.8
func (a *Loop) LineDisasm() string
func (*Loop) ReplaceValue ¶ added in v1.2.8
func (*Loop) SelfDelete ¶ added in v1.3.1
func (i *Loop) SelfDelete()
func (*Loop) SetBlock ¶ added in v1.2.8
func (a *Loop) SetBlock(block *BasicBlock)
func (*Loop) SetVerboseName ¶ added in v1.3.1
func (i *Loop) SetVerboseName(verbose string)
type LoopBuilder ¶ added in v1.2.8
type LoopBuilder struct {
// contains filtered or unexported fields
}
enter:
... // for first expression in here jump loop.header
loop.header: <- enter, loop.latch
// for stmt cond in here If [cond] true -> loop.body, false -> loop.exit
loop.body: <- loop.header
// for body block in here
loop.latch: <- loop.body (target of continue)
// for third expr in here jump loop.header
loop.exit: <- loop.header (target of break)
jump rest
rest:
...rest.code....
LoopBuilder is a builder for loop statement
func (*LoopBuilder) Finish ¶ added in v1.2.8
func (lb *LoopBuilder) Finish()
func (*LoopBuilder) SetBody ¶ added in v1.3.1
func (lb *LoopBuilder) SetBody(f func())
SetBody : Loop Body
func (*LoopBuilder) SetCondition ¶ added in v1.3.1
func (lb *LoopBuilder) SetCondition(f func() Value)
SetCondition : Loop Condition
func (*LoopBuilder) SetFirst ¶ added in v1.3.1
func (lb *LoopBuilder) SetFirst(f func() []Value)
SetFirst : Loop First Expression
func (*LoopBuilder) SetThird ¶ added in v1.3.1
func (lb *LoopBuilder) SetThird(f func() []Value)
SetThird : Loop Third Expression
type Make ¶ added in v1.2.8
type Make struct {
// when slice or map
Len, Cap Value
// contains filtered or unexported fields
}
----------- Make
func ToMake ¶ added in v1.3.0
func ToMake(v Instruction) (*Make, bool)
func (*Make) AddVariable ¶ added in v1.3.0
func (a *Make) AddVariable(v *Variable)
func (*Make) DeleteMember ¶ added in v1.3.1
func (n *Make) DeleteMember(k Value)
func (*Make) GetAllMember ¶ added in v1.3.1
func (*Make) GetAllVariables ¶ added in v1.3.0
func (*Make) GetBlock ¶ added in v1.2.8
func (a *Make) GetBlock() *BasicBlock
func (*Make) GetIndexMember ¶ added in v1.3.1
func (*Make) GetLastVariable ¶ added in v1.3.1
func (a *Make) GetLastVariable() *Variable
func (*Make) GetOperand ¶ added in v1.2.8
func (*Make) GetOperandNum ¶ added in v1.2.8
func (a *Make) GetOperandNum() int
func (*Make) GetOperands ¶ added in v1.2.8
func (a *Make) GetOperands() Values
func (*Make) GetProgram ¶ added in v1.3.0
func (a *Make) GetProgram() *Program
func (*Make) GetStringMember ¶ added in v1.3.1
func (*Make) GetVariable ¶ added in v1.2.8
func (*Make) GetVerboseName ¶ added in v1.3.1
func (i *Make) GetVerboseName() string
func (*Make) IsMemberCallVariable ¶ added in v1.3.1
func (n *Make) IsMemberCallVariable() bool
func (*Make) IsUndefined ¶ added in v1.3.1
func (i *Make) IsUndefined() bool
func (*Make) LineDisasm ¶ added in v1.2.8
func (a *Make) LineDisasm() string
func (*Make) RemoveUser ¶ added in v1.2.8
func (n *Make) RemoveUser(u User)
func (*Make) ReplaceValue ¶ added in v1.2.8
func (*Make) SelfDelete ¶ added in v1.3.1
func (i *Make) SelfDelete()
func (*Make) SetBlock ¶ added in v1.2.8
func (a *Make) SetBlock(block *BasicBlock)
func (*Make) SetVerboseName ¶ added in v1.3.1
func (i *Make) SetVerboseName(verbose string)
type MemberCall ¶ added in v1.3.1
type MemberCall interface { // object member caller IsObject() bool AddMember(Value, Value) GetMember(Value) (Value, bool) GetIndexMember(int) (Value, bool) GetStringMember(string) (Value, bool) DeleteMember(Value) // delete by key GetAllMember() map[Value]Value // map[key]value // member, member callee IsMember() bool SetObject(Value) SetKey(Value) GetKey() Value GetObject() Value }
type MethodBuilder ¶ added in v1.2.9
type MethodBuilder interface { Build(Type, string) *FunctionType GetMethodNames(Type) []string }
var ExternMethodBuilder MethodBuilder
type NameDisasmLiner ¶ added in v1.3.1
type NameDisasmLiner struct {
// contains filtered or unexported fields
}
func NewNameDisasmLiner ¶ added in v1.3.1
func NewNameDisasmLiner() *NameDisasmLiner
func (*NameDisasmLiner) AddLevel ¶ added in v1.3.1
func (n *NameDisasmLiner) AddLevel() bool
func (NameDisasmLiner) DeleteName ¶ added in v1.3.1
func (b NameDisasmLiner) DeleteName(i Instruction)
func (*NameDisasmLiner) DisasmValue ¶ added in v1.3.1
func (n *NameDisasmLiner) DisasmValue(v Value) string
func (NameDisasmLiner) GetName ¶ added in v1.3.1
func (b NameDisasmLiner) GetName(i Instruction) (string, bool)
func (NameDisasmLiner) SetName ¶ added in v1.3.1
func (b NameDisasmLiner) SetName(i Instruction, name string)
func (*NameDisasmLiner) SkipLevelChecking ¶ added in v1.3.1
func (b *NameDisasmLiner) SkipLevelChecking() bool
type Next ¶ added in v1.2.8
type Next struct { Iter Value InNext bool // "in" grammar // contains filtered or unexported fields }
------------- Next
func (*Next) AddVariable ¶ added in v1.3.0
func (a *Next) AddVariable(v *Variable)
func (*Next) DeleteMember ¶ added in v1.3.1
func (n *Next) DeleteMember(k Value)
func (*Next) GetAllMember ¶ added in v1.3.1
func (*Next) GetAllVariables ¶ added in v1.3.0
func (*Next) GetBlock ¶ added in v1.2.8
func (a *Next) GetBlock() *BasicBlock
func (*Next) GetIndexMember ¶ added in v1.3.1
func (*Next) GetLastVariable ¶ added in v1.3.1
func (a *Next) GetLastVariable() *Variable
func (*Next) GetOperand ¶ added in v1.2.8
func (*Next) GetOperandNum ¶ added in v1.2.8
func (a *Next) GetOperandNum() int
func (*Next) GetOperands ¶ added in v1.2.8
func (a *Next) GetOperands() Values
func (*Next) GetProgram ¶ added in v1.3.0
func (a *Next) GetProgram() *Program
func (*Next) GetStringMember ¶ added in v1.3.1
func (*Next) GetVariable ¶ added in v1.2.8
func (*Next) GetVerboseName ¶ added in v1.3.1
func (i *Next) GetVerboseName() string
func (*Next) IsMemberCallVariable ¶ added in v1.3.1
func (n *Next) IsMemberCallVariable() bool
func (*Next) IsUndefined ¶ added in v1.3.1
func (i *Next) IsUndefined() bool
func (*Next) LineDisasm ¶ added in v1.2.8
func (a *Next) LineDisasm() string
func (*Next) RemoveUser ¶ added in v1.2.8
func (n *Next) RemoveUser(u User)
func (*Next) ReplaceValue ¶ added in v1.2.8
func (*Next) SelfDelete ¶ added in v1.3.1
func (i *Next) SelfDelete()
func (*Next) SetBlock ¶ added in v1.2.8
func (a *Next) SetBlock(block *BasicBlock)
func (*Next) SetVerboseName ¶ added in v1.3.1
func (i *Next) SetVerboseName(verbose string)
type Node ¶
type Node interface { // string String() string // for graph HasUsers() bool GetUsers() Users HasValues() bool GetValues() Values IsUndefined() bool }
data-flow
type ObjectType ¶ added in v1.2.8
type ObjectType struct { Name string Kind TypeKind Len int Keys []Value FieldTypes []Type AnonymousField []*ObjectType Combination bool // function multiple return will combined to struct KeyTyp Type FieldType Type // contains filtered or unexported fields }
==================== interface type
func NewMapType ¶
func NewMapType(key, field Type) *ObjectType
func NewObjectType ¶ added in v1.2.8
func NewObjectType() *ObjectType
func NewStructType ¶ added in v1.2.8
func NewStructType() *ObjectType
func ToObjectType ¶ added in v1.2.8
func ToObjectType(t Type) (*ObjectType, bool)
func (*ObjectType) AddField ¶ added in v1.2.8
func (s *ObjectType) AddField(key Value, field Type)
for struct build
func (*ObjectType) AddMethod ¶ added in v1.2.9
func (b *ObjectType) AddMethod(id string, f *FunctionType)
func (*ObjectType) Finish ¶ added in v1.2.8
func (s *ObjectType) Finish()
===================== Finish simply
func (*ObjectType) GetField ¶ added in v1.2.8
func (s *ObjectType) GetField(key Value) Type
return (field-type, key-type)
func (*ObjectType) GetMethod ¶ added in v1.2.8
func (i *ObjectType) GetMethod() map[string]*FunctionType
func (*ObjectType) GetTypeKind ¶ added in v1.2.8
func (i *ObjectType) GetTypeKind() TypeKind
func (*ObjectType) PkgPathString ¶ added in v1.3.1
func (i *ObjectType) PkgPathString() string
func (*ObjectType) RawString ¶ added in v1.2.8
func (itype *ObjectType) RawString() string
func (*ObjectType) SetMethod ¶ added in v1.2.8
func (i *ObjectType) SetMethod(m map[string]*FunctionType)
func (*ObjectType) SetName ¶ added in v1.2.8
func (i *ObjectType) SetName(name string)
func (*ObjectType) SetTypeKind ¶ added in v1.3.1
func (i *ObjectType) SetTypeKind(t TypeKind)
func (*ObjectType) String ¶ added in v1.2.8
func (itype *ObjectType) String() string
type Opcode ¶ added in v1.2.8
type Opcode string
const ( OpUnknown Opcode = "unknown" OpFunction Opcode = "Function" OpBasicBlock Opcode = "BasicBlock" OpParameter Opcode = "Parameter" OpFreeValue Opcode = "FreeValue" OpExternLib Opcode = "ExternLib" OpPhi Opcode = "Phi" OpConstInst Opcode = "ConstInst" OpUndefined Opcode = "Undefined" OpBinOp Opcode = "BinOp" OpUnOp Opcode = "UnOp" OpCall Opcode = "Call" OpSideEffect Opcode = "SideEffect" OpReturn Opcode = "Return" OpMake Opcode = "Make" OpNext Opcode = "Next" OpAssert Opcode = "Assert" OpTypeCast Opcode = "TypeCast" OpTypeValue Opcode = "TypeValue" OpErrorHandler Opcode = "ErrorHandler" OpPanic Opcode = "Panic" OpRecover Opcode = "Recover" OpJump Opcode = "Jump" OpIf Opcode = "If" OpLoop Opcode = "Loop" OpSwitch Opcode = "Switch" )
type Package ¶
type Package struct { Name string // point to program Prog *Program // function list Funcs map[string]*Function }
func NewPackage ¶ added in v1.2.8
func (*Package) GetFunction ¶ added in v1.3.0
func (*Package) NewFunction ¶
type Panic ¶ added in v1.2.8
type Panic struct { Info Value // contains filtered or unexported fields }
-------------- PANIC
func (*Panic) AddVariable ¶ added in v1.3.0
func (a *Panic) AddVariable(v *Variable)
func (*Panic) DeleteMember ¶ added in v1.3.1
func (n *Panic) DeleteMember(k Value)
func (*Panic) GetAllMember ¶ added in v1.3.1
func (*Panic) GetAllVariables ¶ added in v1.3.0
func (*Panic) GetBlock ¶ added in v1.2.8
func (a *Panic) GetBlock() *BasicBlock
func (*Panic) GetIndexMember ¶ added in v1.3.1
func (*Panic) GetLastVariable ¶ added in v1.3.1
func (a *Panic) GetLastVariable() *Variable
func (*Panic) GetOperand ¶ added in v1.2.8
func (*Panic) GetOperandNum ¶ added in v1.2.8
func (a *Panic) GetOperandNum() int
func (*Panic) GetOperands ¶ added in v1.2.8
func (a *Panic) GetOperands() Values
func (*Panic) GetProgram ¶ added in v1.3.0
func (a *Panic) GetProgram() *Program
func (*Panic) GetStringMember ¶ added in v1.3.1
func (*Panic) GetVariable ¶ added in v1.2.8
func (*Panic) GetVerboseName ¶ added in v1.3.1
func (i *Panic) GetVerboseName() string
func (*Panic) IsMemberCallVariable ¶ added in v1.3.1
func (n *Panic) IsMemberCallVariable() bool
func (*Panic) IsUndefined ¶ added in v1.3.1
func (i *Panic) IsUndefined() bool
func (*Panic) LineDisasm ¶ added in v1.2.8
func (a *Panic) LineDisasm() string
func (*Panic) RemoveUser ¶ added in v1.2.8
func (n *Panic) RemoveUser(u User)
func (*Panic) ReplaceValue ¶ added in v1.2.8
func (*Panic) SelfDelete ¶ added in v1.3.1
func (i *Panic) SelfDelete()
func (*Panic) SetBlock ¶ added in v1.2.8
func (a *Panic) SetBlock(block *BasicBlock)
func (*Panic) SetVerboseName ¶ added in v1.3.1
func (i *Panic) SetVerboseName(verbose string)
type Parameter ¶
type Parameter struct { IsFreeValue bool Function *Function FormalParameterIndex int FormalParameterName string FormalParameterVariadic bool // contains filtered or unexported fields }
----------- Parameter
func NewParam ¶ added in v1.2.8
func NewParam(variable string, isFreeValue bool, builder *FunctionBuilder) *Parameter
func ToParameter ¶ added in v1.2.8
func ToParameter(v Instruction) (*Parameter, bool)
func (*Parameter) AddVariable ¶ added in v1.3.0
func (a *Parameter) AddVariable(v *Variable)
func (*Parameter) DeleteMember ¶ added in v1.3.1
func (n *Parameter) DeleteMember(k Value)
func (*Parameter) GetAllMember ¶ added in v1.3.1
func (*Parameter) GetAllVariables ¶ added in v1.3.0
func (*Parameter) GetBlock ¶ added in v1.2.8
func (a *Parameter) GetBlock() *BasicBlock
func (*Parameter) GetDefault ¶ added in v1.3.1
func (*Parameter) GetIndexMember ¶ added in v1.3.1
func (*Parameter) GetLastVariable ¶ added in v1.3.1
func (a *Parameter) GetLastVariable() *Variable
func (*Parameter) GetOperand ¶ added in v1.2.8
func (*Parameter) GetOperandNum ¶ added in v1.2.8
func (a *Parameter) GetOperandNum() int
func (*Parameter) GetOperands ¶ added in v1.2.8
func (a *Parameter) GetOperands() Values
func (*Parameter) GetProgram ¶ added in v1.3.0
func (a *Parameter) GetProgram() *Program
func (*Parameter) GetRange ¶ added in v1.3.0
func (c *Parameter) GetRange() *Range
source code position
func (*Parameter) GetStringMember ¶ added in v1.3.1
func (*Parameter) GetVariable ¶ added in v1.2.8
func (*Parameter) GetVerboseName ¶ added in v1.3.1
func (i *Parameter) GetVerboseName() string
func (*Parameter) HasUsers ¶ added in v1.2.8
func (n *Parameter) HasUsers() bool
has/get user and value
func (*Parameter) IsMemberCallVariable ¶ added in v1.3.1
func (n *Parameter) IsMemberCallVariable() bool
func (*Parameter) IsUndefined ¶ added in v1.3.1
func (i *Parameter) IsUndefined() bool
func (*Parameter) LineDisasm ¶ added in v1.2.8
func (a *Parameter) LineDisasm() string
func (*Parameter) RemoveUser ¶
func (n *Parameter) RemoveUser(u User)
func (*Parameter) ReplaceValue ¶ added in v1.3.1
func (*Parameter) SelfDelete ¶ added in v1.3.1
func (i *Parameter) SelfDelete()
func (*Parameter) SetBlock ¶ added in v1.2.8
func (a *Parameter) SetBlock(block *BasicBlock)
func (*Parameter) SetDefault ¶ added in v1.2.8
func (*Parameter) SetFunc ¶ added in v1.2.8
func (a *Parameter) SetFunc(f *Function)
ssa function and block
func (*Parameter) SetVerboseName ¶ added in v1.3.1
func (i *Parameter) SetVerboseName(verbose string)
type ParentScope ¶ added in v1.3.1
type ParentScope struct {
// contains filtered or unexported fields
}
func (*ParentScope) Create ¶ added in v1.3.1
func (p *ParentScope) Create(scope *Scope) *ParentScope
type Phi ¶
type Phi struct { Edge []Value // edge[i] from phi.Block.Preds[i] // contains filtered or unexported fields }
----------- Phi
func ToPhi ¶ added in v1.2.8
func ToPhi(v Instruction) (*Phi, bool)
func (*Phi) AddVariable ¶ added in v1.3.0
func (a *Phi) AddVariable(v *Variable)
func (*Phi) DeleteMember ¶ added in v1.3.1
func (n *Phi) DeleteMember(k Value)
func (*Phi) GetAllMember ¶ added in v1.3.1
func (*Phi) GetAllVariables ¶ added in v1.3.0
func (*Phi) GetBlock ¶
func (a *Phi) GetBlock() *BasicBlock
func (*Phi) GetIndexMember ¶ added in v1.3.1
func (*Phi) GetLastVariable ¶ added in v1.3.1
func (a *Phi) GetLastVariable() *Variable
func (*Phi) GetOperand ¶ added in v1.2.8
func (*Phi) GetOperandNum ¶ added in v1.2.8
func (a *Phi) GetOperandNum() int
func (*Phi) GetOperands ¶ added in v1.2.8
func (a *Phi) GetOperands() Values
func (*Phi) GetProgram ¶ added in v1.3.0
func (a *Phi) GetProgram() *Program
func (*Phi) GetStringMember ¶ added in v1.3.1
func (*Phi) GetVariable ¶ added in v1.2.8
func (*Phi) GetVerboseName ¶ added in v1.3.1
func (i *Phi) GetVerboseName() string
func (*Phi) IsMemberCallVariable ¶ added in v1.3.1
func (n *Phi) IsMemberCallVariable() bool
func (*Phi) IsUndefined ¶ added in v1.3.1
func (i *Phi) IsUndefined() bool
func (*Phi) LineDisasm ¶ added in v1.2.8
func (a *Phi) LineDisasm() string
func (*Phi) RemoveUser ¶
func (n *Phi) RemoveUser(u User)
func (*Phi) ReplaceValue ¶
func (*Phi) SelfDelete ¶ added in v1.3.1
func (i *Phi) SelfDelete()
func (*Phi) SetBlock ¶ added in v1.2.8
func (a *Phi) SetBlock(block *BasicBlock)
func (*Phi) SetVerboseName ¶ added in v1.3.1
func (i *Phi) SetVerboseName(verbose string)
type Position ¶
func NewPosition ¶ added in v1.3.0
type Program ¶
type Program struct { // package list Packages map[string]*Package ConstInstruction *omap.OrderedMap[int, *ConstInst] NameToInstructions *omap.OrderedMap[string, []Instruction] IdToInstructionMap *omap.OrderedMap[int, Instruction] // contains filtered or unexported fields }
both instruction and value
func NewProgram ¶
func NewProgram() *Program
func (*Program) AddPackage ¶ added in v1.2.8
func (*Program) DeleteInstruction ¶ added in v1.3.0
func (p *Program) DeleteInstruction(i Instruction)
func (*Program) EachFunction ¶ added in v1.3.0
func (*Program) GetAndCreateMainFunction ¶ added in v1.3.0
func (*Program) GetAndCreateMainFunctionBuilder ¶ added in v1.3.0
func (prog *Program) GetAndCreateMainFunctionBuilder() *FunctionBuilder
create or get main function builder
func (*Program) GetFunctionFast ¶ added in v1.3.0
func (*Program) GetInstructionById ¶ added in v1.3.0
func (p *Program) GetInstructionById(id int) Instruction
func (*Program) GetInstructionsByName ¶ added in v1.3.0
func (p *Program) GetInstructionsByName(name string) []Instruction
func (*Program) GetPackage ¶ added in v1.3.0
func (*Program) RemoveInstructionWithName ¶ added in v1.3.1
func (p *Program) RemoveInstructionWithName(name string, i Instruction)
func (*Program) SetInstructionWithName ¶ added in v1.3.0
func (p *Program) SetInstructionWithName(name string, i Instruction)
func (*Program) SetVirtualRegister ¶ added in v1.3.0
func (p *Program) SetVirtualRegister(i Instruction)
set virtual register, and this virtual-register will be instruction-id and set to the instruction
func (*Program) ShowWithSource ¶
func (p *Program) ShowWithSource()
type Range ¶ added in v1.3.0
func (*Range) CompareEnd ¶ added in v1.3.0
func (*Range) CompareStart ¶ added in v1.3.0
if ret < 0: p before other if ret == 0: p = other if ret > 0: p after other
type Recover ¶ added in v1.2.8
type Recover struct {
// contains filtered or unexported fields
}
--------------- RECOVER
func (*Recover) AddVariable ¶ added in v1.3.0
func (a *Recover) AddVariable(v *Variable)
func (*Recover) DeleteMember ¶ added in v1.3.1
func (n *Recover) DeleteMember(k Value)
func (*Recover) GetAllMember ¶ added in v1.3.1
func (*Recover) GetAllVariables ¶ added in v1.3.0
func (*Recover) GetBlock ¶ added in v1.2.8
func (a *Recover) GetBlock() *BasicBlock
func (*Recover) GetIndexMember ¶ added in v1.3.1
func (*Recover) GetLastVariable ¶ added in v1.3.1
func (a *Recover) GetLastVariable() *Variable
func (*Recover) GetOperand ¶ added in v1.2.8
func (*Recover) GetOperandNum ¶ added in v1.2.8
func (a *Recover) GetOperandNum() int
func (*Recover) GetOperands ¶ added in v1.2.8
func (a *Recover) GetOperands() Values
func (*Recover) GetProgram ¶ added in v1.3.0
func (a *Recover) GetProgram() *Program
func (*Recover) GetStringMember ¶ added in v1.3.1
func (*Recover) GetVariable ¶ added in v1.2.8
func (*Recover) GetVerboseName ¶ added in v1.3.1
func (i *Recover) GetVerboseName() string
func (*Recover) IsMemberCallVariable ¶ added in v1.3.1
func (n *Recover) IsMemberCallVariable() bool
func (*Recover) IsUndefined ¶ added in v1.3.1
func (i *Recover) IsUndefined() bool
func (*Recover) LineDisasm ¶ added in v1.2.8
func (a *Recover) LineDisasm() string
func (*Recover) RemoveUser ¶ added in v1.2.8
func (n *Recover) RemoveUser(u User)
func (*Recover) ReplaceValue ¶ added in v1.3.1
func (*Recover) SelfDelete ¶ added in v1.3.1
func (i *Recover) SelfDelete()
func (*Recover) SetBlock ¶ added in v1.2.8
func (a *Recover) SetBlock(block *BasicBlock)
func (*Recover) SetFunc ¶ added in v1.2.8
func (a *Recover) SetFunc(f *Function)
ssa function and block
func (*Recover) SetVerboseName ¶ added in v1.3.1
func (i *Recover) SetVerboseName(verbose string)
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) AddVariable ¶ added in v1.3.0
func (a *Return) AddVariable(v *Variable)
func (*Return) DeleteMember ¶ added in v1.3.1
func (n *Return) DeleteMember(k Value)
func (*Return) GetAllMember ¶ added in v1.3.1
func (*Return) GetAllVariables ¶ added in v1.3.0
func (*Return) GetBlock ¶
func (a *Return) GetBlock() *BasicBlock
func (*Return) GetIndexMember ¶ added in v1.3.1
func (*Return) GetLastVariable ¶ added in v1.3.1
func (a *Return) GetLastVariable() *Variable
func (*Return) GetOperand ¶ added in v1.2.8
func (*Return) GetOperandNum ¶ added in v1.2.8
func (a *Return) GetOperandNum() int
func (*Return) GetOperands ¶ added in v1.2.8
func (a *Return) GetOperands() Values
func (*Return) GetProgram ¶ added in v1.3.0
func (a *Return) GetProgram() *Program
func (*Return) GetStringMember ¶ added in v1.3.1
func (*Return) GetVariable ¶ added in v1.2.8
func (*Return) GetVerboseName ¶ added in v1.3.1
func (i *Return) GetVerboseName() string
func (*Return) IsMemberCallVariable ¶ added in v1.3.1
func (n *Return) IsMemberCallVariable() bool
func (*Return) IsUndefined ¶ added in v1.3.1
func (i *Return) IsUndefined() bool
func (*Return) LineDisasm ¶ added in v1.2.8
func (a *Return) LineDisasm() string
func (*Return) RemoveUser ¶ added in v1.2.9
func (n *Return) RemoveUser(u User)
func (*Return) ReplaceValue ¶
func (*Return) SelfDelete ¶ added in v1.3.1
func (i *Return) SelfDelete()
func (*Return) SetBlock ¶ added in v1.2.8
func (a *Return) SetBlock(block *BasicBlock)
func (*Return) SetFunc ¶ added in v1.2.8
func (a *Return) SetFunc(f *Function)
ssa function and block
func (*Return) SetVerboseName ¶ added in v1.3.1
func (i *Return) SetVerboseName(verbose string)
type Scope ¶ added in v1.3.0
type Scope struct { *ssautil.ScopedVersionedTable[Value] }
func (*Scope) CreateSubScope ¶ added in v1.3.1
func (s *Scope) CreateSubScope() ssautil.ScopedVersionedTableIF[Value]
type ScopeIF ¶ added in v1.3.1
type ScopeIF ssautil.ScopedVersionedTableIF[Value]
type SideEffect ¶ added in v1.2.9
type SideEffect struct { CallSite *Call // call instruction Value Value // modify to this value // contains filtered or unexported fields }
----------- SideEffect
func NewSideEffect ¶ added in v1.2.9
func NewSideEffect(variable string, call *Call, value Value) *SideEffect
func (*SideEffect) AddVariable ¶ added in v1.3.0
func (a *SideEffect) AddVariable(v *Variable)
func (*SideEffect) DeleteMember ¶ added in v1.3.1
func (n *SideEffect) DeleteMember(k Value)
func (*SideEffect) GetAllMember ¶ added in v1.3.1
func (*SideEffect) GetAllVariables ¶ added in v1.3.0
func (*SideEffect) GetBlock ¶ added in v1.2.9
func (a *SideEffect) GetBlock() *BasicBlock
func (*SideEffect) GetIndexMember ¶ added in v1.3.1
func (*SideEffect) GetLastVariable ¶ added in v1.3.1
func (a *SideEffect) GetLastVariable() *Variable
func (*SideEffect) GetOpcode ¶ added in v1.2.9
func (i *SideEffect) GetOpcode() Opcode
func (*SideEffect) GetOperand ¶ added in v1.2.9
func (*SideEffect) GetOperandNum ¶ added in v1.2.9
func (a *SideEffect) GetOperandNum() int
func (*SideEffect) GetOperands ¶ added in v1.2.9
func (a *SideEffect) GetOperands() Values
func (*SideEffect) GetProgram ¶ added in v1.3.0
func (a *SideEffect) GetProgram() *Program
func (*SideEffect) GetRange ¶ added in v1.3.0
func (c *SideEffect) GetRange() *Range
source code position
func (*SideEffect) GetStringMember ¶ added in v1.3.1
func (*SideEffect) GetValues ¶ added in v1.2.9
func (s *SideEffect) GetValues() Values
func (*SideEffect) GetVariable ¶ added in v1.2.9
func (*SideEffect) GetVerboseName ¶ added in v1.3.1
func (i *SideEffect) GetVerboseName() string
func (*SideEffect) HasUsers ¶ added in v1.2.9
func (n *SideEffect) HasUsers() bool
has/get user and value
func (*SideEffect) HasValues ¶ added in v1.2.9
func (s *SideEffect) HasValues() bool
------------ SideEffect
func (*SideEffect) IsMemberCallVariable ¶ added in v1.3.1
func (n *SideEffect) IsMemberCallVariable() bool
func (*SideEffect) IsUndefined ¶ added in v1.3.1
func (i *SideEffect) IsUndefined() bool
func (*SideEffect) LineDisasm ¶ added in v1.2.9
func (a *SideEffect) LineDisasm() string
func (*SideEffect) RemoveUser ¶ added in v1.2.9
func (n *SideEffect) RemoveUser(u User)
func (*SideEffect) ReplaceValue ¶ added in v1.2.9
func (s *SideEffect) ReplaceValue(v Value, to Value)
func (*SideEffect) SelfDelete ¶ added in v1.3.1
func (i *SideEffect) SelfDelete()
func (*SideEffect) SetBlock ¶ added in v1.2.9
func (a *SideEffect) SetBlock(block *BasicBlock)
func (*SideEffect) SetFunc ¶ added in v1.2.9
func (a *SideEffect) SetFunc(f *Function)
ssa function and block
func (*SideEffect) SetVerboseName ¶ added in v1.3.1
func (i *SideEffect) SetVerboseName(verbose string)
func (*SideEffect) String ¶ added in v1.2.9
func (s *SideEffect) String() string
type Switch ¶
type Switch struct { Cond Value DefaultBlock *BasicBlock Label []SwitchLabel // contains filtered or unexported fields }
func NewSwitch ¶ added in v1.2.8
func NewSwitch(cond Value, defaultb *BasicBlock, label []SwitchLabel) *Switch
func (*Switch) AddVariable ¶ added in v1.3.0
func (a *Switch) AddVariable(v *Variable)
func (*Switch) GetAllVariables ¶ added in v1.3.0
func (*Switch) GetBlock ¶
func (a *Switch) GetBlock() *BasicBlock
func (*Switch) GetLastVariable ¶ added in v1.3.1
func (a *Switch) GetLastVariable() *Variable
func (*Switch) GetOperand ¶ added in v1.2.8
func (*Switch) GetOperandNum ¶ added in v1.2.8
func (a *Switch) GetOperandNum() int
func (*Switch) GetOperands ¶ added in v1.2.8
func (a *Switch) GetOperands() Values
func (*Switch) GetProgram ¶ added in v1.3.0
func (a *Switch) GetProgram() *Program
func (*Switch) GetVariable ¶ added in v1.2.8
func (*Switch) GetVerboseName ¶ added in v1.3.1
func (i *Switch) GetVerboseName() string
func (*Switch) IsUndefined ¶ added in v1.3.1
func (i *Switch) IsUndefined() bool
func (*Switch) LineDisasm ¶ added in v1.2.8
func (a *Switch) LineDisasm() string
func (*Switch) ReplaceValue ¶
func (*Switch) SelfDelete ¶ added in v1.3.1
func (i *Switch) SelfDelete()
func (*Switch) SetBlock ¶ added in v1.2.8
func (a *Switch) SetBlock(block *BasicBlock)
func (*Switch) SetFunc ¶ added in v1.2.8
func (a *Switch) SetFunc(f *Function)
ssa function and block
func (*Switch) SetVerboseName ¶ added in v1.3.1
func (i *Switch) SetVerboseName(verbose string)
type SwitchBuilder ¶ added in v1.2.8
type SwitchBuilder struct { DefaultBreak bool // contains filtered or unexported fields }
func (*SwitchBuilder) BuildBody ¶ added in v1.2.8
func (t *SwitchBuilder) BuildBody(f func(int))
func (*SwitchBuilder) BuildCaseSize ¶ added in v1.3.1
func (sw *SwitchBuilder) BuildCaseSize(size int)
func (*SwitchBuilder) BuildCondition ¶ added in v1.2.8
func (t *SwitchBuilder) BuildCondition(f func() Value)
func (*SwitchBuilder) BuildDefault ¶ added in v1.2.8
func (t *SwitchBuilder) BuildDefault(f func())
func (*SwitchBuilder) Finish ¶ added in v1.2.9
func (t *SwitchBuilder) Finish()
func (*SwitchBuilder) SetCase ¶ added in v1.3.1
func (sw *SwitchBuilder) SetCase(f func(int) []Value)
type SwitchLabel ¶
type SwitchLabel struct { Value Value Dest *BasicBlock }
----------- Switch
func NewSwitchLabel ¶
func NewSwitchLabel(v Value, dest *BasicBlock) SwitchLabel
type TryBuilder ¶ added in v1.2.8
type TryBuilder struct {
// contains filtered or unexported fields
}
func (*TryBuilder) BuildCatch ¶ added in v1.2.8
func (t *TryBuilder) BuildCatch(f func())
func (*TryBuilder) BuildError ¶ added in v1.2.9
func (t *TryBuilder) BuildError(f func() string)
func (*TryBuilder) BuildFinally ¶ added in v1.2.8
func (t *TryBuilder) BuildFinally(f func())
func (*TryBuilder) BuildTryBlock ¶ added in v1.2.8
func (t *TryBuilder) BuildTryBlock(f func())
func (*TryBuilder) Finish ¶ added in v1.2.8
func (t *TryBuilder) Finish()
type Type ¶
type Type interface { String() string // only string PkgPathString() string // package path string RawString() string GetTypeKind() TypeKind // set/get method SetMethod(map[string]*FunctionType) AddMethod(string, *FunctionType) GetMethod() map[string]*FunctionType }
func CalculateType ¶ added in v1.2.8
func GetAnyType ¶ added in v1.3.0
func GetAnyType() Type
func GetBooleanType ¶ added in v1.3.0
func GetBooleanType() Type
func GetBytesType ¶ added in v1.3.0
func GetBytesType() Type
func GetErrorType ¶ added in v1.3.0
func GetErrorType() Type
func GetNullType ¶ added in v1.3.0
func GetNullType() Type
func GetNumberType ¶ added in v1.3.0
func GetNumberType() Type
func GetStringType ¶ added in v1.3.0
func GetStringType() Type
func GetTypeByStr ¶
func GetUndefinedType ¶ added in v1.3.0
func GetUndefinedType() Type
type TypeCast ¶ added in v1.2.8
type TypeCast struct { Value Value // contains filtered or unexported fields }
----------- Type-cast cast value -> type
func NewTypeCast ¶ added in v1.2.8
func (*TypeCast) AddVariable ¶ added in v1.3.0
func (a *TypeCast) AddVariable(v *Variable)
func (*TypeCast) DeleteMember ¶ added in v1.3.1
func (n *TypeCast) DeleteMember(k Value)
func (*TypeCast) GetAllMember ¶ added in v1.3.1
func (*TypeCast) GetAllVariables ¶ added in v1.3.0
func (*TypeCast) GetBlock ¶ added in v1.2.8
func (a *TypeCast) GetBlock() *BasicBlock
func (*TypeCast) GetIndexMember ¶ added in v1.3.1
func (*TypeCast) GetLastVariable ¶ added in v1.3.1
func (a *TypeCast) GetLastVariable() *Variable
func (*TypeCast) GetOperand ¶ added in v1.2.8
func (*TypeCast) GetOperandNum ¶ added in v1.2.8
func (a *TypeCast) GetOperandNum() int
func (*TypeCast) GetOperands ¶ added in v1.2.8
func (a *TypeCast) GetOperands() Values
func (*TypeCast) GetProgram ¶ added in v1.3.0
func (a *TypeCast) GetProgram() *Program
func (*TypeCast) GetRange ¶ added in v1.3.0
func (c *TypeCast) GetRange() *Range
source code position
func (*TypeCast) GetStringMember ¶ added in v1.3.1
func (*TypeCast) GetVariable ¶ added in v1.2.8
func (*TypeCast) GetVerboseName ¶ added in v1.3.1
func (i *TypeCast) GetVerboseName() string
func (*TypeCast) HasUsers ¶ added in v1.2.8
func (n *TypeCast) HasUsers() bool
has/get user and value
func (*TypeCast) IsMemberCallVariable ¶ added in v1.3.1
func (n *TypeCast) IsMemberCallVariable() bool
func (*TypeCast) IsUndefined ¶ added in v1.3.1
func (i *TypeCast) IsUndefined() bool
func (*TypeCast) LineDisasm ¶ added in v1.2.8
func (a *TypeCast) LineDisasm() string
func (*TypeCast) RemoveUser ¶ added in v1.2.8
func (n *TypeCast) RemoveUser(u User)
func (*TypeCast) ReplaceValue ¶ added in v1.2.8
func (*TypeCast) SelfDelete ¶ added in v1.3.1
func (i *TypeCast) SelfDelete()
func (*TypeCast) SetBlock ¶ added in v1.2.8
func (a *TypeCast) SetBlock(block *BasicBlock)
func (*TypeCast) SetFunc ¶ added in v1.2.8
func (a *TypeCast) SetFunc(f *Function)
ssa function and block
func (*TypeCast) SetVerboseName ¶ added in v1.3.1
func (i *TypeCast) SetVerboseName(verbose string)
type TypeKind ¶
type TypeKind int
basic type
const ( NumberTypeKind TypeKind = iota StringTypeKind BytesTypeKind BooleanTypeKind UndefinedTypeKind // undefined is nil in golang NullTypeKind // AnyTypeKind // any type ChanTypeKind ErrorTypeKind ObjectTypeKind SliceTypeKind // slice MapTypeKind // map StructTypeKind // struct TupleTypeKind // slice has fixed length InterfaceTypeKind FunctionTypeKind )
type TypeValue ¶ added in v1.2.8
type TypeValue struct {
// contains filtered or unexported fields
}
------------- type value
func NewTypeValue ¶ added in v1.2.8
func (*TypeValue) AddVariable ¶ added in v1.3.0
func (a *TypeValue) AddVariable(v *Variable)
func (*TypeValue) DeleteMember ¶ added in v1.3.1
func (n *TypeValue) DeleteMember(k Value)
func (*TypeValue) GetAllMember ¶ added in v1.3.1
func (*TypeValue) GetAllVariables ¶ added in v1.3.0
func (*TypeValue) GetBlock ¶ added in v1.2.8
func (a *TypeValue) GetBlock() *BasicBlock
func (*TypeValue) GetIndexMember ¶ added in v1.3.1
func (*TypeValue) GetLastVariable ¶ added in v1.3.1
func (a *TypeValue) GetLastVariable() *Variable
func (*TypeValue) GetOperand ¶ added in v1.2.8
func (*TypeValue) GetOperandNum ¶ added in v1.2.8
func (a *TypeValue) GetOperandNum() int
func (*TypeValue) GetOperands ¶ added in v1.2.8
func (a *TypeValue) GetOperands() Values
func (*TypeValue) GetProgram ¶ added in v1.3.0
func (a *TypeValue) GetProgram() *Program
func (*TypeValue) GetRange ¶ added in v1.3.0
func (c *TypeValue) GetRange() *Range
source code position
func (*TypeValue) GetStringMember ¶ added in v1.3.1
func (*TypeValue) GetVariable ¶ added in v1.2.8
func (*TypeValue) GetVerboseName ¶ added in v1.3.1
func (i *TypeValue) GetVerboseName() string
func (*TypeValue) HasUsers ¶ added in v1.2.8
func (n *TypeValue) HasUsers() bool
has/get user and value
func (*TypeValue) IsMemberCallVariable ¶ added in v1.3.1
func (n *TypeValue) IsMemberCallVariable() bool
func (*TypeValue) IsUndefined ¶ added in v1.3.1
func (i *TypeValue) IsUndefined() bool
func (*TypeValue) LineDisasm ¶ added in v1.2.8
func (a *TypeValue) LineDisasm() string
func (*TypeValue) RemoveUser ¶ added in v1.2.8
func (n *TypeValue) RemoveUser(u User)
func (*TypeValue) ReplaceValue ¶ added in v1.3.1
func (*TypeValue) SelfDelete ¶ added in v1.3.1
func (i *TypeValue) SelfDelete()
func (*TypeValue) SetBlock ¶ added in v1.2.8
func (a *TypeValue) SetBlock(block *BasicBlock)
func (*TypeValue) SetFunc ¶ added in v1.2.8
func (a *TypeValue) SetFunc(f *Function)
ssa function and block
func (*TypeValue) SetVerboseName ¶ added in v1.3.1
func (i *TypeValue) SetVerboseName(verbose string)
type Types ¶
type Types []Type // each value can have multiple type possible
type UnOp ¶
type UnOp struct { Op UnaryOpcode X Value // contains filtered or unexported fields }
func NewUnOpOnly ¶ added in v1.2.8
func NewUnOpOnly(op UnaryOpcode, x Value) *UnOp
func ToUnOp ¶ added in v1.2.8
func ToUnOp(v Instruction) (*UnOp, bool)
func (*UnOp) AddVariable ¶ added in v1.3.0
func (a *UnOp) AddVariable(v *Variable)
func (*UnOp) DeleteMember ¶ added in v1.3.1
func (n *UnOp) DeleteMember(k Value)
func (*UnOp) GetAllMember ¶ added in v1.3.1
func (*UnOp) GetAllVariables ¶ added in v1.3.0
func (*UnOp) GetBlock ¶
func (a *UnOp) GetBlock() *BasicBlock
func (*UnOp) GetIndexMember ¶ added in v1.3.1
func (*UnOp) GetLastVariable ¶ added in v1.3.1
func (a *UnOp) GetLastVariable() *Variable
func (*UnOp) GetOperand ¶ added in v1.2.8
func (*UnOp) GetOperandNum ¶ added in v1.2.8
func (a *UnOp) GetOperandNum() int
func (*UnOp) GetOperands ¶ added in v1.2.8
func (a *UnOp) GetOperands() Values
func (*UnOp) GetProgram ¶ added in v1.3.0
func (a *UnOp) GetProgram() *Program
func (*UnOp) GetStringMember ¶ added in v1.3.1
func (*UnOp) GetVariable ¶ added in v1.2.8
func (*UnOp) GetVerboseName ¶ added in v1.3.1
func (i *UnOp) GetVerboseName() string
func (*UnOp) IsMemberCallVariable ¶ added in v1.3.1
func (n *UnOp) IsMemberCallVariable() bool
func (*UnOp) IsUndefined ¶ added in v1.3.1
func (i *UnOp) IsUndefined() bool
func (*UnOp) LineDisasm ¶ added in v1.2.8
func (a *UnOp) LineDisasm() string
func (*UnOp) RemoveUser ¶ added in v1.2.8
func (n *UnOp) RemoveUser(u User)
func (*UnOp) ReplaceValue ¶ added in v1.2.8
func (*UnOp) SelfDelete ¶ added in v1.3.1
func (i *UnOp) SelfDelete()
func (*UnOp) SetBlock ¶ added in v1.2.8
func (a *UnOp) SetBlock(block *BasicBlock)
func (*UnOp) SetVerboseName ¶ added in v1.3.1
func (i *UnOp) SetVerboseName(verbose string)
type UnaryOpcode ¶
type UnaryOpcode int
const ( OpNone UnaryOpcode = iota OpNot // ! OpPlus // + OpNeg // - OpChan // <- OpBitwiseNot // ^ )
type Undefined ¶ added in v1.2.8
type Undefined struct { Kind UndefinedKind // contains filtered or unexported fields }
func NewUndefined ¶ added in v1.2.8
func ToUndefined ¶ added in v1.2.8
func ToUndefined(v Instruction) (*Undefined, bool)
func (*Undefined) AddVariable ¶ added in v1.3.0
func (a *Undefined) AddVariable(v *Variable)
func (*Undefined) DeleteMember ¶ added in v1.3.1
func (n *Undefined) DeleteMember(k Value)
func (*Undefined) GetAllMember ¶ added in v1.3.1
func (*Undefined) GetAllVariables ¶ added in v1.3.0
func (*Undefined) GetBlock ¶ added in v1.2.8
func (a *Undefined) GetBlock() *BasicBlock
func (*Undefined) GetIndexMember ¶ added in v1.3.1
func (*Undefined) GetLastVariable ¶ added in v1.3.1
func (a *Undefined) GetLastVariable() *Variable
func (*Undefined) GetOperand ¶ added in v1.2.8
func (*Undefined) GetOperandNum ¶ added in v1.2.8
func (a *Undefined) GetOperandNum() int
func (*Undefined) GetOperands ¶ added in v1.2.8
func (a *Undefined) GetOperands() Values
func (*Undefined) GetProgram ¶ added in v1.3.0
func (a *Undefined) GetProgram() *Program
func (*Undefined) GetRange ¶ added in v1.3.0
func (c *Undefined) GetRange() *Range
source code position
func (*Undefined) GetStringMember ¶ added in v1.3.1
func (*Undefined) GetVariable ¶ added in v1.2.8
func (*Undefined) GetVerboseName ¶ added in v1.3.1
func (i *Undefined) GetVerboseName() string
func (*Undefined) HasUsers ¶ added in v1.2.8
func (n *Undefined) HasUsers() bool
has/get user and value
func (*Undefined) IsMemberCallVariable ¶ added in v1.3.1
func (n *Undefined) IsMemberCallVariable() bool
func (*Undefined) IsUndefined ¶ added in v1.3.1
func (*Undefined) LineDisasm ¶ added in v1.2.8
func (a *Undefined) LineDisasm() string
func (*Undefined) RemoveUser ¶ added in v1.2.8
func (n *Undefined) RemoveUser(u User)
func (*Undefined) ReplaceValue ¶ added in v1.3.1
func (*Undefined) SelfDelete ¶ added in v1.3.1
func (i *Undefined) SelfDelete()
func (*Undefined) SetBlock ¶ added in v1.2.8
func (a *Undefined) SetBlock(block *BasicBlock)
func (*Undefined) SetFunc ¶ added in v1.2.8
func (a *Undefined) SetFunc(f *Function)
ssa function and block
func (*Undefined) SetVerboseName ¶ added in v1.3.1
func (i *Undefined) SetVerboseName(verbose string)
type UndefinedKind ¶ added in v1.3.1
type UndefinedKind int
mark undefined value type
const ( // normal undefined value UndefinedValue UndefinedKind = iota // member call but not this key UndefinedMemberInValid // member call, has this key, but not this value, this shouldn't mark error UndefinedMemberValid )
type Value ¶
type Value interface { Node Instruction MemberCall Typed Maskable AddUser(User) RemoveUser(User) }
basic handle item (interface)
func CalcBinary ¶ added in v1.2.8
func CalcConstBinarySide ¶ added in v1.2.8
func CalcConstBinarySide(c *ConstInst, v Value, op BinaryOpcode) Value
func HandlerBinOp ¶ added in v1.2.8
func HandlerUnOp ¶ added in v1.2.8
func NewBinOp ¶ added in v1.2.8
func NewBinOp(op BinaryOpcode, x, y Value) Value
func NewUnOp ¶ added in v1.2.8
func NewUnOp(op UnaryOpcode, x Value) Value
type Variable ¶ added in v1.3.0
type Variable struct { *ssautil.Versioned[Value] DefRange *Range UseRange map[*Range]struct{} // contains filtered or unexported fields }
func ReadVariableFromScope ¶ added in v1.3.1
func (*Variable) GetMemberCall ¶ added in v1.3.1
func (*Variable) IsMemberCall ¶ added in v1.3.1
func (*Variable) SetDefRange ¶ added in v1.3.1
func (*Variable) SetMemberCall ¶ added in v1.3.1
Source Files ¶
- InstructionCover.go
- InstructionEmit.go
- InstructionHandler.go
- InstructionOpcode.go
- block.go
- builder.go
- call.go
- cfg.go
- const.go
- const_calc.go
- disasm.go
- disasmLine.go
- error.go
- error_message.go
- extern_instance.go
- func.go
- id.go
- instruction.go
- label.go
- next.go
- object.go
- phi.go
- position.go
- program.go
- scope.go
- ssa.go
- ssa_inspect.go
- ssa_predefined.go
- ssa_vars.go
- type.go
- use.go
- value.go
- variable.go