1▶// Gating rewrite logic for compiled functions.
2//
3// When gating is enabled, the compiled function is wrapped in a conditional:
· · ·
3▶// When gating is enabled, the compiled function is wrapped in a conditional:
4// `gating() ? optimized_fn : original_fn`
5//
· · ·
6▶// For function declarations referenced before their declaration, a special
7// hoisting pattern is used (see `insert_additional_function_declaration`).
8//
· · ·
7▶// hoisting pattern is used (see `insert_additional_function_declaration`).
8//
9// Ported from `Entrypoint/Gating.ts`.
· · ·
19use super::plugin_options::GatingConfig;
20
21▶/// A compiled function node, can be any function type.
22#[derive(Debug, Clone)]
23pub enum CompiledFunctionNode {
+ 102 more matches in this file