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

Unified Diff: sdk/lib/_internal/compiler/implementation/dart_backend/backend.dart

Issue 24527005: Manually enqueue compareTo, hashCode, ==, and toString in the Dart-to-Dart backend to avoid tree sh… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 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 | « no previous file | tests/corelib/regress_11099_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/dart_backend/backend.dart
diff --git a/sdk/lib/_internal/compiler/implementation/dart_backend/backend.dart b/sdk/lib/_internal/compiler/implementation/dart_backend/backend.dart
index 13a215950f4be00ea14a6282a75b3c471b759e6a..6dea90437d71fe470488dd037a57663d1598caef 100644
--- a/sdk/lib/_internal/compiler/implementation/dart_backend/backend.dart
+++ b/sdk/lib/_internal/compiler/implementation/dart_backend/backend.dart
@@ -211,7 +211,18 @@ class DartBackend extends Backend {
ClassElement classElement = coreLibrary.findLocal(new SourceString(name));
classElement.ensureResolved(compiler);
}
+ // Enqueue the methods that the VM might invoke on user objects because
+ // we don't trust the resolution to always get these included.
+ world.registerInvocation(
+ new Selector.call(const SourceString("toString"), null, 0));
+ world.registerInvokedGetter(
+ new Selector.getter(const SourceString("hashCode"), null));
+ world.registerInvocation(
+ new Selector.binaryOperator(const SourceString("==")));
+ world.registerInvocation(
+ new Selector.call(const SourceString("compareTo"), null, 1));
}
+
void codegen(CodegenWorkItem work) { }
void processNativeClasses(Enqueuer world,
Iterable<LibraryElement> libraries) { }
« no previous file with comments | « no previous file | tests/corelib/regress_11099_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698