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

Issue 371065: Inline common case of one capture when using replace with a regexp and... (Closed)

Created:
11 years, 1 month ago by Mads Ager (chromium)
Modified:
9 years, 7 months ago
Reviewers:
Erik Corry
CC:
v8-dev
Visibility:
Public.

Description

Inline common case of one capture when using replace with a regexp and a function. Committed: http://code.google.com/p/v8/source/detail?r=3248

Patch Set 1 #

Total comments: 2

Patch Set 2 : '' #

Patch Set 3 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+9 lines, -2 lines) Patch
M src/string.js View 1 2 1 chunk +9 lines, -2 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Mads Ager (chromium)
11 years, 1 month ago (2009-11-09 10:10:37 UTC) #1
Erik Corry
http://codereview.chromium.org/371065/diff/1/2 File src/string.js (right): http://codereview.chromium.org/371065/diff/1/2#newcode390 Line 390: // If either start or end of match ...
11 years, 1 month ago (2009-11-09 10:22:22 UTC) #2
Mads Ager (chromium)
11 years, 1 month ago (2009-11-09 10:37:26 UTC) #3
http://codereview.chromium.org/371065/diff/1/2
File src/string.js (right):

http://codereview.chromium.org/371065/diff/1/2#newcode390
Line 390: // If either start or end of match is missing use undefined.
On 2009/11/09 10:22:22, Erik Corry wrote:
> I don't think the start or end can be missing.

Good point.  In that case there wouldn't be a match.  Removed the check.

> I think it's probably worth moving inlining outside the do loop so you don't
> have to check numberOfCaptures for every iteration.

I tried this.  Didn't make much difference, so I'd prefer not to duplicate the
loop.

Powered by Google App Engine
This is Rietveld 408576698