Documentation
¶
Overview ¶
Code generated by cmd/genstdlib/main.go; DO NOT EDIT.
Code generated by cmd/genstdlib/main.go; DO NOT EDIT.
Index ¶
- func CallPackageFunction(pkg *Package, functionName string, args []any) ([]any, error)
- func GetModulePath(name, version string) (string, error)
- func LoadGoMod(filename string) (*modfile.File, error)
- func LoadPackage(dir string, optionalConfig *packages.Config) (*packages.Package, error)
- func OnOsExit(f func(int))
- func OnPanic(f func(any))
- func RegisterPackage(pkgPath string, symbols map[string]reflect.Value)
- type ArrayType
- type AssignStmt
- type BasicLit
- type BinaryExpr
- type BinaryExprFunc
- type BlockStmt
- type BranchStmt
- type CallExpr
- type CanAssign
- type CanCompose
- type CanMake
- type CanSelect
- type CaseClause
- type ChanType
- type CompositeLit
- type ConstVar
- type ConstVarDecl
- type DAPAccess
- func (a *DAPAccess) Launch(functionName string, args []any)
- func (a *DAPAccess) Next() error
- func (a *DAPAccess) Scopes(dap.ScopesArguments) (scopes []dap.Scope)
- func (a *DAPAccess) StackFrames(dap.StackTraceArguments) (frames []dap.StackFrame)
- func (a *DAPAccess) Threads() []dap.Thread
- func (a *DAPAccess) Variables(args dap.VariablesArguments) (vars []dap.Variable)
- type Decl
- type DeclStmt
- type DeferCallExpr
- type DeferStmt
- type Ellipsis
- type Env
- type Environment
- type Evaluable
- type Expr
- type ExprStmt
- type ExtendedType
- type ExtendedValue
- type ExternalPackage
- type Field
- type FieldAssignable
- type FieldList
- type Flowable
- type ForStmt
- type Func
- type FuncDecl
- type FuncLit
- type FuncType
- type HasMethods
- type Heap
- type HeapPointer
- type Ident
- type IfStmt
- type IncDecFunc
- type IncDecStmt
- type IndexExpr
- type InterfaceType
- type KeyValueExpr
- type LabeledStmt
- type MapType
- type Package
- type ParenExpr
- type PkgEnvironment
- type RangeStmt
- type ReturnStmt
- type SDKPackage
- type SDKType
- type SelectorExpr
- type SendStmt
- type SliceExpr
- type StarExpr
- type Step
- type StepTaker
- type Stmt
- type StructType
- type StructValue
- type SwitchStmt
- type ToStringer
- type Traverseable
- type TypeAssertExpr
- type TypeSpec
- type TypeSwitchStmt
- type UnaryExpr
- type UnaryExprFunc
- type VM
- type ValueSpec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CallPackageFunction ¶
func GetModulePath ¶
https://stackoverflow.com/questions/67211875/how-to-get-the-path-to-a-go-module-dependency
func LoadPackage ¶
func OnOsExit ¶
func OnOsExit(f func(int))
OnOsExit sets the function to be called when os.Exit is invoked in the interpreted code. The Go SDK os.Exit is not called.
Types ¶
type AssignStmt ¶
type AssignStmt struct {
// contains filtered or unexported fields
}
func (AssignStmt) String ¶
func (a AssignStmt) String() string
type BinaryExpr ¶
type BinaryExpr struct {
// contains filtered or unexported fields
}
func (BinaryExpr) String ¶
func (b BinaryExpr) String() string
type BranchStmt ¶
type BranchStmt struct {
// contains filtered or unexported fields
}
BranchStmt represents a break, continue, goto, or fallthrough statement.
func (BranchStmt) String ¶
func (s BranchStmt) String() string
type CanCompose ¶
type CanCompose interface {
// contains filtered or unexported methods
}
type CanMake ¶
type CanMake interface {
CanCompose
// contains filtered or unexported methods
}
type CanSelect ¶
type CanSelect interface {
// contains filtered or unexported methods
}
CanSelect is implemented by types that support selection of fields or methods by name.
type CaseClause ¶
type CaseClause struct {
CasePos token.Pos // position of "case" or "default" keyword
List []Expr // list of expressions; nil means default case
Body []Stmt
}
A CaseClause represents a case of an expression or type switch statement.
func (CaseClause) String ¶
func (c CaseClause) String() string
type CompositeLit ¶
type CompositeLit struct {
Lbrace token.Pos // position of "{"
Type Expr // literal type; or nil
ParserType types.Type // literal type; or nil
Elts []Expr // list of composite elements; or nil
}
func (CompositeLit) String ¶
func (c CompositeLit) String() string
type ConstVarDecl ¶
type ConstVarDecl struct {
// contains filtered or unexported fields
}
func (ConstVarDecl) String ¶
func (c ConstVarDecl) String() string
type DAPAccess ¶
type DAPAccess struct {
// contains filtered or unexported fields
}
func NewDAPAccess ¶
NewDAPAccess creates a new wrapper around a VM instance to access DAP (Debug Adapter Protocol) data and control.
func (*DAPAccess) Launch ¶
Launch starts execution of the given function on the underlying VM with the provided arguments.
func (*DAPAccess) Scopes ¶
func (a *DAPAccess) Scopes(dap.ScopesArguments) (scopes []dap.Scope)
Scopes describes the variable scopes that are available for the current stack frame.
func (*DAPAccess) StackFrames ¶
func (a *DAPAccess) StackFrames(dap.StackTraceArguments) (frames []dap.StackFrame)
StackFrames returns the current call stack for the selected thread.
type DeferCallExpr ¶
type DeferCallExpr struct {
CallExpr
}
DeferCallExpr§ is a wrapper around CallExpr to distinguish defer calls from regular calls in the flow graph. For defer calls, the arguments are evaluated at the time of the defer statement creation.
func (DeferCallExpr) String ¶
func (c DeferCallExpr) String() string
type Environment ¶
type Environment struct {
// contains filtered or unexported fields
}
func (*Environment) String ¶
func (e *Environment) String() string
type ExtendedType ¶
type ExtendedType struct {
// contains filtered or unexported fields
}
type Count int
type ExtendedValue ¶
type ExtendedValue struct {
// contains filtered or unexported fields
}
ExtendedValue represents a value of an ExtendedType.
type ExternalPackage ¶
type ExternalPackage struct {
SDKPackage
}
func (ExternalPackage) String ¶
func (p ExternalPackage) String() string
type FieldAssignable ¶
type FieldAssignable interface {
// contains filtered or unexported methods
}
type Func ¶
type Func interface {
// contains filtered or unexported methods
}
FuncDecl and FuncLit implement this
type FuncLit ¶
type FuncType ¶
type HasMethods ¶
type HasMethods interface {
// contains filtered or unexported methods
}
type HeapPointer ¶
type HeapPointer struct {
Addr uintptr // unique address in the heap
Type reflect.Type // type of the pointed-to value
EnvRef Env // if non-nil, this points to a variable in an environment
EnvVarName string // the variable name in the environment
}
HeapPointer represents a pointer to a value stored in the VM's heap. This is used to handle pointer escape analysis - when a local variable's address is taken, it needs to survive beyond its scope (in gi terms: environment).
func (*HeapPointer) String ¶
func (hp *HeapPointer) String() string
String formats the HeapPointer to look like a real pointer address.
func (*HeapPointer) UnmarshalJSON ¶
func (hp *HeapPointer) UnmarshalJSON(data []byte) error
type IncDecStmt ¶
type IncDecStmt struct {
// contains filtered or unexported fields
}
func (IncDecStmt) String ¶
func (i IncDecStmt) String() string
type InterfaceType ¶
InterfaceType represents an interface type definition. TODO needed?
func (InterfaceType) String ¶
func (i InterfaceType) String() string
type KeyValueExpr ¶
type KeyValueExpr struct {
Value Expr
// contains filtered or unexported fields
}
func (KeyValueExpr) String ¶
func (k KeyValueExpr) String() string
type LabeledStmt ¶
type LabeledStmt struct {
// contains filtered or unexported fields
}
LabeledStmt represents a labeled statement. https://go.dev/ref/spec#Labeled_statements https://go.dev/ref/spec#Label_scopes
func (LabeledStmt) String ¶
func (s LabeledStmt) String() string
type Package ¶
type Package struct {
*packages.Package // TODO look for actual data used here
// contains filtered or unexported fields
}
func ParseSource ¶
ParseSource is a helper function that allows parsing and building a package directly from a source string, without needing to read from the filesystem. It creates a temporary directory, writes the source to a main.go file, and then uses the standard LoadPackage and BuildPackage functions to create the Package struct.
type PkgEnvironment ¶
type PkgEnvironment struct {
Env
// contains filtered or unexported fields
}
func (*PkgEnvironment) String ¶
func (p *PkgEnvironment) String() string
type ReturnStmt ¶
type ReturnStmt struct {
// contains filtered or unexported fields
}
func (ReturnStmt) String ¶
func (r ReturnStmt) String() string
type SDKPackage ¶
type SDKPackage struct {
// contains filtered or unexported fields
}
func (SDKPackage) String ¶
func (p SDKPackage) String() string
type SelectorExpr ¶
type SelectorExpr struct {
// contains filtered or unexported fields
}
func (SelectorExpr) String ¶
func (s SelectorExpr) String() string
type Stmt ¶
type Stmt interface {
Flowable
// contains filtered or unexported methods
}
All statement nodes implement the Stmt interface.
type StructType ¶
type StructType struct {
// contains filtered or unexported fields
}
StructType represents a struct type definition that is interpreted (IType).
func (StructType) String ¶
func (s StructType) String() string
type StructValue ¶
type StructValue struct {
// contains filtered or unexported fields
}
StructValue represents an instance of an interpreted struct.
func InstantiateStructValue ¶
func InstantiateStructValue(vm *VM, t StructType) StructValue
InstantiateStructValue creates a new StructValue of the given StructType.
func (StructValue) MarshalJSON ¶
func (i StructValue) MarshalJSON() ([]byte, error)
func (StructValue) MarshalXML ¶
func (i StructValue) MarshalXML(enc *xml.Encoder, start xml.StartElement) error
func (StructValue) UnmarshalJSON ¶
func (i StructValue) UnmarshalJSON(data []byte) error
type SwitchStmt ¶
type SwitchStmt struct {
// contains filtered or unexported fields
}
A SwitchStmt represents an expression switch statement.
func (SwitchStmt) String ¶
func (s SwitchStmt) String() string
type ToStringer ¶
type ToStringer interface {
// contains filtered or unexported methods
}
for gi internal use
type Traverseable ¶
type Traverseable interface {
// contains filtered or unexported methods
}
type TypeAssertExpr ¶
type TypeAssertExpr struct {
// contains filtered or unexported fields
}
func (TypeAssertExpr) String ¶
func (e TypeAssertExpr) String() string
type TypeSwitchStmt ¶
type TypeSwitchStmt struct {
SwitchPos token.Pos
Init Stmt // initialization statement; or nil
Assign Stmt // x := y.(type) or y.(type)
Body *BlockStmt
}
func (TypeSwitchStmt) String ¶
func (s TypeSwitchStmt) String() string
Source Files
¶
- array.go
- assign.go
- ast_builder.go
- binary.go
- binary_funcs.go
- call.go
- call_builtin.go
- concurrency.go
- dap_access.go
- decl.go
- env.go
- field.go
- for.go
- func.go
- gomod.go
- graph_builder.go
- heap.go
- ident.go
- if.go
- incdec.go
- incdec_funcs.go
- index.go
- interfaces.go
- keyvalue.go
- literal.go
- package.go
- package_api.go
- package_tracing.go
- range.go
- return.go
- safe.go
- selector.go
- stack.go
- stackframe.go
- star.go
- stdlib_builtin_funcs.go
- stdlib_builtins.go
- stdlib_convert.go
- stdlib_funcs_generated.go
- stdlib_types_generated.go
- step.go
- stmt.go
- struct_type.go
- struct_value.go
- switch.go
- type.go
- type_factory.go
- unary.go
- unary_funcs.go
- utils.go
- var.go
- vm.go
Directories
¶
| Path | Synopsis |
|---|---|
|
internal
|
|
|
perftests/tengobench
command
|
|
|
perftests/walkprofile
command
|
|
|
perftests/walkprofile/test
command
|
|
|
testexamples/stackonpanic
command
|