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

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

Issue 2829223003: Check equivalence of closed world based on kernel elements. (Closed)
Patch Set: Updated cf. comments. Created 3 years, 8 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/compiler/lib/src/world.dart
diff --git a/pkg/compiler/lib/src/world.dart b/pkg/compiler/lib/src/world.dart
index 59ee9b2561449c8f930f39ef2d16a53ffa31baee..6928f7dda7fe402bb836ff7e787bef8e0c20ba94 100644
--- a/pkg/compiler/lib/src/world.dart
+++ b/pkg/compiler/lib/src/world.dart
@@ -1100,6 +1100,20 @@ abstract class ClosedWorldBase implements ClosedWorld, ClosedWorldRefiner {
bool getCurrentlyKnownMightBePassedToApply(Entity element) {
return getMightBePassedToApply(element);
}
+
+ // TODO(johnniwinther): Support [cls] as a [ClassEntity].
+ @override
+ String dump([ClassElement cls]) {
+ StringBuffer sb = new StringBuffer();
+ if (cls != null) {
+ sb.write("Classes in the closed world related to $cls:\n");
+ } else {
+ sb.write("Instantiated classes in the closed world:\n");
+ }
+ getClassHierarchyNode(commonElements.objectClass)
+ .printOn(sb, ' ', instantiatedOnly: cls == null, withRespectTo: cls);
+ return sb.toString();
+ }
}
class ClosedWorldImpl extends ClosedWorldBase {
@@ -1235,19 +1249,6 @@ class ClosedWorldImpl extends ClosedWorldBase {
}
}
- @override
- String dump([ClassElement cls]) {
- StringBuffer sb = new StringBuffer();
- if (cls != null) {
- sb.write("Classes in the closed world related to $cls:\n");
- } else {
- sb.write("Instantiated classes in the closed world:\n");
- }
- getClassHierarchyNode(commonElements.objectClass)
- .printOn(sb, ' ', instantiatedOnly: cls == null, withRespectTo: cls);
- return sb.toString();
- }
-
SideEffects getSideEffectsOfElement(Element element) {
// The type inferrer (where the side effects are being computed),
// does not see generative constructor bodies because they are
@@ -1341,11 +1342,6 @@ class KernelClosedWorld extends ClosedWorldBase {
}
@override
- String dump([ClassEntity cls]) {
- throw new UnimplementedError('KernelClosedWorld.dump');
- }
-
- @override
bool hasElementIn(ClassEntity cls, Selector selector, Entity element) {
throw new UnimplementedError('KernelClosedWorld.hasElementIn');
}
« no previous file with comments | « pkg/compiler/lib/src/universe/resolution_world_builder.dart ('k') | tests/compiler/dart2js/kernel/closed_world2_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698