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

Unified Diff: runtime/vm/ast_transformer.cc

Issue 1575953005: Source position tests for switch and try catch finally (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: runtime/vm/ast_transformer.cc
diff --git a/runtime/vm/ast_transformer.cc b/runtime/vm/ast_transformer.cc
index ae42b7089427b044851036e7351046b8e8b97a2a..32ec3f9f1d1bc00525ab8a33eb5991df84d35e85 100644
--- a/runtime/vm/ast_transformer.cc
+++ b/runtime/vm/ast_transformer.cc
@@ -119,6 +119,7 @@ void AwaitTransformer::VisitAwaitNode(AwaitNode* node) {
// :saved_try_ctx_var = :await_saved_try_ctx_var_y;
// :await_temp_var_(X+1) = :result_param;
+ const intptr_t token_pos = node->token_pos();
LocalVariable* async_op = GetVariableInScope(
preamble_->scope(), Symbols::AsyncOperation());
LocalVariable* async_then_callback = GetVariableInScope(
@@ -136,7 +137,7 @@ void AwaitTransformer::VisitAwaitNode(AwaitNode* node) {
LocalVariable* await_temp = AddToPreambleNewTempVar(transformed_expr);
AwaitMarkerNode* await_marker =
- new (Z) AwaitMarkerNode(async_temp_scope_, node->scope());
+ new (Z) AwaitMarkerNode(async_temp_scope_, node->scope(), token_pos);
preamble_->Add(await_marker);
// :result_param = _awaitHelper(

Powered by Google App Engine
This is Rietveld 408576698