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

Issue 2433923003: [regexp] Add fast-path for global, callable replace (Closed)

Created:
4 years, 2 months ago by jgruber
Modified:
4 years, 1 month ago
Reviewers:
Benedikt Meurer, Yang
CC:
v8-reviews_googlegroups.com
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[regexp] Add fast-path for global, callable replace This adds a fast-path for calls to RegExp.prototype[@@replace] for cases in which the given regexp is unmodified and global, and the given replace argument is callable. The fast-path implementation itself is almost identical to the original JS implementation except that it currently does not reuse result_array. SunSpider/unpack-code relies heavily on this codepath. BUG=v8:5339 Committed: https://crrev.com/a8e30c0e689a68a8d5d457be28eec1fb5b7a3702 Cr-Commit-Position: refs/heads/master@{#40504}

Patch Set 1 #

Patch Set 2 : Fix double-tagged smi and remove asserts #

Patch Set 3 : Re-add asserts and COW array usage #

Total comments: 7

Patch Set 4 : Remove callable path from RegExpReplace #

Patch Set 5 : Rebase on map-based checks #

Patch Set 6 : Unmark coerce-* tests as failing #

Patch Set 7 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+359 lines, -280 lines) Patch
M src/builtins/builtins-regexp.cc View 1 2 3 4 5 chunks +232 lines, -11 lines 0 comments Download
M src/compiler/code-assembler.h View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M src/compiler/code-assembler.cc View 1 2 3 4 1 chunk +18 lines, -0 lines 0 comments Download
M src/runtime/runtime.h View 1 2 3 4 2 chunks +1 line, -1 line 0 comments Download
M src/runtime/runtime-regexp.cc View 1 2 3 4 7 chunks +100 lines, -268 lines 0 comments Download
M src/string-builder.h View 1 chunk +5 lines, -0 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 44 (33 generated)
jgruber
4 years, 2 months ago (2016-10-19 12:47:43 UTC) #4
jgruber
Some comments mainly for myself, but I'd also appreciate input. Much of this would be ...
4 years, 2 months ago (2016-10-19 16:39:13 UTC) #15
Yang
lgtm https://codereview.chromium.org/2433923003/diff/40001/src/runtime/runtime-regexp.cc File src/runtime/runtime-regexp.cc (right): https://codereview.chromium.org/2433923003/diff/40001/src/runtime/runtime-regexp.cc#newcode1004 src/runtime/runtime-regexp.cc:1004: // The cache FixedArray is a COW-array and ...
4 years, 2 months ago (2016-10-20 09:53:14 UTC) #16
jgruber
Thanks for the review! https://codereview.chromium.org/2433923003/diff/40001/src/runtime/runtime-regexp.cc File src/runtime/runtime-regexp.cc (right): https://codereview.chromium.org/2433923003/diff/40001/src/runtime/runtime-regexp.cc#newcode1004 src/runtime/runtime-regexp.cc:1004: // The cache FixedArray is ...
4 years, 2 months ago (2016-10-20 10:58:30 UTC) #19
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/2433923003/60001
4 years, 2 months ago (2016-10-20 11:03:19 UTC) #23
commit-bot: I haz the power
Try jobs failed on following builders: v8_presubmit on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_presubmit/builds/26942)
4 years, 2 months ago (2016-10-20 11:12:59 UTC) #25
jgruber
+ bmeurer for compiler/
4 years, 2 months ago (2016-10-20 11:36:23 UTC) #27
Benedikt Meurer
lgtm
4 years, 2 months ago (2016-10-20 14:59:50 UTC) #28
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/2433923003/120001
4 years, 2 months ago (2016-10-21 12:08:03 UTC) #41
commit-bot: I haz the power
Committed patchset #7 (id:120001)
4 years, 2 months ago (2016-10-21 12:12:00 UTC) #42
commit-bot: I haz the power
4 years, 1 month ago (2016-11-17 22:09:50 UTC) #44
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/a8e30c0e689a68a8d5d457be28eec1fb5b7a3702
Cr-Commit-Position: refs/heads/master@{#40504}

Powered by Google App Engine
This is Rietveld 408576698