package staticinit
import "cmd/compile/internal/staticinit"
Index ¶
- func AnySideEffects(n ir.Node) bool
- func StaticLoc(n ir.Node) (name *ir.Name, offset int64, ok bool)
- func StaticName(t *types.Type) *ir.Name
- type Entry
- type Plan
- type Schedule
Functions ¶
func AnySideEffects ¶
AnySideEffects reports whether n contains any operations that could have observable side effects.
func StaticLoc ¶
StaticLoc returns the static address of n, if n has one, or else nil.
func StaticName ¶
StaticName returns a name backed by a (writable) static data symbol. Use readonlystaticname for read-only node.
Types ¶
type Entry ¶
type Entry struct { Xoffset int64 // struct, array only Expr ir.Node // bytes of run-time computed expressions }
type Plan ¶
type Plan struct { E []Entry }
type Schedule ¶
type Schedule struct { // Out is the ordered list of dynamic initialization // statements. Out []ir.Node Plans map[ir.Node]*Plan Temps map[ir.Node]*ir.Name }
An Schedule is used to decompose assignment statements into static and dynamic initialization parts. Static initializations are handled by populating variables' linker symbol data, while dynamic initializations are accumulated to be executed in order.
func (*Schedule) StaticAssign ¶
func (*Schedule) StaticInit ¶
StaticInit adds an initialization statement n to the schedule.
Source Files ¶
- Version
- v1.17.12
- Published
- Jul 12, 2022
- Platform
- linux/amd64
- Imports
- 10 packages
- Last checked
- 25 seconds ago –
Tools for package owners.