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

Issue 5443001: Move quoting of a JSON string to a specialized runtime function. (Closed)

Created:
10 years ago by Lasse Reichstein
Modified:
9 years, 6 months ago
CC:
v8-dev, sandholm
Visibility:
Public.

Description

Move quoting of a JSON string to a specialized runtime function. Previously used string replace regexp with function replacement.

Patch Set 1 #

Total comments: 5

Patch Set 2 : Added quotes when building quoted string. #

Patch Set 3 : Remove TODO, add counters to track behavior. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+168 lines, -28 lines) Patch
M src/json.js View 1 1 chunk +3 lines, -27 lines 0 comments Download
M src/runtime.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/runtime.cc View 1 2 1 chunk +161 lines, -0 lines 0 comments Download
M src/v8-counters.h View 1 2 1 chunk +3 lines, -1 line 0 comments Download

Messages

Total messages: 5 (0 generated)
Lasse Reichstein
10 years ago (2010-12-01 08:56:33 UTC) #1
William Hesse
LGTM. http://codereview.chromium.org/5443001/diff/1/src/runtime.cc File src/runtime.cc (right): http://codereview.chromium.org/5443001/diff/1/src/runtime.cc#newcode4618 src/runtime.cc:4618: if (sizeof(Char) > 1) { 1u? http://codereview.chromium.org/5443001/diff/1/src/runtime.cc#newcode4632 src/runtime.cc:4632: ...
10 years ago (2010-12-01 09:34:58 UTC) #2
William Hesse
Still LGTM.
10 years ago (2010-12-01 09:36:56 UTC) #3
Kevin Millikin (Chromium)
http://codereview.chromium.org/5443001/diff/1/src/runtime.cc File src/runtime.cc (right): http://codereview.chromium.org/5443001/diff/1/src/runtime.cc#newcode4632 src/runtime.cc:4632: // TODO(lrn): Better handling of allocation errors. Try harder ...
10 years ago (2010-12-01 09:44:51 UTC) #4
Lasse Reichstein
10 years ago (2010-12-01 10:02:47 UTC) #5
http://codereview.chromium.org/5443001/diff/1/src/runtime.cc
File src/runtime.cc (right):

http://codereview.chromium.org/5443001/diff/1/src/runtime.cc#newcode4618
src/runtime.cc:4618: if (sizeof(Char) > 1) {
Done.

http://codereview.chromium.org/5443001/diff/1/src/runtime.cc#newcode4632
src/runtime.cc:4632: // TODO(lrn): Better handling of allocation errors. Try
harder
I'll remove it, and make a counter to count the extra work we do rescanning the
string. Then we can see whether this needs more attention.
It currently doesn't seem to be a problem.

Powered by Google App Engine
This is Rietveld 408576698