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

Unified Diff: pkg/front_end/lib/src/fasta/fasta.dart

Issue 2904203003: Don't recreate CoreTypes in transformers. Pass it in. (Closed)
Patch Set: Create CoreTypes in AnalyzerLoader. 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/front_end/lib/src/fasta/fasta.dart
diff --git a/pkg/front_end/lib/src/fasta/fasta.dart b/pkg/front_end/lib/src/fasta/fasta.dart
index 6d1a2a37af246cc0054fb35b64a926073244d614..d75303f6f13798348df7dd62a1077216973c9963 100644
--- a/pkg/front_end/lib/src/fasta/fasta.dart
+++ b/pkg/front_end/lib/src/fasta/fasta.dart
@@ -16,6 +16,8 @@ import 'package:front_end/src/fasta/kernel/utils.dart';
import 'package:kernel/binary/ast_to_binary.dart'
show LibraryFilteringBinaryPrinter;
+import 'package:kernel/core_types.dart' show CoreTypes;
+
import 'package:kernel/kernel.dart' show Library, Program, loadProgramFromBytes;
import 'package:kernel/target/targets.dart' show Target, TargetFlags, getTarget;
@@ -220,8 +222,9 @@ Future<CompilationResult> parseScriptInFileSystem(
// Perform target-specific transformations.
Target target = getTarget("vm", new TargetFlags(strongMode: false));
- target.performModularTransformations(program);
- target.performGlobalTransformations(program);
+ CoreTypes coreTypes = new CoreTypes(program);
ahe 2017/05/29 14:08:46 This has already been computed, so we shouldn't co
scheglov 2017/05/30 00:06:10 Fixed. We now extract CoreTypes in addition to Pro
+ target.performModularTransformations(coreTypes, program);
+ target.performGlobalTransformations(coreTypes, program);
// Write the program to a list of bytes and return it. Do not include
// libraries that have a dart: import URI.

Powered by Google App Engine
This is Rietveld 408576698