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

Issue 1836123002: Add fast paths for native RegExps in ES2015 subclass-aware code (Closed)

Created:
4 years, 8 months ago by adamk
Modified:
4 years, 8 months ago
Reviewers:
Dan Ehrenberg, Yang
CC:
v8-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Add fast paths for native RegExps in ES2015 subclass-aware code This patch adds fast paths for @@replace and @@split that call into the old, side-effect free (and faster) versions of those builtin operations when possible (roughly, when the receiver is a RegExp and the 'exec' method is untampered). Also add some micro-optimizations that further improve performance. Taken altogether, this takes us from a ~70% regression on the Octane RegExp benchmark to a ~9% regression. The test262.status lines for RegExps has been reorganized to make it clearer the status of individual tests. More work will likely be required to increase spec compliance before the --harmony-regexp-exec flag is shipped; some of that work is happening on the spec side. BUG=v8:4602 LOG=y Committed: https://crrev.com/360586f2f91973b8fc5a20dc1073a43acdce10a5 Cr-Commit-Position: refs/heads/master@{#35118}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Added TO_BOOLEAN and more comments #

Total comments: 6

Patch Set 3 : Less zealous inlining #

Unified diffs Side-by-side diffs Delta from patch set Stats (+89 lines, -29 lines) Patch
M src/js/harmony-unicode-regexps.js View 1 1 chunk +2 lines, -3 lines 0 comments Download
M src/js/regexp.js View 1 2 10 chunks +56 lines, -13 lines 0 comments Download
M test/test262/test262.status View 1 chunk +31 lines, -13 lines 0 comments Download

Messages

Total messages: 14 (4 generated)
adamk
4 years, 8 months ago (2016-03-28 22:46:32 UTC) #2
Dan Ehrenberg
lgtm +100 Nice clean change https://codereview.chromium.org/1836123002/diff/1/src/js/harmony-unicode-regexps.js File src/js/harmony-unicode-regexps.js (right): https://codereview.chromium.org/1836123002/diff/1/src/js/harmony-unicode-regexps.js#newcode34 src/js/harmony-unicode-regexps.js:34: return !!REGEXP_UNICODE(this); While making ...
4 years, 8 months ago (2016-03-28 22:56:09 UTC) #3
adamk
https://codereview.chromium.org/1836123002/diff/1/src/js/harmony-unicode-regexps.js File src/js/harmony-unicode-regexps.js (right): https://codereview.chromium.org/1836123002/diff/1/src/js/harmony-unicode-regexps.js#newcode34 src/js/harmony-unicode-regexps.js:34: return !!REGEXP_UNICODE(this); On 2016/03/28 22:56:09, Dan Ehrenberg wrote: > ...
4 years, 8 months ago (2016-03-28 23:14:37 UTC) #4
Dan Ehrenberg
lgtm
4 years, 8 months ago (2016-03-28 23:22:02 UTC) #5
adamk
Yang, would love another set of eyes on this in case you have concerns (in ...
4 years, 8 months ago (2016-03-29 00:36:01 UTC) #6
Yang
IIRC the existing implementation already violates the spec wrt updating lastIndex inside exec when we ...
4 years, 8 months ago (2016-03-29 12:19:04 UTC) #7
adamk
https://codereview.chromium.org/1836123002/diff/20001/src/js/regexp.js File src/js/regexp.js (right): https://codereview.chromium.org/1836123002/diff/20001/src/js/regexp.js#newcode886 src/js/regexp.js:886: %SetForceInlineFlag(SetAdvancedStringIndex); On 2016/03/29 12:19:04, Yang wrote: > I see ...
4 years, 8 months ago (2016-03-29 20:19:20 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1836123002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1836123002/40001
4 years, 8 months ago (2016-03-29 20:19:45 UTC) #11
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 8 months ago (2016-03-29 20:41:46 UTC) #12
commit-bot: I haz the power
4 years, 8 months ago (2016-03-29 20:43:03 UTC) #14
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/360586f2f91973b8fc5a20dc1073a43acdce10a5
Cr-Commit-Position: refs/heads/master@{#35118}

Powered by Google App Engine
This is Rietveld 408576698