Skip to main content

Module transform

Module transform 

Source
Expand description

Layer 5: Semantic transforms.

Two-pass modules that use scope analysis to propagate, inline, and eliminate. Each is a Module implementation. Depends on scope/, fold/, ast/.

Modules§

alias
Alias inlining: var e = Yp; e(445)Yp(445).
constant
Constant propagation: inline literal values into their usage sites.
dead
Dead code elimination: remove provably-unused declarations.
global
Global value injection.
member
Member simplification: obj["property"]obj.property.
object
Object/array property resolution.
proxy
Proxy function inlining.