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

Issue 59523002: Flatten the AST for try/catch. (Closed)

Created:
7 years, 1 month ago by Kevin Millikin (Google)
Modified:
7 years, 1 month ago
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

Flatten the AST for try/catch. Flatten a pair of blocks where the outer one is solely used to hold the bindings of the parameters and to contain the inner one. R=fschneider@google.com Committed: https://code.google.com/p/dart/source/detail?r=29889

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+8 lines, -15 lines) Patch
M runtime/vm/parser.cc View 6 chunks +8 lines, -15 lines 1 comment Download

Messages

Total messages: 4 (0 generated)
Kevin Millikin (Google)
7 years, 1 month ago (2013-11-05 09:53:16 UTC) #1
Florian Schneider
lgtm https://codereview.chromium.org/59523002/diff/1/runtime/vm/parser.cc File runtime/vm/parser.cc (right): https://codereview.chromium.org/59523002/diff/1/runtime/vm/parser.cc#newcode1100 runtime/vm/parser.cc:1100: OpenBlock(); // Start catch clause. The same should ...
7 years, 1 month ago (2013-11-05 10:05:30 UTC) #2
Kevin Millikin (Google)
Committed patchset #1 manually as r29889 (presubmit successful).
7 years, 1 month ago (2013-11-05 11:21:04 UTC) #3
hausner
7 years, 1 month ago (2013-11-05 18:53:41 UTC) #4
Message was sent while issue was closed.
This change broke the compiler. The reason there were two nested blocks is
because the exception and stack trace variables are declared in an invisible 
block that encloses the visible block of the catch clause. This allows users to
shadow the exception and stack trace variables. Your change puts the exception
and stack trace variables inside the catch block, making it an error if another
variable with the same name is defined.

dart2js allows the shadowing, so you also introduced an incompatibility.

This said, there was is a bug in the way the two nested blocks were used prior
to your change.

I'll revert this change and fix the previous bug.

Powered by Google App Engine
This is Rietveld 408576698