mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:47:35 +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:
parent
2f1d6c0b9a
commit
2e81cc4cf7
5 changed files with 50 additions and 31 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue