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

Unified Diff: pkg/kernel/lib/transformations/async.dart

Issue 2610133002: Non-format-changing kernel offset changes (Closed)
Patch Set: End offset doesn't appear to be needed on AwaitExpression (anymore) Created 3 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: pkg/kernel/lib/transformations/async.dart
diff --git a/pkg/kernel/lib/transformations/async.dart b/pkg/kernel/lib/transformations/async.dart
index 972d8dc804e58833ac006612488ed49233813982..b01f71a896f001a9bff950ed9929d9dbde6be1d9 100644
--- a/pkg/kernel/lib/transformations/async.dart
+++ b/pkg/kernel/lib/transformations/async.dart
@@ -409,17 +409,19 @@ class ExpressionLifter extends Transformer {
final R = continuationRewriter;
var shouldName = seenAwait;
var result = new VariableGet(asyncResult);
+
// The statements are in reverse order, so name the result first if
// necessary and then add the two other statements in reverse.
if (shouldName) result = name(result);
- statements.add(R.createContinuationPoint());
+ statements.add(R.createContinuationPoint()..fileOffset = expr.fileOffset);
Arguments arguments = new Arguments(<Expression>[
expr.operand,
new VariableGet(R.thenContinuationVariable),
new VariableGet(R.catchErrorContinuationVariable)
]);
statements.add(new ExpressionStatement(
- new StaticInvocation(R.helper.awaitHelper, arguments)));
+ new StaticInvocation(R.helper.awaitHelper, arguments)
+ ..fileOffset = expr.fileOffset));
seenAwait = false;
var index = nameIndex;

Powered by Google App Engine
This is Rietveld 408576698