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

Issue 12225141: Minor cleanup (Closed)

Created:
7 years, 10 months ago by siva
Modified:
7 years, 10 months ago
Reviewers:
srdjan, hausner
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Minor cleanup - added a field parsed_function to the parser - remove fields expression_temp_ and saved_current_context_ Committed: https://code.google.com/p/dart/source/detail?r=18402

Patch Set 1 #

Patch Set 2 : #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+32 lines, -36 lines) Patch
M runtime/vm/parser.h View 5 chunks +10 lines, -8 lines 0 comments Download
M runtime/vm/parser.cc View 1 8 chunks +22 lines, -28 lines 2 comments Download

Messages

Total messages: 4 (0 generated)
siva
7 years, 10 months ago (2013-02-12 19:07:50 UTC) #1
srdjan
lgtm
7 years, 10 months ago (2013-02-12 19:30:46 UTC) #2
hausner
LGTM w/comment https://chromiumcodereview.appspot.com/12225141/diff/3001/runtime/vm/parser.cc File runtime/vm/parser.cc (right): https://chromiumcodereview.appspot.com/12225141/diff/3001/runtime/vm/parser.cc#newcode305 runtime/vm/parser.cc:305: ASSERT(parsed_function() != NULL); You make it illegal ...
7 years, 10 months ago (2013-02-12 19:34:04 UTC) #3
siva
7 years, 10 months ago (2013-02-12 20:47:07 UTC) #4
https://chromiumcodereview.appspot.com/12225141/diff/3001/runtime/vm/parser.cc
File runtime/vm/parser.cc (right):

https://chromiumcodereview.appspot.com/12225141/diff/3001/runtime/vm/parser.c...
runtime/vm/parser.cc:305: ASSERT(parsed_function() != NULL);
Initially I implemented this to check if parsed_function is null and return
Function::null(). Then I figured if nobody uses it that way why pay the price
for a check. So I added an assertion that this function does not expect
parsed_function to NULL. If we find cases where we need to access
current_function I can convert the assert to a check.

So far the test suites did not trip the ASSERT.

On 2013/02/12 19:34:04, hausner wrote:
> You make it illegal to call current_function() when parsing top-level.
> Previously, Function::null() was returned. I take it we didn't depend on this.

Powered by Google App Engine
This is Rietveld 408576698