Documentation ¶
Index ¶
- Constants
- Variables
- func BindingGenericTypeWithRealType(real, generic Type, symbolsTypeMap map[string]Type) (errMsg string)
- 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 GenericTypeError(symbol, generic, want, got Type) string
- func GetAllKey(t Type) []string
- func GetEndPosition(t antlr.Token) (int, int)
- func GetKeyString(key Value) string
- func GetMethodsName(t Type) []string
- func GetSSACacheIterationCost() time.Duration
- func GetSSACacheToDatabaseCost() time.Duration
- func GetSSASaveIrCodeCost() time.Duration
- func GetTypeStr(n Value) string
- func InsertSortedIntSlice(ts []int, t int) []int
- func Instruction2IrCode(inst Instruction, ir *ssadb.IrCode) error
- func IsCompareOpcode(i BinaryOpcode) bool
- 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 NewInstructionFromLazy[T Instruction](id int64, Cover func(Instruction) (T, bool)) (T, error)
- 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 SaveTypeToDB(typ Type) int
- func SetMemberCall(obj, key, member Value)
- func ShowDatabaseCacheCost()
- func SpinHandle(name string, phiValue, header, latch Value) map[string]Value
- func SyncFromDatabase(s *ScopeInstance) error
- func TryGetSimilarityKey(table []string, name string) string
- func TypeCompare(t1, t2 Type) bool
- func TypeEqual(t1, t2 Type) bool
- func ValueIsNull() string
- func ValueNotMember(op Opcode, name, key string, r *Range) string
- func ValueNotMemberInCall(name, key string) string
- func ValueUndefined(v string) string
- type AliasType
- func (b *AliasType) AddMethod(id string, f *Function)
- func (a *AliasType) GetMethod() map[string]*Function
- func (a *AliasType) GetTypeKind() TypeKind
- func (b *AliasType) PkgPathString() string
- func (a *AliasType) RawString() string
- func (a *AliasType) SetMethod(m map[string]*Function)
- func (a *AliasType) String() string
- type Assert
- func (a *Assert) GetBlock() *BasicBlock
- func (a *Assert) GetFunc() *Function
- func (a *Assert) GetId() int64
- func (a *Assert) GetName() string
- func (i *Assert) GetOpcode() Opcode
- func (a *Assert) GetProgram() *Program
- func (c *Assert) GetRange() *Range
- func (i *Assert) GetShortVerboseName() string
- func (v *Assert) GetSourceCode() string
- func (v *Assert) GetSourceCodeContext(n int) string
- func (r *Assert) GetUsers() Users
- func (a *Assert) GetValues() Values
- func (i *Assert) GetVerboseName() string
- func (r *Assert) HasUsers() bool
- func (a *Assert) HasValues() bool
- func (a *Assert) IsAnnotation() bool
- func (i *Assert) IsBlock(name string) bool
- func (i *Assert) IsCFGEnterBlock() ([]Instruction, bool)
- func (c *Assert) IsExtern() bool
- func (i *Assert) IsLazy() bool
- func (i *Assert) IsUndefined() bool
- func (a *Assert) LineDisasm() string
- func (c *Assert) NewError(kind ErrorKind, tag ErrorTag, msg string)
- func (a *Assert) ReplaceValue(v, to Value)
- func (i *Assert) Self() Instruction
- 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 int64)
- func (a *Assert) SetIsAnnotation(b bool)
- func (a *Assert) SetName(v string)
- func (c *Assert) SetRange(pos *Range)
- func (i *Assert) SetVerboseName(verbose string)
- func (a *Assert) String() string
- type AssignAble
- type BasicBlock
- func (i *BasicBlock) AddMask(v Value)
- func (n *BasicBlock) AddMember(k, v Value)
- func (i *BasicBlock) AddReference(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) ForEachMember(fn func(Value, Value) bool)
- func (n *BasicBlock) GetAllMember() map[Value]Value
- func (a *BasicBlock) GetAllVariables() map[string]*Variable
- func (b *BasicBlock) GetBlockById(name string) *BasicBlock
- 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 (n *BasicBlock) GetObject() Value
- func (i *BasicBlock) GetOpcode() Opcode
- 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 (n *BasicBlock) HasUsers() bool
- func (b *BasicBlock) HasValues() bool
- func (b *BasicBlock) IsBlock(name string) bool
- func (b *BasicBlock) IsCFGEnterBlock() ([]Instruction, bool)
- func (n *BasicBlock) IsMember() bool
- func (n *BasicBlock) IsObject() bool
- func (b *BasicBlock) LastInst() Instruction
- func (i *BasicBlock) Masked() bool
- func (b *BasicBlock) Reachable() int
- func (i *BasicBlock) Reference() Values
- func (n *BasicBlock) RemoveUser(u User)
- func (n *BasicBlock) SetKey(k Value)
- func (n *BasicBlock) SetObject(v Value)
- func (b *BasicBlock) SetReachable(boolean bool)
- func (b *BasicBlock) SetType(ts Type)
- func (b *BasicBlock) String() string
- type BasicType
- func (b *BasicType) AddMethod(id string, f *Function)
- func (b *BasicType) GetMethod() map[string]*Function
- func (b *BasicType) GetTypeKind() TypeKind
- func (b *BasicType) PkgPathString() string
- func (b *BasicType) RawString() string
- func (b *BasicType) SetMethod(method map[string]*Function)
- func (b *BasicType) String() string
- type BinOp
- func (i *BinOp) AddMask(v Value)
- func (n *BinOp) AddMember(k, v Value)
- func (i *BinOp) AddReference(v Value)
- func (n *BinOp) AddUser(u User)
- func (a *BinOp) AddVariable(v *Variable)
- func (n *BinOp) DeleteMember(k Value)
- func (n *BinOp) ForEachMember(fn func(Value, Value) bool)
- func (n *BinOp) GetAllMember() map[Value]Value
- func (a *BinOp) GetAllVariables() map[string]*Variable
- 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 (n *BinOp) GetObject() Value
- func (i *BinOp) GetOpcode() Opcode
- 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 (n *BinOp) HasUsers() bool
- func (b *BinOp) HasValues() bool
- func (n *BinOp) IsMember() bool
- func (n *BinOp) IsObject() bool
- func (i *BinOp) Masked() bool
- func (i *BinOp) Reference() Values
- func (n *BinOp) RemoveUser(u User)
- func (b *BinOp) ReplaceValue(v Value, to Value)
- func (n *BinOp) SetKey(k Value)
- func (n *BinOp) SetObject(v Value)
- func (n *BinOp) SetType(typ Type)
- func (b *BinOp) String() string
- type BinaryOpcode
- type BluePrintMember
- type Build
- type Builder
- type Cache
- func (c *Cache) AddClassInstance(name string, inst Instruction)
- func (c *Cache) AddVariable(name string, inst Instruction)
- func (c *Cache) DeleteInstruction(inst Instruction)
- func (c *Cache) ForEachVariable(handle func(string, []Instruction))
- func (c *Cache) GetByVariable(name string) []Instruction
- func (c *Cache) GetClassInstance(name string) []Instruction
- func (c *Cache) GetInstruction(id int64) Instruction
- func (c *Cache) HaveDatabaseBackend() bool
- func (c *Cache) IrCodeToInstruction(inst Instruction, ir *ssadb.IrCode) Instruction
- func (c *Cache) IsExistedSourceCodeHash(programName string, hashString string) bool
- func (c *Cache) RemoveVariable(name string, inst Instruction)
- func (c *Cache) SaveToDatabase()
- func (c *Cache) SetInstruction(inst Instruction)
- func (c *Cache) SetVariable(name string, instructions []Instruction)
- type Call
- func (i *Call) AddMask(v Value)
- func (n *Call) AddMember(k, v Value)
- func (i *Call) AddReference(v Value)
- func (n *Call) AddUser(u User)
- func (a *Call) AddVariable(v *Variable)
- func (n *Call) DeleteMember(k Value)
- func (n *Call) ForEachMember(fn func(Value, Value) bool)
- func (n *Call) GetAllMember() map[Value]Value
- func (a *Call) GetAllVariables() map[string]*Variable
- 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 (n *Call) GetObject() Value
- func (i *Call) GetOpcode() Opcode
- 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 (c *Call) HandleFreeValue(fvs []*Parameter)
- func (n *Call) HasUsers() bool
- func (c *Call) HasValues() bool
- func (n *Call) IsMember() bool
- func (n *Call) IsObject() bool
- func (i *Call) Masked() bool
- func (i *Call) Reference() Values
- func (n *Call) RemoveUser(u User)
- func (c *Call) ReplaceValue(v Value, to Value)
- func (n *Call) SetKey(k Value)
- func (n *Call) SetObject(v Value)
- func (n *Call) SetType(typ Type)
- func (c *Call) String() string
- type CanStartStopToken
- type ChanType
- func (b *ChanType) AddMethod(id string, f *Function)
- func (c *ChanType) GetMethod() map[string]*Function
- func (c *ChanType) GetTypeKind() TypeKind
- func (c ChanType) PkgPathString() string
- func (c ChanType) RawString() string
- func (c *ChanType) SetMethod(m map[string]*Function)
- func (c ChanType) String() string
- type ClassBluePrint
- func (c *ClassBluePrint) AddMethod(key string, fun *Function)
- func (c *ClassBluePrint) AddNormalMember(name string, value Value)
- func (c *ClassBluePrint) AddNormalMemberOnlyType(name string, typ Type)
- func (c *ClassBluePrint) AddParentClass(parent *ClassBluePrint)
- func (c *ClassBluePrint) AddStaticMember(name string, value Value)
- func (c *ClassBluePrint) AddStaticMethod(name string, value *Function)
- func (c *ClassBluePrint) Apply(obj Value) Type
- func (c *ClassBluePrint) GetMember(key string) *BluePrintMember
- func (c *ClassBluePrint) GetMemberEx(key string, get func(*ClassBluePrint) bool) bool
- func (c *ClassBluePrint) GetMethod() map[string]*Function
- func (c *ClassBluePrint) GetTypeKind() TypeKind
- func (b *ClassBluePrint) InitializeWithContainer(con *Make) error
- func (c *ClassBluePrint) PkgPathString() string
- func (c *ClassBluePrint) RawString() string
- func (c *ClassBluePrint) SetMethod(m map[string]*Function)
- func (c *ClassBluePrint) String() string
- type ClassModifier
- 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 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 (i *ConstInst) AddReference(v Value)
- func (n *ConstInst) AddUser(u User)
- func (a *ConstInst) AddVariable(v *Variable)
- func (n *ConstInst) DeleteMember(k Value)
- func (n *ConstInst) ForEachMember(fn func(Value, Value) bool)
- func (n *ConstInst) GetAllMember() map[Value]Value
- func (a *ConstInst) GetAllVariables() map[string]*Variable
- 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 (n *ConstInst) GetObject() Value
- func (i *ConstInst) GetOpcode() Opcode
- 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 (n *ConstInst) HasUsers() bool
- func (c *ConstInst) HasValues() bool
- func (n *ConstInst) IsMember() bool
- func (n *ConstInst) IsObject() bool
- func (i *ConstInst) Masked() bool
- func (i *ConstInst) Reference() Values
- func (n *ConstInst) RemoveUser(u User)
- func (c *ConstInst) ReplaceValue(v Value, to Value)
- func (n *ConstInst) SetKey(k Value)
- func (n *ConstInst) SetObject(v Value)
- func (c *ConstInst) SetType(ts Type)
- func (c *ConstInst) String() string
- type DisasmLiner
- type DummyExtraFileAnalyzer
- type ErrorComment
- type ErrorCommentId
- type ErrorHandler
- func (e *ErrorHandler) AddCatch(c *BasicBlock)
- func (e *ErrorHandler) AddDone(d *BasicBlock)
- func (e *ErrorHandler) AddFinal(f *BasicBlock)
- func (a *ErrorHandler) GetBlock() *BasicBlock
- func (a *ErrorHandler) GetFunc() *Function
- func (a *ErrorHandler) GetId() int64
- func (a *ErrorHandler) GetName() string
- func (i *ErrorHandler) GetOpcode() Opcode
- func (a *ErrorHandler) GetProgram() *Program
- func (c *ErrorHandler) GetRange() *Range
- func (i *ErrorHandler) GetShortVerboseName() string
- func (v *ErrorHandler) GetSourceCode() string
- func (v *ErrorHandler) GetSourceCodeContext(n int) string
- func (i *ErrorHandler) GetVerboseName() string
- func (a *ErrorHandler) IsAnnotation() bool
- func (i *ErrorHandler) IsBlock(name string) bool
- func (i *ErrorHandler) IsCFGEnterBlock() ([]Instruction, bool)
- func (c *ErrorHandler) IsExtern() bool
- func (i *ErrorHandler) IsLazy() bool
- func (i *ErrorHandler) IsUndefined() bool
- func (a *ErrorHandler) LineDisasm() string
- func (c *ErrorHandler) NewError(kind ErrorKind, tag ErrorTag, msg string)
- func (i *ErrorHandler) ReplaceValue(Value, Value)
- func (i *ErrorHandler) Self() Instruction
- 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 int64)
- func (a *ErrorHandler) SetIsAnnotation(b bool)
- 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 (i *ExternLib) AddReference(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) ForEachMember(fn func(Value, Value) bool)
- func (n *ExternLib) GetAllMember() map[Value]Value
- func (a *ExternLib) GetAllVariables() map[string]*Variable
- 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 (n *ExternLib) GetObject() Value
- func (i *ExternLib) GetOpcode() Opcode
- 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 (n *ExternLib) HasUsers() bool
- func (e *ExternLib) HasValues() bool
- func (n *ExternLib) IsMember() bool
- func (n *ExternLib) IsObject() bool
- func (i *ExternLib) Masked() bool
- func (i *ExternLib) Reference() Values
- func (n *ExternLib) RemoveUser(u User)
- func (e *ExternLib) ReplaceValue(v Value, to Value)
- func (n *ExternLib) SetKey(k Value)
- func (n *ExternLib) SetObject(v Value)
- func (n *ExternLib) SetType(typ Type)
- func (e *ExternLib) String() string
- type ExtraFileAnalyzer
- type FullDisasmLiner
- func (f *FullDisasmLiner) AddLevel() bool
- func (b FullDisasmLiner) DeleteName(i Instruction)
- func (f *FullDisasmLiner) DisasmValue(v Instruction) 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 (f *Function) AddForceSideEffect(name string, v Value)
- func (i *Function) AddMask(v Value)
- func (n *Function) AddMember(k, v Value)
- func (i *Function) AddReference(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) ForEachMember(fn func(Value, Value) bool)
- func (n *Function) GetAllMember() map[Value]Value
- func (a *Function) GetAllVariables() map[string]*Variable
- func (f *Function) GetDeferBlock() *BasicBlock
- func (f *Function) GetFunc() *Function
- 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 (f *Function) GetMethodName() string
- func (n *Function) GetObject() Value
- func (i *Function) GetOpcode() Opcode
- func (f *Function) GetParent() *Function
- func (f *Function) GetProgram() *Program
- func (n *Function) GetStringMember(key string) (Value, bool)
- func (f *Function) GetType() Type
- func (n *Function) GetUsers() Users
- func (f *Function) GetValues() Values
- func (a *Function) GetVariable(name string) *Variable
- func (n *Function) HasUsers() bool
- func (f *Function) HasValues() bool
- func (f *Function) IsGeneric() bool
- func (f *Function) IsMain() bool
- func (n *Function) IsMember() bool
- func (f *Function) IsMethod() bool
- func (n *Function) IsObject() bool
- 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 (i *Function) Reference() Values
- func (n *Function) RemoveUser(u User)
- func (f *Function) ReturnValue() []Value
- func (f *Function) SetGeneric(b bool)
- func (n *Function) SetKey(k Value)
- func (f *Function) SetMethod(is bool, objType Type)
- func (f *Function) SetMethodName(name string)
- func (n *Function) SetObject(v Value)
- func (f *Function) SetType(t Type)
- func (f *Function) String() string
- type FunctionAsmFlag
- type FunctionBuilder
- func (b *FunctionBuilder) AddDefer(call *Call)
- func (b *FunctionBuilder) AddIncludePath(path string)
- func (b *FunctionBuilder) AddLabel(name string, block *BasicBlock)
- func (i FunctionBuilder) AddMask(v Value)
- func (n FunctionBuilder) AddMember(k, v Value)
- func (i FunctionBuilder) AddReference(v Value)
- func (n FunctionBuilder) AddUser(u User)
- func (a FunctionBuilder) AddVariable(v *Variable)
- func (b *FunctionBuilder) AppendBlockRange()
- func (b *FunctionBuilder) AssignVariable(variable *Variable, value Value)
- func (b *FunctionBuilder) Break() bool
- func (b *FunctionBuilder) BuildDirectoryPackage(name []string, once bool) (*Program, error)
- func (b *FunctionBuilder) BuildFilePackage(filename string, once bool) error
- 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 (f *FunctionBuilder) CheckAndSetSideEffect(variable *Variable, v Value)
- func (b *FunctionBuilder) Continue() bool
- func (b *FunctionBuilder) CoverReflectFunctionType(itype reflect.Type, level int) *FunctionType
- func (b *FunctionBuilder) CreateClassBluePrint(name string, tokenizer ...CanStartStopToken) *ClassBluePrint
- 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(object, key Value) *Variable
- func (b *FunctionBuilder) CreateVariable(name string, pos ...CanStartStopToken) *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) EmitConstInstNil() *ConstInst
- func (f *FunctionBuilder) EmitConstInstWithUnary(i any, un int) *ConstInst
- func (f *FunctionBuilder) EmitEmptyContainer() *Make
- func (f *FunctionBuilder) EmitErrorHandler(try *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 (f *FunctionBuilder) EmitValueOnlyDeclare(name string) *Undefined
- func (b *FunctionBuilder) Fallthrough() bool
- func (b *FunctionBuilder) Finish()
- func (n FunctionBuilder) ForEachMember(fn func(Value, Value) bool)
- func (n FunctionBuilder) GetAllMember() map[Value]Value
- func (a FunctionBuilder) GetAllVariables() map[string]*Variable
- func (b *FunctionBuilder) GetClassBluePrint(name string) *ClassBluePrint
- func (b *FunctionBuilder) GetCurrentRange(fallback CanStartStopToken) *Range
- func (b *FunctionBuilder) GetEditor() *memedit.MemEditor
- 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 (n FunctionBuilder) GetObject() Value
- func (b *FunctionBuilder) GetRangeByToken(r CanStartStopToken) *Range
- func (b *FunctionBuilder) GetStaticMember(class, key string) *Variable
- func (n FunctionBuilder) GetStringMember(key string) (Value, bool)
- func (n FunctionBuilder) GetUsers() Users
- func (a FunctionBuilder) GetVariable(name string) *Variable
- 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 (n FunctionBuilder) IsMember() bool
- func (n FunctionBuilder) IsObject() bool
- func (b *FunctionBuilder) IsParentFunctionVariable(v *Variable) bool
- 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, pos ...CanStartStopToken) *Parameter
- func (f *FunctionBuilder) NewParameterMember(name string, obj *Parameter, key Value) *ParameterMember
- 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 (i FunctionBuilder) Reference() Values
- func (b *FunctionBuilder) ReferenceParameter(name string)
- func (n FunctionBuilder) RemoveUser(u User)
- func (b *FunctionBuilder) SetClassBluePrint(name string, class *ClassBluePrint)
- func (f *FunctionBuilder) SetCurrent(i Instruction, noChangeRanges ...bool) func()
- func (b *FunctionBuilder) SetEditor(editor *memedit.MemEditor)
- func (f *FunctionBuilder) SetInstructionPosition(i Instruction)
- func (n FunctionBuilder) SetKey(k Value)
- func (b *FunctionBuilder) SetMarkedFunction(name string)
- func (n FunctionBuilder) SetObject(v Value)
- func (b *FunctionBuilder) SetRange(token CanStartStopToken) func()
- func (b *FunctionBuilder) SetRangeFromTerminalNode(node antlr.TerminalNode) func()
- 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) WithExternBuildValueHandler(m map[string]func(b *FunctionBuilder, id string, v any) (value Value))
- 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 FunctionSideEffect
- type FunctionType
- func (f *FunctionType) AddAnnotationFunc(handler ...func(Value))
- func (b *FunctionType) AddMethod(id string, f *Function)
- func (f *FunctionType) GetMethod() map[string]*Function
- 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]*Function)
- func (f *FunctionType) SetModifySelf(b bool)
- func (s *FunctionType) SetName(name string)
- func (s *FunctionType) SetSideEffect(se []*FunctionSideEffect)
- func (s *FunctionType) String() string
- type GenericType
- func (b *GenericType) AddMethod(id string, f *Function)
- func (c *GenericType) GetMethod() map[string]*Function
- func (c *GenericType) GetTypeKind() TypeKind
- func (c GenericType) PkgPathString() string
- func (c GenericType) RawString() string
- func (c *GenericType) SetMethod(m map[string]*Function)
- func (c GenericType) String() string
- type GetIdIF
- type If
- func (i *If) AddFalse(f *BasicBlock)
- func (i *If) AddTrue(t *BasicBlock)
- func (a *If) GetBlock() *BasicBlock
- func (a *If) GetFunc() *Function
- func (a *If) GetId() int64
- func (a *If) GetName() string
- func (i *If) GetOpcode() Opcode
- func (a *If) GetProgram() *Program
- func (c *If) GetRange() *Range
- func (i *If) GetShortVerboseName() string
- func (i *If) GetSiblings() []*If
- func (v *If) GetSourceCode() string
- func (v *If) GetSourceCodeContext(n int) string
- func (r *If) GetUsers() Users
- func (i *If) GetValues() Values
- func (i *If) GetVerboseName() string
- func (r *If) HasUsers() bool
- func (i *If) HasValues() bool
- func (a *If) IsAnnotation() bool
- func (i *If) IsBlock(name string) bool
- func (i *If) IsCFGEnterBlock() ([]Instruction, bool)
- func (c *If) IsExtern() bool
- func (i *If) IsLazy() bool
- func (i *If) IsUndefined() bool
- func (a *If) LineDisasm() string
- func (c *If) NewError(kind ErrorKind, tag ErrorTag, msg string)
- func (i *If) ReplaceValue(v Value, to Value)
- func (i *If) Self() Instruction
- 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 int64)
- func (a *If) SetIsAnnotation(b bool)
- 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 *Function)
- func (i *InterfaceType) GetMethod() map[string]*Function
- func (i *InterfaceType) GetTypeKind() TypeKind
- func (i *InterfaceType) PkgPathString() string
- func (i *InterfaceType) RawString() string
- func (i *InterfaceType) SetMethod(m map[string]*Function)
- func (i *InterfaceType) String() string
- type Jump
- func (a *Jump) GetBlock() *BasicBlock
- func (a *Jump) GetFunc() *Function
- func (a *Jump) GetId() int64
- func (a *Jump) GetName() string
- func (i *Jump) GetOpcode() Opcode
- func (a *Jump) GetProgram() *Program
- func (c *Jump) GetRange() *Range
- func (i *Jump) GetShortVerboseName() string
- func (v *Jump) GetSourceCode() string
- func (v *Jump) GetSourceCodeContext(n int) string
- func (i *Jump) GetVerboseName() string
- func (a *Jump) IsAnnotation() bool
- func (i *Jump) IsBlock(name string) bool
- func (i *Jump) IsCFGEnterBlock() ([]Instruction, bool)
- func (c *Jump) IsExtern() bool
- func (i *Jump) IsLazy() bool
- func (i *Jump) IsUndefined() bool
- func (a *Jump) LineDisasm() string
- func (c *Jump) NewError(kind ErrorKind, tag ErrorTag, msg string)
- func (i *Jump) ReplaceValue(Value, Value)
- func (i *Jump) Self() Instruction
- 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 int64)
- func (a *Jump) SetIsAnnotation(b bool)
- func (a *Jump) SetName(v string)
- func (c *Jump) SetRange(pos *Range)
- func (i *Jump) SetVerboseName(verbose string)
- func (j *Jump) String() string
- type LazyInstruction
- func (lz *LazyInstruction) AddMask(v Value)
- func (lz *LazyInstruction) AddMember(v1 Value, v2 Value)
- func (lz *LazyInstruction) AddReference(v Value)
- func (lz *LazyInstruction) AddVariable(v *Variable)
- func (lz *LazyInstruction) DeleteMember(v Value)
- func (lz *LazyInstruction) ForEachMember(fn func(Value, Value) bool)
- func (lz *LazyInstruction) GetAllMember() map[Value]Value
- func (lz *LazyInstruction) GetAllVariables() map[string]*Variable
- func (lz *LazyInstruction) GetBlock() *BasicBlock
- func (lz *LazyInstruction) GetFunc() *Function
- func (lz *LazyInstruction) GetId() int64
- func (lz *LazyInstruction) GetIndexMember(i int) (Value, bool)
- func (lz *LazyInstruction) GetKey() Value
- func (lz *LazyInstruction) GetLastVariable() *Variable
- func (lz *LazyInstruction) GetMask() []Value
- func (lz *LazyInstruction) GetMember(v Value) (Value, bool)
- func (lz *LazyInstruction) GetName() string
- func (lz *LazyInstruction) GetObject() Value
- func (lz *LazyInstruction) GetOpcode() Opcode
- func (lz *LazyInstruction) GetProgram() *Program
- func (lz *LazyInstruction) GetRange() *Range
- func (lz *LazyInstruction) GetShortVerboseName() string
- func (lz *LazyInstruction) GetSourceCode() string
- func (lz *LazyInstruction) GetSourceCodeContext(n int) string
- func (lz *LazyInstruction) GetStringMember(n string) (Value, bool)
- func (lz *LazyInstruction) GetType() Type
- func (lz *LazyInstruction) GetUsers() Users
- func (lz *LazyInstruction) GetValues() Values
- func (lz *LazyInstruction) GetVariable(n string) *Variable
- func (lz *LazyInstruction) GetVerboseName() string
- func (lz *LazyInstruction) HasUsers() bool
- func (lz *LazyInstruction) HasValues() bool
- func (lz *LazyInstruction) IsAnnotation() bool
- func (lz *LazyInstruction) IsBlock(name string) bool
- func (lz *LazyInstruction) IsCFGEnterBlock() ([]Instruction, bool)
- func (lz *LazyInstruction) IsExtern() bool
- func (lz *LazyInstruction) IsLazy() bool
- func (lz *LazyInstruction) IsMember() bool
- func (lz *LazyInstruction) IsObject() bool
- func (lz *LazyInstruction) IsUndefined() bool
- func (lz *LazyInstruction) Masked() bool
- func (lz *LazyInstruction) NewError(e ErrorKind, t ErrorTag, msg string)
- func (lz *LazyInstruction) Reference() Values
- func (lz *LazyInstruction) ReplaceValue(v1, v2 Value)
- func (lz *LazyInstruction) Self() Instruction
- func (lz *LazyInstruction) SelfDelete()
- func (lz *LazyInstruction) SetBlock(b *BasicBlock)
- func (lz *LazyInstruction) SetExtern(extern bool)
- func (lz *LazyInstruction) SetFunc(f *Function)
- func (lz *LazyInstruction) SetId(id int64)
- func (lz *LazyInstruction) SetIsAnnotation(b bool)
- func (lz *LazyInstruction) SetKey(v Value)
- func (lz *LazyInstruction) SetName(name string)
- func (lz *LazyInstruction) SetObject(v Value)
- func (lz *LazyInstruction) SetRange(r *Range)
- func (lz *LazyInstruction) SetType(t Type)
- func (lz *LazyInstruction) SetVerboseName(name string)
- func (lz *LazyInstruction) ShouldSave() bool
- func (lz *LazyInstruction) String() string
- type LazyScope
- func (l *LazyScope) AssignVariable(v ssautil.VersionedIF[Value], t Value)
- func (l *LazyScope) Compare(s ssautil.ScopedVersionedTableIF[Value]) bool
- func (l *LazyScope) CoverBy(s ssautil.ScopedVersionedTableIF[Value])
- func (l *LazyScope) CreateSubScope() ssautil.ScopedVersionedTableIF[Value]
- func (l *LazyScope) CreateVariable(name string, isLocal bool) ssautil.VersionedIF[Value]
- func (l *LazyScope) ForEachCapturedVariable(c ssautil.CaptureVariableHandler[Value])
- func (l *LazyScope) GetParent() ssautil.ScopedVersionedTableIF[Value]
- func (l *LazyScope) GetPersistentId() int64
- func (l *LazyScope) GetPersistentProgramName() string
- func (l *LazyScope) GetScopeLevel() int
- func (l *LazyScope) GetThis() ssautil.ScopedVersionedTableIF[Value]
- func (l *LazyScope) GetVariableFromValue(t Value) ssautil.VersionedIF[Value]
- func (l *LazyScope) IsSameOrSubScope(s ssautil.ScopedVersionedTableIF[Value]) bool
- func (l *LazyScope) Merge(b bool, m ssautil.MergeHandle[Value], ...)
- func (l *LazyScope) ReadValue(name string) Value
- func (l *LazyScope) ReadVariable(name string) ssautil.VersionedIF[Value]
- func (l *LazyScope) SaveToDatabase() error
- func (l *LazyScope) SetCapturedVariable(s string, v ssautil.VersionedIF[Value])
- func (l *LazyScope) SetParent(s ssautil.ScopedVersionedTableIF[Value])
- func (l *LazyScope) SetPersistentId(i int64)
- func (l *LazyScope) SetPersistentNode(node *ssadb.IrScopeNode)
- func (l *LazyScope) SetSpin(f func(string) Value)
- func (l *LazyScope) SetThis(s ssautil.ScopedVersionedTableIF[Value])
- func (l *LazyScope) Spin(s ssautil.ScopedVersionedTableIF[Value], ...)
- type Loop
- func (l *Loop) Finish(init, step []Value)
- func (a *Loop) GetBlock() *BasicBlock
- func (a *Loop) GetFunc() *Function
- func (a *Loop) GetId() int64
- func (a *Loop) GetName() string
- func (i *Loop) GetOpcode() Opcode
- func (a *Loop) GetProgram() *Program
- func (c *Loop) GetRange() *Range
- func (i *Loop) GetShortVerboseName() string
- func (v *Loop) GetSourceCode() string
- func (v *Loop) GetSourceCodeContext(n int) string
- func (r *Loop) GetUsers() Users
- func (l *Loop) GetValues() Values
- func (i *Loop) GetVerboseName() string
- func (r *Loop) HasUsers() bool
- func (l *Loop) HasValues() bool
- func (a *Loop) IsAnnotation() bool
- func (i *Loop) IsBlock(name string) bool
- func (i *Loop) IsCFGEnterBlock() ([]Instruction, bool)
- func (c *Loop) IsExtern() bool
- func (i *Loop) IsLazy() bool
- func (i *Loop) IsUndefined() bool
- func (a *Loop) LineDisasm() string
- func (c *Loop) NewError(kind ErrorKind, tag ErrorTag, msg string)
- func (l *Loop) ReplaceValue(v Value, to Value)
- func (i *Loop) Self() Instruction
- 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 int64)
- func (a *Loop) SetIsAnnotation(b bool)
- 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 (i *Make) AddReference(v Value)
- func (n *Make) AddUser(u User)
- func (a *Make) AddVariable(v *Variable)
- func (n *Make) DeleteMember(k Value)
- func (n *Make) ForEachMember(fn func(Value, Value) bool)
- func (n *Make) GetAllMember() map[Value]Value
- func (a *Make) GetAllVariables() map[string]*Variable
- 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 (n *Make) GetObject() Value
- func (i *Make) GetOpcode() Opcode
- 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 (n *Make) HasUsers() bool
- func (i *Make) HasValues() bool
- func (n *Make) IsMember() bool
- func (n *Make) IsObject() bool
- func (i *Make) Masked() bool
- func (i *Make) Reference() Values
- func (n *Make) RemoveUser(u User)
- func (i *Make) ReplaceValue(v, to Value)
- func (n *Make) SetKey(k Value)
- func (n *Make) SetObject(v Value)
- func (n *Make) SetType(typ Type)
- 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 Instruction) 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 (i *Next) AddReference(v Value)
- func (n *Next) AddUser(u User)
- func (a *Next) AddVariable(v *Variable)
- func (n *Next) DeleteMember(k Value)
- func (n *Next) ForEachMember(fn func(Value, Value) bool)
- func (n *Next) GetAllMember() map[Value]Value
- func (a *Next) GetAllVariables() map[string]*Variable
- 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 (n *Next) GetObject() Value
- func (i *Next) GetOpcode() Opcode
- 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 (n *Next) HasUsers() bool
- func (n *Next) HasValues() bool
- func (n *Next) IsMember() bool
- func (n *Next) IsObject() bool
- func (i *Next) Masked() bool
- func (i *Next) Reference() Values
- func (n *Next) RemoveUser(u User)
- func (n *Next) ReplaceValue(v, to Value)
- func (n *Next) SetKey(k Value)
- func (n *Next) SetObject(v Value)
- func (n *Next) SetType(typ Type)
- func (n *Next) String() string
- type Node
- type ObjectType
- func (s *ObjectType) AddField(key Value, field Type)
- func (b *ObjectType) AddMethod(id string, f *Function)
- func (s *ObjectType) Finish()
- func (s *ObjectType) GetField(key Value) Type
- func (i *ObjectType) GetMethod() map[string]*Function
- func (i *ObjectType) GetTypeKind() TypeKind
- func (i *ObjectType) PkgPathString() string
- func (itype *ObjectType) RawString() string
- func (i *ObjectType) SetMethod(m map[string]*Function)
- func (i *ObjectType) SetName(name string)
- func (i *ObjectType) SetPkgPath(pkg string)
- func (i *ObjectType) SetTypeKind(t TypeKind)
- func (itype *ObjectType) String() string
- type OffsetItem
- type Opcode
- type OrType
- func (b *OrType) AddMethod(id string, f *Function)
- func (c *OrType) GetMethod() map[string]*Function
- func (c *OrType) GetTypeKind() TypeKind
- func (c *OrType) GetTypes() Types
- func (c OrType) PkgPathString() string
- func (c OrType) RawString() string
- func (c *OrType) SetMethod(m map[string]*Function)
- func (c OrType) String() string
- type Panic
- func (i *Panic) AddMask(v Value)
- func (n *Panic) AddMember(k, v Value)
- func (i *Panic) AddReference(v Value)
- func (n *Panic) AddUser(u User)
- func (a *Panic) AddVariable(v *Variable)
- func (n *Panic) DeleteMember(k Value)
- func (n *Panic) ForEachMember(fn func(Value, Value) bool)
- func (n *Panic) GetAllMember() map[Value]Value
- func (a *Panic) GetAllVariables() map[string]*Variable
- 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 (n *Panic) GetObject() Value
- func (i *Panic) GetOpcode() Opcode
- 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 (n *Panic) HasUsers() bool
- func (p *Panic) HasValues() bool
- func (n *Panic) IsMember() bool
- func (n *Panic) IsObject() bool
- func (i *Panic) Masked() bool
- func (i *Panic) Reference() Values
- func (n *Panic) RemoveUser(u User)
- func (p *Panic) ReplaceValue(v, to Value)
- func (n *Panic) SetKey(k Value)
- func (n *Panic) SetObject(v Value)
- func (n *Panic) SetType(typ Type)
- func (p *Panic) String() string
- type Parameter
- func (i *Parameter) AddMask(v Value)
- func (n *Parameter) AddMember(k, v Value)
- func (i *Parameter) AddReference(v Value)
- func (n *Parameter) AddUser(u User)
- func (a *Parameter) AddVariable(v *Variable)
- func (p *Parameter) Copy() *Parameter
- func (n *Parameter) DeleteMember(k Value)
- func (n *Parameter) ForEachMember(fn func(Value, Value) bool)
- func (n *Parameter) GetAllMember() map[Value]Value
- func (a *Parameter) GetAllVariables() map[string]*Variable
- func (p *Parameter) GetDefault() Value
- 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 (n *Parameter) GetObject() Value
- func (i *Parameter) GetOpcode() Opcode
- 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 (n *Parameter) HasUsers() bool
- func (p *Parameter) HasValues() bool
- func (n *Parameter) IsMember() bool
- func (n *Parameter) IsObject() bool
- func (i *Parameter) Masked() bool
- func (i *Parameter) Reference() Values
- func (n *Parameter) RemoveUser(u User)
- func (p *Parameter) SetDefault(v Value)
- func (n *Parameter) SetKey(k Value)
- func (n *Parameter) SetObject(v Value)
- func (n *Parameter) SetType(typ Type)
- func (p *Parameter) String() string
- type ParameterMember
- func (i *ParameterMember) AddMask(v Value)
- func (n *ParameterMember) AddMember(k, v Value)
- func (i *ParameterMember) AddReference(v Value)
- func (n *ParameterMember) AddUser(u User)
- func (a *ParameterMember) AddVariable(v *Variable)
- func (n *ParameterMember) DeleteMember(k Value)
- func (n *ParameterMember) ForEachMember(fn func(Value, Value) bool)
- func (p ParameterMember) Get(c *Call) (obj Value, ok bool)
- func (n *ParameterMember) GetAllMember() map[Value]Value
- func (a *ParameterMember) GetAllVariables() map[string]*Variable
- func (n *ParameterMember) GetIndexMember(i int) (Value, bool)
- func (n *ParameterMember) GetKey() Value
- func (a *ParameterMember) GetLastVariable() *Variable
- func (i *ParameterMember) GetMask() []Value
- func (n *ParameterMember) GetMember(key Value) (Value, bool)
- func (n *ParameterMember) GetObject() Value
- func (i *ParameterMember) GetOpcode() Opcode
- func (n *ParameterMember) GetStringMember(key string) (Value, bool)
- func (n *ParameterMember) GetType() Type
- func (n *ParameterMember) GetUsers() Users
- func (p *ParameterMember) GetValues() Values
- func (a *ParameterMember) GetVariable(name string) *Variable
- func (n *ParameterMember) HasUsers() bool
- func (p *ParameterMember) HasValues() bool
- func (n *ParameterMember) IsMember() bool
- func (n *ParameterMember) IsObject() bool
- func (i *ParameterMember) Masked() bool
- func (i *ParameterMember) Reference() Values
- func (n *ParameterMember) RemoveUser(u User)
- func (n *ParameterMember) SetKey(k Value)
- func (n *ParameterMember) SetObject(v Value)
- func (n *ParameterMember) SetType(typ Type)
- func (p *ParameterMember) String() string
- type ParameterMemberCallKind
- type ParentScope
- type Phi
- func (i *Phi) AddMask(v Value)
- func (n *Phi) AddMember(k, v Value)
- func (i *Phi) AddReference(v Value)
- func (n *Phi) AddUser(u User)
- func (a *Phi) AddVariable(v *Variable)
- func (n *Phi) DeleteMember(k Value)
- func (n *Phi) ForEachMember(fn func(Value, Value) bool)
- func (n *Phi) GetAllMember() map[Value]Value
- func (a *Phi) GetAllVariables() map[string]*Variable
- func (p *Phi) GetControlFlowConditions() []Value
- 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 (n *Phi) GetObject() Value
- func (i *Phi) GetOpcode() Opcode
- 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 (n *Phi) HasUsers() bool
- func (p *Phi) HasValues() bool
- func (n *Phi) IsMember() bool
- func (n *Phi) IsObject() bool
- func (i *Phi) Masked() bool
- func (i *Phi) Reference() Values
- func (n *Phi) RemoveUser(u User)
- func (p *Phi) ReplaceValue(v Value, to Value)
- func (n *Phi) SetKey(k Value)
- func (n *Phi) SetObject(v Value)
- func (n *Phi) SetType(typ Type)
- func (p *Phi) String() string
- type Position
- type Program
- func (prog *Program) AddError(err *SSAError)
- func (prog *Program) BuildValueFromAny(b *FunctionBuilder, id string, v any) (value Value)
- func (prog *Program) CoverReflectFunctionType(itype reflect.Type, level int) *FunctionType
- func (p *Program) DeleteInstruction(inst Instruction)
- func (prog *Program) EachFunction(handler func(*Function))
- func (prog *Program) Finish()
- func (prog *Program) ForceSetOffsetValue(v Value, r *Range)
- func (prog *Program) GetAndCreateFunction(pkgName string, funcName string) *Function
- func (prog *Program) GetAndCreateFunctionBuilder(pkgName string, funcName string) *FunctionBuilder
- func (prog *Program) GetCacheExternInstance(name string) (Value, bool)
- func (pkg *Program) GetClassBluePrint(name string) *ClassBluePrint
- func (p *Program) GetCurrentEditor() *memedit.MemEditor
- func (p *Program) GetEditor(url string) (*memedit.MemEditor, bool)
- func (prog *Program) GetErrors() SSAErrors
- func (prog *Program) GetFrontValueByOffset(searchOffset int) (offset int, value Value)
- func (p *Program) GetFunction(name string) *Function
- func (p *Program) GetIncludeFiles() []string
- func (p *Program) GetInstructionById(id int64) Instruction
- func (prog *Program) GetLibrary(name string) (*Program, bool)
- func (prog *Program) GetProgramName() string
- func (p *Program) NewFunction(name string) *Function
- func (p *Program) NewFunctionWithParent(name string, parent *Function) *Function
- func (prog *Program) NewLibrary(name string, path []string) *Program
- func (p *Program) PopEditor()
- func (p *Program) PushEditor(e *memedit.MemEditor)
- func (p *Program) RemoveInstructionInVariable(name string, i Instruction)
- func (prog *Program) SearchIndexAndOffsetByOffset(searchOffset int) (index int, offset int)
- func (prog *Program) SetCacheExternInstance(name string, v Value)
- func (p *Program) SetInstructionWithName(name string, i Instruction)
- func (prog *Program) SetOffsetValue(v Value, r *Range)
- func (prog *Program) SetOffsetValueEx(v Value, r *Range, force bool)
- func (prog *Program) SetOffsetVariable(v *Variable, r *Range)
- func (p *Program) SetVirtualRegister(i Instruction)
- func (p *Program) Show() *Program
- func (prog *Program) ShowOffsetMap()
- func (p *Program) ShowWithSource()
- func (prog *Program) TryBuildExternValue(b *FunctionBuilder, id string) Value
- func (prog *Program) TryGetSimilarityKey(name, key string) string
- type ProgramKind
- type Range
- func (r *Range) Add(end *Range)
- func (p *Range) CompareEnd(other *Range) int
- func (p *Range) CompareStart(other *Range) int
- func (r *Range) GetEditor() *memedit.MemEditor
- func (r *Range) GetEnd() memedit.PositionIf
- func (r *Range) GetEndOffset() int
- func (p *Range) GetOffset() int
- func (r *Range) GetOffsetRange() (int, int)
- func (r *Range) GetStart() memedit.PositionIf
- func (p *Range) GetText() string
- func (p *Range) GetTextContext(n int) string
- func (p *Range) GetTextContextWithPrompt(n int, msg ...string) string
- func (p *Range) GetWordText() string
- func (r *Range) Len() int
- func (p *Range) String() string
- type Recover
- func (i *Recover) AddMask(v Value)
- func (n *Recover) AddMember(k, v Value)
- func (i *Recover) AddReference(v Value)
- func (n *Recover) AddUser(u User)
- func (a *Recover) AddVariable(v *Variable)
- func (n *Recover) DeleteMember(k Value)
- func (n *Recover) ForEachMember(fn func(Value, Value) bool)
- func (n *Recover) GetAllMember() map[Value]Value
- func (a *Recover) GetAllVariables() map[string]*Variable
- 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 (n *Recover) GetObject() Value
- func (i *Recover) GetOpcode() Opcode
- 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 (n *Recover) HasUsers() bool
- func (r *Recover) HasValues() bool
- func (n *Recover) IsMember() bool
- func (n *Recover) IsObject() bool
- func (i *Recover) Masked() bool
- func (i *Recover) Reference() Values
- func (n *Recover) RemoveUser(u User)
- func (n *Recover) SetKey(k Value)
- func (n *Recover) SetObject(v Value)
- func (n *Recover) SetType(typ Type)
- func (r *Recover) String() string
- type Return
- func (i *Return) AddMask(v Value)
- func (n *Return) AddMember(k, v Value)
- func (i *Return) AddReference(v Value)
- func (n *Return) AddUser(u User)
- func (a *Return) AddVariable(v *Variable)
- func (n *Return) DeleteMember(k Value)
- func (n *Return) ForEachMember(fn func(Value, Value) bool)
- func (n *Return) GetAllMember() map[Value]Value
- func (a *Return) GetAllVariables() map[string]*Variable
- 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 (n *Return) GetObject() Value
- func (i *Return) GetOpcode() Opcode
- 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 (r *Return) HasUsers() bool
- func (r *Return) HasValues() bool
- func (n *Return) IsMember() bool
- func (n *Return) IsObject() bool
- func (i *Return) Masked() bool
- func (i *Return) Reference() Values
- func (n *Return) RemoveUser(u User)
- func (r *Return) ReplaceValue(v Value, to Value)
- func (n *Return) SetKey(k Value)
- func (n *Return) SetObject(v Value)
- func (n *Return) SetType(typ Type)
- func (r *Return) String() string
- type SSAError
- type SSAErrors
- type ScopeIF
- type ScopeInstance
- type SideEffect
- func (i *SideEffect) AddMask(v Value)
- func (n *SideEffect) AddMember(k, v Value)
- func (i *SideEffect) AddReference(v Value)
- func (n *SideEffect) AddUser(u User)
- func (a *SideEffect) AddVariable(v *Variable)
- func (n *SideEffect) DeleteMember(k Value)
- func (n *SideEffect) ForEachMember(fn func(Value, Value) bool)
- func (n *SideEffect) GetAllMember() map[Value]Value
- func (a *SideEffect) GetAllVariables() map[string]*Variable
- 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 (n *SideEffect) GetObject() Value
- func (i *SideEffect) GetOpcode() Opcode
- 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 (n *SideEffect) HasUsers() bool
- func (s *SideEffect) HasValues() bool
- func (n *SideEffect) IsMember() bool
- func (n *SideEffect) IsObject() bool
- func (i *SideEffect) Masked() bool
- func (i *SideEffect) Reference() Values
- func (n *SideEffect) RemoveUser(u User)
- func (s *SideEffect) ReplaceValue(v Value, to Value)
- func (n *SideEffect) SetKey(k Value)
- func (n *SideEffect) SetObject(v Value)
- func (n *SideEffect) SetType(typ Type)
- func (s *SideEffect) String() string
- type Switch
- func (a *Switch) GetBlock() *BasicBlock
- func (a *Switch) GetFunc() *Function
- func (a *Switch) GetId() int64
- func (a *Switch) GetName() string
- func (i *Switch) GetOpcode() Opcode
- func (a *Switch) GetProgram() *Program
- func (c *Switch) GetRange() *Range
- func (i *Switch) GetShortVerboseName() string
- func (v *Switch) GetSourceCode() string
- func (v *Switch) GetSourceCodeContext(n int) string
- func (r *Switch) GetUsers() Users
- func (sw *Switch) GetValues() Values
- func (i *Switch) GetVerboseName() string
- func (r *Switch) HasUsers() bool
- func (sw *Switch) HasValues() bool
- func (a *Switch) IsAnnotation() bool
- func (i *Switch) IsBlock(name string) bool
- func (i *Switch) IsCFGEnterBlock() ([]Instruction, bool)
- func (c *Switch) IsExtern() bool
- func (i *Switch) IsLazy() bool
- func (i *Switch) IsUndefined() bool
- func (a *Switch) LineDisasm() string
- func (c *Switch) NewError(kind ErrorKind, tag ErrorTag, msg string)
- func (sw *Switch) ReplaceValue(v Value, to Value)
- func (i *Switch) Self() Instruction
- 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 int64)
- func (a *Switch) SetIsAnnotation(b bool)
- 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 Token
- type TryBuilder
- type Type
- func ApplyGenericType(raw Type, symbolsTypeMap map[string]Type) Type
- func CalculateType(ts []Type) Type
- func CloneType(t Type) (Type, bool)
- func GetAnyType() Type
- func GetBooleanType() Type
- func GetByteType() Type
- func GetBytesType() Type
- func GetErrorType() Type
- func GetGenericTypeFromType(t Type) []Type
- func GetNullType() Type
- func GetNumberType() Type
- func GetStringType() Type
- func GetType(i any) Type
- func GetTypeByStr(typ string) Type
- func GetTypeFromDB(id int) Type
- func GetUndefinedType() Type
- func ParseClassBluePrint(this Value, objectTyp *ObjectType) (ret Type)
- type TypeCast
- func (i *TypeCast) AddMask(v Value)
- func (n *TypeCast) AddMember(k, v Value)
- func (i *TypeCast) AddReference(v Value)
- func (n *TypeCast) AddUser(u User)
- func (a *TypeCast) AddVariable(v *Variable)
- func (n *TypeCast) DeleteMember(k Value)
- func (n *TypeCast) ForEachMember(fn func(Value, Value) bool)
- func (n *TypeCast) GetAllMember() map[Value]Value
- func (a *TypeCast) GetAllVariables() map[string]*Variable
- 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 (n *TypeCast) GetObject() Value
- func (i *TypeCast) GetOpcode() Opcode
- 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 (n *TypeCast) HasUsers() bool
- func (t *TypeCast) HasValues() bool
- func (n *TypeCast) IsMember() bool
- func (n *TypeCast) IsObject() bool
- func (i *TypeCast) Masked() bool
- func (i *TypeCast) Reference() Values
- func (n *TypeCast) RemoveUser(u User)
- func (t *TypeCast) ReplaceValue(v, to Value)
- func (n *TypeCast) SetKey(k Value)
- func (n *TypeCast) SetObject(v Value)
- func (n *TypeCast) SetType(typ Type)
- func (t *TypeCast) String() string
- type TypeKind
- type TypeValue
- func (i *TypeValue) AddMask(v Value)
- func (n *TypeValue) AddMember(k, v Value)
- func (i *TypeValue) AddReference(v Value)
- func (n *TypeValue) AddUser(u User)
- func (a *TypeValue) AddVariable(v *Variable)
- func (n *TypeValue) DeleteMember(k Value)
- func (n *TypeValue) ForEachMember(fn func(Value, Value) bool)
- func (n *TypeValue) GetAllMember() map[Value]Value
- func (a *TypeValue) GetAllVariables() map[string]*Variable
- 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 (n *TypeValue) GetObject() Value
- func (i *TypeValue) GetOpcode() Opcode
- 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 (n *TypeValue) HasUsers() bool
- func (t *TypeValue) HasValues() bool
- func (n *TypeValue) IsMember() bool
- func (n *TypeValue) IsObject() bool
- func (i *TypeValue) Masked() bool
- func (i *TypeValue) Reference() Values
- func (n *TypeValue) RemoveUser(u User)
- func (n *TypeValue) SetKey(k Value)
- func (n *TypeValue) SetObject(v Value)
- func (n *TypeValue) SetType(typ Type)
- 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 (i *UnOp) AddReference(v Value)
- func (n *UnOp) AddUser(u User)
- func (a *UnOp) AddVariable(v *Variable)
- func (n *UnOp) DeleteMember(k Value)
- func (n *UnOp) ForEachMember(fn func(Value, Value) bool)
- func (n *UnOp) GetAllMember() map[Value]Value
- func (a *UnOp) GetAllVariables() map[string]*Variable
- 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 (n *UnOp) GetObject() Value
- func (i *UnOp) GetOpcode() Opcode
- 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 (n *UnOp) HasUsers() bool
- func (n *UnOp) HasValues() bool
- func (n *UnOp) IsMember() bool
- func (n *UnOp) IsObject() bool
- func (i *UnOp) Masked() bool
- func (i *UnOp) Reference() Values
- func (n *UnOp) RemoveUser(u User)
- func (u *UnOp) ReplaceValue(v Value, to Value)
- func (n *UnOp) SetKey(k Value)
- func (n *UnOp) SetObject(v Value)
- func (n *UnOp) SetType(typ Type)
- func (u *UnOp) String() string
- type UnaryOpcode
- type Undefined
- func (i *Undefined) AddMask(v Value)
- func (n *Undefined) AddMember(k, v Value)
- func (i *Undefined) AddReference(v Value)
- func (n *Undefined) AddUser(u User)
- func (a *Undefined) AddVariable(v *Variable)
- func (n *Undefined) DeleteMember(k Value)
- func (n *Undefined) ForEachMember(fn func(Value, Value) bool)
- func (n *Undefined) GetAllMember() map[Value]Value
- func (a *Undefined) GetAllVariables() map[string]*Variable
- 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 (n *Undefined) GetObject() Value
- func (i *Undefined) GetOpcode() Opcode
- 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 (n *Undefined) HasUsers() bool
- func (u *Undefined) HasValues() bool
- func (n *Undefined) IsMember() bool
- func (n *Undefined) IsObject() bool
- func (u *Undefined) IsUndefined() bool
- func (i *Undefined) Masked() bool
- func (i *Undefined) Reference() Values
- func (n *Undefined) RemoveUser(u User)
- func (n *Undefined) SetKey(k Value)
- func (n *Undefined) SetObject(v Value)
- func (n *Undefined) SetType(typ Type)
- func (u *Undefined) String() string
- type UndefinedKind
- type User
- type Users
- type Value
- type Values
- type Variable
- func (v *Variable) AddRange(r *Range, force bool)
- func (variable *Variable) Assign(value Value) error
- func (b *Variable) GetMemberCall() (Value, Value)
- func (b *Variable) GetProgram() *Program
- func (b *Variable) IsMemberCall() bool
- func (v *Variable) NewError(kind ErrorKind, tag ErrorTag, msg string)
- func (variable *Variable) Replace(val, to Value)
- 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 ( 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` OpPow = `pow` )
const ( OpNot = `not` OpPlus = `plus` OpNeg = `neg` OpChan = `chan` OpBitwiseNot = `bitwise-not` )
const (
MAXTYPELEVEL = 15
)
const MAXTypeCompareDepth = 10
const (
OpNone = ``
)
Variables ¶
var ( NextOk = NewConst("ok") NextField = NewConst("field") NextKey = NewConst("key") )
var ( // T is a generic type TypeT = NewGenericType("T") TypeU = NewGenericType("U") TypeK = NewGenericType("K") TypeV = NewGenericType("V") )
var BasicTypes = map[TypeKind]*BasicType{ NumberTypeKind: NewBasicType(NumberTypeKind, "number"), StringTypeKind: NewBasicType(StringTypeKind, "string"), ByteTypeKind: NewBasicType(ByteTypeKind, "byte"), 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 SSAOpcode2Name = map[Opcode]string{ SSAOpcodeUnKnow: "UnKnow", SSAOpcodeAssert: "Assert", SSAOpcodeBasicBlock: "BasicBlock", SSAOpcodeBinOp: "BinOp", SSAOpcodeCall: "Call", SSAOpcodeConstInst: "ConstInst", SSAOpcodeErrorHandler: "ErrorHandler", SSAOpcodeExternLib: "ExternLib", SSAOpcodeIf: "If", SSAOpcodeJump: "Jump", SSAOpcodeLoop: "Loop", SSAOpcodeMake: "Make", SSAOpcodeNext: "Next", SSAOpcodePanic: "Panic", SSAOpcodeParameter: "Parameter", SSAOpcodeFreeValue: "FreeValue", SSAOpcodeParameterMember: "ParameterMember", SSAOpcodePhi: "Phi", SSAOpcodeRecover: "Recover", SSAOpcodeReturn: "Return", SSAOpcodeSideEffect: "SideEffect", SSAOpcodeSwitch: "Switch", SSAOpcodeTypeCast: "TypeCast", SSAOpcodeTypeValue: "TypeValue", SSAOpcodeUnOp: "UnOp", SSAOpcodeUndefined: "Undefined", SSAOpcodeFunction: "Function", }
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 GenericTypeError ¶
func GetEndPosition ¶ added in v1.3.3
func GetKeyString ¶ added in v1.3.1
func GetMethodsName ¶ added in v1.2.9
func GetSSASaveIrCodeCost ¶
func GetTypeStr ¶
func InsertSortedIntSlice ¶ added in v1.3.3
func Instruction2IrCode ¶ added in v1.3.3
func Instruction2IrCode(inst Instruction, ir *ssadb.IrCode) error
Instruction2IrCode : marshal instruction to ir code, used in cache, to save to database
func IsCompareOpcode ¶ added in v1.3.3
func IsCompareOpcode(i BinaryOpcode) 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 NewInstructionFromLazy ¶ added in v1.3.3
func NewInstructionFromLazy[T Instruction](id int64, Cover func(Instruction) (T, bool)) (T, error)
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
ReplaceMemberCall replace all member or object relationship and will fixup method function call
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 SaveTypeToDB ¶
func ShowDatabaseCacheCost ¶
func ShowDatabaseCacheCost()
func SpinHandle ¶ added in v1.3.1
func SyncFromDatabase ¶ added in v1.3.3
func SyncFromDatabase(s *ScopeInstance) error
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 ValueNotMemberInCall ¶
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) GetTypeKind ¶ added in v1.2.8
func (*AliasType) PkgPathString ¶ added in v1.3.1
type Assert ¶ added in v1.2.8
type Assert struct { Cond Value Msg string MsgValue Value // contains filtered or unexported fields }
----------- assert
func (*Assert) GetBlock ¶ added in v1.2.8
func (a *Assert) GetBlock() *BasicBlock
func (*Assert) GetProgram ¶ added in v1.3.0
func (a *Assert) GetProgram() *Program
func (*Assert) GetShortVerboseName ¶ added in v1.3.2
func (i *Assert) GetShortVerboseName() string
func (*Assert) GetSourceCode ¶ added in v1.3.3
func (v *Assert) GetSourceCode() string
func (*Assert) GetSourceCodeContext ¶ added in v1.3.3
func (*Assert) GetVerboseName ¶ added in v1.3.1
func (i *Assert) GetVerboseName() string
func (*Assert) IsAnnotation ¶
func (a *Assert) IsAnnotation() bool
func (*Assert) IsCFGEnterBlock ¶
func (i *Assert) IsCFGEnterBlock() ([]Instruction, bool)
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) Self ¶
func (i *Assert) Self() Instruction
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) SetIsAnnotation ¶
func (a *Assert) SetIsAnnotation(b bool)
func (*Assert) SetVerboseName ¶ added in v1.3.1
func (i *Assert) SetVerboseName(verbose string)
type AssignAble ¶ added in v1.3.3
type BasicBlock ¶
type BasicBlock struct { Index int // BasicBlock graph Preds, Succs []Value Condition Value // instruction list Insts []Instruction Phis []Value // error catch Handler *ErrorHandler // for build ScopeTable ScopeIF // contains filtered or unexported fields }
implement Value
func ToBasicBlock ¶ added in v1.3.3
func ToBasicBlock(n Instruction) (*BasicBlock, bool)
func (*BasicBlock) AddReference ¶
func (i *BasicBlock) AddReference(v 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) ForEachMember ¶ added in v1.3.3
func (*BasicBlock) GetAllMember ¶ added in v1.3.1
func (*BasicBlock) GetAllVariables ¶ added in v1.3.0
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) 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) 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) IsCFGEnterBlock ¶
func (b *BasicBlock) IsCFGEnterBlock() ([]Instruction, bool)
func (*BasicBlock) LastInst ¶
func (b *BasicBlock) LastInst() Instruction
func (*BasicBlock) Reachable ¶ added in v1.2.8
func (b *BasicBlock) Reachable() int
func (*BasicBlock) RemoveUser ¶
func (n *BasicBlock) RemoveUser(u User)
func (*BasicBlock) SetReachable ¶
func (b *BasicBlock) SetReachable(boolean bool)
func (*BasicBlock) SetType ¶
func (b *BasicBlock) SetType(ts Type)
type BasicType ¶
type BasicType struct { Kind TypeKind // contains filtered or unexported fields }
func NewBasicType ¶ added in v1.3.1
func (*BasicType) GetTypeKind ¶ added in v1.2.8
func (*BasicType) PkgPathString ¶ added in v1.3.1
type BinOp ¶
type BinOp struct { Op BinaryOpcode X, Y Value // contains filtered or unexported fields }
----------- BinOp
func NewBinOp ¶ added in v1.2.8
func NewBinOp(op BinaryOpcode, x, y Value) *BinOp
func ToBinOp ¶ added in v1.2.8
func ToBinOp(v Instruction) (*BinOp, bool)
func (*BinOp) AddReference ¶
func (i *BinOp) AddReference(v Value)
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) ForEachMember ¶ added in v1.3.3
func (*BinOp) GetAllMember ¶ added in v1.3.1
func (*BinOp) GetAllVariables ¶ added in v1.3.0
func (*BinOp) GetIndexMember ¶ added in v1.3.1
func (*BinOp) GetLastVariable ¶ added in v1.3.1
func (a *BinOp) GetLastVariable() *Variable
func (*BinOp) GetStringMember ¶ added in v1.3.1
func (*BinOp) GetVariable ¶ added in v1.2.8
func (*BinOp) RemoveUser ¶
func (n *BinOp) RemoveUser(u User)
func (*BinOp) ReplaceValue ¶
type BinaryOpcode ¶
type BinaryOpcode string
type BluePrintMember ¶ added in v1.3.2
type Builder ¶
type Builder interface { Build(string, bool, *FunctionBuilder) error FilterFile(string) bool ExtraFileAnalyzer }
type Cache ¶ added in v1.3.2
type Cache struct { ProgramName string // mark which program handled DB *gorm.DB InstructionCache *utils.CacheWithKey[int64, instructionIrCode] // instructionID to instruction VariableCache *utils.CacheWithKey[string, []Instruction] // variable(name:string) to []instruction Class2InstIndex map[string][]Instruction // contains filtered or unexported fields }
Cache : a cache in middle layer of database and application.
application will Get/Set Instruction,
and save the data to database when the data is expired, and load the data from database when the data is not in cache.
func GetCacheFromPool ¶ added in v1.3.3
func NewDBCache ¶ added in v1.3.2
NewDBCache : create a new ssa db cache. if ttl is 0, the cache will never expire, and never save to database.
func (*Cache) AddClassInstance ¶
func (c *Cache) AddClassInstance(name string, inst Instruction)
func (*Cache) AddVariable ¶ added in v1.3.2
func (c *Cache) AddVariable(name string, inst Instruction)
func (*Cache) DeleteInstruction ¶ added in v1.3.2
func (c *Cache) DeleteInstruction(inst Instruction)
func (*Cache) ForEachVariable ¶ added in v1.3.2
func (c *Cache) ForEachVariable(handle func(string, []Instruction))
func (*Cache) GetByVariable ¶ added in v1.3.2
func (c *Cache) GetByVariable(name string) []Instruction
func (*Cache) GetClassInstance ¶
func (c *Cache) GetClassInstance(name string) []Instruction
func (*Cache) GetInstruction ¶ added in v1.3.2
func (c *Cache) GetInstruction(id int64) Instruction
GetInstruction : get instruction from cache.
func (*Cache) HaveDatabaseBackend ¶ added in v1.3.3
func (*Cache) IrCodeToInstruction ¶ added in v1.3.3
func (c *Cache) IrCodeToInstruction(inst Instruction, ir *ssadb.IrCode) Instruction
IrCodeToInstruction : unmarshal ir code to instruction, used in LazyInstruction
func (*Cache) IsExistedSourceCodeHash ¶ added in v1.3.3
func (*Cache) RemoveVariable ¶ added in v1.3.2
func (c *Cache) RemoveVariable(name string, inst Instruction)
func (*Cache) SaveToDatabase ¶ added in v1.3.2
func (c *Cache) SaveToDatabase()
func (*Cache) SetInstruction ¶ added in v1.3.2
func (c *Cache) SetInstruction(inst Instruction)
SetInstruction : set instruction to cache.
func (*Cache) SetVariable ¶ added in v1.3.2
func (c *Cache) SetVariable(name string, instructions []Instruction)
type Call ¶
type Call struct { // for call function Method Value Args []Value Binding map[string]Value ArgMember []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 ToCall ¶ added in v1.2.8
func ToCall(v Instruction) (*Call, bool)
func (*Call) AddReference ¶
func (i *Call) AddReference(v Value)
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) ForEachMember ¶ added in v1.3.3
func (*Call) GetAllMember ¶ added in v1.3.1
func (*Call) GetAllVariables ¶ added in v1.3.0
func (*Call) GetIndexMember ¶ added in v1.3.1
func (*Call) GetLastVariable ¶ added in v1.3.1
func (a *Call) GetLastVariable() *Variable
func (*Call) GetStringMember ¶ added in v1.3.1
func (*Call) GetVariable ¶ added in v1.2.8
func (*Call) HandleFreeValue ¶ added in v1.2.8
func (*Call) RemoveUser ¶
func (n *Call) RemoveUser(u User)
func (*Call) ReplaceValue ¶
type CanStartStopToken ¶ added in v1.3.3
type CanStartStopToken interface { GetStop() antlr.Token GetStart() antlr.Token GetText() string }
/ ============================== Token ==============================
type ChanType ¶
type ChanType struct { Elem Type // contains filtered or unexported fields }
====================== chan type
func NewChanType ¶
func (*ChanType) GetTypeKind ¶ added in v1.2.8
func (ChanType) PkgPathString ¶ added in v1.3.1
type ClassBluePrint ¶ added in v1.3.2
type ClassBluePrint struct { Name string Method map[string]*Function StaticMethod map[string]*Function NormalMember map[string]*BluePrintMember StaticMember map[string]Value CallBack []func() // magic method Copy Value Constructor Value Destructor Value ParentClass []*ClassBluePrint // contains filtered or unexported fields }
ClassBluePrint is a class blue print, it is used to create a new class
func NewClassBluePrint ¶ added in v1.3.2
func NewClassBluePrint() *ClassBluePrint
func (*ClassBluePrint) AddMethod ¶ added in v1.3.2
func (c *ClassBluePrint) AddMethod(key string, fun *Function)
func (*ClassBluePrint) AddNormalMember ¶ added in v1.3.2
func (c *ClassBluePrint) AddNormalMember(name string, value Value)
AddNormalMember is used to add a normal member to the class,
func (*ClassBluePrint) AddNormalMemberOnlyType ¶ added in v1.3.2
func (c *ClassBluePrint) AddNormalMemberOnlyType(name string, typ Type)
func (*ClassBluePrint) AddParentClass ¶ added in v1.3.2
func (c *ClassBluePrint) AddParentClass(parent *ClassBluePrint)
AddParentClass is used to add a parent class to the class,
func (*ClassBluePrint) AddStaticMember ¶ added in v1.3.2
func (c *ClassBluePrint) AddStaticMember(name string, value Value)
AddStaticMember is used to add a static member to the class,
func (*ClassBluePrint) AddStaticMethod ¶ added in v1.3.2
func (c *ClassBluePrint) AddStaticMethod(name string, value *Function)
AddStaticMethod is used to add a static method to the class,
func (*ClassBluePrint) Apply ¶ added in v1.3.2
func (c *ClassBluePrint) Apply(obj Value) Type
func (*ClassBluePrint) GetMember ¶ added in v1.3.2
func (c *ClassBluePrint) GetMember(key string) *BluePrintMember
func (*ClassBluePrint) GetMemberEx ¶
func (c *ClassBluePrint) GetMemberEx(key string, get func(*ClassBluePrint) bool) bool
func (*ClassBluePrint) GetMethod ¶ added in v1.3.2
func (c *ClassBluePrint) GetMethod() map[string]*Function
func (*ClassBluePrint) GetTypeKind ¶ added in v1.3.2
func (c *ClassBluePrint) GetTypeKind() TypeKind
func (*ClassBluePrint) InitializeWithContainer ¶
func (b *ClassBluePrint) InitializeWithContainer(con *Make) error
func (*ClassBluePrint) PkgPathString ¶ added in v1.3.2
func (c *ClassBluePrint) PkgPathString() string
func (*ClassBluePrint) RawString ¶ added in v1.3.2
func (c *ClassBluePrint) RawString() string
func (*ClassBluePrint) SetMethod ¶ added in v1.3.2
func (c *ClassBluePrint) SetMethod(m map[string]*Function)
func (*ClassBluePrint) String ¶ added in v1.3.2
func (c *ClassBluePrint) String() string
type ClassModifier ¶ added in v1.3.2
type ClassModifier int
const ( NoneModifier ClassModifier = 1 << iota Static Public Protected Private Abstract Final Readonly )
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 ToConst ¶ added in v1.2.8
func ToConst(v Instruction) (*ConstInst, bool)
func (*ConstInst) AddReference ¶
func (i *ConstInst) AddReference(v Value)
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) ForEachMember ¶ added in v1.3.3
func (*ConstInst) GetAllMember ¶ added in v1.3.1
func (*ConstInst) GetAllVariables ¶ added in v1.3.0
func (*ConstInst) GetIndexMember ¶ added in v1.3.1
func (*ConstInst) GetLastVariable ¶ added in v1.3.1
func (a *ConstInst) GetLastVariable() *Variable
func (*ConstInst) GetStringMember ¶ added in v1.3.1
func (*ConstInst) GetVariable ¶ added in v1.2.8
func (*ConstInst) HasUsers ¶ added in v1.2.8
func (n *ConstInst) HasUsers() bool
has/get user and value
func (*ConstInst) RemoveUser ¶ added in v1.2.8
func (n *ConstInst) RemoveUser(u User)
func (*ConstInst) ReplaceValue ¶ added in v1.3.0
type DisasmLiner ¶ added in v1.3.0
type DisasmLiner interface { DisasmValue(v Instruction) 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 DummyExtraFileAnalyzer ¶
type DummyExtraFileAnalyzer struct { }
func (*DummyExtraFileAnalyzer) EnableExtraFileAnalyzer ¶
func (d *DummyExtraFileAnalyzer) EnableExtraFileAnalyzer() bool
func (*DummyExtraFileAnalyzer) ExtraFileAnalyze ¶
func (d *DummyExtraFileAnalyzer) ExtraFileAnalyze(filesys.FileSystem, *Program, string) error
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 *BasicBlock) *ErrorHandler
func (*ErrorHandler) AddCatch ¶
func (e *ErrorHandler) AddCatch(c *BasicBlock)
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) GetBlock ¶ added in v1.2.8
func (a *ErrorHandler) GetBlock() *BasicBlock
func (*ErrorHandler) GetOpcode ¶ added in v1.2.8
func (i *ErrorHandler) GetOpcode() Opcode
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) GetShortVerboseName ¶ added in v1.3.2
func (i *ErrorHandler) GetShortVerboseName() string
func (*ErrorHandler) GetSourceCode ¶ added in v1.3.3
func (v *ErrorHandler) GetSourceCode() string
func (*ErrorHandler) GetSourceCodeContext ¶ added in v1.3.3
func (*ErrorHandler) GetVerboseName ¶ added in v1.3.1
func (i *ErrorHandler) GetVerboseName() string
func (*ErrorHandler) IsAnnotation ¶
func (a *ErrorHandler) IsAnnotation() bool
func (*ErrorHandler) IsCFGEnterBlock ¶
func (i *ErrorHandler) IsCFGEnterBlock() ([]Instruction, bool)
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) Self ¶
func (i *ErrorHandler) Self() Instruction
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) SetIsAnnotation ¶
func (a *ErrorHandler) SetIsAnnotation(b bool)
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) AddReference ¶
func (i *ExternLib) AddReference(v Value)
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) ForEachMember ¶ added in v1.3.3
func (*ExternLib) GetAllMember ¶ added in v1.3.1
func (*ExternLib) GetAllVariables ¶ added in v1.3.0
func (*ExternLib) GetIndexMember ¶ added in v1.3.1
func (*ExternLib) GetLastVariable ¶ added in v1.3.1
func (a *ExternLib) GetLastVariable() *Variable
func (*ExternLib) GetStringMember ¶ added in v1.3.1
func (*ExternLib) GetVariable ¶ added in v1.3.0
func (*ExternLib) HasUsers ¶ added in v1.3.0
func (n *ExternLib) HasUsers() bool
has/get user and value
func (*ExternLib) RemoveUser ¶ added in v1.3.0
func (n *ExternLib) RemoveUser(u User)
func (*ExternLib) ReplaceValue ¶ added in v1.3.0
type ExtraFileAnalyzer ¶
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 Instruction) 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 { // Type Type *FunctionType // just function parameter Params []Value ParamLength int // for closure function FreeValues map[string]Value // store the captured variable form parent-function, just contain name, and type is Parameter // parameter member call // ParameterMembers []*ParameterMember ParameterMembers []Value // function side effects SideEffects []*FunctionSideEffect ChildFuncs []Value // child function within this function Return []Value // BasicBlock list Blocks []Instruction // First and End block EnterBlock Instruction ExitBlock Instruction // 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 Instruction // 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 ToFunction(n Instruction) (*Function, bool)
func (*Function) AddErrorComment ¶ added in v1.2.8
func (*Function) AddForceSideEffect ¶ added in v1.3.2
func (*Function) AddReference ¶
func (i *Function) AddReference(v Value)
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) Finish ¶
func (f *Function) Finish()
Finish the function, set FunctionType, set EnterBlock/ExitBlock
func (*Function) FirstBlockInstruction ¶ added in v1.3.0
func (f *Function) FirstBlockInstruction() []Instruction
func (*Function) ForEachMember ¶ added in v1.3.3
func (*Function) GetAllMember ¶ added in v1.3.1
func (*Function) GetAllVariables ¶ added in v1.3.0
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) GetMethodName ¶
func (*Function) GetProgram ¶ added in v1.3.0
func (*Function) GetStringMember ¶ added in v1.3.1
func (*Function) GetVariable ¶ added in v1.2.8
func (*Function) HasUsers ¶ added in v1.2.8
func (n *Function) HasUsers() bool
has/get user and value
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) RemoveUser ¶
func (n *Function) RemoveUser(u User)
func (*Function) ReturnValue ¶
func (*Function) SetGeneric ¶
func (*Function) SetMethodName ¶
type FunctionAsmFlag ¶
type FunctionAsmFlag int
const ( DisAsmDefault FunctionAsmFlag = 1 << iota DisAsmWithSource )
type FunctionBuilder ¶
type FunctionBuilder struct { *Function // disable free-value SupportClosure bool // Support obtaining static members from the StaticMember of the class's blueprint, // even if the class is not instantiated SupportGetStaticMember bool SupportClass bool RefParameter map[string]struct{} // for build CurrentBlock *BasicBlock // current block to build CurrentRange *Range // current position in source code CurrentFile string // current file name DefineFunc map[string]any MarkedFuncType *FunctionType MarkedFunctions []*Function MarkedVariable *Variable MarkedThisObject Value MarkedThisClassBlueprint *ClassBluePrint // contains filtered or unexported fields }
Function builder API
func NewBuilder ¶
func NewBuilder(editor *memedit.MemEditor, f *Function, parent *FunctionBuilder) *FunctionBuilder
func (*FunctionBuilder) AddDefer ¶
func (b *FunctionBuilder) AddDefer(call *Call)
add current function defer function
func (*FunctionBuilder) AddIncludePath ¶ added in v1.3.3
func (b *FunctionBuilder) AddIncludePath(path string)
func (*FunctionBuilder) AddLabel ¶ added in v1.2.8
func (b *FunctionBuilder) AddLabel(name string, block *BasicBlock)
for goto and label
func (FunctionBuilder) AddReference ¶
func (i FunctionBuilder) AddReference(v Value)
func (FunctionBuilder) AddVariable ¶ added in v1.3.0
func (a FunctionBuilder) AddVariable(v *Variable)
func (*FunctionBuilder) AppendBlockRange ¶
func (b *FunctionBuilder) AppendBlockRange()
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) BuildDirectoryPackage ¶ added in v1.3.3
func (b *FunctionBuilder) BuildDirectoryPackage(name []string, once bool) (*Program, error)
func (*FunctionBuilder) BuildFilePackage ¶ added in v1.3.3
func (b *FunctionBuilder) BuildFilePackage(filename string, once bool) error
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) CheckAndSetSideEffect ¶
func (f *FunctionBuilder) CheckAndSetSideEffect(variable *Variable, v Value)
func (*FunctionBuilder) Continue ¶ added in v1.3.1
func (b *FunctionBuilder) Continue() bool
func (*FunctionBuilder) CoverReflectFunctionType ¶ added in v1.2.8
func (b *FunctionBuilder) CoverReflectFunctionType(itype reflect.Type, level int) *FunctionType
func (*FunctionBuilder) CreateClassBluePrint ¶ added in v1.3.2
func (b *FunctionBuilder) CreateClassBluePrint(name string, tokenizer ...CanStartStopToken) *ClassBluePrint
CreateClassBluePrint will create object template (maybe class) in dynamic and classless language, we can create object without class but because of the 'this/super', we will still keep the concept 'Class' for ref the method/function, the blueprint is a container too, saving the static variables and util methods.
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(object, key Value) *Variable
func (*FunctionBuilder) CreateVariable ¶ added in v1.3.1
func (b *FunctionBuilder) CreateVariable(name string, pos ...CanStartStopToken) *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) 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) EmitEmptyContainer ¶
func (f *FunctionBuilder) EmitEmptyContainer() *Make
func (*FunctionBuilder) EmitErrorHandler ¶ added in v1.2.8
func (f *FunctionBuilder) EmitErrorHandler(try *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) EmitValueOnlyDeclare ¶ added in v1.3.3
func (f *FunctionBuilder) EmitValueOnlyDeclare(name string) *Undefined
func (*FunctionBuilder) Fallthrough ¶ added in v1.3.1
func (b *FunctionBuilder) Fallthrough() bool
func (FunctionBuilder) ForEachMember ¶ added in v1.3.3
func (FunctionBuilder) GetAllMember ¶ added in v1.3.1
func (FunctionBuilder) GetAllVariables ¶ added in v1.3.0
func (*FunctionBuilder) GetClassBluePrint ¶ added in v1.3.2
func (b *FunctionBuilder) GetClassBluePrint(name string) *ClassBluePrint
func (*FunctionBuilder) GetCurrentRange ¶
func (b *FunctionBuilder) GetCurrentRange(fallback CanStartStopToken) *Range
func (*FunctionBuilder) GetEditor ¶ added in v1.3.3
func (b *FunctionBuilder) GetEditor() *memedit.MemEditor
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) GetRangeByToken ¶
func (b *FunctionBuilder) GetRangeByToken(r CanStartStopToken) *Range
func (*FunctionBuilder) GetStaticMember ¶ added in v1.3.2
func (b *FunctionBuilder) GetStaticMember(class, key string) *Variable
func (FunctionBuilder) GetStringMember ¶ added in v1.3.1
func (FunctionBuilder) GetVariable ¶ added in v1.2.8
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) IsParentFunctionVariable ¶ added in v1.3.1
func (b *FunctionBuilder) IsParentFunctionVariable(v *Variable) bool
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, pos ...CanStartStopToken) *Parameter
func (*FunctionBuilder) NewParameterMember ¶ added in v1.3.3
func (f *FunctionBuilder) NewParameterMember(name string, obj *Parameter, key Value) *ParameterMember
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) ReferenceParameter ¶ added in v1.3.2
func (b *FunctionBuilder) ReferenceParameter(name string)
func (FunctionBuilder) RemoveUser ¶ added in v1.2.8
func (n FunctionBuilder) RemoveUser(u User)
func (*FunctionBuilder) SetClassBluePrint ¶
func (b *FunctionBuilder) SetClassBluePrint(name string, class *ClassBluePrint)
func (*FunctionBuilder) SetCurrent ¶ added in v1.2.8
func (f *FunctionBuilder) SetCurrent(i Instruction, noChangeRanges ...bool) func()
func (*FunctionBuilder) SetEditor ¶ added in v1.3.3
func (b *FunctionBuilder) SetEditor(editor *memedit.MemEditor)
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) SetRange ¶ added in v1.3.0
func (b *FunctionBuilder) SetRange(token CanStartStopToken) func()
func (*FunctionBuilder) SetRangeFromTerminalNode ¶ added in v1.3.3
func (b *FunctionBuilder) SetRangeFromTerminalNode(node antlr.TerminalNode) func()
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) WithExternBuildValueHandler ¶
func (b *FunctionBuilder) WithExternBuildValueHandler(m map[string]func(b *FunctionBuilder, id string, v any) (value Value))
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 FunctionSideEffect ¶ added in v1.3.1
type FunctionSideEffect struct { Name string VerboseName string Modify Value // only call-side Scope > this Scope-level, this side-effect can be create // Scope *Scope Variable *Variable // contains filtered or unexported fields }
FunctionSideEffect is a side-effect in a closure
type FunctionType ¶ added in v1.2.8
type FunctionType struct { Name string This *Function ReturnType Type ReturnValue []*Return Parameter Types ParameterLen int ParameterValue []*Parameter FreeValue []*Parameter ParameterMember []*ParameterMember SideEffects []*FunctionSideEffect IsVariadic bool IsMethod bool ObjectType Type IsModifySelf bool // if this is method function AnnotationFunc []func(Value) // contains filtered or unexported fields }
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) AddAnnotationFunc ¶
func (f *FunctionType) AddAnnotationFunc(handler ...func(Value))
func (*FunctionType) AddMethod ¶ added in v1.2.9
func (b *FunctionType) AddMethod(id string, f *Function)
func (*FunctionType) GetMethod ¶ added in v1.2.8
func (f *FunctionType) GetMethod() map[string]*Function
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]*Function)
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 []*FunctionSideEffect)
func (*FunctionType) String ¶ added in v1.2.8
func (s *FunctionType) String() string
type GenericType ¶
type GenericType struct {
// contains filtered or unexported fields
}
====================== generic type
func NewGenericType ¶
func NewGenericType(symbol string) *GenericType
func (*GenericType) AddMethod ¶
func (b *GenericType) AddMethod(id string, f *Function)
func (*GenericType) GetMethod ¶
func (c *GenericType) GetMethod() map[string]*Function
func (*GenericType) GetTypeKind ¶
func (c *GenericType) GetTypeKind() TypeKind
func (GenericType) PkgPathString ¶
func (c GenericType) PkgPathString() string
func (GenericType) RawString ¶
func (c GenericType) RawString() string
func (*GenericType) SetMethod ¶
func (c *GenericType) SetMethod(m map[string]*Function)
func (GenericType) String ¶
func (c GenericType) String() string
type If ¶
----------- 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 ToIfInstruction ¶
func ToIfInstruction(n Instruction) (*If, bool)
func (*If) AddFalse ¶
func (i *If) AddFalse(f *BasicBlock)
func (*If) AddTrue ¶
func (i *If) AddTrue(t *BasicBlock)
func (*If) GetBlock ¶
func (a *If) GetBlock() *BasicBlock
func (*If) GetProgram ¶ added in v1.3.0
func (a *If) GetProgram() *Program
func (*If) GetShortVerboseName ¶ added in v1.3.2
func (i *If) GetShortVerboseName() string
func (*If) GetSiblings ¶
func (*If) GetSourceCode ¶ added in v1.3.3
func (v *If) GetSourceCode() string
func (*If) GetSourceCodeContext ¶ added in v1.3.3
func (*If) GetVerboseName ¶ added in v1.3.1
func (i *If) GetVerboseName() string
func (*If) IsAnnotation ¶
func (a *If) IsAnnotation() bool
func (*If) IsCFGEnterBlock ¶
func (i *If) IsCFGEnterBlock() ([]Instruction, bool)
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) Self ¶
func (i *If) Self() Instruction
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) SetIsAnnotation ¶
func (a *If) SetIsAnnotation(b bool)
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 GetShortVerboseName() string SetVerboseName(string) SetIsAnnotation(bool) IsAnnotation() bool GetIdIF SetId(int64) // position GetRange() *Range SetRange(*Range) GetSourceCode() string GetSourceCodeContext(n int) string // extern IsExtern() bool SetExtern(bool) SelfDelete() IsBlock(string) bool IsCFGEnterBlock() ([]Instruction, bool) // Self means lazy instruction will check and return // real instruction will return itself Self() Instruction // IsLazy means this instruction is lazy, not loaded all from db IsLazy() bool }
func CreateInstruction ¶ added in v1.3.3
func CreateInstruction(op Opcode) Instruction
func MatchInstructionByExact ¶
func MatchInstructionByExact(prog *Program, mod int, e string) []Instruction
func MatchInstructionByGlob ¶
func MatchInstructionByGlob(prog *Program, mod int, g string) []Instruction
GetByVariableGlob means get variable name(glob).
func MatchInstructionByRegexp ¶
func MatchInstructionByRegexp(prog *Program, mod int, r string) []Instruction
GetByVariableRegexp will filter Instruction via variable regexp name
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 *Function)
func (*InterfaceType) GetMethod ¶ added in v1.2.8
func (i *InterfaceType) GetMethod() map[string]*Function
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]*Function)
func (*InterfaceType) String ¶
func (i *InterfaceType) String() string
type Jump ¶
type Jump struct { To Value // 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) GetBlock ¶
func (a *Jump) GetBlock() *BasicBlock
func (*Jump) GetProgram ¶ added in v1.3.0
func (a *Jump) GetProgram() *Program
func (*Jump) GetShortVerboseName ¶ added in v1.3.2
func (i *Jump) GetShortVerboseName() string
func (*Jump) GetSourceCode ¶ added in v1.3.3
func (v *Jump) GetSourceCode() string
func (*Jump) GetSourceCodeContext ¶ added in v1.3.3
func (*Jump) GetVerboseName ¶ added in v1.3.1
func (i *Jump) GetVerboseName() string
func (*Jump) IsAnnotation ¶
func (a *Jump) IsAnnotation() bool
func (*Jump) IsCFGEnterBlock ¶
func (i *Jump) IsCFGEnterBlock() ([]Instruction, bool)
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) Self ¶
func (i *Jump) Self() Instruction
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) SetIsAnnotation ¶
func (a *Jump) SetIsAnnotation(b bool)
func (*Jump) SetVerboseName ¶ added in v1.3.1
func (i *Jump) SetVerboseName(verbose string)
type LazyInstruction ¶ added in v1.3.3
type LazyInstruction struct { Instruction Value User Modify bool // contains filtered or unexported fields }
func ToLazyInstruction ¶ added in v1.3.3
func ToLazyInstruction(n any) (*LazyInstruction, bool)
func (*LazyInstruction) AddMask ¶ added in v1.3.3
func (lz *LazyInstruction) AddMask(v Value)
func (*LazyInstruction) AddMember ¶ added in v1.3.3
func (lz *LazyInstruction) AddMember(v1 Value, v2 Value)
func (*LazyInstruction) AddReference ¶
func (lz *LazyInstruction) AddReference(v Value)
func (*LazyInstruction) AddVariable ¶ added in v1.3.3
func (lz *LazyInstruction) AddVariable(v *Variable)
func (*LazyInstruction) DeleteMember ¶ added in v1.3.3
func (lz *LazyInstruction) DeleteMember(v Value)
func (*LazyInstruction) ForEachMember ¶ added in v1.3.3
func (lz *LazyInstruction) ForEachMember(fn func(Value, Value) bool)
func (*LazyInstruction) GetAllMember ¶ added in v1.3.3
func (lz *LazyInstruction) GetAllMember() map[Value]Value
func (*LazyInstruction) GetAllVariables ¶ added in v1.3.3
func (lz *LazyInstruction) GetAllVariables() map[string]*Variable
func (*LazyInstruction) GetBlock ¶ added in v1.3.3
func (lz *LazyInstruction) GetBlock() *BasicBlock
func (*LazyInstruction) GetFunc ¶ added in v1.3.3
func (lz *LazyInstruction) GetFunc() *Function
func (*LazyInstruction) GetId ¶ added in v1.3.3
func (lz *LazyInstruction) GetId() int64
just use lazy instruction
func (*LazyInstruction) GetIndexMember ¶ added in v1.3.3
func (lz *LazyInstruction) GetIndexMember(i int) (Value, bool)
func (*LazyInstruction) GetKey ¶ added in v1.3.3
func (lz *LazyInstruction) GetKey() Value
func (*LazyInstruction) GetLastVariable ¶ added in v1.3.3
func (lz *LazyInstruction) GetLastVariable() *Variable
func (*LazyInstruction) GetMask ¶ added in v1.3.3
func (lz *LazyInstruction) GetMask() []Value
func (*LazyInstruction) GetMember ¶ added in v1.3.3
func (lz *LazyInstruction) GetMember(v Value) (Value, bool)
func (*LazyInstruction) GetName ¶ added in v1.3.3
func (lz *LazyInstruction) GetName() string
just use IrCode
func (*LazyInstruction) GetObject ¶ added in v1.3.3
func (lz *LazyInstruction) GetObject() Value
func (*LazyInstruction) GetOpcode ¶ added in v1.3.3
func (lz *LazyInstruction) GetOpcode() Opcode
func (*LazyInstruction) GetProgram ¶ added in v1.3.3
func (lz *LazyInstruction) GetProgram() *Program
func (*LazyInstruction) GetRange ¶ added in v1.3.3
func (lz *LazyInstruction) GetRange() *Range
func (*LazyInstruction) GetShortVerboseName ¶ added in v1.3.3
func (lz *LazyInstruction) GetShortVerboseName() string
func (*LazyInstruction) GetSourceCode ¶ added in v1.3.3
func (lz *LazyInstruction) GetSourceCode() string
func (*LazyInstruction) GetSourceCodeContext ¶ added in v1.3.3
func (lz *LazyInstruction) GetSourceCodeContext(n int) string
func (*LazyInstruction) GetStringMember ¶ added in v1.3.3
func (lz *LazyInstruction) GetStringMember(n string) (Value, bool)
func (*LazyInstruction) GetType ¶ added in v1.3.3
func (lz *LazyInstruction) GetType() Type
func (*LazyInstruction) GetUsers ¶ added in v1.3.3
func (lz *LazyInstruction) GetUsers() Users
func (*LazyInstruction) GetValues ¶ added in v1.3.3
func (lz *LazyInstruction) GetValues() Values
func (*LazyInstruction) GetVariable ¶ added in v1.3.3
func (lz *LazyInstruction) GetVariable(n string) *Variable
func (*LazyInstruction) GetVerboseName ¶ added in v1.3.3
func (lz *LazyInstruction) GetVerboseName() string
func (*LazyInstruction) HasUsers ¶ added in v1.3.3
func (lz *LazyInstruction) HasUsers() bool
func (*LazyInstruction) HasValues ¶ added in v1.3.3
func (lz *LazyInstruction) HasValues() bool
func (*LazyInstruction) IsAnnotation ¶
func (lz *LazyInstruction) IsAnnotation() bool
func (*LazyInstruction) IsBlock ¶
func (lz *LazyInstruction) IsBlock(name string) bool
func (*LazyInstruction) IsCFGEnterBlock ¶
func (lz *LazyInstruction) IsCFGEnterBlock() ([]Instruction, bool)
func (*LazyInstruction) IsExtern ¶ added in v1.3.3
func (lz *LazyInstruction) IsExtern() bool
func (*LazyInstruction) IsLazy ¶
func (lz *LazyInstruction) IsLazy() bool
func (*LazyInstruction) IsMember ¶ added in v1.3.3
func (lz *LazyInstruction) IsMember() bool
func (*LazyInstruction) IsObject ¶ added in v1.3.3
func (lz *LazyInstruction) IsObject() bool
func (*LazyInstruction) IsUndefined ¶ added in v1.3.3
func (lz *LazyInstruction) IsUndefined() bool
func (*LazyInstruction) Masked ¶ added in v1.3.3
func (lz *LazyInstruction) Masked() bool
func (*LazyInstruction) NewError ¶ added in v1.3.3
func (lz *LazyInstruction) NewError(e ErrorKind, t ErrorTag, msg string)
func (*LazyInstruction) Reference ¶
func (lz *LazyInstruction) Reference() Values
func (*LazyInstruction) ReplaceValue ¶ added in v1.3.3
func (lz *LazyInstruction) ReplaceValue(v1, v2 Value)
func (*LazyInstruction) Self ¶ added in v1.3.3
func (lz *LazyInstruction) Self() Instruction
func (*LazyInstruction) SelfDelete ¶ added in v1.3.3
func (lz *LazyInstruction) SelfDelete()
func (*LazyInstruction) SetBlock ¶ added in v1.3.3
func (lz *LazyInstruction) SetBlock(b *BasicBlock)
func (*LazyInstruction) SetExtern ¶ added in v1.3.3
func (lz *LazyInstruction) SetExtern(extern bool)
func (*LazyInstruction) SetFunc ¶ added in v1.3.3
func (lz *LazyInstruction) SetFunc(f *Function)
func (*LazyInstruction) SetId ¶ added in v1.3.3
func (lz *LazyInstruction) SetId(id int64)
func (*LazyInstruction) SetIsAnnotation ¶
func (lz *LazyInstruction) SetIsAnnotation(b bool)
func (*LazyInstruction) SetKey ¶ added in v1.3.3
func (lz *LazyInstruction) SetKey(v Value)
func (*LazyInstruction) SetName ¶ added in v1.3.3
func (lz *LazyInstruction) SetName(name string)
func (*LazyInstruction) SetObject ¶ added in v1.3.3
func (lz *LazyInstruction) SetObject(v Value)
func (*LazyInstruction) SetRange ¶ added in v1.3.3
func (lz *LazyInstruction) SetRange(r *Range)
func (*LazyInstruction) SetType ¶ added in v1.3.3
func (lz *LazyInstruction) SetType(t Type)
func (*LazyInstruction) SetVerboseName ¶ added in v1.3.3
func (lz *LazyInstruction) SetVerboseName(name string)
func (*LazyInstruction) ShouldSave ¶ added in v1.3.3
func (lz *LazyInstruction) ShouldSave() bool
func (*LazyInstruction) String ¶ added in v1.3.3
func (lz *LazyInstruction) String() string
type LazyScope ¶
type LazyScope struct {
// contains filtered or unexported fields
}
func (*LazyScope) AssignVariable ¶
func (l *LazyScope) AssignVariable(v ssautil.VersionedIF[Value], t Value)
func (*LazyScope) Compare ¶
func (l *LazyScope) Compare(s ssautil.ScopedVersionedTableIF[Value]) bool
func (*LazyScope) CreateSubScope ¶
func (l *LazyScope) CreateSubScope() ssautil.ScopedVersionedTableIF[Value]
func (*LazyScope) CreateVariable ¶
func (*LazyScope) ForEachCapturedVariable ¶
func (l *LazyScope) ForEachCapturedVariable(c ssautil.CaptureVariableHandler[Value])
func (*LazyScope) GetPersistentId ¶
func (*LazyScope) GetPersistentProgramName ¶
func (*LazyScope) GetScopeLevel ¶
func (*LazyScope) GetVariableFromValue ¶
func (l *LazyScope) GetVariableFromValue(t Value) ssautil.VersionedIF[Value]
func (*LazyScope) IsSameOrSubScope ¶
func (l *LazyScope) IsSameOrSubScope(s ssautil.ScopedVersionedTableIF[Value]) bool
func (*LazyScope) Merge ¶
func (l *LazyScope) Merge(b bool, m ssautil.MergeHandle[Value], s ...ssautil.ScopedVersionedTableIF[Value])
func (*LazyScope) ReadVariable ¶
func (l *LazyScope) ReadVariable(name string) ssautil.VersionedIF[Value]
func (*LazyScope) SaveToDatabase ¶
func (*LazyScope) SetCapturedVariable ¶
func (l *LazyScope) SetCapturedVariable(s string, v ssautil.VersionedIF[Value])
func (*LazyScope) SetParent ¶
func (l *LazyScope) SetParent(s ssautil.ScopedVersionedTableIF[Value])
func (*LazyScope) SetPersistentId ¶
func (*LazyScope) SetPersistentNode ¶
func (l *LazyScope) SetPersistentNode(node *ssadb.IrScopeNode)
func (*LazyScope) Spin ¶
func (l *LazyScope) Spin(s ssautil.ScopedVersionedTableIF[Value], s2 ssautil.ScopedVersionedTableIF[Value], s3 ssautil.SpinHandle[Value])
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) GetBlock ¶ added in v1.2.8
func (a *Loop) GetBlock() *BasicBlock
func (*Loop) GetProgram ¶ added in v1.3.0
func (a *Loop) GetProgram() *Program
func (*Loop) GetShortVerboseName ¶ added in v1.3.2
func (i *Loop) GetShortVerboseName() string
func (*Loop) GetSourceCode ¶ added in v1.3.3
func (v *Loop) GetSourceCode() string
func (*Loop) GetSourceCodeContext ¶ added in v1.3.3
func (*Loop) GetVerboseName ¶ added in v1.3.1
func (i *Loop) GetVerboseName() string
func (*Loop) IsAnnotation ¶
func (a *Loop) IsAnnotation() bool
func (*Loop) IsCFGEnterBlock ¶
func (i *Loop) IsCFGEnterBlock() ([]Instruction, bool)
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) Self ¶
func (i *Loop) Self() Instruction
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) SetIsAnnotation ¶
func (a *Loop) SetIsAnnotation(b bool)
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) AddReference ¶
func (i *Make) AddReference(v Value)
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) ForEachMember ¶ added in v1.3.3
func (*Make) GetAllMember ¶ added in v1.3.1
func (*Make) GetAllVariables ¶ added in v1.3.0
func (*Make) GetIndexMember ¶ added in v1.3.1
func (*Make) GetLastVariable ¶ added in v1.3.1
func (a *Make) GetLastVariable() *Variable
func (*Make) GetStringMember ¶ added in v1.3.1
func (*Make) GetVariable ¶ added in v1.2.8
func (*Make) RemoveUser ¶ added in v1.2.8
func (n *Make) RemoveUser(u User)
func (*Make) ReplaceValue ¶ added in v1.2.8
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 ForEachMember(func(k Value, v Value) bool) // member, member callee IsMember() bool SetObject(Value) SetKey(Value) GetKey() Value GetObject() Value }
type MethodBuilder ¶ added in v1.2.9
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 Instruction) 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) AddReference ¶
func (i *Next) AddReference(v Value)
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) ForEachMember ¶ added in v1.3.3
func (*Next) GetAllMember ¶ added in v1.3.1
func (*Next) GetAllVariables ¶ added in v1.3.0
func (*Next) GetIndexMember ¶ added in v1.3.1
func (*Next) GetLastVariable ¶ added in v1.3.1
func (a *Next) GetLastVariable() *Variable
func (*Next) GetStringMember ¶ added in v1.3.1
func (*Next) GetVariable ¶ added in v1.2.8
func (*Next) RemoveUser ¶ added in v1.2.8
func (n *Next) RemoveUser(u User)
func (*Next) ReplaceValue ¶ added in v1.2.8
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 *Function)
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]*Function
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]*Function)
func (*ObjectType) SetName ¶ added in v1.2.8
func (i *ObjectType) SetName(name string)
func (*ObjectType) SetPkgPath ¶ added in v1.3.3
func (i *ObjectType) SetPkgPath(pkg 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 OffsetItem ¶ added in v1.3.3
type OffsetItem struct {
// contains filtered or unexported fields
}
func (*OffsetItem) GetValue ¶ added in v1.3.3
func (item *OffsetItem) GetValue() Value
func (*OffsetItem) GetVariable ¶ added in v1.3.3
func (item *OffsetItem) GetVariable() *Variable
type Opcode ¶ added in v1.2.8
type Opcode int
const ( SSAOpcodeUnKnow Opcode = iota SSAOpcodeAssert SSAOpcodeBasicBlock SSAOpcodeBinOp SSAOpcodeCall SSAOpcodeConstInst SSAOpcodeErrorHandler SSAOpcodeExternLib SSAOpcodeIf SSAOpcodeJump SSAOpcodeLoop SSAOpcodeMake SSAOpcodeNext SSAOpcodePanic SSAOpcodeParameter SSAOpcodeFreeValue SSAOpcodeParameterMember SSAOpcodePhi SSAOpcodeRecover SSAOpcodeReturn SSAOpcodeSideEffect SSAOpcodeSwitch SSAOpcodeTypeCast SSAOpcodeTypeValue SSAOpcodeUnOp SSAOpcodeUndefined SSAOpcodeFunction )
type OrType ¶
type OrType struct {
// contains filtered or unexported fields
}
====================== or type
func (*OrType) GetTypeKind ¶
func (OrType) PkgPathString ¶
type Panic ¶ added in v1.2.8
type Panic struct { Info Value // contains filtered or unexported fields }
-------------- PANIC
func (*Panic) AddReference ¶
func (i *Panic) AddReference(v Value)
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) ForEachMember ¶ added in v1.3.3
func (*Panic) GetAllMember ¶ added in v1.3.1
func (*Panic) GetAllVariables ¶ added in v1.3.0
func (*Panic) GetIndexMember ¶ added in v1.3.1
func (*Panic) GetLastVariable ¶ added in v1.3.1
func (a *Panic) GetLastVariable() *Variable
func (*Panic) GetStringMember ¶ added in v1.3.1
func (*Panic) GetVariable ¶ added in v1.2.8
func (*Panic) RemoveUser ¶ added in v1.2.8
func (n *Panic) RemoveUser(u User)
func (*Panic) ReplaceValue ¶ added in v1.2.8
type Parameter ¶
type Parameter struct { // for FreeValue IsFreeValue bool // Parameter Index FormalParameterIndex int // contains filtered or unexported fields }
----------- Parameter
func NewParam ¶ added in v1.2.8
func NewParam(variable string, isFreeValue bool, builder *FunctionBuilder) *Parameter
func ToFreeValue ¶ added in v1.3.3
func ToParameter ¶ added in v1.2.8
func ToParameter(v Instruction) (*Parameter, bool)
func (*Parameter) AddReference ¶
func (i *Parameter) AddReference(v Value)
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) ForEachMember ¶ added in v1.3.3
func (*Parameter) GetAllMember ¶ added in v1.3.1
func (*Parameter) GetAllVariables ¶ added in v1.3.0
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) GetStringMember ¶ added in v1.3.1
func (*Parameter) GetVariable ¶ added in v1.2.8
func (*Parameter) HasUsers ¶ added in v1.2.8
func (n *Parameter) HasUsers() bool
has/get user and value
func (*Parameter) RemoveUser ¶
func (n *Parameter) RemoveUser(u User)
func (*Parameter) SetDefault ¶ added in v1.2.8
type ParameterMember ¶ added in v1.3.3
type ParameterMember struct { FormalParameterIndex int // contains filtered or unexported fields }
func NewParamMember ¶ added in v1.3.3
func NewParamMember(variable string, builder *FunctionBuilder, obj *Parameter, key Value) *ParameterMember
func ToParameterMember ¶
func ToParameterMember(v Instruction) (*ParameterMember, bool)
func (*ParameterMember) AddReference ¶
func (i *ParameterMember) AddReference(v Value)
func (*ParameterMember) AddUser ¶ added in v1.3.3
func (n *ParameterMember) AddUser(u User)
for Value
func (*ParameterMember) AddVariable ¶ added in v1.3.3
func (a *ParameterMember) AddVariable(v *Variable)
func (*ParameterMember) DeleteMember ¶ added in v1.3.3
func (n *ParameterMember) DeleteMember(k Value)
func (*ParameterMember) ForEachMember ¶ added in v1.3.3
func (*ParameterMember) GetAllMember ¶ added in v1.3.3
func (*ParameterMember) GetAllVariables ¶ added in v1.3.3
func (*ParameterMember) GetIndexMember ¶ added in v1.3.3
func (*ParameterMember) GetLastVariable ¶ added in v1.3.3
func (a *ParameterMember) GetLastVariable() *Variable
func (*ParameterMember) GetOpcode ¶ added in v1.3.3
func (i *ParameterMember) GetOpcode() Opcode
func (*ParameterMember) GetStringMember ¶ added in v1.3.3
func (*ParameterMember) GetType ¶ added in v1.3.3
func (n *ParameterMember) GetType() Type
for Value : type
func (*ParameterMember) GetValues ¶ added in v1.3.3
func (p *ParameterMember) GetValues() Values
func (*ParameterMember) GetVariable ¶ added in v1.3.3
func (*ParameterMember) HasUsers ¶ added in v1.3.3
func (n *ParameterMember) HasUsers() bool
has/get user and value
func (*ParameterMember) HasValues ¶ added in v1.3.3
func (p *ParameterMember) HasValues() bool
func (*ParameterMember) RemoveUser ¶ added in v1.3.3
func (n *ParameterMember) RemoveUser(u User)
func (*ParameterMember) String ¶ added in v1.3.3
func (p *ParameterMember) String() string
----------- Parameter
type ParameterMemberCallKind ¶ added in v1.3.3
type ParameterMemberCallKind int
const ( NoMemberCall ParameterMemberCallKind = iota ParameterMemberCall FreeValueMemberCall )
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 ScopeIF) *ParentScope
type Phi ¶
type Phi struct { CFGEntryBasicBlock Value Edge []Value // edge[i] from phi.Block.Preds[i] // contains filtered or unexported fields }
----------- Phi
func NewPhi ¶
func NewPhi(block *BasicBlock, variable string) *Phi
func ToPhi ¶ added in v1.2.8
func ToPhi(v Instruction) (*Phi, bool)
func (*Phi) AddReference ¶
func (i *Phi) AddReference(v Value)
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) ForEachMember ¶ added in v1.3.3
func (*Phi) GetAllMember ¶ added in v1.3.1
func (*Phi) GetAllVariables ¶ added in v1.3.0
func (*Phi) GetControlFlowConditions ¶
func (*Phi) GetIndexMember ¶ added in v1.3.1
func (*Phi) GetLastVariable ¶ added in v1.3.1
func (a *Phi) GetLastVariable() *Variable
func (*Phi) GetStringMember ¶ added in v1.3.1
func (*Phi) GetVariable ¶ added in v1.2.8
func (*Phi) RemoveUser ¶
func (n *Phi) RemoveUser(u User)
func (*Phi) ReplaceValue ¶
type Position ¶
func NewPosition ¶ added in v1.3.0
type Program ¶
type Program struct { // package list Name string Version string ProgramKind ProgramKind // is library or application // from pom.xml file SCAPackages []*dxtypes.Package ExtraFile map[string]string // filename and data Application *Program // current Application // program relationship DownStream map[string]*Program UpStream map[string]*Program EnableDatabase bool // for compile, whether use database FileList map[string]string // file-name and file hash Cache *Cache // function list Funcs map[string]*Function // class blue print ClassBluePrint map[string]*ClassBluePrint // offset OffsetMap map[int]*OffsetItem OffsetSortedSlice []int // package Loader Loader *ssautil.PackageFileLoader Build Build ExternInstance map[string]any ExternLib map[string]map[string]any // contains filtered or unexported fields }
both instruction and value
func GetProgram ¶
func GetProgram(program string, kind ProgramKind) (*Program, error)
func NewProgram ¶
func NewProgram(ProgramName string, enableDatabase bool, kind ProgramKind, fs filesys.FileSystem, programPath string) *Program
func NewProgramFromDB ¶
func (*Program) BuildValueFromAny ¶ added in v1.3.3
func (prog *Program) BuildValueFromAny(b *FunctionBuilder, id string, v any) (value Value)
func (*Program) CoverReflectFunctionType ¶ added in v1.3.3
func (prog *Program) CoverReflectFunctionType(itype reflect.Type, level int) *FunctionType
func (*Program) DeleteInstruction ¶ added in v1.3.0
func (p *Program) DeleteInstruction(inst Instruction)
func (*Program) EachFunction ¶ added in v1.3.0
func (*Program) ForceSetOffsetValue ¶
func (*Program) GetAndCreateFunction ¶ added in v1.3.3
func (*Program) GetAndCreateFunctionBuilder ¶ added in v1.3.3
func (prog *Program) GetAndCreateFunctionBuilder(pkgName string, funcName string) *FunctionBuilder
create or get main function builder
func (*Program) GetCacheExternInstance ¶
func (*Program) GetClassBluePrint ¶
func (pkg *Program) GetClassBluePrint(name string) *ClassBluePrint
func (*Program) GetCurrentEditor ¶
func (*Program) GetFrontValueByOffset ¶ added in v1.3.3
func (*Program) GetFunction ¶
func (*Program) GetIncludeFiles ¶ added in v1.3.3
func (*Program) GetInstructionById ¶ added in v1.3.0
func (p *Program) GetInstructionById(id int64) Instruction
func (*Program) GetProgramName ¶ added in v1.3.3
func (*Program) NewFunction ¶
func (*Program) NewFunctionWithParent ¶
func (*Program) PushEditor ¶ added in v1.3.3
func (*Program) RemoveInstructionInVariable ¶ added in v1.3.2
func (p *Program) RemoveInstructionInVariable(name string, i Instruction)
func (*Program) SearchIndexAndOffsetByOffset ¶ added in v1.3.3
func (*Program) SetCacheExternInstance ¶
func (*Program) SetInstructionWithName ¶ added in v1.3.0
func (p *Program) SetInstructionWithName(name string, i Instruction)
func (*Program) SetOffsetValue ¶ added in v1.3.3
func (*Program) SetOffsetValueEx ¶
func (*Program) SetOffsetVariable ¶ added in v1.3.3
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) ShowOffsetMap ¶ added in v1.3.3
func (prog *Program) ShowOffsetMap()
func (*Program) ShowWithSource ¶
func (p *Program) ShowWithSource()
func (*Program) TryBuildExternValue ¶ added in v1.3.3
func (prog *Program) TryBuildExternValue(b *FunctionBuilder, id string) Value
func (*Program) TryGetSimilarityKey ¶ added in v1.3.3
type ProgramKind ¶
type ProgramKind string
const ( Application ProgramKind = "application" Library = "library" )
type Range ¶ added in v1.3.0
type Range struct {
// contains filtered or unexported fields
}
func GetRange ¶ added in v1.3.3
func GetRange(editor *memedit.MemEditor, token CanStartStopToken) *Range
func NewRange ¶ added in v1.3.0
func NewRange(editor *memedit.MemEditor, startIf, endIf memedit.PositionIf) *Range
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
func (*Range) GetEnd ¶ added in v1.3.3
func (r *Range) GetEnd() memedit.PositionIf
func (*Range) GetEndOffset ¶ added in v1.3.3
func (*Range) GetOffsetRange ¶ added in v1.3.3
func (*Range) GetStart ¶ added in v1.3.3
func (r *Range) GetStart() memedit.PositionIf
func (*Range) GetTextContext ¶ added in v1.3.3
func (*Range) GetTextContextWithPrompt ¶
func (*Range) GetWordText ¶ added in v1.3.3
type Recover ¶ added in v1.2.8
type Recover struct {
// contains filtered or unexported fields
}
--------------- RECOVER
func (*Recover) AddReference ¶
func (i *Recover) AddReference(v Value)
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) ForEachMember ¶ added in v1.3.3
func (*Recover) GetAllMember ¶ added in v1.3.1
func (*Recover) GetAllVariables ¶ added in v1.3.0
func (*Recover) GetIndexMember ¶ added in v1.3.1
func (*Recover) GetLastVariable ¶ added in v1.3.1
func (a *Recover) GetLastVariable() *Variable
func (*Recover) GetStringMember ¶ added in v1.3.1
func (*Recover) GetVariable ¶ added in v1.2.8
func (*Recover) RemoveUser ¶ added in v1.2.8
func (n *Recover) RemoveUser(u User)
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 ToReturn ¶ added in v1.3.3
func ToReturn(v Instruction) (*Return, bool)
func (*Return) AddReference ¶
func (i *Return) AddReference(v Value)
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) ForEachMember ¶ added in v1.3.3
func (*Return) GetAllMember ¶ added in v1.3.1
func (*Return) GetAllVariables ¶ added in v1.3.0
func (*Return) GetIndexMember ¶ added in v1.3.1
func (*Return) GetLastVariable ¶ added in v1.3.1
func (a *Return) GetLastVariable() *Variable
func (*Return) GetStringMember ¶ added in v1.3.1
func (*Return) GetVariable ¶ added in v1.2.8
func (*Return) RemoveUser ¶ added in v1.2.9
func (n *Return) RemoveUser(u User)
func (*Return) ReplaceValue ¶
type ScopeIF ¶ added in v1.3.1
type ScopeIF ssautil.ScopedVersionedTableIF[Value]
type ScopeInstance ¶
type ScopeInstance struct { *ssautil.ScopedVersionedTable[Value] }
func GetScopeFromIrScopeId ¶ added in v1.3.3
func GetScopeFromIrScopeId(i int64) *ScopeInstance
func NewScope ¶ added in v1.3.0
func NewScope(name string) *ScopeInstance
func (*ScopeInstance) CreateSubScope ¶
func (s *ScopeInstance) CreateSubScope() ssautil.ScopedVersionedTableIF[Value]
type SideEffect ¶ added in v1.2.9
type SideEffect struct { CallSite Value // 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) AddReference ¶
func (i *SideEffect) AddReference(v Value)
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) ForEachMember ¶ added in v1.3.3
func (*SideEffect) GetAllMember ¶ added in v1.3.1
func (*SideEffect) GetAllVariables ¶ added in v1.3.0
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) 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) 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) 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) 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) GetBlock ¶
func (a *Switch) GetBlock() *BasicBlock
func (*Switch) GetProgram ¶ added in v1.3.0
func (a *Switch) GetProgram() *Program
func (*Switch) GetShortVerboseName ¶ added in v1.3.2
func (i *Switch) GetShortVerboseName() string
func (*Switch) GetSourceCode ¶ added in v1.3.3
func (v *Switch) GetSourceCode() string
func (*Switch) GetSourceCodeContext ¶ added in v1.3.3
func (*Switch) GetVerboseName ¶ added in v1.3.1
func (i *Switch) GetVerboseName() string
func (*Switch) IsAnnotation ¶
func (a *Switch) IsAnnotation() bool
func (*Switch) IsCFGEnterBlock ¶
func (i *Switch) IsCFGEnterBlock() ([]Instruction, bool)
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) Self ¶
func (i *Switch) Self() Instruction
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) SetIsAnnotation ¶
func (a *Switch) SetIsAnnotation(b bool)
func (*Switch) SetVerboseName ¶ added in v1.3.1
func (i *Switch) SetVerboseName(verbose string)
type SwitchBuilder ¶ added in v1.2.8
type SwitchBuilder struct { AutoBreak 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) BuildErrorCatch ¶
func (t *TryBuilder) BuildErrorCatch(err func() string, catch func())
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 // string contain inner information GetTypeKind() TypeKind // type kind // set/get method, method is a function SetMethod(map[string]*Function) AddMethod(string, *Function) GetMethod() map[string]*Function }
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 GetByteType ¶
func GetByteType() Type
func GetBytesType ¶ added in v1.3.0
func GetBytesType() Type
func GetErrorType ¶ added in v1.3.0
func GetErrorType() Type
func GetGenericTypeFromType ¶
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 GetTypeFromDB ¶
func GetUndefinedType ¶ added in v1.3.0
func GetUndefinedType() Type
func ParseClassBluePrint ¶ added in v1.3.2
func ParseClassBluePrint(this Value, objectTyp *ObjectType) (ret Type)
ParseClassBluePrint parse get classBluePrint if the ObjectType is a ClassFactor
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) AddReference ¶
func (i *TypeCast) AddReference(v Value)
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) ForEachMember ¶ added in v1.3.3
func (*TypeCast) GetAllMember ¶ added in v1.3.1
func (*TypeCast) GetAllVariables ¶ added in v1.3.0
func (*TypeCast) GetIndexMember ¶ added in v1.3.1
func (*TypeCast) GetLastVariable ¶ added in v1.3.1
func (a *TypeCast) GetLastVariable() *Variable
func (*TypeCast) GetStringMember ¶ added in v1.3.1
func (*TypeCast) GetVariable ¶ added in v1.2.8
func (*TypeCast) HasUsers ¶ added in v1.2.8
func (n *TypeCast) HasUsers() bool
has/get user and value
func (*TypeCast) RemoveUser ¶ added in v1.2.8
func (n *TypeCast) RemoveUser(u User)
func (*TypeCast) ReplaceValue ¶ added in v1.2.8
type TypeKind ¶
type TypeKind int
TypeKind is a Kind of ssa.type
const ( // NumberTypeKind is all number type, int*/uint*/float/double/complex 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 ClassBluePrintTypeKind GenericTypeKind ByteTypeKind OrTypeKind )
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) AddReference ¶
func (i *TypeValue) AddReference(v Value)
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) ForEachMember ¶ added in v1.3.3
func (*TypeValue) GetAllMember ¶ added in v1.3.1
func (*TypeValue) GetAllVariables ¶ added in v1.3.0
func (*TypeValue) GetIndexMember ¶ added in v1.3.1
func (*TypeValue) GetLastVariable ¶ added in v1.3.1
func (a *TypeValue) GetLastVariable() *Variable
func (*TypeValue) GetStringMember ¶ added in v1.3.1
func (*TypeValue) GetVariable ¶ added in v1.2.8
func (*TypeValue) HasUsers ¶ added in v1.2.8
func (n *TypeValue) HasUsers() bool
has/get user and value
func (*TypeValue) RemoveUser ¶ added in v1.2.8
func (n *TypeValue) RemoveUser(u User)
type Types ¶
type Types []Type
type UnOp ¶
type UnOp struct { Op UnaryOpcode X Value // contains filtered or unexported fields }
func NewUnOp ¶ added in v1.2.8
func NewUnOp(op UnaryOpcode, x Value) *UnOp
func ToUnOp ¶ added in v1.2.8
func ToUnOp(v Instruction) (*UnOp, bool)
func (*UnOp) AddReference ¶
func (i *UnOp) AddReference(v Value)
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) ForEachMember ¶ added in v1.3.3
func (*UnOp) GetAllMember ¶ added in v1.3.1
func (*UnOp) GetAllVariables ¶ added in v1.3.0
func (*UnOp) GetIndexMember ¶ added in v1.3.1
func (*UnOp) GetLastVariable ¶ added in v1.3.1
func (a *UnOp) GetLastVariable() *Variable
func (*UnOp) GetStringMember ¶ added in v1.3.1
func (*UnOp) GetVariable ¶ added in v1.2.8
func (*UnOp) RemoveUser ¶ added in v1.2.8
func (n *UnOp) RemoveUser(u User)
func (*UnOp) ReplaceValue ¶ added in v1.2.8
type UnaryOpcode ¶
type UnaryOpcode string
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) AddReference ¶
func (i *Undefined) AddReference(v Value)
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) ForEachMember ¶ added in v1.3.3
func (*Undefined) GetAllMember ¶ added in v1.3.1
func (*Undefined) GetAllVariables ¶ added in v1.3.0
func (*Undefined) GetIndexMember ¶ added in v1.3.1
func (*Undefined) GetLastVariable ¶ added in v1.3.1
func (a *Undefined) GetLastVariable() *Variable
func (*Undefined) GetStringMember ¶ added in v1.3.1
func (*Undefined) GetVariable ¶ added in v1.2.8
func (*Undefined) HasUsers ¶ added in v1.2.8
func (n *Undefined) HasUsers() bool
has/get user and value
func (*Undefined) IsUndefined ¶ added in v1.3.1
func (*Undefined) RemoveUser ¶ added in v1.2.8
func (n *Undefined) RemoveUser(u User)
type UndefinedKind ¶ added in v1.3.1
type UndefinedKind int
UndefinedKind : mark undefined value type
const ( // UndefinedValueInValid normal undefined value UndefinedValueInValid UndefinedKind = iota // UndefinedValueValid is variable only declare UndefinedValueValid // UndefinedMemberInValid member call but not this key UndefinedMemberInValid // UndefinedMemberValid member call, has this key, but not this value, this shouldn't mark error UndefinedMemberValid )
type User ¶
type User interface { Node Instruction ReplaceValue(Value, Value) }
func ToUser ¶ added in v1.2.8
func ToUser(n Instruction) (User, bool)
type Value ¶
type Value interface { Node Instruction MemberCall Typed Maskable AssignAble AddUser(User) RemoveUser(User) // reference, this value same as other value // in use-def chain, this value use contain other value AddReference(Value) Reference() Values }
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 NewLazyInstruction ¶ added in v1.3.3
NewLazyInstruction : create a new lazy instruction, only create in cache
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) GetProgram ¶ added in v1.3.3
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
- blue_print.go
- blue_print_apply.go
- blue_print_method.go
- blue_print_oop.go
- builder.go
- call.go
- cfg.go
- closure.go
- const.go
- const_calc.go
- database_cache.go
- database_code.go
- database_id.go
- database_marshal.go
- database_program.go
- database_search.go
- database_type.go
- disasm.go
- disasmLine.go
- error.go
- error_message.go
- extern_instance.go
- extra_file_analyzer.go
- func.go
- generic_type.go
- instruction.go
- instructionLazy.go
- label.go
- member_call.go
- next.go
- offset_item.go
- package_loader.go
- phi.go
- position.go
- position_front.go
- program.go
- return.go
- scope.go
- scope_from_database.go
- scope_lazy.go
- ssa.go
- ssa_inspect.go
- ssa_predefined.go
- ssa_vars.go
- type.go
- use.go
- value.go
- variable.go