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

Unified Diff: pkg/kernel/lib/transformations/continuation.dart

Issue 2904203003: Don't recreate CoreTypes in transformers. Pass it in. (Closed)
Patch Set: Don't create CoreTypes in createOutlines() on InputError. Created 3 years, 7 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
Index: pkg/kernel/lib/transformations/continuation.dart
diff --git a/pkg/kernel/lib/transformations/continuation.dart b/pkg/kernel/lib/transformations/continuation.dart
index 4e4cdbba40809ca69de429db88538b34cbc7ddfa..5090511ca6230dfd3283dffaef23ce05b0a911e1 100644
--- a/pkg/kernel/lib/transformations/continuation.dart
+++ b/pkg/kernel/lib/transformations/continuation.dart
@@ -20,8 +20,8 @@ void transformLibraries(CoreTypes coreTypes, List<Library> libraries) {
}
}
-Program transformProgram(Program program) {
- var helper = new HelperNodes.fromProgram(program);
+Program transformProgram(CoreTypes coreTypes, Program program) {
+ var helper = new HelperNodes.fromCoreTypes(coreTypes);
var rewriter = new RecursiveContinuationRewriter(helper);
return rewriter.rewriteProgram(program);
}
@@ -943,9 +943,4 @@ class HelperNodes {
coreTypes.awaitHelperProcedure,
coreTypes);
}
-
- factory HelperNodes.fromProgram(Program program) {
- var coreTypes = new CoreTypes(program);
- return new HelperNodes.fromCoreTypes(coreTypes);
- }
}
« no previous file with comments | « pkg/kernel/lib/transformations/closure_conversion.dart ('k') | pkg/kernel/lib/transformations/generic_types_reification.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698