Skip to main content

Module prune_maybe_throws

Module prune_maybe_throws 

Source
Expand description

Prunes MaybeThrow terminals for blocks that can provably never throw.

Currently very conservative: only affects blocks with primitives or array/object literals. Even a variable reference could throw due to TDZ.

Analogous to TS Optimization/PruneMaybeThrows.ts.

Functionsยง

prune_maybe_throws
Prune MaybeThrow terminals for blocks that cannot throw, then clean up the CFG.