Reviewers: Mads Ager,
Description:
[Arguments] Fix a small bug and change some test expectations.
When handling duplicate parameter names, the first duplicate named parameter
"won" the prize of being aliased by the arguments object. It should be the
last duplicate that wins.
Also, remove the FAIL expectation for some tests that we now pass.
[email protected]
Please review this at http://codereview.chromium.org/6765026/
SVN Base: https://v8.googlecode.com/svn/branches/experimental/arguments
Affected files:
M src/runtime.cc
M test/mozilla/mozilla.status
M test/sputnik/sputnik.status
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;
Index: test/mozilla/mozilla.status
diff --git a/test/mozilla/mozilla.status b/test/mozilla/mozilla.status
index
b9528bd9534d7b57d032a1602c4956bd9f5eb98b..9266a91dcbb9e79accb0dfef57d002442172989b
100644
--- a/test/mozilla/mozilla.status
+++ b/test/mozilla/mozilla.status
@@ -587,11 +587,6 @@ js1_5/Regress/regress-416737-02: FAIL_OK
js1_5/Array/regress-350256-02: FAIL
-# This fails because 'delete arguments[i]' does not disconnect the
-# argument from the arguments array. See issue #900066.
-ecma_3/Function/regress-137181: FAIL
-
-
# 'export' and 'import' are not keywords in V8.
ecma_2/Exceptions/lexical-010: FAIL
ecma_2/Exceptions/lexical-022: FAIL
Index: test/sputnik/sputnik.status
diff --git a/test/sputnik/sputnik.status b/test/sputnik/sputnik.status
index
6da87eac95acb69806dafab2271e5cf092412055..437dccf8fd27a8773e1d16c8eb7b95cbf5ea4f25
100644
--- a/test/sputnik/sputnik.status
+++ b/test/sputnik/sputnik.status
@@ -30,14 +30,6 @@ def FAIL_OK = FAIL, OKAY
##################### DELIBERATE INCOMPATIBILITIES #####################
-# 900066: Deleting elements in .arguments should disconnect the
-# element from the actual arguments. Implementing this is nontrivial
-# and we have no indication that anything on the web depends on this
-# feature.
-S13_A13_T1: FAIL_OK
-S13_A13_T2: FAIL_OK
-S13_A13_T3: FAIL_OK
-
# This tests precision of trignometric functions. We're slightly off
# from the implementation in libc (~ 1e-17) but it's not clear if we
# or they are closer to the right answer, or if it even matters.
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev