mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 08:36:15 +00:00
LibJS: Use Identifier to represent FunctionParameter name
Using identifier instead of string allows to store supplemental information about whether it can be represented as local variable.
This commit is contained in:
committed by
Andreas Kling
parent
2f1d6c0b9a
commit
2e81cc4cf7
@@ -1128,7 +1128,7 @@ Object* create_mapped_arguments_object(VM& vm, FunctionObject& function, Vector<
|
||||
VERIFY(formals.size() <= NumericLimits<i32>::max());
|
||||
for (i32 index = static_cast<i32>(formals.size()) - 1; index >= 0; --index) {
|
||||
// a. Let name be parameterNames[index].
|
||||
auto const& name = formals[index].binding.get<DeprecatedFlyString>();
|
||||
auto const& name = formals[index].binding.get<NonnullRefPtr<Identifier const>>()->string();
|
||||
|
||||
// b. If name is not an element of mappedNames, then
|
||||
if (mapped_names.contains(name))
|
||||
|
||||
Reference in New Issue
Block a user