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

Issue 549207: Added validating JSON parser mode to parser. (Closed)

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

Description

Added validating JSON parser mode to parser.

Patch Set 1 #

Total comments: 10
Unified diffs Side-by-side diffs Delta from patch set Stats (+636 lines, -112 lines) Patch
M src/ast.h View 5 chunks +0 lines, -7 lines 0 comments Download
M src/ast.cc View 1 chunk +0 lines, -21 lines 0 comments Download
M src/compiler.cc View 4 chunks +3 lines, -26 lines 0 comments Download
M src/json-delay.js View 1 chunk +1 line, -1 line 0 comments Download
M src/parser.h View 1 chunk +2 lines, -1 line 1 comment Download
M src/parser.cc View 19 chunks +311 lines, -40 lines 6 comments Download
M src/scanner.h View 3 chunks +31 lines, -5 lines 1 comment Download
M src/scanner.cc View 4 chunks +206 lines, -5 lines 2 comments Download
M test/mjsunit/debug-compile-event.js View 1 chunk +1 line, -1 line 0 comments Download
M test/mjsunit/json.js View 2 chunks +79 lines, -3 lines 0 comments Download
M test/mjsunit/mirror-script.js View 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
Lasse Reichstein
Review, plase.
10 years, 10 months ago (2010-01-29 17:08:17 UTC) #1
Mads Ager (chromium)
LGTM http://codereview.chromium.org/549207/diff/1/6 File src/parser.cc (right): http://codereview.chromium.org/549207/diff/1/6#newcode212 src/parser.cc:212: bool* is_simple_out, Remove the _out prefix on these ...
10 years, 10 months ago (2010-02-01 08:42:19 UTC) #2
Rico
http://codereview.chromium.org/549207/diff/1/8 File src/scanner.cc (right): http://codereview.chromium.org/549207/diff/1/8#newcode692 src/scanner.cc:692: if (c0_ < '0' || c0_ > '9') return ...
10 years, 10 months ago (2010-02-01 10:40:58 UTC) #3
Rico
It seems that after applying this patch json objects are no longer recognized, i.e., I ...
10 years, 10 months ago (2010-02-01 11:38:58 UTC) #4
Rico
Sorry, according to spec you are of course right that the above should not compile ...
10 years, 10 months ago (2010-02-01 11:59:01 UTC) #5
Lasse Reichstein
10 years, 10 months ago (2010-02-01 12:17:30 UTC) #6
http://codereview.chromium.org/549207/diff/1/6
File src/parser.cc (right):

http://codereview.chromium.org/549207/diff/1/6#newcode212
src/parser.cc:212: bool* is_simple_out,
Done.

http://codereview.chromium.org/549207/diff/1/6#newcode218
src/parser.cc:218: bool* is_simple_out,
Done, too.

http://codereview.chromium.org/549207/diff/1/6#newcode3955
src/parser.cc:3955: void Parser::BuildObjectLiteralConstantProperties(
Done.

http://codereview.chromium.org/549207/diff/1/8
File src/scanner.cc (right):

http://codereview.chromium.org/549207/diff/1/8#newcode692
src/scanner.cc:692: if (c0_ < '0' || c0_ > '9') return Token::ILLEGAL;
This code does allow a zero digit after the "e".
As for sense ... I guess you can't rule it out in automatically generated code
JSON.

In retrospect, I should probably have used an IsDigit predicate for readablity.

Powered by Google App Engine
This is Rietveld 408576698