Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(413)

Issue 2630233003: [regexp] Create property on result for each named capture (Closed)

Created:
3 years, 11 months ago by jgruber
Modified:
3 years, 10 months ago
Reviewers:
Dan Ehrenberg, Yang
CC:
Dan Ehrenberg
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[regexp] Store named captures on the regexp result This implements storing named captures on the regexp result object. For instance, /(?<a>.)/u.exec("b") will return a result such that: result.group.a // "b" https://tc39.github.io/proposal-regexp-named-groups/ BUG=v8:5437 Review-Url: https://codereview.chromium.org/2630233003 Cr-Original-Original-Original-Commit-Position: refs/heads/master@{#42532} Committed: https://chromium.googlesource.com/v8/v8/+/70000946eb2a9155679528702a766219a1fcf154 Review-Url: https://codereview.chromium.org/2630233003 Cr-Original-Original-Commit-Position: refs/heads/master@{#42570} Committed: https://chromium.googlesource.com/v8/v8/+/ee94fa11ed63477393c6534c352ebac6e502396c Review-Url: https://codereview.chromium.org/2630233003 Cr-Original-Commit-Position: refs/heads/master@{#42676} Committed: https://chromium.googlesource.com/v8/v8/+/8bf52534f6bf86821a1589dcbcb7335052c1f94f Review-Url: https://codereview.chromium.org/2630233003 Cr-Commit-Position: refs/heads/master@{#42838} Committed: https://chromium.googlesource.com/v8/v8/+/d52ec9e6cfb0c5ad81d614b11957cb85fba06d96

Patch Set 1 #

Patch Set 2 : Blacklist index, input, length #

Total comments: 4

Patch Set 3 : Remove unused CaptureNameMapOffset #

Total comments: 6

Patch Set 4 : Address comments #

Patch Set 5 : Address comments and switch to 'group' property #

Patch Set 6 : Disable test on noi18n #

Patch Set 7 : Rebase #

Total comments: 2

Patch Set 8 : Use CreateDataProperty instead of SetProperty #

Patch Set 9 : Null proto and remove __proto__ blacklist #

Unified diffs Side-by-side diffs Delta from patch set Stats (+124 lines, -20 lines) Patch
M src/builtins/builtins-regexp.cc View 1 2 3 4 5 6 7 8 7 chunks +89 lines, -11 lines 0 comments Download
M src/heap-symbols.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M test/mjsunit/harmony/regexp-named-captures.js View 1 2 3 4 5 6 7 8 2 chunks +31 lines, -9 lines 0 comments Download
M test/mjsunit/mjsunit.status View 1 2 3 4 5 6 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 74 (52 generated)
jgruber
This adds capture properties to the RegExp result, implemented to match the draft spec at ...
3 years, 11 months ago (2017-01-17 09:26:51 UTC) #8
Yang
lgtm. https://codereview.chromium.org/2630233003/diff/20001/src/builtins/builtins-regexp.cc File src/builtins/builtins-regexp.cc (right): https://codereview.chromium.org/2630233003/diff/20001/src/builtins/builtins-regexp.cc#newcode214 src/builtins/builtins-regexp.cc:214: Node* const data = LoadObjectField(regexp, JSRegExp::kDataOffset); On 2017/01/17 ...
3 years, 11 months ago (2017-01-18 13:25:37 UTC) #15
Dan Ehrenberg
lgtm Based on your feedback, I'll change the spec to use a groups object. Maybe ...
3 years, 11 months ago (2017-01-18 18:19:04 UTC) #16
jgruber
Thanks for the reviews, comments addressed. I updated this to store captures on a result.group ...
3 years, 11 months ago (2017-01-19 15:59:12 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2630233003/80001
3 years, 11 months ago (2017-01-20 08:02:06 UTC) #29
commit-bot: I haz the power
Committed patchset #5 (id:80001) as https://chromium.googlesource.com/v8/v8/+/70000946eb2a9155679528702a766219a1fcf154
3 years, 11 months ago (2017-01-20 08:04:13 UTC) #32
jgruber
A revert of this CL (patchset #5 id:80001) has been created in https://codereview.chromium.org/2643213002/ by jgruber@chromium.org. ...
3 years, 11 months ago (2017-01-20 08:41:40 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2630233003/120001
3 years, 11 months ago (2017-01-20 15:39:43 UTC) #42
commit-bot: I haz the power
Committed patchset #7 (id:120001) as https://chromium.googlesource.com/v8/v8/+/ee94fa11ed63477393c6534c352ebac6e502396c
3 years, 11 months ago (2017-01-20 16:11:19 UTC) #45
Dan Ehrenberg
https://codereview.chromium.org/2630233003/diff/120001/src/builtins/builtins-regexp.cc File src/builtins/builtins-regexp.cc (right): https://codereview.chromium.org/2630233003/diff/120001/src/builtins/builtins-regexp.cc#newcode277 src/builtins/builtins-regexp.cc:277: language_mode); We should really be calling DefineOwnProperty here, not ...
3 years, 11 months ago (2017-01-20 18:23:47 UTC) #46
jgruber
A revert of this CL (patchset #7 id:120001) has been created in https://codereview.chromium.org/2639403008/ by jgruber@chromium.org. ...
3 years, 11 months ago (2017-01-20 19:03:01 UTC) #47
jgruber
On 2017/01/20 19:03:01, jgruber wrote: > A revert of this CL (patchset #7 id:120001) has ...
3 years, 11 months ago (2017-01-24 13:24:28 UTC) #49
jgruber
On 2017/01/24 13:24:28, jgruber wrote: > On 2017/01/20 19:03:01, jgruber wrote: > > A revert ...
3 years, 11 months ago (2017-01-25 13:03:49 UTC) #54
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2630233003/160001
3 years, 11 months ago (2017-01-26 07:57:26 UTC) #60
commit-bot: I haz the power
Committed patchset #9 (id:160001) as https://chromium.googlesource.com/v8/v8/+/8bf52534f6bf86821a1589dcbcb7335052c1f94f
3 years, 11 months ago (2017-01-26 07:59:30 UTC) #63
Michael Achenbach
Breaks arm64 nosnap: https://build.chromium.org/p/client.v8.ports/builders/V8%20Linux%20-%20arm64%20-%20sim%20-%20nosnap%20-%20debug/builds/3677 Revert again?
3 years, 11 months ago (2017-01-26 09:25:19 UTC) #64
jgruber
On 2017/01/26 09:25:19, Michael Achenbach wrote: > Breaks arm64 nosnap: > https://build.chromium.org/p/client.v8.ports/builders/V8%20Linux%20-%20arm64%20-%20sim%20-%20nosnap%20-%20debug/builds/3677 > > Revert ...
3 years, 11 months ago (2017-01-26 09:27:53 UTC) #65
jgruber
On 2017/01/26 09:27:53, jgruber wrote: > On 2017/01/26 09:25:19, Michael Achenbach wrote: > > Breaks ...
3 years, 11 months ago (2017-01-26 09:29:07 UTC) #66
jgruber
A revert of this CL (patchset #9 id:160001) has been created in https://codereview.chromium.org/2654233002/ by jgruber@chromium.org. ...
3 years, 11 months ago (2017-01-26 09:29:58 UTC) #67
jgruber
On 2017/01/26 09:29:58, jgruber wrote: > A revert of this CL (patchset #9 id:160001) has ...
3 years, 10 months ago (2017-02-01 08:25:31 UTC) #69
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2630233003/160001
3 years, 10 months ago (2017-02-01 08:25:57 UTC) #71
commit-bot: I haz the power
3 years, 10 months ago (2017-02-01 08:54:45 UTC) #74
Message was sent while issue was closed.
Committed patchset #9 (id:160001) as
https://chromium.googlesource.com/v8/v8/+/d52ec9e6cfb0c5ad81d614b11957cb85fba...

Powered by Google App Engine
This is Rietveld 408576698