LibJS: Allow using local variable for catch parameters

Local variables are faster to access and if all catch parameters are
locals we can skip lexical environment allocation.
This commit is contained in:
Aliaksandr Kalenik 2025-04-22 00:05:36 +02:00 committed by Alexander Kalenik
commit 7932091e02
Notes: github-actions[bot] 2025-04-22 19:58:29 +00:00
3 changed files with 49 additions and 28 deletions

View file

@ -320,7 +320,6 @@ private:
bool initiated_by_eval { false };
bool in_eval_function_context { false }; // This controls if we allow new.target or not. Note that eval("return") is not allowed, so we have to have a separate state variable for eval.
bool in_formal_parameter_context { false };
bool in_catch_parameter_context { false };
bool in_generator_function_context { false };
bool await_expression_is_valid { false };
bool in_arrow_function_context { false };