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

Unified Diff: pkg/kernel/lib/transformations/insert_type_checks.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/insert_type_checks.dart
diff --git a/pkg/kernel/lib/transformations/insert_type_checks.dart b/pkg/kernel/lib/transformations/insert_type_checks.dart
index 01db445a5e6a2056c54326b9046826a6a07fed93..a884442472a88daf750387fccec8dffbe269b771 100644
--- a/pkg/kernel/lib/transformations/insert_type_checks.dart
+++ b/pkg/kernel/lib/transformations/insert_type_checks.dart
@@ -17,13 +17,12 @@ import '../type_checker.dart';
/// Ideally this should be done when initially generating kernel IR, but this
/// is not practical at the moment.
class InsertTypeChecks {
- CoreTypes coreTypes;
+ final CoreTypes coreTypes;
ClassHierarchy hierarchy;
- InsertTypeChecks({this.coreTypes, this.hierarchy});
+ InsertTypeChecks(this.coreTypes, {this.hierarchy});
void transformProgram(Program program) {
- coreTypes ??= new CoreTypes(program);
hierarchy ??= new ClassHierarchy(program);
new CheckInsertingTypeChecker(coreTypes, hierarchy).checkProgram(program);
}
« no previous file with comments | « pkg/kernel/lib/transformations/insert_covariance_checks.dart ('k') | pkg/kernel/lib/transformations/method_call.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698