Documentation
¶
Index ¶
- Variables
- func TypeCompare(t1, t2 *Type) bool
- func ValueCompare(v1, v2 *Value) bool
- type Language
- type Option
- type Program
- type Type
- type Value
- func (v *Value) Compare(other *Value) bool
- func (v *Value) FixUpdateValue() Values
- func (v *Value) GetBlock() *Value
- func (v *Value) GetConst() *ssa.Const
- func (v *Value) GetConstValue() any
- func (v *Value) GetFunction() *Value
- func (i *Value) GetOperand(index int) *Value
- func (i *Value) GetOperands() Values
- func (v *Value) GetParameter(i int) *Value
- func (v *Value) GetParameters() Values
- func (v *Value) GetPosition() *ssa.Position
- func (v *Value) GetReachable() *Value
- func (v *Value) GetReturn() Values
- func (v *Value) GetType() *Type
- func (i *Value) GetUser(index int) *Value
- func (i *Value) GetUsers() Values
- func (i *Value) HasOperands() bool
- func (i *Value) HasUsers() bool
- func (v *Value) InMainFunction() bool
- func (v *Value) IsAssert() bool
- func (v *Value) IsBasicBlock() bool
- func (v *Value) IsBinOp() bool
- func (v *Value) IsCall() bool
- func (v *Value) IsConstInst() bool
- func (v *Value) IsErrorHandler() bool
- func (v *Value) IsField() bool
- func (v *Value) IsFunction() bool
- func (v *Value) IsIf() bool
- func (v *Value) IsJump() bool
- func (v *Value) IsLoop() bool
- func (v *Value) IsMake() bool
- func (v *Value) IsNext() bool
- func (v *Value) IsPanic() bool
- func (v *Value) IsPhi() bool
- func (v *Value) IsReachable() int
- func (v *Value) IsRecover() bool
- func (v *Value) IsReturn() bool
- func (v *Value) IsSwitch() bool
- func (v *Value) IsTypeCast() bool
- func (v *Value) IsTypeValue() bool
- func (v *Value) IsUnOp() bool
- func (v *Value) IsUndefined() bool
- func (v *Value) IsUpdate() bool
- func (v *Value) NewError(tag, msg string)
- func (v *Value) NewWarn(tag, msg string)
- func (i *Value) Show()
- func (v *Value) ShowUseDefChain()
- func (i *Value) ShowWithSource()
- func (v *Value) String() string
- func (i *Value) StringWithSource() string
- type Values
- func (v Values) Filter(f func(*Value) bool) Values
- func (v Values) ForEach(f func(*Value))
- func (v Values) Get(i int) *Value
- func (v Values) GetUsers() Values
- func (value Values) Ref(name string) Values
- func (v Values) Show()
- func (v Values) ShowWithSource()
- func (v Values) StringEx(flag int) string
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Number = newType(ssa.BasicTypes[ssa.Number]) String = newType(ssa.BasicTypes[ssa.String]) Bytes = newType(ssa.BasicTypes[ssa.Bytes]) Boolean = newType(ssa.BasicTypes[ssa.Boolean]) UndefinedType = newType(ssa.BasicTypes[ssa.UndefinedType]) Null = newType(ssa.BasicTypes[ssa.Null]) Any = newType(ssa.BasicTypes[ssa.Any]) ErrorType = newType(ssa.BasicTypes[ssa.ErrorType]) )
View Source
var Exports = map[string]any{ "Parse": Parse, "withLanguage": WithLanguage, "withExternLib": WithExternLib, "withExternValue": WithExternValue, "Javascript": JS, "Yak": Yak, }
Functions ¶
func TypeCompare ¶ added in v1.2.9
func ValueCompare ¶ added in v1.2.9
Types ¶
type Option ¶
type Option func(*config)
func WithExternMethod ¶ added in v1.2.9
func WithExternMethod(b ssa.MethodBuilder) Option
func WithExternValue ¶
func WithLanguage ¶
type Program ¶
func NewProgram ¶
type Value ¶
type Value struct {
// contains filtered or unexported fields
}
func NewValue ¶
func NewValue(n ssa.InstructionNode) *Value
func (*Value) FixUpdateValue ¶ added in v1.2.9
func (*Value) GetConstValue ¶ added in v1.2.9
for const instruction
func (*Value) GetFunction ¶
func (*Value) GetOperand ¶
func (*Value) GetOperands ¶
func (*Value) GetParameter ¶
func (*Value) GetParameters ¶ added in v1.2.9
func (*Value) GetPosition ¶ added in v1.2.9
func (*Value) GetReachable ¶
func (*Value) HasOperands ¶
func (*Value) InMainFunction ¶
func (*Value) IsBasicBlock ¶
func (*Value) IsConstInst ¶
func (*Value) IsErrorHandler ¶
func (*Value) IsFunction ¶
func (*Value) IsReachable ¶
if condition is true : 1 reach if condition is false : -1 unreachable if condition need calc: 0 unknown
func (*Value) IsTypeCast ¶
func (*Value) IsTypeValue ¶
func (*Value) IsUndefined ¶
func (*Value) ShowUseDefChain ¶
func (v *Value) ShowUseDefChain()
func (*Value) ShowWithSource ¶
func (i *Value) ShowWithSource()
func (*Value) StringWithSource ¶
Click to show internal directories.
Click to hide internal directories.