-
Notifications
You must be signed in to change notification settings - Fork 475
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updates to regexp-match-indices tests based on d-flag #2934
Conversation
Data point: I have prototyped an implementation of regexp-match-indices with the /d flag in SpiderMonkey, but we are waiting on the updated test262 tests before shipping. It looks like V8 has already landed their implementation with /d (guarded behind a flag). |
WebKit/WebKit@7e63c11 JSC change is also ready. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks mostly good. I think there are a couple of copy-paste errors as I commented below for tests test/built-ins/RegExp/match-indices/indices-groups-object-undefined.js and test/built-ins/RegExp/prototype/flags/coercion-hasIndices.js.
It also looks like there is some existing dead code in test/built-ins/RegExp/match-indices/indices-groups-properties.js
test/built-ins/RegExp/match-indices/indices-groups-properties.js
Outdated
Show resolved
Hide resolved
test/built-ins/RegExp/match-indices/indices-groups-properties.js
Outdated
Show resolved
Hide resolved
https://bugs.webkit.org/show_bug.cgi?id=222157 Reviewed by Yusuke Suzuki. JSTests: Added a new test to verify that all flag RegExp flag combinations work round tripping from flags to flag proerties and back. Added standalone versions of the updated regexp-match-indices from the PR tc39/test262#2934 as JSTest/stress test. Disabled the regexp-match-indices feature test in test262 until the pull request with updated tests land and we update the WebKit version. This is tracked in https://bugs.webkit.org/show_bug.cgi?id=222142. * stress/regexp-all-flags.js: Added. (flagsFromVariation): (setPropertiesForVariation): (missingPropertiesForVariation): (test.let.flagsSet.get call): (test): * stress/test262-indices-array-element.js: Added. (assertSameValue): * stress/test262-indices-array-matched.js: Added. (assertSameValue): (assertCompareArray): * stress/test262-indices-array-non-unicode-match.js: Added. (assertSameValue): (assertCompareArray): (assertDeepEqual): (verifyProperty): * stress/test262-indices-array-properties.js: Added. (verifyProperty): * stress/test262-indices-array-unicode-match.js: Added. (assertSameValue): (assertCompareArray): (assertDeepEqual): (verifyProperty): * stress/test262-indices-array-unicode-property-names.js: Added. (assertCompareArray): * stress/test262-indices-array-unmatched.js: Added. (assertSameValue): * stress/test262-indices-array.js: Added. (assert): (assertSameValue): * stress/test262-indices-groups-object-undefined.js: Added. (verifyProperty): * stress/test262-indices-groups-object-unmatched.js: Added. (assertSameValue): (assertCompareArray): * stress/test262-indices-groups-object.js: Added. (assertSameValue): (assertCompareArray): (verifyProperty): * stress/test262-indices-groups-properties.js: Added. (assertCompareArray): (verifyProperty): * stress/test262-indices-property.js: Added. (assertSameValue): (verifyProperty): * test262/config.yaml: Source/JavaScriptCore: When hasIndices is true, but there aren't any named groups, the spec says that we should create the indices.groups property is the value undefined. Increased the size of FlagsString to 7 plus terminater to account for the new 'd' flags. * runtime/RegExpMatchesArray.h: (JSC::createRegExpMatchesArray): * runtime/RegExpPrototype.cpp: Canonical link: https://commits.webkit.org/234355@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@273160 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=222157 Reviewed by Yusuke Suzuki. JSTests: Added a new test to verify that all flag RegExp flag combinations work round tripping from flags to flag proerties and back. Added standalone versions of the updated regexp-match-indices from the PR tc39/test262#2934 as JSTest/stress test. Disabled the regexp-match-indices feature test in test262 until the pull request with updated tests land and we update the WebKit version. This is tracked in https://bugs.webkit.org/show_bug.cgi?id=222142. * stress/regexp-all-flags.js: Added. (flagsFromVariation): (setPropertiesForVariation): (missingPropertiesForVariation): (test.let.flagsSet.get call): (test): * stress/test262-indices-array-element.js: Added. (assertSameValue): * stress/test262-indices-array-matched.js: Added. (assertSameValue): (assertCompareArray): * stress/test262-indices-array-non-unicode-match.js: Added. (assertSameValue): (assertCompareArray): (assertDeepEqual): (verifyProperty): * stress/test262-indices-array-properties.js: Added. (verifyProperty): * stress/test262-indices-array-unicode-match.js: Added. (assertSameValue): (assertCompareArray): (assertDeepEqual): (verifyProperty): * stress/test262-indices-array-unicode-property-names.js: Added. (assertCompareArray): * stress/test262-indices-array-unmatched.js: Added. (assertSameValue): * stress/test262-indices-array.js: Added. (assert): (assertSameValue): * stress/test262-indices-groups-object-undefined.js: Added. (verifyProperty): * stress/test262-indices-groups-object-unmatched.js: Added. (assertSameValue): (assertCompareArray): * stress/test262-indices-groups-object.js: Added. (assertSameValue): (assertCompareArray): (verifyProperty): * stress/test262-indices-groups-properties.js: Added. (assertCompareArray): (verifyProperty): * stress/test262-indices-property.js: Added. (assertSameValue): (verifyProperty): * test262/config.yaml: Source/JavaScriptCore: When hasIndices is true, but there aren't any named groups, the spec says that we should create the indices.groups property is the value undefined. Increased the size of FlagsString to 7 plus terminater to account for the new 'd' flags. * runtime/RegExpMatchesArray.h: (JSC::createRegExpMatchesArray): * runtime/RegExpPrototype.cpp: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@273160 268f45cc-cd09-0410-ab3c-d52691b4dbfc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Thanks for taking care of those quickly.
FYI: I'll be putting up a PR against |
@rwaldron can you review and (hopefully) merge? |
ping: @rwaldron, @leobalter I'd appreciate a review, thanks. |
Updates based on the changes from tc39/proposal-regexp-match-indices#49
NOTE: Its not yet clear if there are any public implementations that have adopted this change as of yet.