mirror of
https://github.com/RGBCube/serenity
synced 2025-06-28 21:02:07 +00:00
LibJS: Partially revert 12b283f
This commit partially reverts "LibJS: Make accessing the current function's arguments cheaper". While the change passed all the currently passing test262 tests, it seems to have _some_ flaw that silently breaks with some real-world websites. As the speedup with negligible at best, let's just revert it until we can implement it more correctly.
This commit is contained in:
parent
fa6c06ce8d
commit
13138811df
4 changed files with 0 additions and 107 deletions
|
@ -1012,28 +1012,10 @@ Reference Identifier::to_reference(Interpreter& interpreter, GlobalObject&) cons
|
|||
VERIFY(environment);
|
||||
VERIFY(environment->is_declarative_environment());
|
||||
if (!environment->is_permanently_screwed_by_eval()) {
|
||||
if (m_lexically_bound_function_argument.has_value()) {
|
||||
return Reference {
|
||||
*environment,
|
||||
string(),
|
||||
*m_lexically_bound_function_argument,
|
||||
interpreter.vm().in_strict_mode(),
|
||||
m_cached_environment_coordinate,
|
||||
&interpreter.vm().running_execution_context(),
|
||||
};
|
||||
}
|
||||
return Reference { *environment, string(), interpreter.vm().in_strict_mode(), m_cached_environment_coordinate };
|
||||
}
|
||||
m_cached_environment_coordinate = {};
|
||||
}
|
||||
if (m_lexically_bound_function_argument.has_value()) {
|
||||
return Reference {
|
||||
string(),
|
||||
*m_lexically_bound_function_argument,
|
||||
interpreter.vm().in_strict_mode(),
|
||||
&interpreter.vm().running_execution_context(),
|
||||
};
|
||||
}
|
||||
|
||||
auto reference = interpreter.vm().resolve_binding(string());
|
||||
if (reference.environment_coordinate().has_value())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue