| Index: pkg/kernel/lib/transformations/continuation.dart
|
| diff --git a/pkg/kernel/lib/transformations/continuation.dart b/pkg/kernel/lib/transformations/continuation.dart
|
| index 185edc50eb6ae1742b2cba8d4f2a7fdd6e57bad3..97ef172f8c9475aa93bd5bfe43220c1fc90f9e2e 100644
|
| --- a/pkg/kernel/lib/transformations/continuation.dart
|
| +++ b/pkg/kernel/lib/transformations/continuation.dart
|
| @@ -125,12 +125,9 @@ class SyncStarFunctionRewriter extends ContinuationRewriterBase {
|
| final function = new FunctionNode(buildClosureBody(),
|
| positionalParameters: [iteratorVariable],
|
| requiredParameterCount: 1,
|
| - asyncMarker: AsyncMarker.SyncYielding)
|
| - ..fileOffset = enclosingFunction.fileOffset
|
| - ..fileEndOffset = enclosingFunction.fileEndOffset;
|
| + asyncMarker: AsyncMarker.SyncYielding);
|
| final closureFunction =
|
| - new FunctionDeclaration(nestedClosureVariable, function)
|
| - ..fileOffset = enclosingFunction.parent.fileOffset;
|
| + new FunctionDeclaration(nestedClosureVariable, function);
|
|
|
| // return new _SyncIterable(:sync_body);
|
| final arguments = new Arguments([new VariableGet(nestedClosureVariable)]);
|
| @@ -212,9 +209,7 @@ abstract class AsyncRewriterBase extends ContinuationRewriterBase {
|
| final function = new FunctionNode(buildWrappedBody(),
|
| positionalParameters: parameters,
|
| requiredParameterCount: 0,
|
| - asyncMarker: AsyncMarker.SyncYielding)
|
| - ..fileOffset = enclosingFunction.fileOffset
|
| - ..fileEndOffset = enclosingFunction.fileEndOffset;
|
| + asyncMarker: AsyncMarker.SyncYielding);
|
|
|
| // The await expression lifter might have created a number of
|
| // [VariableDeclarations].
|
| @@ -225,8 +220,7 @@ abstract class AsyncRewriterBase extends ContinuationRewriterBase {
|
|
|
| // Now add the closure function itself.
|
| final closureFunction =
|
| - new FunctionDeclaration(nestedClosureVariable, function)
|
| - ..fileOffset = enclosingFunction.parent.fileOffset;
|
| + new FunctionDeclaration(nestedClosureVariable, function);
|
| statements.add(closureFunction);
|
|
|
| // :async_op_then = _asyncThenWrapperHelper(asyncBody);
|
| @@ -541,7 +535,7 @@ abstract class AsyncRewriterBase extends ContinuationRewriterBase {
|
| var condition = new AwaitExpression(new MethodInvocation(
|
| new VariableGet(iteratorVariable),
|
| new Name('moveNext'),
|
| - new Arguments(<Expression>[])))..fileOffset = stmt.fileOffset;
|
| + new Arguments(<Expression>[])));
|
|
|
| // var <variable> = iterator.current;
|
| var valueVariable = stmt.variable;
|
| @@ -665,9 +659,8 @@ class AsyncStarFunctionRewriter extends AsyncRewriterBase {
|
| // :controller = new _AsyncController(:async_op);
|
| var arguments =
|
| new Arguments(<Expression>[new VariableGet(nestedClosureVariable)]);
|
| - var buildController =
|
| - new ConstructorInvocation(helper.streamControllerConstructor, arguments)
|
| - ..fileOffset = enclosingFunction.fileOffset;
|
| + var buildController = new ConstructorInvocation(
|
| + helper.streamControllerConstructor, arguments);
|
| var setController = new ExpressionStatement(
|
| new VariableSet(controllerVariable, buildController));
|
| statements.add(setController);
|
| @@ -703,7 +696,7 @@ class AsyncStarFunctionRewriter extends AsyncRewriterBase {
|
| new VariableGet(controllerVariable),
|
| new Name("close", helper.asyncLibrary),
|
| new Arguments(<Expression>[]))),
|
| - new ReturnStatement()..fileOffset = enclosingFunction.fileEndOffset
|
| + new ReturnStatement()
|
| ]);
|
| }
|
|
|
| @@ -713,12 +706,10 @@ class AsyncStarFunctionRewriter extends AsyncRewriterBase {
|
| var addExpression = new MethodInvocation(
|
| new VariableGet(controllerVariable),
|
| new Name(stmt.isYieldStar ? 'addStream' : 'add', helper.asyncLibrary),
|
| - new Arguments(<Expression>[expr]))..fileOffset = stmt.fileOffset;
|
| + new Arguments(<Expression>[expr]));
|
|
|
| - statements.add(new IfStatement(
|
| - addExpression,
|
| - new ReturnStatement(new NullLiteral()),
|
| - createContinuationPoint()..fileOffset = stmt.fileOffset));
|
| + statements.add(new IfStatement(addExpression,
|
| + new ReturnStatement(new NullLiteral()), createContinuationPoint()));
|
| return null;
|
| }
|
|
|
| @@ -744,8 +735,7 @@ class AsyncFunctionRewriter extends AsyncRewriterBase {
|
| // var :completer = new Completer.sync();
|
| completerVariable = new VariableDeclaration(":completer",
|
| initializer: new StaticInvocation(helper.completerConstructor,
|
| - new Arguments([], types: [const DynamicType()]))
|
| - ..fileOffset = enclosingFunction.body.fileOffset,
|
| + new Arguments([], types: [const DynamicType()])),
|
| isFinal: true);
|
| statements.add(completerVariable);
|
|
|
| @@ -758,8 +748,7 @@ class AsyncFunctionRewriter extends AsyncRewriterBase {
|
| var newMicrotaskStatement = new ExpressionStatement(new StaticInvocation(
|
| helper.futureMicrotaskConstructor,
|
| new Arguments([new VariableGet(nestedClosureVariable)],
|
| - types: [const DynamicType()]))
|
| - ..fileOffset = enclosingFunction.fileOffset);
|
| + types: [const DynamicType()])));
|
| statements.add(newMicrotaskStatement);
|
|
|
| // return :completer.future;
|
| @@ -771,7 +760,6 @@ class AsyncFunctionRewriter extends AsyncRewriterBase {
|
| enclosingFunction.body = new Block(statements);
|
| enclosingFunction.body.parent = enclosingFunction;
|
| enclosingFunction.asyncMarker = AsyncMarker.Sync;
|
| - enclosingFunction.debuggable = false;
|
| return enclosingFunction;
|
| }
|
|
|
| @@ -794,7 +782,7 @@ class AsyncFunctionRewriter extends AsyncRewriterBase {
|
| new VariableGet(completerVariable),
|
| new Name("complete", helper.asyncLibrary),
|
| new Arguments([new VariableGet(returnVariable)]))),
|
| - new ReturnStatement()..fileOffset = enclosingFunction.fileEndOffset
|
| + new ReturnStatement()
|
| ]);
|
| }
|
|
|
|
|