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

Issue 8417056: Separating constructor parsing from function parsing (Closed)

Created:
9 years, 1 month ago by hausner
Modified:
9 years, 1 month ago
Reviewers:
regis
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Separating constructor parsing from function parsing Make parsing functions and constructors more readable by separating the two into disjoint functions. Committed: https://code.google.com/p/dart/source/detail?r=1172

Patch Set 1 #

Total comments: 12
Unified diffs Side-by-side diffs Delta from patch set Stats (+252 lines, -210 lines) Patch
M runtime/vm/parser.h View 1 chunk +2 lines, -0 lines 0 comments Download
M runtime/vm/parser.cc View 2 chunks +250 lines, -210 lines 12 comments Download

Messages

Total messages: 4 (0 generated)
hausner
Looks like a big change, but it's mostly moving code and eliminating a few if ...
9 years, 1 month ago (2011-11-03 21:30:43 UTC) #1
hausner
TBR. I'll address potential comments in a separate checkin.
9 years, 1 month ago (2011-11-03 22:30:51 UTC) #2
regis
LGTM http://codereview.chromium.org/8417056/diff/1/runtime/vm/parser.cc File runtime/vm/parser.cc (right): http://codereview.chromium.org/8417056/diff/1/runtime/vm/parser.cc#newcode1536 runtime/vm/parser.cc:1536: if (IsLiteral("class")) { This is not new code, ...
9 years, 1 month ago (2011-11-03 23:58:22 UTC) #3
hausner
9 years, 1 month ago (2011-11-04 17:04:55 UTC) #4
Addressed in a separate checkin. Thanks!

http://codereview.chromium.org/8417056/diff/1/runtime/vm/parser.cc
File runtime/vm/parser.cc (right):

http://codereview.chromium.org/8417056/diff/1/runtime/vm/parser.cc#newcode1536
runtime/vm/parser.cc:1536: if (IsLiteral("class")) {
On 2011/11/03 23:58:22, regis wrote:
> This is not new code, but I was nevertheless puzzled by how we can see "class"
> here. I would add a comment referring to Parser::CheckConstructors and explain
> that the default token position in ClassDesc points to the "class" token of
its
> declaration.

Done.

http://codereview.chromium.org/8417056/diff/1/runtime/vm/parser.cc#newcode1551
runtime/vm/parser.cc:1551: // Add implicit parameter for constructor phase.
On 2011/11/03 23:58:22, regis wrote:
> Should you use "construction phase" here and elsewhere?

True. Done in all places.

http://codereview.chromium.org/8417056/diff/1/runtime/vm/parser.cc#newcode1566
runtime/vm/parser.cc:1566: // are is generated.
On 2011/11/03 23:58:22, regis wrote:
> Comment parsing error.

Done.

http://codereview.chromium.org/8417056/diff/1/runtime/vm/parser.cc#newcode1578
runtime/vm/parser.cc:1578: // to strore the initializer expressions in the
respective instance fields.
On 2011/11/03 23:58:22, regis wrote:
> strore -> store

Done.

http://codereview.chromium.org/8417056/diff/1/runtime/vm/parser.cc#newcode1643
runtime/vm/parser.cc:1643: // and add the implicit super call to the super
construcotr's body
On 2011/11/03 23:58:22, regis wrote:
> construcotr -> ...

Done.

http://codereview.chromium.org/8417056/diff/1/runtime/vm/parser.cc#newcode1690
runtime/vm/parser.cc:1690: // initializer.
On 2011/11/03 23:58:22, regis wrote:
> Doesn't the above comment fit on one line?

Done.

Powered by Google App Engine
This is Rietveld 408576698