Revision: 7441
Author: [email protected]
Date: Wed Mar 30 07:36:58 2011
Log: [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]
Review URL: http://codereview.chromium.org/6765026
http://code.google.com/p/v8/source/detail?r=7441
Modified:
/branches/experimental/arguments/src/runtime.cc
/branches/experimental/arguments/test/mozilla/mozilla.status
/branches/experimental/arguments/test/sputnik/sputnik.status
=======================================
--- /branches/experimental/arguments/src/runtime.cc Wed Mar 30 04:09:54 2011
+++ /branches/experimental/arguments/src/runtime.cc Wed Mar 30 07:36:58 2011
@@ -7234,11 +7234,11 @@
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;
=======================================
--- /branches/experimental/arguments/test/mozilla/mozilla.status Tue Mar 15
07:19:18 2011
+++ /branches/experimental/arguments/test/mozilla/mozilla.status Wed Mar 30
07:36:58 2011
@@ -587,11 +587,6 @@
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
=======================================
--- /branches/experimental/arguments/test/sputnik/sputnik.status Wed Feb 23
22:38:45 2011
+++ /branches/experimental/arguments/test/sputnik/sputnik.status Wed Mar 30
07:36:58 2011
@@ -30,14 +30,6 @@
##################### 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