swc_ecma_transforms_optimization

Function inline_globals2

source
pub fn inline_globals2(
    envs: Lrc<AHashMap<JsWord, Expr>>,
    globals: Lrc<AHashMap<JsWord, Expr>>,
    global_exprs: GlobalExprMap,
    typeofs: Lrc<AHashMap<JsWord, JsWord>>,
) -> impl Pass
Expand description

Create a global inlining pass, which replaces expressions with the specified value.

See GlobalExprMap for description.

Note: Values specified in global_exprs have higher precedence than