| Index: src/runtime.cc
|
| diff --git a/src/runtime.cc b/src/runtime.cc
|
| index 5f57e0eae422e8c126bd696cb917ddedeccc0894..5aef7b50ec36fb8f0e5b1baa374002bf3c91b4e1 100644
|
| --- a/src/runtime.cc
|
| +++ b/src/runtime.cc
|
| @@ -7234,11 +7234,11 @@ static MaybeObject* Runtime_NewArgumentsFast(RUNTIME_CALLING_CONVENTION) {
|
|
|
| ScopeInfo<> scope_info(callee->shared()->scope_info());
|
| while (index >= 0) {
|
| - // Detect duplicate names.
|
| + // Detect duplicate names to the right in the parameter list.
|
| Handle<String> name = scope_info.parameter_name(index);
|
| int context_slot_count = scope_info.number_of_context_slots();
|
| bool duplicate = false;
|
| - for (int j = 0; j < index; ++j) {
|
| + for (int j = index + 1; j < parameter_count; ++j) {
|
| if (scope_info.parameter_name(j).is_identical_to(name)) {
|
| duplicate = true;
|
| break;
|
|
|