Documentation ¶
Index ¶
- Variables
- func MethodSignature(method *types.Func) string
- type ArrayValue
- type ConstValue
- type Function
- type FunctionValue
- type Global
- type GlobalValue
- type Interface
- type MapValue
- type NamedType
- type PointerBitCastValue
- type PointerToUintptrValue
- type PointerValue
- type Program
- func (p *Program) AddPackage(pkg *ssa.Package)
- func (p *Program) GetFunction(ssaFn *ssa.Function) *Function
- func (p *Program) GetGlobal(ssaGlobal *ssa.Global) *Global
- func (p *Program) Interpret(block *ssa.BasicBlock, dumpSSA bool) error
- func (p *Program) IsVolatile(t types.Type) bool
- func (p *Program) MainPkg() *ssa.Package
- func (p *Program) SimpleDCE()
- type SliceValue
- type StructValue
- type TypeWithMethods
- type Value
- type ZeroBasicValue
Constants ¶
This section is empty.
Variables ¶
var ErrCGoWrapper = errors.New("tinygo internal: cgo wrapper") // a signal, not an error
Functions ¶
func MethodSignature ¶
Make a readable version of a method signature (including the function name, excluding the receiver name). This string is used internally to match interfaces and to call the correct method on an interface. Examples:
String() string Read([]byte) (int, error)
Types ¶
type ArrayValue ¶
type ConstValue ¶
type Function ¶
Function or method.
func (*Function) CName ¶
Return the name of the C function if this is a CGo wrapper. Otherwise, return a zero-length string.
func (*Function) IsExported ¶
Return true iff this function is externally visible.
func (*Function) IsInterrupt ¶
Return true for functions annotated with //go:interrupt. The function name is already customized in LinkName() to hook up in the interrupt vector.
On some platforms (like AVR), interrupts need a special compiler flag.
func (*Function) IsNoBounds ¶
type GlobalValue ¶
type GlobalValue struct {
Global *Global
}
type Interface ¶
Interface type that is at some point used in a type assert (to check whether it implements another interface).
type PointerBitCastValue ¶
type PointerToUintptrValue ¶
type PointerToUintptrValue struct {
Elem Value
}
type PointerValue ¶
type Program ¶
type Program struct { Program *ssa.Program LoaderProgram *loader.Program Functions []*Function Globals []*Global NamedTypes []*NamedType // contains filtered or unexported fields }
View on all functions, types, and globals in a program, with analysis results.
func NewProgram ¶
Create and intialize a new *Program from a *ssa.Program.
func (*Program) AddPackage ¶
Add a package to this Program. All packages need to be added first before any analysis is done for correct results.
func (*Program) Interpret ¶
func (p *Program) Interpret(block *ssa.BasicBlock, dumpSSA bool) error
Interpret instructions as far as possible, and drop those instructions from the basic block.
func (*Program) IsVolatile ¶
Return true if this named type is annotated with the //go:volatile pragma, for volatile loads and stores.
type SliceValue ¶
type SliceValue struct { Type *types.Slice Array *ArrayValue }
type StructValue ¶
type TypeWithMethods ¶
type TypeWithMethods struct { Num int Methods map[string]*types.Selection // contains filtered or unexported fields }
Type that is at some point put in an interface.