From 84492bb66b340f4e0df36758e98fddbb10b5d1dc Mon Sep 17 00:00:00 2001 From: adamk Date: Thu, 31 Mar 2016 17:38:05 -0700 Subject: [PATCH] Ship --harmony-regexp-exec There are still spec compliance fixes to be made, but this patch turns the flag to shipping to make sure we get more canary coverage and performance data from the bots. BUG=v8:4602 LOG=y Review URL: https://codereview.chromium.org/1847103002 Cr-Commit-Position: refs/heads/master@{#35181} --- src/flag-definitions.h | 2 +- test/mjsunit/es6/regexp-flags.js | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/flag-definitions.h b/src/flag-definitions.h index 3d368e3e236..4a2b601c230 100644 --- a/src/flag-definitions.h +++ b/src/flag-definitions.h @@ -204,7 +204,6 @@ DEFINE_IMPLICATION(es_staging, move_object_start) // Features that are complete (but still behind --harmony/es-staging flag). #define HARMONY_STAGED(V) \ - V(harmony_regexp_exec, "harmony RegExp exec override behavior") \ V(harmony_regexp_lookbehind, "harmony regexp lookbehind") \ V(harmony_tailcalls, "harmony tail calls") \ V(harmony_object_values_entries, "harmony Object.values / Object.entries") \ @@ -219,6 +218,7 @@ DEFINE_IMPLICATION(es_staging, move_object_start) V(harmony_instanceof, "harmony instanceof support") \ V(harmony_iterator_close, "harmony iterator finalization") \ V(harmony_unicode_regexps, "harmony unicode regexps") \ + V(harmony_regexp_exec, "harmony RegExp exec override behavior") \ V(harmony_sloppy, "harmony features in sloppy mode") \ V(harmony_sloppy_let, "harmony let in sloppy mode") \ V(harmony_sloppy_function, "harmony sloppy function block scoping") \ diff --git a/test/mjsunit/es6/regexp-flags.js b/test/mjsunit/es6/regexp-flags.js index 98d9dec65bc..ad40c43b69b 100644 --- a/test/mjsunit/es6/regexp-flags.js +++ b/test/mjsunit/es6/regexp-flags.js @@ -44,9 +44,11 @@ assertEquals(2, get_count); // Overridden flag getters affects the flags getter. assertEquals("gi", r3.flags); assertEquals(4, get_count); -// Overridden flag getters do not affect the internal flags. +// Overridden flag getters affect string.replace +// TODO(adamk): Add more tests here once we've switched +// to use [[OriginalFlags]] in more cases. assertEquals(expected, string.replace(r3, "X")); -assertEquals(4, get_count); +assertEquals(5, get_count); function testName(name) {