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

Issue 6334106: Improve ScanJsonNumber. (Closed)

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

Description

Improve ScanJsonNumber.

Patch Set 1 #

Total comments: 6

Patch Set 2 : '' #

Total comments: 2

Patch Set 3 : '' #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+67 lines, -59 lines) Patch
M src/array.js View 1 chunk +5 lines, -3 lines 0 comments Download
M src/conversions.cc View 1 20 chunks +32 lines, -46 lines 0 comments Download
M src/parser.cc View 1 1 chunk +3 lines, -9 lines 0 comments Download
M src/scanner.h View 1 2 2 chunks +9 lines, -0 lines 2 comments Download
M src/scanner.cc View 1 2 chunks +18 lines, -1 line 0 comments Download

Messages

Total messages: 7 (0 generated)
sandholm
Simplified version...
9 years, 10 months ago (2011-02-04 13:37:34 UTC) #1
Lasse Reichstein
LGTM with comments. http://codereview.chromium.org/6334106/diff/1/src/scanner.cc File src/scanner.cc (right): http://codereview.chromium.org/6334106/diff/1/src/scanner.cc#newcode519 src/scanner.cc:519: bool sign = (c0_ == '-'); ...
9 years, 10 months ago (2011-02-04 13:53:36 UTC) #2
sandholm
http://codereview.chromium.org/6334106/diff/1/src/scanner.cc File src/scanner.cc (right): http://codereview.chromium.org/6334106/diff/1/src/scanner.cc#newcode519 src/scanner.cc:519: bool sign = (c0_ == '-'); On 2011/02/04 13:53:36, ...
9 years, 10 months ago (2011-02-04 14:26:36 UTC) #3
tfarina
http://codereview.chromium.org/6334106/diff/2003/src/scanner.h File src/scanner.h (right): http://codereview.chromium.org/6334106/diff/2003/src/scanner.h#newcode151 src/scanner.h:151: double number() { double number() const { return number_; ...
9 years, 10 months ago (2011-02-04 14:46:48 UTC) #4
sandholm
http://codereview.chromium.org/6334106/diff/2003/src/scanner.h File src/scanner.h (right): http://codereview.chromium.org/6334106/diff/2003/src/scanner.h#newcode151 src/scanner.h:151: double number() { On 2011/02/04 14:46:48, tfarina wrote: > ...
9 years, 10 months ago (2011-02-04 14:57:22 UTC) #5
tfarina
http://codereview.chromium.org/6334106/diff/8/src/scanner.h File src/scanner.h (right): http://codereview.chromium.org/6334106/diff/8/src/scanner.h#newcode152 src/scanner.h:152: double number() { I'll not insist in the const ...
9 years, 10 months ago (2011-02-04 15:04:44 UTC) #6
Lasse Reichstein
9 years, 10 months ago (2011-02-07 08:40:43 UTC) #7
http://codereview.chromium.org/6334106/diff/8/src/scanner.h
File src/scanner.h (right):

http://codereview.chromium.org/6334106/diff/8/src/scanner.h#newcode152
src/scanner.h:152: double number() {
We generally don't use const in the V8 code.
It should work, and probably wouldn't hurt if added, but it's only necessary if
you ever have a const reference to the scanner, and we probably won't have that
either.

As for making it a one-liner ... I wouldn't insist either way either. I prefer
the three-line code, but I can understand the argument for having more
meaningful lines on screen at a atime.

Powered by Google App Engine
This is Rietveld 408576698