Bug 204264

Summary: [JSC] DFG strength reduction should define "groups" for RegExp constant-folded result
Product: WebKit Reporter: Yusuke Suzuki <ysuzuki>
Component: JavaScriptCoreAssignee: Yusuke Suzuki <ysuzuki>
Status: RESOLVED FIXED    
Severity: Normal CC: msaboff, ross.kirsling, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 204067    
Bug Blocks:    
Attachments:
Description Flags
Patch msaboff: review+

Yusuke Suzuki
Reported 2019-11-15 16:59:19 PST
...
Attachments
Patch (5.10 KB, patch)
2019-11-15 17:12 PST, Yusuke Suzuki
msaboff: review+
Yusuke Suzuki
Comment 1 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.
Yusuke Suzuki
Comment 2 2019-11-15 17:12:16 PST
Michael Saboff
Comment 3 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.
Yusuke Suzuki
Comment 4 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 :)
Yusuke Suzuki
Comment 5 2019-11-15 17:25:27 PST
Yusuke Suzuki
Comment 6 2019-11-15 17:26:12 PST
Note You need to log in before you can comment on or make changes to this bug.