Skip to main content

Crate react_compiler_optimization

Crate react_compiler_optimization 

Source

Re-exports§

pub use constant_propagation::constant_propagation;
pub use dead_code_elimination::dead_code_elimination;
pub use drop_manual_memoization::drop_manual_memoization;
pub use inline_iifes::inline_immediately_invoked_function_expressions;
pub use name_anonymous_functions::name_anonymous_functions;
pub use optimize_for_ssr::optimize_for_ssr;
pub use optimize_props_method_calls::optimize_props_method_calls;
pub use outline_functions::outline_functions;
pub use outline_jsx::outline_jsx;
pub use prune_maybe_throws::prune_maybe_throws;
pub use prune_unused_labels_hir::prune_unused_labels_hir;

Modules§

constant_propagation
Constant propagation/folding pass.
dead_code_elimination
Dead code elimination pass.
drop_manual_memoization
Removes manual memoization using useMemo and useCallback APIs.
inline_iifes
Inlines immediately invoked function expressions (IIFEs) to allow more fine-grained memoization of the values they produce.
merge_consecutive_blocks
Merges sequences of blocks that will always execute consecutively — i.e., where the predecessor always transfers control to the successor (ends in a goto) and where the predecessor is the only predecessor for that successor (no other way to reach the successor).
name_anonymous_functions
Port of NameAnonymousFunctions from TypeScript.
optimize_for_ssr
Optimizes the code for running in an SSR environment.
optimize_props_method_calls
Converts MethodCall instructions on props objects into CallExpression instructions.
outline_functions
Port of OutlineFunctions from TypeScript (Optimization/OutlineFunctions.ts).
outline_jsx
Port of OutlineJsx from TypeScript.
prune_maybe_throws
Prunes MaybeThrow terminals for blocks that can provably never throw.
prune_unused_labels_hir
Removes unused labels from the HIR.