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

Issue 520223002: Fix scoping async functions. (Closed)

Created:
6 years, 3 months ago by Michael Lippautz (Google)
Modified:
6 years, 3 months ago
Reviewers:
hausner
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

Fix scoping async functions. This CL fixes several scoping/context issues: * Do not reuse scopes in SequenceNode_s as they might introduce a new context level. In that case we would trigger context allocationg multiple times resulting in scope/contexts being out of sync. * Properly save and restore saved_try_context in try/catch/finally blocks and nesting closures. For this we need to keep track of async closures top scopes. R=hausner@google.com Committed: https://code.google.com/p/dart/source/detail?r=39775

Patch Set 1 : #

Total comments: 3

Patch Set 2 : rebase + added comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+230 lines, -161 lines) Patch
M runtime/vm/ast_transformer.h View 3 chunks +5 lines, -12 lines 0 comments Download
M runtime/vm/ast_transformer.cc View 7 chunks +61 lines, -27 lines 0 comments Download
M runtime/vm/parser.h View 9 chunks +16 lines, -22 lines 0 comments Download
M runtime/vm/parser.cc View 1 19 chunks +124 lines, -100 lines 0 comments Download
M tests/language/await_future_test.dart View 2 chunks +24 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (5 generated)
Michael Lippautz (Google)
PTAL There's no more dry run, as we now properly add variables to scopes in ...
6 years, 3 months ago (2014-09-02 18:22:11 UTC) #6
hausner
lgtm https://codereview.chromium.org/520223002/diff/80001/runtime/vm/parser.cc File runtime/vm/parser.cc (right): https://codereview.chromium.org/520223002/diff/80001/runtime/vm/parser.cc#newcode2947 runtime/vm/parser.cc:2947: LocalVariable* saved_saved_try_ctx = parsed_function()->saved_try_ctx(); We only have to ...
6 years, 3 months ago (2014-09-02 20:04:47 UTC) #7
Michael Lippautz (Google)
https://codereview.chromium.org/520223002/diff/80001/runtime/vm/parser.cc File runtime/vm/parser.cc (right): https://codereview.chromium.org/520223002/diff/80001/runtime/vm/parser.cc#newcode2947 runtime/vm/parser.cc:2947: LocalVariable* saved_saved_try_ctx = parsed_function()->saved_try_ctx(); On 2014/09/02 20:04:47, hausner wrote: ...
6 years, 3 months ago (2014-09-02 20:25:23 UTC) #8
Michael Lippautz (Google)
6 years, 3 months ago (2014-09-02 20:25:44 UTC) #9
Message was sent while issue was closed.
Committed patchset #2 (id:100001) manually as 39775 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698