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

Issue 9213002: Fast path for string.replace that replaces a single character by a string. (Closed)

Created:
8 years, 11 months ago by Yang
Modified:
8 years, 11 months ago
Reviewers:
Erik Corry, rossberg
CC:
v8-dev
Visibility:
Public.

Description

Fast path for string.replace that replaces a single character by a string. BUG= TEST= Committed: http://code.google.com/p/v8/source/detail?r=10412

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+66 lines, -1 line) Patch
M src/heap.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/runtime.h View 2 chunks +7 lines, -0 lines 0 comments Download
M src/runtime.cc View 1 chunk +53 lines, -0 lines 0 comments Download
M src/string.js View 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Yang
Please take a look. When replacing a single character by a string, instead of flattening ...
8 years, 11 months ago (2012-01-13 16:36:57 UTC) #1
rossberg
lgtm
8 years, 11 months ago (2012-01-16 15:13:24 UTC) #2
Erik Corry
8 years, 11 months ago (2012-01-17 08:29:54 UTC) #3
Unfortunately this exhibits unbounded recursion.  Here's a way to crash it:


var s = "";
for (var i = 0; i < 100000; i++) {
  s = s + "y";
}

s.replace("x", "foo");

Powered by Google App Engine
This is Rietveld 408576698