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

Unified Diff: pkg/front_end/lib/src/fasta/kernel/kernel_outline_shaker.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
« no previous file with comments | « pkg/front_end/lib/src/fasta/fasta.dart ('k') | pkg/front_end/lib/src/fasta/kernel/kernel_target.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/lib/src/fasta/kernel/kernel_outline_shaker.dart
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_outline_shaker.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_outline_shaker.dart
index 4a27da8c649af1c71cbe1bf68fb9cee371e4606a..bb18d8420e5d643b0a8b85cf85c630f170f5adf2 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_outline_shaker.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_outline_shaker.dart
@@ -162,8 +162,10 @@ class TypeMarker extends DartTypeVisitor {
// TODO(sigmund): delete. We should collect this information while
// building kernel without having to run a visitor afterwards.
class RootsMarker extends RecursiveVisitor {
+ final CoreTypes coreTypes;
final RetainedDataBuilder data;
- RootsMarker(this.data);
+
+ RootsMarker(this.coreTypes, this.data);
void run(Program program, bool isIncluded(Uri uri)) {
markRequired(program);
@@ -180,7 +182,6 @@ class RootsMarker extends RecursiveVisitor {
// TODO(sigmund): consider being more fine-grained and only marking what is
// seen and used.
void markRequired(Program program) {
- var coreTypes = new CoreTypes(program);
coreTypes.objectClass.members.forEach(data.markMember);
// These are assumed to be available by fasta:
« no previous file with comments | « pkg/front_end/lib/src/fasta/fasta.dart ('k') | pkg/front_end/lib/src/fasta/kernel/kernel_target.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698