mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:47:44 +00:00
LibJS: Use CreateUnmappedArgumentsObject for non-simple parameter lists
This patch implements the IsSimpleParameterList static semantics for ordinary function objects. We now also create an unmapped arguments object for callee contexts with non-simple parameter lists, instead of only doing it in strict mode. Covered by test262.
This commit is contained in:
parent
e2e695bc9f
commit
d1ffeaf66d
3 changed files with 18 additions and 1 deletions
|
@ -369,7 +369,7 @@ Value VM::get_variable(const FlyString& name, GlobalObject& global_object)
|
|||
if (possible_match.has_value())
|
||||
return possible_match.value().value;
|
||||
if (!context.arguments_object) {
|
||||
if (context.function->is_strict_mode()) {
|
||||
if (context.function->is_strict_mode() || !context.function->has_simple_parameter_list()) {
|
||||
context.arguments_object = create_unmapped_arguments_object(global_object, context.arguments);
|
||||
} else {
|
||||
// FIXME: This code path is completely ad-hoc.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue