package
0.0.0-20201102054017-282493799a89
Repository: https://github.com/golangltd/leafltd.git
Documentation: pkg.go.dev

# Packages

Package ssa/interp defines an interpreter for the SSA representation of Go programs.
No description provided by the author

# Functions

BuilderModeFlag creates a new command line flag of type BuilderMode, adds it to the specified flag set, and returns it.
DefaultType returns the default "typed" type for an "untyped" type; it returns the incoming type for all other types.
EnclosingFunction returns the function that contains the syntax node denoted by path.
FindTests returns the list of packages that define at least one Test, Example or Benchmark function (as defined by "go test"), and the lists of all such functions.
HasEnclosingFunction returns true if the AST node denoted by path is contained within the declaration of some function or package-level variable.
NewConst returns a new constant of the specified value and type.
NewProgram returns a new SSA Program.
WriteFunction writes to buf a human-readable "disassembly" of f.
WritePackage writes to buf a human-readable summary of p.

# Constants

Build init functions without guards or calls to dependent inits.
Build packages serially, not in parallel.
Enable debug info for all packages.
Log source locations as SSA builder progresses.
Build naïve SSA form: don't replace local loads/stores with registers.
Print function SSA code to stdout.
Print package inventory to stdout.
Perform sanity checking of function bodies.

# Structs

The Alloc instruction reserves space for a variable of the given type, zero-initializes it, and yields its address.
BasicBlock represents an SSA basic block.
The BinOp instruction yields the result of binary operation X Op Y.
A Builtin represents a specific use of a built-in function, e.g.
The Call instruction represents a function or method call.
CallCommon is contained by Go, Defer and Call to hold the common parts of a function or method call.
ChangeInterface constructs a value of one interface type from a value of another interface type known to be assignable to it.
The ChangeType instruction applies to X a value-preserving type change to Type().
A Const represents the value of a constant expression.
The Convert instruction yields the conversion of value X to type Type().
A DebugRef instruction maps a source-level expression Expr to the SSA value X that represents the value (!IsAddr) or address (IsAddr) of that expression.
The Defer instruction pushes the specified call onto a stack of functions to be called by a RunDefers instruction or by a panic.
The Extract instruction yields component Index of Tuple.
The Field instruction yields the Field of struct X.
The FieldAddr instruction yields the address of Field of *struct X.
A FreeVar represents a free variable of the function to which it belongs.
Function represents the parameters, results, and code of a function or method.
A Global is a named Value holding the address of a package-level variable.
The Go instruction creates a new goroutine and calls the specified function within it.
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.
The Index instruction yields element Index of array X.
The IndexAddr instruction yields the address of the element at index Index of collection X.
The Jump instruction transfers control to the sole successor of its owning block.
The Lookup instruction yields element Index of collection X, a map or string.
The MakeChan instruction creates a new channel object and yields a value of kind chan.
The MakeClosure instruction yields a closure value whose code is Fn and whose free variables' values are supplied by Bindings.
MakeInterface constructs an instance of an interface type from a value of a concrete type.
The MakeMap instruction creates a new hash-table-based map object and yields a value of kind map.
The MakeSlice instruction yields a slice of length Len backed by a newly allocated array of length Cap.
The MapUpdate instruction updates the association of Map[Key] to Value.
A NamedConst is a Member of a Package representing a package-level named constant.
The Next instruction reads and advances the (map or string) iterator Iter and returns a 3-tuple value (ok, k, v).
A Package is a single analyzed Go package containing Members for all package-level functions, variables, constants and types it declares.
The Panic instruction initiates a panic with value X.
A Parameter represents an input parameter of a function.
The Phi instruction represents an SSA φ-node, which combines values that differ across incoming control-flow edges and yields a new value.
A Program is a partial or complete Go program converted to SSA form.
The Range instruction yields an iterator over the domain and range of X, which must be a string or map.
The Return instruction returns values and control back to the calling function.
The RunDefers instruction pops and invokes the entire stack of procedure calls pushed by Defer instructions in this function.
The Select instruction tests whether (or blocks until) one of the specified sent or received states is entered.
SelectState is a helper for Select.
The Send instruction sends X on channel Chan.
The Slice instruction yields a slice of an existing string, slice or *array X between optional integer bounds Low and High.
The Store instruction stores Val at address Addr.
A Type is a Member of a Package representing a package-level named type.
The TypeAssert instruction tests whether interface value X has type AssertedType.
The UnOp instruction yields the result of Op X.

# Interfaces

The CallInstruction interface, implemented by *Go, *Defer and *Call, exposes the common parts of function-calling instructions, yet provides a way back to the Value defined by *Call alone.
An Instruction is an SSA instruction that computes a new Value or has some effect.
A Member is a member of a Go package, implemented by *NamedConst, *Global, *Function, or *Type; they are created by package-level const, var, func and type declarations respectively.
A Node is a node in the SSA value graph.
A Value is an SSA value that can be referenced by an instruction.

# Type aliases

BuilderMode is a bitmask of options for diagnostics and checking.