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

Unified Diff: dart/pkg/compiler/lib/src/js_backend/backend.dart

Issue 935033005: Register literals through backend. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Changes commited as r43876. Created 5 years, 10 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 | « dart/pkg/compiler/lib/src/compiler.dart ('k') | dart/pkg/compiler/lib/src/resolution/members.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/pkg/compiler/lib/src/js_backend/backend.dart
diff --git a/dart/pkg/compiler/lib/src/js_backend/backend.dart b/dart/pkg/compiler/lib/src/js_backend/backend.dart
index a33b032470c93d6697851954aaa89b688f7519b6..3b64c8d45633a4cfbaa5f9196016834cd4d3d43a 100644
--- a/dart/pkg/compiler/lib/src/js_backend/backend.dart
+++ b/dart/pkg/compiler/lib/src/js_backend/backend.dart
@@ -2580,9 +2580,10 @@ class JavaScriptResolutionCallbacks extends ResolutionCallbacks {
void onStackTraceInCatch(Registry registry) {
assert(registry.isForResolution);
registerBackendStaticInvocation(backend.getTraceFromException(), registry);
+ backend.compiler.enqueuer.resolution.registerInstantiatedClass(
+ backend.compiler.stackTraceClass, registry);
}
-
void onTypeVariableExpression(Registry registry) {
assert(registry.isForResolution);
registerBackendStaticInvocation(backend.getSetRuntimeTypeInfo(), registry);
@@ -2710,6 +2711,45 @@ class JavaScriptResolutionCallbacks extends ResolutionCallbacks {
registerBackendStaticInvocation(
backend.compiler.symbolValidatedConstructor, registry);
}
+
+ void onLiteralInt(Registry registry) {
+ backend.compiler.enqueuer.resolution.registerInstantiatedClass(
+ backend.intImplementation, registry);
+ }
+
+ void onLiteralDouble(Registry registry) {
+ backend.compiler.enqueuer.resolution.registerInstantiatedClass(
+ backend.doubleImplementation, registry);
+ }
+
+ void onLiteralBool(Registry registry) {
+ backend.compiler.enqueuer.resolution.registerInstantiatedClass(
+ backend.boolImplementation, registry);
+ }
+
+ void onLiteralString(Registry registry) {
+ backend.compiler.enqueuer.resolution.registerInstantiatedClass(
+ // TODO(ahe): For some reason using [backend.stringImplementation] here
+ // confuses dart2js during override checks.
+ backend.compiler.stringClass, registry);
+ }
+
+ void onLiteralNull(Registry registry) {
+ backend.compiler.enqueuer.resolution.registerInstantiatedClass(
+ backend.nullImplementation, registry);
+ }
+
+ void onLiteralSymbol(Registry registry) {
+ backend.compiler.enqueuer.resolution.registerInstantiatedClass(
+ backend.compiler.symbolClass, registry);
+ backend.compiler.enqueuer.resolution.registerStaticUse(
+ backend.compiler.symbolConstructor.declaration);
+ }
+
+ void onLiteralFunction(Registry registry) {
+ backend.compiler.enqueuer.resolution.registerInstantiatedClass(
+ backend.functionImplementation, registry);
+ }
}
/// Records that [constant] is used by the element behind [registry].
« no previous file with comments | « dart/pkg/compiler/lib/src/compiler.dart ('k') | dart/pkg/compiler/lib/src/resolution/members.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698