Bug 204264 - [JSC] DFG strength reduction should define "groups" for RegExp constant-folded result
Summary: [JSC] DFG strength reduction should define "groups" for RegExp constant-folde...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Yusuke Suzuki
URL:
Keywords: InRadar
Depends on: 204067
Blocks:
  Show dependency treegraph
 
Reported: 2019-11-15 16:59 PST by Yusuke Suzuki
Modified: 2019-11-15 17:26 PST (History)
3 users (show)

See Also:


Attachments
Patch (5.10 KB, patch)
2019-11-15 17:12 PST, Yusuke Suzuki
msaboff: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yusuke Suzuki 2019-11-15 16:59:19 PST
...
Comment 1 Yusuke Suzuki 2019-11-15 16:59:57 PST
After https://bugs.webkit.org/show_bug.cgi?id=204067, we are always defining "groups" property, but DFG strength reduction does not agree.
Comment 2 Yusuke Suzuki 2019-11-15 17:12:16 PST
Created attachment 383671 [details]
Patch
Comment 3 Michael Saboff 2019-11-15 17:22:56 PST
Comment on attachment 383671 [details]
Patch

r=me.  Always creating "groups" including creating an undefined "groups" for str.match() results where there aren't any named capture groups is compliant with the ECMA-262 spec.
Comment 4 Yusuke Suzuki 2019-11-15 17:24:39 PST
(In reply to Michael Saboff from comment #3)
> Comment on attachment 383671 [details]
> Patch
> 
> r=me.  Always creating "groups" including creating an undefined "groups" for
> str.match() results where there aren't any named capture groups is compliant
> with the ECMA-262 spec.

Yes, now it is updated and defining undefined for "groups" if named capture groups do not exist is the spec compliant behavior :)
Comment 5 Yusuke Suzuki 2019-11-15 17:25:27 PST
Committed r252514: <https://trac.webkit.org/changeset/252514>
Comment 6 Yusuke Suzuki 2019-11-15 17:26:12 PST
<rdar://problem/57186234>