Documentation
¶
Index ¶
- func BuildSSA(pkg *packages.Package) (*buildssa.SSA, error)
- func GetPosition(pkg *ssa.Package, pos ...token.Pos) token.Position
- func InstrToCallCommon(instr ssa.Instruction) (*ssa.CallCommon, bool)
- func LoadBuildSSAs(dir string, patterns ...string) ([]*buildssa.SSA, error)
- func LoadInstrs(dir string, patterns ...string) ([]ssa.Instruction, error)
- func Unquote(str string) (string, error)
- func ValueToCallCommon(value ssa.Value) (*ssa.CallCommon, bool)
- func ValueToConsts[T any](v ssa.Value, flattener ToConstsFunc[T], mapper func(t *ssa.Const) (T, bool)) ([]T, bool)
- func ValueToConstsWithMaxDepth[T any](v ssa.Value, maxDepth int, flattener ToConstsFunc[T], ...) ([]T, bool)
- func ValueToInts(v ssa.Value) ([]int, bool)
- func ValueToIntsWithMaxDepth(v ssa.Value, maxDepth int) ([]int, bool)
- func ValueToStrings(v ssa.Value) ([]string, bool)
- func ValueToStringsWithMaxDepth(v ssa.Value, maxDepth int) ([]string, bool)
- type BuiltinDynamicMethodCall
- func (b *BuiltinDynamicMethodCall) Arg(idx int) ssa.Value
- func (b *BuiltinDynamicMethodCall) ArgsLen() int
- func (b *BuiltinDynamicMethodCall) Match(namePattern string) bool
- func (b *BuiltinDynamicMethodCall) Method() *types.Func
- func (b *BuiltinDynamicMethodCall) Name() string
- func (b *BuiltinDynamicMethodCall) Recv() ssa.Value
- func (b *BuiltinDynamicMethodCall) String() string
- type BuiltinStaticFunctionCall
- func (b *BuiltinStaticFunctionCall) Arg(idx int) ssa.Value
- func (b *BuiltinStaticFunctionCall) ArgsLen() int
- func (b *BuiltinStaticFunctionCall) Func() *ssa.Builtin
- func (b *BuiltinStaticFunctionCall) Match(namePattern string) bool
- func (b *BuiltinStaticFunctionCall) Name() string
- func (b *BuiltinStaticFunctionCall) String() string
- type CallInfo
- type DynamicFunctionCall
- type DynamicMethodCall
- func (d *DynamicMethodCall) Arg(idx int) ssa.Value
- func (d *DynamicMethodCall) ArgsLen() int
- func (d *DynamicMethodCall) Match(namePattern string) bool
- func (d *DynamicMethodCall) Method() *types.Func
- func (d *DynamicMethodCall) Name() string
- func (d *DynamicMethodCall) Pkg() *types.Package
- func (d *DynamicMethodCall) Recv() ssa.Value
- func (d *DynamicMethodCall) String() string
- type Function
- type Method
- type Namer
- type PackageFunction
- type PackageMethod
- type Packager
- type Posx
- func (p *Posx) Add(pos token.Pos) *Posx
- func (p *Posx) Compare(other *Posx) int
- func (p *Posx) Equal(other *Posx) bool
- func (p *Posx) LogValue() slog.Value
- func (m *Posx) Package() *types.Package
- func (p *Posx) PackagePath(abbreviate bool) string
- func (m *Posx) Position() token.Position
- func (p *Posx) PositionString() string
- type StaticFunctionCall
- func (s *StaticFunctionCall) Arg(idx int) ssa.Value
- func (s *StaticFunctionCall) ArgsLen() int
- func (s *StaticFunctionCall) Func() *ssa.Function
- func (s *StaticFunctionCall) Match(namePattern string) bool
- func (s *StaticFunctionCall) Name() string
- func (s *StaticFunctionCall) Pkg() *types.Package
- func (s *StaticFunctionCall) String() string
- type StaticFunctionClosureCall
- func (s *StaticFunctionClosureCall) Arg(idx int) ssa.Value
- func (s *StaticFunctionClosureCall) ArgsLen() int
- func (s *StaticFunctionClosureCall) Func() *ssa.Function
- func (s *StaticFunctionClosureCall) Match(namePattern string) bool
- func (s *StaticFunctionClosureCall) Name() string
- func (s *StaticFunctionClosureCall) Parent() *ssa.Function
- func (s *StaticFunctionClosureCall) Pkg() *types.Package
- func (s *StaticFunctionClosureCall) String() string
- type StaticMethodCall
- func (s *StaticMethodCall) Arg(idx int) ssa.Value
- func (s *StaticMethodCall) ArgsLen() int
- func (s *StaticMethodCall) Match(namePattern string) bool
- func (s *StaticMethodCall) Method() *types.Func
- func (s *StaticMethodCall) Name() string
- func (s *StaticMethodCall) Pkg() *types.Package
- func (s *StaticMethodCall) Recv() ssa.Value
- func (s *StaticMethodCall) String() string
- type ToConstsFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InstrToCallCommon ¶
func InstrToCallCommon(instr ssa.Instruction) (*ssa.CallCommon, bool)
func LoadInstrs ¶
func LoadInstrs(dir string, patterns ...string) ([]ssa.Instruction, error)
func ValueToCallCommon ¶
func ValueToCallCommon(value ssa.Value) (*ssa.CallCommon, bool)
func ValueToConsts ¶
func ValueToIntsWithMaxDepth ¶
Types ¶
type BuiltinDynamicMethodCall ¶
type BuiltinDynamicMethodCall struct {
ssa.CallCommon
}
func NewBuiltinDynamicMethodCall ¶
func NewBuiltinDynamicMethodCall(common *ssa.CallCommon) *BuiltinDynamicMethodCall
func (*BuiltinDynamicMethodCall) ArgsLen ¶
func (b *BuiltinDynamicMethodCall) ArgsLen() int
func (*BuiltinDynamicMethodCall) Match ¶
func (b *BuiltinDynamicMethodCall) Match(namePattern string) bool
func (*BuiltinDynamicMethodCall) Method ¶
func (b *BuiltinDynamicMethodCall) Method() *types.Func
func (*BuiltinDynamicMethodCall) Name ¶
func (b *BuiltinDynamicMethodCall) Name() string
func (*BuiltinDynamicMethodCall) Recv ¶
func (b *BuiltinDynamicMethodCall) Recv() ssa.Value
func (*BuiltinDynamicMethodCall) String ¶
func (b *BuiltinDynamicMethodCall) String() string
type BuiltinStaticFunctionCall ¶
type BuiltinStaticFunctionCall struct {
ssa.CallCommon
}
func NewBuiltinStaticFunctionCall ¶
func NewBuiltinStaticFunctionCall(common *ssa.CallCommon) *BuiltinStaticFunctionCall
func (*BuiltinStaticFunctionCall) ArgsLen ¶
func (b *BuiltinStaticFunctionCall) ArgsLen() int
func (*BuiltinStaticFunctionCall) Func ¶
func (b *BuiltinStaticFunctionCall) Func() *ssa.Builtin
func (*BuiltinStaticFunctionCall) Match ¶
func (b *BuiltinStaticFunctionCall) Match(namePattern string) bool
func (*BuiltinStaticFunctionCall) Name ¶
func (b *BuiltinStaticFunctionCall) Name() string
func (*BuiltinStaticFunctionCall) String ¶
func (b *BuiltinStaticFunctionCall) String() string
type CallInfo ¶
type CallInfo interface { Name() string Arg(idx int) ssa.Value ArgsLen() int Match(namePattern string) bool // contains filtered or unexported methods }
func GetCallInfo ¶
func GetCallInfo(common *ssa.CallCommon) CallInfo
type DynamicFunctionCall ¶
type DynamicFunctionCall struct {
ssa.CallCommon
}
func NewDynamicFunctionCall ¶
func NewDynamicFunctionCall(common *ssa.CallCommon) *DynamicFunctionCall
func (*DynamicFunctionCall) ArgsLen ¶
func (d *DynamicFunctionCall) ArgsLen() int
func (*DynamicFunctionCall) Match ¶
func (d *DynamicFunctionCall) Match(namePattern string) bool
func (*DynamicFunctionCall) Name ¶
func (d *DynamicFunctionCall) Name() string
func (*DynamicFunctionCall) String ¶
func (d *DynamicFunctionCall) String() string
type DynamicMethodCall ¶
type DynamicMethodCall struct {
ssa.CallCommon
}
func NewDynamicMethodCall ¶
func NewDynamicMethodCall(common *ssa.CallCommon) *DynamicMethodCall
func (*DynamicMethodCall) ArgsLen ¶
func (d *DynamicMethodCall) ArgsLen() int
func (*DynamicMethodCall) Match ¶
func (d *DynamicMethodCall) Match(namePattern string) bool
func (*DynamicMethodCall) Method ¶
func (d *DynamicMethodCall) Method() *types.Func
func (*DynamicMethodCall) Name ¶
func (d *DynamicMethodCall) Name() string
func (*DynamicMethodCall) Pkg ¶
func (d *DynamicMethodCall) Pkg() *types.Package
func (*DynamicMethodCall) Recv ¶
func (d *DynamicMethodCall) Recv() ssa.Value
func (*DynamicMethodCall) String ¶
func (d *DynamicMethodCall) String() string
type PackageFunction ¶
type PackageMethod ¶
type StaticFunctionCall ¶
type StaticFunctionCall struct {
ssa.CallCommon
}
func NewStaticFunctionCall ¶
func NewStaticFunctionCall(common *ssa.CallCommon) *StaticFunctionCall
func (*StaticFunctionCall) ArgsLen ¶
func (s *StaticFunctionCall) ArgsLen() int
func (*StaticFunctionCall) Func ¶
func (s *StaticFunctionCall) Func() *ssa.Function
func (*StaticFunctionCall) Match ¶
func (s *StaticFunctionCall) Match(namePattern string) bool
func (*StaticFunctionCall) Name ¶
func (s *StaticFunctionCall) Name() string
func (*StaticFunctionCall) Pkg ¶
func (s *StaticFunctionCall) Pkg() *types.Package
func (*StaticFunctionCall) String ¶
func (s *StaticFunctionCall) String() string
type StaticFunctionClosureCall ¶
type StaticFunctionClosureCall struct {
ssa.CallCommon
}
func NewStaticFunctionClosureCall ¶
func NewStaticFunctionClosureCall(common *ssa.CallCommon) *StaticFunctionClosureCall
func (*StaticFunctionClosureCall) ArgsLen ¶
func (s *StaticFunctionClosureCall) ArgsLen() int
func (*StaticFunctionClosureCall) Func ¶
func (s *StaticFunctionClosureCall) Func() *ssa.Function
func (*StaticFunctionClosureCall) Match ¶
func (s *StaticFunctionClosureCall) Match(namePattern string) bool
func (*StaticFunctionClosureCall) Name ¶
func (s *StaticFunctionClosureCall) Name() string
func (*StaticFunctionClosureCall) Parent ¶
func (s *StaticFunctionClosureCall) Parent() *ssa.Function
func (*StaticFunctionClosureCall) Pkg ¶
func (s *StaticFunctionClosureCall) Pkg() *types.Package
func (*StaticFunctionClosureCall) String ¶
func (s *StaticFunctionClosureCall) String() string
type StaticMethodCall ¶
type StaticMethodCall struct {
ssa.CallCommon
}
func NewStaticMethodCall ¶
func NewStaticMethodCall(common *ssa.CallCommon) *StaticMethodCall
func (*StaticMethodCall) ArgsLen ¶
func (s *StaticMethodCall) ArgsLen() int
func (*StaticMethodCall) Match ¶
func (s *StaticMethodCall) Match(namePattern string) bool
func (*StaticMethodCall) Method ¶
func (s *StaticMethodCall) Method() *types.Func
func (*StaticMethodCall) Name ¶
func (s *StaticMethodCall) Name() string
func (*StaticMethodCall) Pkg ¶
func (s *StaticMethodCall) Pkg() *types.Package
func (*StaticMethodCall) Recv ¶
func (s *StaticMethodCall) Recv() ssa.Value
func (*StaticMethodCall) String ¶
func (s *StaticMethodCall) String() string
Click to show internal directories.
Click to hide internal directories.