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

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

Issue 2918593003: Pass ClassHierarchy instead of creating it. (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/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 2d6acf9fd789c5619487c8d4c533c61b16ddafff..c4662bd7ebee6019703f98ef9febbb660c74da4e 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/class_hierarchy.dart' show ClassHierarchy;
+
import 'package:kernel/core_types.dart' show CoreTypes;
import 'package:kernel/kernel.dart' show Library, Program, loadProgramFromBytes;
@@ -196,6 +198,7 @@ Future<CompilationResult> parseScriptInFileSystem(
}
CoreTypes coreTypes;
+ ClassHierarchy hierarchy;
Program program;
try {
TranslateUri uriTranslator =
@@ -210,6 +213,7 @@ Future<CompilationResult> parseScriptInFileSystem(
await dillTarget.buildOutlines();
await kernelTarget.buildOutlines();
coreTypes = kernelTarget.loader.coreTypes;
+ hierarchy = kernelTarget.loader.hierarchy;
program = await kernelTarget.buildProgram();
if (kernelTarget.errors.isNotEmpty) {
return new CompilationResult.errors(kernelTarget.errors);
@@ -224,7 +228,7 @@ Future<CompilationResult> parseScriptInFileSystem(
// Perform target-specific transformations.
Target target = getTarget("vm", new TargetFlags(strongMode: false));
- target.performModularTransformations(coreTypes, program);
+ target.performModularTransformations(coreTypes, hierarchy, program);
target.performGlobalTransformations(coreTypes, program);
// Write the program to a list of bytes and return it. Do not include

Powered by Google App Engine
This is Rietveld 408576698