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

Issue 5295004: Preparser extracted into separate files that can be compiled to a library. (Closed)

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

Description

Preparser extracted into separate files that can be compiled to a library. No scons target yet.

Patch Set 1 #

Total comments: 4

Patch Set 2 : Cleanup of preparse class. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+539 lines, -255 lines) Patch
A include/v8-preparser.h View 1 1 chunk +123 lines, -0 lines 0 comments Download
M preparser/preparser-process.cc View 4 chunks +57 lines, -90 lines 0 comments Download
M src/parser.h View 3 chunks +21 lines, -2 lines 0 comments Download
M src/parser.cc View 1 8 chunks +35 lines, -23 lines 0 comments Download
M src/preparser.h View 1 5 chunks +84 lines, -54 lines 0 comments Download
M src/preparser.cc View 1 41 chunks +53 lines, -53 lines 0 comments Download
A src/preparser-api.cc View 1 1 chunk +128 lines, -0 lines 0 comments Download
M src/scanner.h View 1 chunk +0 lines, -2 lines 0 comments Download
M src/scanner.cc View 2 chunks +1 line, -23 lines 0 comments Download
M src/scanner-base.h View 2 chunks +0 lines, -4 lines 0 comments Download
M src/scanner-base.cc View 1 chunk +1 line, -1 line 0 comments Download
M test/cctest/test-parsing.cc View 1 2 chunks +36 lines, -3 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Lasse Reichstein
10 years ago (2010-11-26 14:03:53 UTC) #1
fschneider
LGTM. http://codereview.chromium.org/5295004/diff/1/include/v8-preparser.h File include/v8-preparser.h (right): http://codereview.chromium.org/5295004/diff/1/include/v8-preparser.h#newcode75 include/v8-preparser.h:75: static PreParserData StackOverflow() { return PreParserData(NULL, 0); } ...
10 years ago (2010-11-29 12:27:35 UTC) #2
Lasse Reichstein
10 years ago (2010-11-29 13:06:39 UTC) #3
http://codereview.chromium.org/5295004/diff/1/include/v8-preparser.h
File include/v8-preparser.h (right):

http://codereview.chromium.org/5295004/diff/1/include/v8-preparser.h#newcode75
include/v8-preparser.h:75: static PreParserData StackOverflow() { return
PreParserData(NULL, 0); }
More whitespacing inserted.

http://codereview.chromium.org/5295004/diff/1/src/preparser.h
File src/preparser.h (right):

http://codereview.chromium.org/5295004/diff/1/src/preparser.h#newcode83
src/preparser.h:83: PreParser() : scope_(NULL), allow_lazy_(true) { }
Not really. In fact, allow_lazy_ shouldn't be initialized either, since it's
initialized before use in PerParseProgram.

However, this pattern of usage sucks.
I should make the constructor private, have it initialize the variables, and
make PreParseProgram static. I'll do that.
And while I'm at it, I think I can move the internally used types into the class
as well.

Powered by Google App Engine
This is Rietveld 408576698