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

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

Issue 25478009: Handle compile-time constness for conditionals and type literal calls. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments Created 7 years, 2 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: sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
diff --git a/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart b/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
index 6cc883159cde6d55b89fd280cde8055fd4bf1e8d..754e5aa0bad1b1481b6868da298300901da924c3 100644
--- a/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
@@ -757,6 +757,10 @@ class JavaScriptBackend extends Backend {
// An interceptor constant references the class's prototype chain.
InterceptorConstant interceptor = constant;
registerInstantiatedConstantType(interceptor.dispatchedType, elements);
+ } else if (constant.isType()) {
+ TypeConstant typeConstant = constant;
+ registerTypeLiteral(typeConstant.representedType.element,
+ compiler.enqueuer.codegen, elements);
}
}

Powered by Google App Engine
This is Rietveld 408576698