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

Unified Diff: pkg/compiler/lib/src/ssa/kernel_impact.dart

Issue 2848243002: Register local functions with async markers (Closed)
Patch Set: Created 3 years, 8 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
« no previous file with comments | « no previous file | tests/compiler/dart2js/kernel/impact_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « no previous file | tests/compiler/dart2js/kernel/impact_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698