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

Unified Diff: pkg/compiler/lib/src/world.dart

Issue 2506393002: Enhance precision of recorded instantiation info in ResolutionWorldBuilder (Closed)
Patch Set: Updated cf. comments. Created 4 years, 1 month 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/compiler/lib/src/world.dart
diff --git a/pkg/compiler/lib/src/world.dart b/pkg/compiler/lib/src/world.dart
index dd786a425824575358f2f77a2d54908a567bcd94..c406d0700f8196e6554627632ef32678491913e6 100644
--- a/pkg/compiler/lib/src/world.dart
+++ b/pkg/compiler/lib/src/world.dart
@@ -25,8 +25,8 @@ import 'universe/class_set.dart';
import 'universe/function_set.dart' show FunctionSet;
import 'universe/selector.dart' show Selector;
import 'universe/side_effects.dart' show SideEffects;
-import 'universe/world_builder.dart' show ResolutionWorldBuilder;
-import 'util/enumset.dart';
+import 'universe/world_builder.dart'
+ show InstantiationInfo, ResolutionWorldBuilder;
import 'util/util.dart' show Link;
/// Common superinterface for [OpenWorld] and [ClosedWorld].
@@ -1007,7 +1007,10 @@ class WorldImpl implements ClosedWorld, ClosedWorldRefiner, OpenWorld {
/// Updates the `isDirectlyInstantiated` and `isIndirectlyInstantiated`
/// properties of the [ClassHierarchyNode] for [cls].
- void addSubtypes(ClassElement cls, EnumSet<Instantiation> instantiations) {
+ void addSubtypes(ClassElement cls, InstantiationInfo info) {
+ if (!info.hasInstantiation) {
+ return;
+ }
if (cacheStrategy.hasIncrementalSupport && !alreadyPopulated.add(cls)) {
return;
}
@@ -1017,10 +1020,8 @@ class WorldImpl implements ClosedWorld, ClosedWorldRefiner, OpenWorld {
}
_updateClassHierarchyNodeForClass(cls,
- directlyInstantiated:
- instantiations.contains(Instantiation.DIRECTLY_INSTANTIATED),
- abstractlyInstantiated:
- instantiations.contains(Instantiation.ABSTRACTLY_INSTANTIATED));
+ directlyInstantiated: info.isDirectlyInstantiated,
+ abstractlyInstantiated: info.isAbstractlyInstantiated);
// Walk through the superclasses, and record the types
// implemented by that type on the superclasses.
« no previous file with comments | « pkg/compiler/lib/src/universe/world_builder.dart ('k') | tests/compiler/dart2js/kernel/closed_world_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698