RegExp.flags: check individual flags in correct order
ECMA262 22.2.6.4 specifies that the individual boolean-valued flags should be checked in a particular order by the RegExp.flags getter. 'hasIndices' should be first - not last. Bug: v8:13666 Change-Id: Ic4894dce84dc2454213d06c7356db0ded792a5be Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4171640 Reviewed-by: Shu-yu Guo <syg@chromium.org> Commit-Queue: Shu-yu Guo <syg@chromium.org> Cr-Commit-Position: refs/heads/main@{#85376}
This commit is contained in:
parent
b7cce4aa16
commit
84697034b6
1
AUTHORS
1
AUTHORS
@ -153,6 +153,7 @@ Jiawen Geng <technicalcute@gmail.com>
|
||||
Jiaxun Yang <jiaxun.yang@flygoat.com>
|
||||
Joel Stanley <joel@jms.id.au>
|
||||
Johan Bergström <johan@bergstroem.nu>
|
||||
Johan Levin <johan13@gmail.com>
|
||||
John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
|
||||
Jonathan Liu <net147@gmail.com>
|
||||
Juan Arboleda <soyjuanarbol@gmail.com>
|
||||
|
@ -1023,13 +1023,13 @@ TNode<String> RegExpBuiltinsAssembler::FlagsGetter(TNode<Context> context,
|
||||
BIND(&next); \
|
||||
} while (false)
|
||||
|
||||
CASE_FOR_FLAG("hasIndices", JSRegExp::kHasIndices);
|
||||
CASE_FOR_FLAG("global", JSRegExp::kGlobal);
|
||||
CASE_FOR_FLAG("ignoreCase", JSRegExp::kIgnoreCase);
|
||||
CASE_FOR_FLAG("multiline", JSRegExp::kMultiline);
|
||||
CASE_FOR_FLAG("dotAll", JSRegExp::kDotAll);
|
||||
CASE_FOR_FLAG("unicode", JSRegExp::kUnicode);
|
||||
CASE_FOR_FLAG("sticky", JSRegExp::kSticky);
|
||||
CASE_FOR_FLAG("hasIndices", JSRegExp::kHasIndices);
|
||||
#undef CASE_FOR_FLAG
|
||||
|
||||
#define CASE_FOR_FLAG(NAME, V8_FLAG_EXTERN_REF, FLAG) \
|
||||
|
@ -277,9 +277,6 @@
|
||||
# http://crbug/v8/10905
|
||||
'language/identifier-resolution/assign-to-global-undefined': [FAIL],
|
||||
|
||||
# http://crbug/v8/11531
|
||||
'built-ins/RegExp/prototype/flags/get-order': [FAIL],
|
||||
|
||||
# http://crbug/v8/11533
|
||||
'language/statements/class/subclass/default-constructor-spread-override': [FAIL],
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user