Index: pkg/compiler/lib/src/ssa/kernel_impact.dart |
diff --git a/pkg/compiler/lib/src/ssa/kernel_impact.dart b/pkg/compiler/lib/src/ssa/kernel_impact.dart |
index f550813ad33f2404463eb4571d72904e87a18b07..8f4d619dd7317b7cbe70f622283d8ee9efdc8f86 100644 |
--- a/pkg/compiler/lib/src/ssa/kernel_impact.dart |
+++ b/pkg/compiler/lib/src/ssa/kernel_impact.dart |
@@ -137,10 +137,8 @@ class KernelImpactBuilder extends ir.Visitor { |
return impactBuilder; |
} |
- ResolutionImpact buildProcedure(ir.Procedure procedure) { |
- handleSignature(procedure.function); |
- visitNode(procedure.function.body); |
- switch (procedure.function.asyncMarker) { |
+ void handleAsyncMarker(ir.AsyncMarker asyncMarker) { |
+ switch (asyncMarker) { |
case ir.AsyncMarker.Sync: |
break; |
case ir.AsyncMarker.SyncStar: |
@@ -154,8 +152,14 @@ class KernelImpactBuilder extends ir.Visitor { |
break; |
case ir.AsyncMarker.SyncYielding: |
throw new SpannableAssertionFailure(CURRENT_ELEMENT_SPANNABLE, |
- "Unexpected async marker: ${procedure.function.asyncMarker}"); |
+ "Unexpected async marker: ${asyncMarker}"); |
} |
+ } |
+ |
+ ResolutionImpact buildProcedure(ir.Procedure procedure) { |
+ handleSignature(procedure.function); |
+ visitNode(procedure.function.body); |
+ handleAsyncMarker(procedure.function.asyncMarker); |
if (procedure.isExternal && |
!elementAdapter.isForeignLibrary(procedure.enclosingLibrary)) { |
impactBuilder.registerNativeData( |
@@ -472,6 +476,7 @@ class KernelImpactBuilder extends ir.Visitor { |
impactBuilder.registerStaticUse( |
new StaticUse.closure(elementAdapter.getLocalFunction(node))); |
handleSignature(node.function); |
+ handleAsyncMarker(node.function.asyncMarker); |
visitNode(node.function.body); |
} |
@@ -480,6 +485,7 @@ class KernelImpactBuilder extends ir.Visitor { |
impactBuilder.registerStaticUse( |
new StaticUse.closure(elementAdapter.getLocalFunction(node))); |
handleSignature(node.function); |
+ handleAsyncMarker(node.function.asyncMarker); |
visitNode(node.function.body); |
} |