| Index: pkg/compiler/lib/src/kernel/element_map_impl.dart
|
| diff --git a/pkg/compiler/lib/src/kernel/element_map_impl.dart b/pkg/compiler/lib/src/kernel/element_map_impl.dart
|
| index e06221d78ed91e3101dd72da5afdeb50b79c38e4..06bdbc93a3da6bc194b78c956707dbcd92017d6e 100644
|
| --- a/pkg/compiler/lib/src/kernel/element_map_impl.dart
|
| +++ b/pkg/compiler/lib/src/kernel/element_map_impl.dart
|
| @@ -299,11 +299,30 @@ class KernelToElementMapImpl extends KernelToElementMapMixin {
|
| bool isExternal = node.isExternal;
|
| bool isAbstract = node.isAbstract;
|
| KFunction function;
|
| + AsyncMarker asyncMarker;
|
| + switch (node.function.asyncMarker) {
|
| + case ir.AsyncMarker.Async:
|
| + asyncMarker = AsyncMarker.ASYNC;
|
| + break;
|
| + case ir.AsyncMarker.AsyncStar:
|
| + asyncMarker = AsyncMarker.ASYNC_STAR;
|
| + break;
|
| + case ir.AsyncMarker.Sync:
|
| + asyncMarker = AsyncMarker.SYNC;
|
| + break;
|
| + case ir.AsyncMarker.SyncStar:
|
| + asyncMarker = AsyncMarker.SYNC_STAR;
|
| + break;
|
| + case ir.AsyncMarker.SyncYielding:
|
| + throw new UnsupportedError(
|
| + "Async marker ${node.function.asyncMarker} is not supported.");
|
| + }
|
| switch (node.kind) {
|
| case ir.ProcedureKind.Factory:
|
| throw new UnsupportedError("Cannot create method from factory.");
|
| case ir.ProcedureKind.Getter:
|
| - function = new KGetter(memberIndex, library, enclosingClass, name,
|
| + function = new KGetter(
|
| + memberIndex, library, enclosingClass, name, asyncMarker,
|
| isStatic: isStatic,
|
| isExternal: isExternal,
|
| isAbstract: isAbstract);
|
| @@ -311,12 +330,13 @@ class KernelToElementMapImpl extends KernelToElementMapMixin {
|
| case ir.ProcedureKind.Method:
|
| case ir.ProcedureKind.Operator:
|
| function = new KMethod(memberIndex, library, enclosingClass, name,
|
| - _getParameterStructure(node.function),
|
| + _getParameterStructure(node.function), asyncMarker,
|
| isStatic: isStatic,
|
| isExternal: isExternal,
|
| isAbstract: isAbstract);
|
| break;
|
| case ir.ProcedureKind.Setter:
|
| + assert(asyncMarker == AsyncMarker.SYNC);
|
| function = new KSetter(
|
| memberIndex, library, enclosingClass, getName(node.name).setter,
|
| isStatic: isStatic,
|
|
|