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

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

Issue 2904203003: Don't recreate CoreTypes in transformers. Pass it in. (Closed)
Patch Set: 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/mixin_full_resolution.dart
diff --git a/pkg/kernel/lib/transformations/mixin_full_resolution.dart b/pkg/kernel/lib/transformations/mixin_full_resolution.dart
index 0fbb388f8781ac254283066388e11f39c8a2aeb5..749ffeacf7aae06f5509e70b32bf64c767ddaf70 100644
--- a/pkg/kernel/lib/transformations/mixin_full_resolution.dart
+++ b/pkg/kernel/lib/transformations/mixin_full_resolution.dart
@@ -10,8 +10,8 @@ import '../core_types.dart';
import '../target/targets.dart' show NoneTarget, Target;
import '../type_algebra.dart';
-Program transformProgram(Program program) {
- new MixinFullResolution(new NoneTarget(null)).transform(program);
+Program transformProgram(CoreTypes coreTypes, Program program) {
+ new MixinFullResolution(new NoneTarget(null), coreTypes).transform(program);
return program;
}
@@ -24,10 +24,10 @@ Program transformProgram(Program program) {
class MixinFullResolution {
final Target targetInfo;
+ final CoreTypes coreTypes;
ClassHierarchy hierarchy;
- CoreTypes coreTypes;
- MixinFullResolution(this.targetInfo);
+ MixinFullResolution(this.targetInfo, this.coreTypes);
void transform(Program program) {
var transformedClasses = new Set<Class>();
@@ -44,7 +44,6 @@ class MixinFullResolution {
}
hierarchy = new ClassHierarchy(program);
- coreTypes = new CoreTypes(program);
// Resolve all super call expressions and super initializers.
for (var library in program.libraries) {

Powered by Google App Engine
This is Rietveld 408576698