Documentation
¶
Overview ¶
Package layout plans the internal storage layout for one package's local variables. It is intentionally independent of LLGo SSA, LLVM, the runtime, and the build cache so every integration layer consumes the same policy result.
Index ¶
- func BlockCacheName(path string) string
- func BlockName(path string) string
- func EnsureName(path string, kind locality.Kind) string
- func FailureCacheName(path string, kind locality.Kind) string
- func GuardName(path string, kind locality.Kind) string
- func InitName(path string, kind locality.Kind) string
- type Declaration
- type Initializer
- type Package
- type Storage
- type Variable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BlockCacheName ¶
BlockCacheName returns the package block's owner-local direct-cache symbol.
func EnsureName ¶
EnsureName returns the package/kind first-use initializer symbol.
func FailureCacheName ¶
FailureCacheName returns the package/kind initializer failure-cache symbol.
Types ¶
type Declaration ¶
Declaration is the source information needed to plan one variable.
type Initializer ¶
Initializer identifies one replay helper in Go package initialization order.
type Package ¶
type Package struct {
Path string
Variables []Variable
Block []Variable
Thread []Initializer
Goroutine []Initializer
// contains filtered or unexported fields
}
Package is a deterministic storage plan. Block contains all pointer-bearing TLS and GLS variables in their shared physical package block.
func Plan ¶
func Plan(path string, declarations []Declaration) (Package, error)
Plan creates a deterministic package layout. TLS and GLS remain logically distinct, while the current one-thread-per-goroutine backend may share their pointer-bearing package block.
func (Package) Initializers ¶
func (p Package) Initializers(kind locality.Kind) []Initializer
Initializers returns the ordered replay helpers for kind.
type Storage ¶
type Storage uint8
Storage identifies the physical addressing strategy selected for a variable.
func StorageForType ¶
StorageForType returns the physical storage class for a local variable type. Pointer-free values use native LLVM TLS; values visible to the GC share the package block rooted by LocalContext.
type Variable ¶
type Variable struct {
Declaration
Storage Storage
Field int
}
Variable is one planned local variable. Field is valid for package storage.