| Index: pkg/kernel/lib/transformations/continuation.dart
|
| diff --git a/pkg/kernel/lib/transformations/continuation.dart b/pkg/kernel/lib/transformations/continuation.dart
|
| index a8b28205e7d446a47eaba6eb9ee6be33d804d52d..7f593d17f4efd7aec1278a23b1a6ce42a8f85822 100644
|
| --- a/pkg/kernel/lib/transformations/continuation.dart
|
| +++ b/pkg/kernel/lib/transformations/continuation.dart
|
| @@ -124,11 +124,16 @@ class SyncStarFunctionRewriter extends ContinuationRewriterBase {
|
| // :sync_body(:iterator) {
|
| // modified <node.body>;
|
| // }
|
| +
|
| + // Note: SyncYielding functions have no Dart equivalent. Since they are
|
| + // synchronous, we use Sync. (Note also that the Dart VM backend uses the
|
| + // Dart async marker to decide if functions are debuggable.)
|
| final nestedClosureVariable = new VariableDeclaration(":sync_op");
|
| final function = new FunctionNode(buildClosureBody(),
|
| positionalParameters: [iteratorVariable],
|
| requiredParameterCount: 1,
|
| - asyncMarker: AsyncMarker.SyncYielding)
|
| + asyncMarker: AsyncMarker.SyncYielding,
|
| + dartAsyncMarker: AsyncMarker.Sync)
|
| ..fileOffset = enclosingFunction.fileOffset
|
| ..fileEndOffset = enclosingFunction.fileEndOffset
|
| ..returnType = helper.coreTypes.boolClass.rawType;
|
| @@ -223,10 +228,15 @@ abstract class AsyncRewriterBase extends ContinuationRewriterBase {
|
| new VariableDeclaration(':exception'),
|
| new VariableDeclaration(':stack_trace'),
|
| ];
|
| +
|
| + // Note: SyncYielding functions have no Dart equivalent. Since they are
|
| + // synchronous, we use Sync. (Note also that the Dart VM backend uses the
|
| + // Dart async marker to decide if functions are debuggable.)
|
| final function = new FunctionNode(buildWrappedBody(),
|
| positionalParameters: parameters,
|
| requiredParameterCount: 0,
|
| - asyncMarker: AsyncMarker.SyncYielding)
|
| + asyncMarker: AsyncMarker.SyncYielding,
|
| + dartAsyncMarker: AsyncMarker.Sync)
|
| ..fileOffset = enclosingFunction.fileOffset
|
| ..fileEndOffset = enclosingFunction.fileEndOffset;
|
|
|
|
|