Revert r9596 due to page-cycler regressions.
authormstarzinger@chromium.org <mstarzinger@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 4 Nov 2011 13:05:16 +0000 (13:05 +0000)
committermstarzinger@chromium.org <mstarzinger@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 4 Nov 2011 13:05:16 +0000 (13:05 +0000)
R=vegorov@chromium.org

Review URL: http://codereview.chromium.org/8463006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9883 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/v8natives.js
test/test262/test262.status

index 9595ad1..6173352 100644 (file)
@@ -686,7 +686,12 @@ function DefineProxyProperty(obj, p, attributes, should_throw) {
 
 
 // ES5 8.12.9.
-function DefineObjectProperty(obj, p, desc, should_throw) {
+function DefineOwnProperty(obj, p, desc, should_throw) {
+  if (%IsJSProxy(obj)) {
+    var attributes = FromGenericPropertyDescriptor(desc);
+    return DefineProxyProperty(obj, p, attributes, should_throw);
+  }
+
   var current_or_access = %GetOwnProperty(ToObject(obj), ToString(p));
   // A false value here means that access checks failed.
   if (current_or_access === false) return void 0;
@@ -850,63 +855,6 @@ function DefineObjectProperty(obj, p, desc, should_throw) {
 }
 
 
-// ES5 section 15.4.5.1.
-function DefineArrayProperty(obj, p, desc, should_throw) {
-  var length_desc = GetOwnProperty(obj, "length");
-  var length = length_desc.getValue();
-
-  // Step 3 - Special handling for the length property.
-  if (p == "length") {
-    if (!desc.hasValue()) {
-      return DefineObjectProperty(obj, "length", desc, should_throw);
-    }
-    var new_length = ToUint32(desc.getValue());
-    if (new_length != ToNumber(desc.getValue())) {
-      throw new $RangeError('defineProperty() array length out of range');
-    }
-    // TODO(1756): There still are some uncovered corner cases left on how to
-    // handle changes to the length property of arrays.
-    return DefineObjectProperty(obj, "length", desc, should_throw);
-  }
-
-  // Step 4 - Special handling for array index.
-  var index = ToUint32(p);
-  if (index == ToNumber(p) && index != 4294967295) {
-    if ((index >= length && !length_desc.isWritable()) ||
-        !DefineObjectProperty(obj, p, desc, true)) {
-      if (should_throw) {
-        throw MakeTypeError("define_disallowed", [p]);
-      } else {
-        return false;
-      }
-    }
-    if (index >= length) {
-      // TODO(mstarzinger): We should actually set the value of the property
-      // descriptor here and pass it to DefineObjectProperty(). Take a look at
-      // ES5 section 15.4.5.1, step 4.e.i and 4.e.ii for details.
-      obj.length = index + 1;
-    }
-    return true;
-  }
-
-  // Step 5 - Fallback to default implementation.
-  return DefineObjectProperty(obj, p, desc, should_throw);
-}
-
-
-// ES5 section 8.12.9, ES5 section 15.4.5.1 and Harmony proxies.
-function DefineOwnProperty(obj, p, desc, should_throw) {
-  if (%IsJSProxy(obj)) {
-    var attributes = FromGenericPropertyDescriptor(desc);
-    return DefineProxyProperty(obj, p, attributes, should_throw);
-  } else if (IS_ARRAY(obj)) {
-    return DefineArrayProperty(obj, p, desc, should_throw);
-  } else {
-    return DefineObjectProperty(obj, p, desc, should_throw);
-  }
-}
-
-
 // ES5 section 15.2.3.2.
 function ObjectGetPrototypeOf(obj) {
   if (!IS_SPEC_OBJECT(obj))
index 4bdd6c1..7c03cba 100644 (file)
@@ -45,6 +45,7 @@ S15.3.3.1_A4: FAIL
 # V8 Bug: http://code.google.com/p/v8/issues/detail?id=1756
 15.2.3.6-4-116: FAIL
 15.2.3.6-4-117: FAIL
+15.2.3.6-4-125: FAIL
 15.2.3.6-4-126: FAIL
 15.2.3.6-4-127: FAIL
 15.2.3.6-4-128: FAIL
@@ -52,17 +53,31 @@ S15.3.3.1_A4: FAIL
 15.2.3.6-4-130: FAIL
 15.2.3.6-4-131: FAIL
 15.2.3.6-4-132: FAIL
+15.2.3.6-4-133: FAIL
+15.2.3.6-4-134: FAIL
+15.2.3.6-4-135: FAIL
+15.2.3.6-4-136: FAIL
 15.2.3.6-4-137: FAIL
+15.2.3.6-4-138: FAIL
+15.2.3.6-4-139: FAIL
+15.2.3.6-4-140: FAIL
+15.2.3.6-4-141: FAIL
 15.2.3.6-4-142: FAIL
 15.2.3.6-4-143: FAIL
 15.2.3.6-4-144: FAIL
+15.2.3.6-4-145: FAIL
 15.2.3.6-4-146: FAIL
 15.2.3.6-4-147: FAIL
 15.2.3.6-4-148: FAIL
 15.2.3.6-4-149: FAIL
+15.2.3.6-4-150: FAIL
 15.2.3.6-4-151: FAIL
+15.2.3.6-4-152: FAIL
+15.2.3.6-4-153: FAIL
 15.2.3.6-4-154: FAIL
 15.2.3.6-4-155: FAIL
+15.2.3.6-4-156: FAIL
+15.2.3.6-4-157: FAIL
 15.2.3.6-4-159: FAIL
 15.2.3.6-4-161: FAIL
 15.2.3.6-4-165: FAIL
@@ -81,6 +96,37 @@ S15.3.3.1_A4: FAIL
 15.2.3.6-4-178: FAIL
 15.2.3.6-4-179-1: FAIL
 15.2.3.6-4-181: FAIL
+15.2.3.6-4-183: FAIL
+15.2.3.6-4-188: FAIL
+15.2.3.6-4-189: FAIL
+15.2.3.6-4-275: FAIL
+15.2.3.6-4-276: FAIL
+15.2.3.6-4-292-1: FAIL
+15.2.3.6-4-293-2: FAIL
+15.2.3.6-4-293-3: FAIL
+15.2.3.6-4-294-1: FAIL
+15.2.3.6-4-295-1: FAIL
+15.2.3.6-4-296-1: FAIL
+15.2.3.6-4-333-11: FAIL
+15.2.3.6-4-360-1: FAIL
+15.2.3.6-4-360-6: FAIL
+15.2.3.6-4-360-7: FAIL
+15.2.3.6-4-405: FAIL
+15.2.3.6-4-410: FAIL
+15.2.3.6-4-415: FAIL
+15.2.3.6-4-420: FAIL
+15.2.3.6-4-612: FAIL
+15.2.3.6-4-613: FAIL
+15.2.3.6-4-614: FAIL
+15.2.3.6-4-615: FAIL
+15.2.3.6-4-616: FAIL
+15.2.3.6-4-617: FAIL
+15.2.3.6-4-618: FAIL
+15.2.3.6-4-619: FAIL
+15.2.3.6-4-620: FAIL
+15.2.3.6-4-621: FAIL
+15.2.3.6-4-623: FAIL
+15.2.3.6-4-624: FAIL
 15.2.3.7-6-a-112: FAIL
 15.2.3.7-6-a-113: FAIL
 15.2.3.7-6-a-122: FAIL
@@ -120,6 +166,79 @@ S15.3.3.1_A4: FAIL
 15.2.3.7-6-a-175: FAIL
 15.2.3.7-6-a-176: FAIL
 15.2.3.7-6-a-177: FAIL
+15.2.3.7-6-a-121: FAIL
+15.2.3.7-6-a-130: FAIL
+15.2.3.7-6-a-129: FAIL
+15.2.3.7-6-a-131: FAIL
+15.2.3.7-6-a-132: FAIL
+15.2.3.7-6-a-136: FAIL
+15.2.3.7-6-a-135: FAIL
+15.2.3.7-6-a-134: FAIL
+15.2.3.7-6-a-137: FAIL
+15.2.3.7-6-a-141: FAIL
+15.2.3.7-6-a-146: FAIL
+15.2.3.7-6-a-148: FAIL
+15.2.3.7-6-a-149: FAIL
+15.2.3.7-6-a-152: FAIL
+15.2.3.7-6-a-153: FAIL
+15.2.3.7-6-a-179: FAIL
+15.2.3.7-6-a-184: FAIL
+15.2.3.7-6-a-185: FAIL
+15.2.3.7-6-a-264: FAIL
+15.2.3.7-6-a-265: FAIL
+15.4.4.14-9-b-i-11: FAIL
+15.4.4.14-9-b-i-13: FAIL
+15.4.4.14-9-b-i-17: FAIL
+15.4.4.14-9-b-i-19: FAIL
+15.4.4.14-9-b-i-28: FAIL
+15.4.4.14-9-b-i-30: FAIL
+15.4.4.15-8-a-14: FAIL
+15.4.4.15-8-b-i-11: FAIL
+15.4.4.15-8-b-i-13: FAIL
+15.4.4.15-8-b-i-17: FAIL
+15.4.4.15-8-b-i-28: FAIL
+15.4.4.15-8-b-i-30: FAIL
+15.4.4.16-7-c-i-10: FAIL
+15.4.4.16-7-c-i-12: FAIL
+15.4.4.16-7-c-i-14: FAIL
+15.4.4.16-7-c-i-18: FAIL
+15.4.4.16-7-c-i-20: FAIL
+15.4.4.16-7-c-i-28: FAIL
+15.4.4.17-7-c-i-10: FAIL
+15.4.4.17-7-c-i-12: FAIL
+15.4.4.17-7-c-i-14: FAIL
+15.4.4.17-7-c-i-18: FAIL
+15.4.4.17-7-c-i-20: FAIL
+15.4.4.17-7-c-i-28: FAIL
+15.4.4.18-7-c-i-10: FAIL
+15.4.4.18-7-c-i-12: FAIL
+15.4.4.18-7-c-i-14: FAIL
+15.4.4.18-7-c-i-18: FAIL
+15.4.4.18-7-c-i-20: FAIL
+15.4.4.18-7-c-i-28: FAIL
+15.4.4.19-8-c-i-10: FAIL
+15.4.4.19-8-c-i-14: FAIL
+15.4.4.19-8-c-i-12: FAIL
+15.4.4.19-8-c-i-18: FAIL
+15.4.4.19-8-c-i-19: FAIL
+15.4.4.19-8-c-i-28: FAIL
+15.4.4.20-9-c-i-10: FAIL
+15.4.4.20-9-c-i-12: FAIL
+15.4.4.20-9-c-i-14: FAIL
+15.4.4.20-9-c-i-18: FAIL
+15.4.4.20-9-c-i-20: FAIL
+15.4.4.20-9-c-i-28: FAIL
+15.4.4.22-8-b-2: FAIL
+15.4.4.22-8-b-iii-1-12: FAIL
+15.4.4.22-8-b-iii-1-18: FAIL
+15.4.4.22-8-b-iii-1-20: FAIL
+15.4.4.22-8-b-iii-1-33: FAIL
+15.4.4.22-8-b-iii-1-30: FAIL
+15.4.4.22-9-b-13: FAIL
+15.4.4.22-9-b-24: FAIL
+15.4.4.22-9-b-26: FAIL
+15.4.4.22-9-b-9: FAIL
+15.4.4.22-9-c-i-30: FAIL
 
 # V8 Bug: http://code.google.com/p/v8/issues/detail?id=1772
 15.2.3.6-4-292-1: FAIL