package pkginit

import "cmd/compile/internal/pkginit"

Index

Constants

const (
	InitNotStarted = iota
	InitDone
	InitPending
)

Static initialization phase. These values are stored in two bits in Node.flags.

Functions

func Task

func Task() *ir.Name

Task makes and returns an initialization record for the package. See runtime/proc.go:initTask for its layout. The 3 tasks for initialization are:

  1. Initialize all of the packages the current package depends on.
  2. Initialize all the variables that have initializers.
  3. Run any init functions.

Types

type InitOrder

type InitOrder struct {
	// contains filtered or unexported fields
}

Source Files

init.go initorder.go

Version
v1.17.4
Published
Dec 2, 2021
Platform
js/wasm
Imports
11 packages
Last checked
14 seconds ago

Tools for package owners.