Documentation
¶
Overview ¶
Package dcepass rewrites ABI metadata so link-time dead code elimination can drop method bodies that are no longer referenced by live method slots.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EmitInterfaceUseOverrides ¶ added in v1.0.9
EmitInterfaceUseOverrides resolves predicates only after the complete interface domain is known. A nil predicate keeps every assertion possible. Constant-returning functions also fold during final Wasm optimization without LTO; linear-memory flags cannot be treated as immutable by that optimizer.
func EmitRegularTypeFieldOverrides ¶ added in v1.0.9
EmitRegularTypeFieldOverrides removes inaccessible field tables after method overrides. Regular-memory types use byte-wise equality and hashing, so neither needs the table. Keep descriptor prefixes and any earlier method compaction.
func EmitStrongTypeOverrides ¶
func EmitStrongTypeOverrides(dst llvm.Module, srcMods []llvm.Module, liveSlots map[string][]int, dropMetadata func(string) bool, verbose bool)
EmitStrongTypeOverrides emits method-pruned strong ABI type symbols into dst. srcMods contains the original package modules. For each constant ABI type global with a method array, it creates a same-name strong global in dst and clears IFn/TFn for method slots not listed in liveSlots[typeName]. dropMetadata can remove method storage for types proven invisible to interfaces and reflection; nil preserves them. verbose logs removed slots.
Types ¶
This section is empty.