LibJS: Remove some irrelevant hash lookups in ESFO constructor

If we don't have parameter expressions, we don't need to collect
metadata about whether instantiated var names collide with parameter
names or function names, as these flags are only used in the parameter
code path.
This commit is contained in:
Andreas Kling 2025-03-27 17:07:40 +00:00
parent 9f65629b2e
commit 04e879d86e

View file

@ -250,8 +250,8 @@ ECMAScriptFunctionObject::ECMAScriptFunctionObject(FlyString name, ByteString so
// 3. Perform ! env.InitializeBinding(n, undefined).
m_var_names_to_initialize_binding.append({
.identifier = id,
.parameter_binding = parameter_bindings.contains(id.string()),
.function_name = function_names.contains(id.string()),
// NOTE: We don't have to set parameter_binding or function_name here
// since those are only relevant in the hasParameterExpressions==true path.
});
if (!id.is_local())