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

Issue 508643004: Fix scope/context behavior in await transformer. (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 scope/context behavior in await transformer. We are not allowed to reuse LocalScope in different SequenceNode_s. The problem is that if a context needs to be created for that scope the FlowGraphbuilder will insert context creation code at all SequenNoce_s that use this scope. This results in scopes and contexts being out of sync and writing garbage. The fix is to just chain a new scope that is on the same function- and loop-level. Also fix recognizing of "await" in async functions. A follow up CL will enable await in loops, if, return, ... BUG= R=hausner@google.com Committed: https://code.google.com/p/dart/source/detail?r=39571

Patch Set 1 #

Total comments: 2

Patch Set 2 : add await_is_keyword_ indicator to parser #

Total comments: 4

Patch Set 3 : addressed comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+67 lines, -11 lines) Patch
M runtime/vm/ast_transformer.h View 1 chunk +1 line, -0 lines 0 comments Download
M runtime/vm/ast_transformer.cc View 4 chunks +10 lines, -4 lines 0 comments Download
M runtime/vm/parser.h View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M runtime/vm/parser.cc View 1 2 7 chunks +21 lines, -7 lines 0 comments Download
M runtime/vm/symbols.h View 1 chunk +1 line, -0 lines 0 comments Download
M tests/language/await_future_test.dart View 2 chunks +30 lines, -0 lines 0 comments Download
M tests/standalone/issue14236_test.dart View Binary file 0 comments Download

Messages

Total messages: 13 (0 generated)
Michael Lippautz (Google)
mlippautz@google.com changed reviewers: + hausner@google.com
6 years, 3 months ago (2014-08-26 20:08:17 UTC) #1
Michael Lippautz (Google)
The test covers both cases as a) it forces creation of a scope/context at the ...
6 years, 3 months ago (2014-08-26 20:08:17 UTC) #2
hausner
I hope you can make the IsIdentifier function cheaper. See comment below. https://codereview.chromium.org/508643004/diff/1/runtime/vm/parser.cc File runtime/vm/parser.cc ...
6 years, 3 months ago (2014-08-26 20:45:48 UTC) #3
Michael Lippautz (Google)
Patchset #2 (id:20001) has been deleted
6 years, 3 months ago (2014-08-26 21:53:58 UTC) #4
Michael Lippautz (Google)
Patchset #2 (id:40001) has been deleted
6 years, 3 months ago (2014-08-26 21:55:39 UTC) #5
Michael Lippautz (Google)
Patchset #2 (id:60001) has been deleted
6 years, 3 months ago (2014-08-26 22:05:19 UTC) #6
Michael Lippautz (Google)
Patchset #2 (id:80001) has been deleted
6 years, 3 months ago (2014-08-26 22:06:11 UTC) #7
Michael Lippautz (Google)
PTAL https://codereview.chromium.org/508643004/diff/1/runtime/vm/parser.cc File runtime/vm/parser.cc (right): https://codereview.chromium.org/508643004/diff/1/runtime/vm/parser.cc#newcode6267 runtime/vm/parser.cc:6267: is_async = func.IsAsyncFunction() || func.is_async_closure(); On 2014/08/26 20:45:47, ...
6 years, 3 months ago (2014-08-26 22:07:44 UTC) #8
hausner
lgtm https://codereview.chromium.org/508643004/diff/100001/runtime/vm/parser.cc File runtime/vm/parser.cc (right): https://codereview.chromium.org/508643004/diff/100001/runtime/vm/parser.cc#newcode3035 runtime/vm/parser.cc:3035: await_is_keyword_ = false; Interesting. Why are you setting ...
6 years, 3 months ago (2014-08-26 22:48:07 UTC) #9
Michael Lippautz (Google)
Patchset #3 (id:120001) has been deleted
6 years, 3 months ago (2014-08-26 22:59:54 UTC) #10
Michael Lippautz (Google)
Patchset #3 (id:140001) has been deleted
6 years, 3 months ago (2014-08-26 23:00:37 UTC) #11
Michael Lippautz (Google)
https://codereview.chromium.org/508643004/diff/100001/runtime/vm/parser.cc File runtime/vm/parser.cc (right): https://codereview.chromium.org/508643004/diff/100001/runtime/vm/parser.cc#newcode3035 runtime/vm/parser.cc:3035: await_is_keyword_ = false; On 2014/08/26 22:48:06, hausner wrote: > ...
6 years, 3 months ago (2014-08-26 23:01:44 UTC) #12
Michael Lippautz (Google)
6 years, 3 months ago (2014-08-26 23:02:05 UTC) #13
Message was sent while issue was closed.
Committed patchset #3 manually as 39571 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698