Remove always-true --harmony-regexp-property runtime flag
It was shipped in Chrome 64. Bug: v8:4743 Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng Change-Id: I1084f55d19c0370d344acedeab630f03c02f49e5 Reviewed-on: https://chromium-review.googlesource.com/1086799 Reviewed-by: Jakob Gruber <jgruber@chromium.org> Commit-Queue: Mathias Bynens <mathias@chromium.org> Cr-Commit-Position: refs/heads/master@{#53514}
This commit is contained in:
parent
6cddfd50db
commit
57bc75fb98
@ -4269,7 +4269,6 @@ void Bootstrapper::ExportFromRuntime(Isolate* isolate,
|
|||||||
void Genesis::InitializeGlobal_##id() {}
|
void Genesis::InitializeGlobal_##id() {}
|
||||||
|
|
||||||
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_do_expressions)
|
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_do_expressions)
|
||||||
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_regexp_property)
|
|
||||||
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_function_tostring)
|
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_function_tostring)
|
||||||
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_public_fields)
|
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_public_fields)
|
||||||
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_private_fields)
|
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_private_fields)
|
||||||
|
@ -232,7 +232,6 @@ DEFINE_IMPLICATION(harmony_class_fields, harmony_private_fields)
|
|||||||
#define HARMONY_SHIPPING(V) \
|
#define HARMONY_SHIPPING(V) \
|
||||||
V(harmony_string_trimming, "harmony String.prototype.trim{Start,End}") \
|
V(harmony_string_trimming, "harmony String.prototype.trim{Start,End}") \
|
||||||
V(harmony_sharedarraybuffer, "harmony sharedarraybuffer") \
|
V(harmony_sharedarraybuffer, "harmony sharedarraybuffer") \
|
||||||
V(harmony_regexp_property, "harmony Unicode regexp property classes") \
|
|
||||||
V(harmony_function_tostring, "harmony Function.prototype.toString") \
|
V(harmony_function_tostring, "harmony Function.prototype.toString") \
|
||||||
V(harmony_optional_catch_binding, "allow omitting binding in catch blocks") \
|
V(harmony_optional_catch_binding, "allow omitting binding in catch blocks") \
|
||||||
V(harmony_import_meta, "harmony import.meta property") \
|
V(harmony_import_meta, "harmony import.meta property") \
|
||||||
|
@ -342,20 +342,15 @@ RegExpTree* RegExpParser::ParseDisjunction() {
|
|||||||
uc32 p = Next();
|
uc32 p = Next();
|
||||||
Advance(2);
|
Advance(2);
|
||||||
if (unicode()) {
|
if (unicode()) {
|
||||||
if (FLAG_harmony_regexp_property) {
|
ZoneList<CharacterRange>* ranges =
|
||||||
ZoneList<CharacterRange>* ranges =
|
new (zone()) ZoneList<CharacterRange>(2, zone());
|
||||||
new (zone()) ZoneList<CharacterRange>(2, zone());
|
if (!ParsePropertyClass(ranges, p == 'P')) {
|
||||||
if (!ParsePropertyClass(ranges, p == 'P')) {
|
return ReportError(CStrVector("Invalid property name"));
|
||||||
return ReportError(CStrVector("Invalid property name"));
|
|
||||||
}
|
|
||||||
RegExpCharacterClass* cc = new (zone())
|
|
||||||
RegExpCharacterClass(zone(), ranges, builder->flags());
|
|
||||||
builder->AddCharacterClass(cc);
|
|
||||||
} else {
|
|
||||||
// With /u, no identity escapes except for syntax characters
|
|
||||||
// are allowed. Otherwise, all identity escapes are allowed.
|
|
||||||
return ReportError(CStrVector("Invalid escape"));
|
|
||||||
}
|
}
|
||||||
|
RegExpCharacterClass* cc = new (zone())
|
||||||
|
RegExpCharacterClass(zone(), ranges, builder->flags());
|
||||||
|
builder->AddCharacterClass(cc);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
builder->AddCharacter(p);
|
builder->AddCharacter(p);
|
||||||
}
|
}
|
||||||
@ -1590,7 +1585,7 @@ void RegExpParser::ParseClassEscape(ZoneList<CharacterRange>* ranges,
|
|||||||
return;
|
return;
|
||||||
case 'p':
|
case 'p':
|
||||||
case 'P':
|
case 'P':
|
||||||
if (FLAG_harmony_regexp_property && unicode()) {
|
if (unicode()) {
|
||||||
bool negate = Next() == 'P';
|
bool negate = Next() == 'P';
|
||||||
Advance(2);
|
Advance(2);
|
||||||
if (!ParsePropertyClass(ranges, negate)) {
|
if (!ParsePropertyClass(ranges, negate)) {
|
||||||
|
@ -2,8 +2,6 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
// Flags: --harmony-regexp-property
|
|
||||||
|
|
||||||
function t(re, s) { assertTrue(re.test(s)); }
|
function t(re, s) { assertTrue(re.test(s)); }
|
||||||
function f(re, s) { assertFalse(re.test(s)); }
|
function f(re, s) { assertFalse(re.test(s)); }
|
||||||
|
|
||||||
|
@ -2,8 +2,6 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
// Flags: --harmony-regexp-property
|
|
||||||
|
|
||||||
assertThrows("/[\\p]/u");
|
assertThrows("/[\\p]/u");
|
||||||
assertThrows("/[\\p{garbage}]/u");
|
assertThrows("/[\\p{garbage}]/u");
|
||||||
assertThrows("/[\\p{}]/u");
|
assertThrows("/[\\p{}]/u");
|
||||||
|
@ -1,18 +0,0 @@
|
|||||||
// Copyright 2016 the V8 project authors. All rights reserved.
|
|
||||||
// Use of this source code is governed by a BSD-style license that can be
|
|
||||||
// found in the LICENSE file.
|
|
||||||
|
|
||||||
// Flags: --no-harmony-regexp-property
|
|
||||||
|
|
||||||
function test(source, message) {
|
|
||||||
try {
|
|
||||||
eval(source);
|
|
||||||
} catch (e) {
|
|
||||||
assertEquals(message, e.message);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
assertUnreachable();
|
|
||||||
}
|
|
||||||
|
|
||||||
test("/\\pL/u", "Invalid regular expression: /\\pL/: Invalid escape");
|
|
||||||
test("/[\\p{L}]/u", "Invalid regular expression: /[\\p{L}]/: Invalid escape");
|
|
@ -2,8 +2,6 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
// Flags: --harmony-regexp-property
|
|
||||||
|
|
||||||
assertThrows("/\\p{Bidi_Class=L}+/u");
|
assertThrows("/\\p{Bidi_Class=L}+/u");
|
||||||
assertThrows("/\\p{bc=Left_To_Right}+/u");
|
assertThrows("/\\p{bc=Left_To_Right}+/u");
|
||||||
assertThrows("/\\p{bc=AL}+/u");
|
assertThrows("/\\p{bc=AL}+/u");
|
||||||
|
@ -2,8 +2,6 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
// Flags: --harmony-regexp-property
|
|
||||||
|
|
||||||
assertThrows("/\\p{In CJK}/u");
|
assertThrows("/\\p{In CJK}/u");
|
||||||
assertThrows("/\\p{InCJKUnifiedIdeographs}/u");
|
assertThrows("/\\p{InCJKUnifiedIdeographs}/u");
|
||||||
assertThrows("/\\p{InCJK}/u");
|
assertThrows("/\\p{InCJK}/u");
|
||||||
|
@ -2,8 +2,6 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
// Flags: --harmony-regexp-property
|
|
||||||
|
|
||||||
assertThrows("/\\p/u");
|
assertThrows("/\\p/u");
|
||||||
assertThrows("/\\p{garbage}/u");
|
assertThrows("/\\p{garbage}/u");
|
||||||
assertThrows("/\\p{}/u");
|
assertThrows("/\\p{}/u");
|
||||||
|
@ -2,8 +2,6 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
// Flags: --harmony-regexp-property
|
|
||||||
|
|
||||||
assertThrows("/\p{Block=ASCII}+/u");
|
assertThrows("/\p{Block=ASCII}+/u");
|
||||||
assertThrows("/\p{Block=ASCII}+/u");
|
assertThrows("/\p{Block=ASCII}+/u");
|
||||||
assertThrows("/\p{Block=Basic_Latin}+/u");
|
assertThrows("/\p{Block=Basic_Latin}+/u");
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
// Flags: --harmony-regexp-property
|
|
||||||
// Files: test/mjsunit/harmony/regexp-property-lu-ui.js
|
// Files: test/mjsunit/harmony/regexp-property-lu-ui.js
|
||||||
|
|
||||||
testCodePointRange(0);
|
testCodePointRange(0);
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
// Flags: --harmony-regexp-property
|
|
||||||
// Files: test/mjsunit/harmony/regexp-property-lu-ui.js
|
// Files: test/mjsunit/harmony/regexp-property-lu-ui.js
|
||||||
|
|
||||||
testCodePointRange(1);
|
testCodePointRange(1);
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
// Flags: --harmony-regexp-property
|
|
||||||
// Files: test/mjsunit/harmony/regexp-property-lu-ui.js
|
// Files: test/mjsunit/harmony/regexp-property-lu-ui.js
|
||||||
|
|
||||||
testCodePointRange(2);
|
testCodePointRange(2);
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
// Flags: --harmony-regexp-property
|
|
||||||
// Files: test/mjsunit/harmony/regexp-property-lu-ui.js
|
// Files: test/mjsunit/harmony/regexp-property-lu-ui.js
|
||||||
|
|
||||||
testCodePointRange(3);
|
testCodePointRange(3);
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
// Flags: --harmony-regexp-property
|
|
||||||
// Files: test/mjsunit/harmony/regexp-property-lu-ui.js
|
// Files: test/mjsunit/harmony/regexp-property-lu-ui.js
|
||||||
|
|
||||||
testCodePointRange(4);
|
testCodePointRange(4);
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
// Flags: --harmony-regexp-property
|
|
||||||
// Files: test/mjsunit/harmony/regexp-property-lu-ui.js
|
// Files: test/mjsunit/harmony/regexp-property-lu-ui.js
|
||||||
|
|
||||||
testCodePointRange(5);
|
testCodePointRange(5);
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
// Flags: --harmony-regexp-property
|
|
||||||
// Files: test/mjsunit/harmony/regexp-property-lu-ui.js
|
// Files: test/mjsunit/harmony/regexp-property-lu-ui.js
|
||||||
|
|
||||||
testCodePointRange(6);
|
testCodePointRange(6);
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
// Flags: --harmony-regexp-property
|
|
||||||
// Files: test/mjsunit/harmony/regexp-property-lu-ui.js
|
// Files: test/mjsunit/harmony/regexp-property-lu-ui.js
|
||||||
|
|
||||||
testCodePointRange(7);
|
testCodePointRange(7);
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
// Flags: --harmony-regexp-property
|
|
||||||
// Files: test/mjsunit/harmony/regexp-property-lu-ui.js
|
// Files: test/mjsunit/harmony/regexp-property-lu-ui.js
|
||||||
|
|
||||||
testCodePointRange(8);
|
testCodePointRange(8);
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
// Flags: --harmony-regexp-property
|
|
||||||
// Files: test/mjsunit/harmony/regexp-property-lu-ui.js
|
// Files: test/mjsunit/harmony/regexp-property-lu-ui.js
|
||||||
|
|
||||||
testCodePointRange(9);
|
testCodePointRange(9);
|
||||||
|
@ -2,8 +2,6 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
// Flags: --harmony-regexp-property
|
|
||||||
|
|
||||||
function t(re, s) { assertTrue(re.test(s)); }
|
function t(re, s) { assertTrue(re.test(s)); }
|
||||||
function f(re, s) { assertFalse(re.test(s)); }
|
function f(re, s) { assertFalse(re.test(s)); }
|
||||||
|
|
||||||
|
@ -2,8 +2,6 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
// Flags: --harmony-regexp-property
|
|
||||||
|
|
||||||
function t(re, s) { assertTrue(re.test(s)); }
|
function t(re, s) { assertTrue(re.test(s)); }
|
||||||
function f(re, s) { assertFalse(re.test(s)); }
|
function f(re, s) { assertFalse(re.test(s)); }
|
||||||
|
|
||||||
|
@ -2,8 +2,6 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
// Flags: --harmony-regexp-property
|
|
||||||
|
|
||||||
function t(re, s) { assertTrue(re.test(s)); }
|
function t(re, s) { assertTrue(re.test(s)); }
|
||||||
function f(re, s) { assertFalse(re.test(s)); }
|
function f(re, s) { assertFalse(re.test(s)); }
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
// Flags: --regexp-mode-modifiers --harmony-regexp-property
|
// Flags: --regexp-mode-modifiers
|
||||||
|
|
||||||
// These regexps are just grepped out of the other tests we already have
|
// These regexps are just grepped out of the other tests we already have
|
||||||
// and the syntax changed from out-of-line i flag to inline i flag.
|
// and the syntax changed from out-of-line i flag to inline i flag.
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
// Flags: --regexp-mode-modifiers --harmony-regexp-property
|
// Flags: --regexp-mode-modifiers
|
||||||
|
|
||||||
// These regexps are just grepped out of the other tests we already have
|
// These regexps are just grepped out of the other tests we already have
|
||||||
// and the syntax changed from out-of-line i flag to inline i flag.
|
// and the syntax changed from out-of-line i flag to inline i flag.
|
||||||
|
@ -2,8 +2,6 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
// Flags: --harmony-regexp-property
|
|
||||||
|
|
||||||
assertNull(/a\P{Any}a/u.exec("a\u{d83d}a"));
|
assertNull(/a\P{Any}a/u.exec("a\u{d83d}a"));
|
||||||
assertEquals(["a\u{d83d}a"], /a\p{Any}a/u.exec("a\u{d83d}a"));
|
assertEquals(["a\u{d83d}a"], /a\p{Any}a/u.exec("a\u{d83d}a"));
|
||||||
assertEquals(["a\u{d83d}a"], /(?:a\P{Any}a|a\p{Any}a)/u.exec("a\u{d83d}a"));
|
assertEquals(["a\u{d83d}a"], /(?:a\P{Any}a|a\p{Any}a)/u.exec("a\u{d83d}a"));
|
||||||
|
@ -2,6 +2,4 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
// Flags: --harmony-regexp-property
|
|
||||||
|
|
||||||
assertThrows(() => new RegExp("\\1(\\P{P\0[}()/", "u"), SyntaxError);
|
assertThrows(() => new RegExp("\\1(\\P{P\0[}()/", "u"), SyntaxError);
|
||||||
|
@ -43,7 +43,6 @@ from testrunner.outproc import test262
|
|||||||
# TODO(littledan): move the flag mapping into the status file
|
# TODO(littledan): move the flag mapping into the status file
|
||||||
FEATURE_FLAGS = {
|
FEATURE_FLAGS = {
|
||||||
'BigInt': '--harmony-bigint',
|
'BigInt': '--harmony-bigint',
|
||||||
'regexp-unicode-property-escapes': '--harmony-regexp-property',
|
|
||||||
'class-fields-public': '--harmony-public-fields',
|
'class-fields-public': '--harmony-public-fields',
|
||||||
'optional-catch-binding': '--harmony-optional-catch-binding',
|
'optional-catch-binding': '--harmony-optional-catch-binding',
|
||||||
'class-fields-private': '--harmony-private-fields',
|
'class-fields-private': '--harmony-private-fields',
|
||||||
|
Loading…
Reference in New Issue
Block a user