Skip to content

Commit

Permalink
Don't create parameter expressions environment if not used
Browse files Browse the repository at this point in the history
  • Loading branch information
HalidOdat committed Oct 4, 2023
1 parent f54f79e commit d53a0c4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions boa_engine/src/bytecompiler/declarations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -932,8 +932,11 @@ impl ByteCompiler<'_, '_> {
// c. Let env be NewDeclarativeEnvironment(calleeEnv).
// d. Assert: The VariableEnvironment of calleeContext is calleeEnv.
// e. Set the LexicalEnvironment of calleeContext to env.
let _ = self.push_compile_environment(false);
additional_env = true;

if self.can_optimize_local_variables {
let _ = self.push_compile_environment(false);
additional_env = true;
}
}

// 22. If argumentsObjectNeeded is true, then
Expand Down

0 comments on commit d53a0c4

Please sign in to comment.