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

Issue 269049: Split the AST LoopStatement type into separate types for do/while,... (Closed)

Created:
11 years, 2 months ago by Kevin Millikin (Chromium)
Modified:
9 years, 7 months ago
CC:
v8-dev
Visibility:
Public.

Description

Split the AST LoopStatement type into separate types for do/while, while, and for loops. Previously they were distinguished by a type field, which required runtime asserts to avoid invalid nodes (since not all loop types have the same internal structure). Now they C++ type system is used to require well-formed loop ASTs. Because they do not share compilation code, we had very large functions in the code generators that merely did a runtime dispatch to a specific implementation based on the type. Committed: http://code.google.com/p/v8/source/detail?r=3048

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+969 lines, -806 lines) Patch
M src/arm/codegen-arm.h View 1 chunk +8 lines, -0 lines 0 comments Download
M src/arm/codegen-arm.cc View 3 chunks +163 lines, -154 lines 0 comments Download
M src/ast.h View 7 chunks +61 lines, -19 lines 0 comments Download
M src/ast.cc View 1 chunk +0 lines, -14 lines 0 comments Download
M src/codegen.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/codegen.cc View 1 chunk +19 lines, -0 lines 0 comments Download
M src/ia32/codegen-ia32.h View 1 chunk +8 lines, -0 lines 0 comments Download
M src/ia32/codegen-ia32.cc View 4 chunks +283 lines, -269 lines 0 comments Download
M src/parser.cc View 9 chunks +16 lines, -14 lines 1 comment Download
M src/prettyprinter.cc View 6 chunks +55 lines, -43 lines 1 comment Download
M src/rewriter.cc View 6 chunks +40 lines, -16 lines 0 comments Download
M src/usage-analyzer.cc View 3 chunks +20 lines, -9 lines 0 comments Download
M src/x64/codegen-x64.h View 1 chunk +8 lines, -0 lines 0 comments Download
M src/x64/codegen-x64.cc View 4 chunks +287 lines, -268 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Kevin Millikin (Chromium)
11 years, 2 months ago (2009-10-12 10:48:15 UTC) #1
William Hesse
LGTM. http://codereview.chromium.org/269049/diff/1/15 File src/parser.cc (right): http://codereview.chromium.org/269049/diff/1/15#newcode2613 Line 2613: Statement* Parser::ParseForStatement(ZoneStringList* labels, bool* ok) { Perhaps ...
11 years, 2 months ago (2009-10-12 11:45:35 UTC) #2
fschneider
11 years, 2 months ago (2009-10-12 12:10:21 UTC) #3
LGTM.

Powered by Google App Engine
This is Rietveld 408576698