Ship ES2015 Symbol.species

This patch moves the ES2015 Symbol.species feature from staging to
shipping. @@species should be good to ship now that the regression
from fast-path cases in concat, slice and splice have been addressed.

R=adamk
BUG=v8:4093
LOG=Y
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_chromium_rel_ng;tryserver.blink:linux_blink_rel

Review URL: https://codereview.chromium.org/1721993002

Cr-Commit-Position: refs/heads/master@{#34226}
This commit is contained in:
littledan 2016-02-23 11:51:38 -08:00 committed by Commit bot
parent 3c6a3ca7b0
commit 1353b37d40
4 changed files with 15 additions and 11 deletions

View File

@ -222,7 +222,6 @@ DEFINE_IMPLICATION(es_staging, harmony_tailcalls)
#define HARMONY_STAGED(V) \
V(harmony_function_name, "harmony Function name inference") \
V(harmony_regexp_lookbehind, "harmony regexp lookbehind") \
V(harmony_species, "harmony Symbol.species") \
V(harmony_instanceof, "harmony instanceof support")
// Features that are shipping (turned on by default, but internal flag remains).
@ -238,7 +237,8 @@ DEFINE_IMPLICATION(es_staging, harmony_tailcalls)
V(harmony_sloppy_function, "harmony sloppy function block scoping") \
V(harmony_proxies, "harmony proxies") \
V(harmony_reflect, "harmony Reflect API") \
V(harmony_regexp_subclass, "harmony regexp subclassing")
V(harmony_regexp_subclass, "harmony regexp subclassing") \
V(harmony_species, "harmony Symbol.species")
// Once a shipping feature has proved stable in the wild, it will be dropped
// from HARMONY_SHIPPING, all occurrences of the FLAG_ variable are removed,

View File

@ -811,9 +811,10 @@ logger.get = function(t, trap, r) {
log.length = 0;
assertEquals([obj], Array.prototype.concat.apply(obj));
assertEquals(1, log.length);
assertEquals(2, log.length); // An extra read for the constructor
for (var i in log) assertSame(target, log[i][1]);
assertEquals(["get", target, Symbol.isConcatSpreadable, obj], log[0]);
assertEquals(["get", target, "constructor", obj], log[0]);
assertEquals(["get", target, Symbol.isConcatSpreadable, obj], log[1]);
})();
@ -835,14 +836,15 @@ logger.get = function(t, trap, r) {
log.length = 0;
assertEquals(["a", "b"], Array.prototype.concat.apply(obj));
assertEquals(6, log.length);
assertEquals(7, log.length);
for (var i in log) assertSame(target, log[i][1]);
assertEquals(["get", target, Symbol.isConcatSpreadable, obj], log[0]);
assertEquals(["get", target, "length", obj], log[1]);
assertEquals(["has", target, "0"], log[2]);
assertEquals(["get", target, "0", obj], log[3]);
assertEquals(["has", target, "1"], log[4]);
assertEquals(["get", target, "1", obj], log[5]);
assertEquals(["get", target, "constructor", obj], log[0]);
assertEquals(["get", target, Symbol.isConcatSpreadable, obj], log[1]);
assertEquals(["get", target, "length", obj], log[2]);
assertEquals(["has", target, "0"], log[3]);
assertEquals(["get", target, "0", obj], log[4]);
assertEquals(["has", target, "1"], log[5]);
assertEquals(["get", target, "1", obj], log[6]);
})();

View File

@ -31,6 +31,7 @@ function MyPromise(resolver) {
};
MyPromise.prototype = new Promise(function() {});
MyPromise.__proto__ = Promise;
p.constructor = MyPromise;
var q = p.chain(

View File

@ -28,6 +28,7 @@ function MyPromise(resolver) {
};
MyPromise.prototype = new Promise(function() {});
MyPromise.__proto__ = Promise;
p.constructor = MyPromise;
var q = p.chain(