Backed out changeset 8825d25eab2d (bug 1165052)
authorTooru Fujisawa <arai_a@mac.com>
Mon, 28 Mar 2016 06:49:57 +0900
changeset 290673 705cf9ac47e9ccb246d18b5c8a0b6ce6419fa556
parent 290672 cd9eee8108af36b5f26dce4c1934476cc3cd38d5
child 290674 bc9e586a8f1944d87e53f601d41ea860b272a3bc
push id19656
push usergwagner@mozilla.com
push dateMon, 04 Apr 2016 13:43:23 +0000
treeherderb2g-inbound@e99061fde28a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1165052
milestone48.0a1
backs out8825d25eab2d107c5be515b15ef4b5ee1de79421
Backed out changeset 8825d25eab2d (bug 1165052)
js/src/builtin/Array.js
js/src/jsarray.cpp
js/src/tests/ecma_6/Symbol/species.js
--- a/js/src/builtin/Array.js
+++ b/js/src/builtin/Array.js
@@ -865,22 +865,16 @@ function ArrayToString() {
     var func = array.join;
 
     // Steps 5-6.
     if (!IsCallable(func))
         return callFunction(std_Object_toString, array);
     return callContentFunction(func, array);
 }
 
-// ES 2016 draft Mar 25, 2016 22.1.2.5.
-function ArraySpecies() {
-    // Step 1.
-    return this;
-}
-
 // ES 2016 draft Mar 25, 2016 22.1.3.1.
 // Note: Array.prototype.concat.length is 1.
 function ArrayConcat(arg1) {
     // Step 1.
     var O = ToObject(this);
 
     // Step 2.
     var A = std_Array(0);
--- a/js/src/jsarray.cpp
+++ b/js/src/jsarray.cpp
@@ -3012,21 +3012,16 @@ static const JSFunctionSpec array_static
     JS_SELF_HOSTED_FN("reduce",      "ArrayStaticReduce", 2,0),
     JS_SELF_HOSTED_FN("reduceRight", "ArrayStaticReduceRight", 2,0),
     JS_SELF_HOSTED_FN("from",        "ArrayFrom", 3,0),
     JS_FN("of",                 array_of,           0,0),
 
     JS_FS_END
 };
 
-const JSPropertySpec array_static_props[] = {
-    JS_SELF_HOSTED_SYM_GET(species, "ArraySpecies", 0),
-    JS_PS_END
-};
-
 /* ES5 15.4.2 */
 bool
 js::ArrayConstructor(JSContext* cx, unsigned argc, Value* vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
 
     RootedObject proto(cx);
     if (!GetPrototypeFromCallableConstructor(cx, args, &proto))
@@ -3154,17 +3149,17 @@ const Class ArrayObject::class_ = {
     nullptr, /* call */
     nullptr, /* hasInstance */
     nullptr, /* construct */
     nullptr, /* trace */
     {
         GenericCreateConstructor<ArrayConstructor, 1, AllocKind::FUNCTION, &jit::JitInfo_Array>,
         CreateArrayPrototype,
         array_static_methods,
-        array_static_props,
+        nullptr,
         array_methods,
         nullptr,
         array_proto_finish
     }
 };
 
 /*
  * Array allocation functions.
--- a/js/src/tests/ecma_6/Symbol/species.js
+++ b/js/src/tests/ecma_6/Symbol/species.js
@@ -1,24 +1,24 @@
 var BUGNUMBER = 1131043;
 var summary = "Implement @@species getter for builtin types";
 
 print(BUGNUMBER + ": " + summary);
 
 var TypedArray = Object.getPrototypeOf(Int8Array);
 
-for (var C of [Array, Map, Set,
+for (var C of [Map, Set,
                Int8Array, Uint8Array, Uint8ClampedArray,
                Int16Array, Uint16Array, Int32Array, Uint32Array,
                Float32Array, Float64Array,
                ArrayBuffer]) {
   assertEq(C[Symbol.species], C);
 }
 
-for (C of [Array, Map, Set,
+for (C of [Map, Set,
            TypedArray,
            ArrayBuffer]) {
   var desc = Object.getOwnPropertyDescriptor(C, Symbol.species);
   assertDeepEq(Object.keys(desc).sort(), ["configurable", "enumerable", "get", "set"]);
   assertEq(desc.set, undefined);
   assertEq(desc.enumerable, false);
   assertEq(desc.configurable, true);
   assertEq(desc.get.apply(null), null);