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

Unified Diff: sdk/lib/_internal/compiler/implementation/ssa/nodes.dart

Issue 11299009: Support type literals as compile-time constants. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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: sdk/lib/_internal/compiler/implementation/ssa/nodes.dart
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/nodes.dart b/sdk/lib/_internal/compiler/implementation/ssa/nodes.dart
index 346d80beedcb47d2622a0e88feb0581d0a2f03d6..e0f19b2b1f904c136db67f7fcf6e0a7ef0e1d7e1 100644
--- a/sdk/lib/_internal/compiler/implementation/ssa/nodes.dart
+++ b/sdk/lib/_internal/compiler/implementation/ssa/nodes.dart
@@ -169,8 +169,13 @@ class HGraph {
if (constant.isList()) return HType.READABLE_ARRAY;
if (constant.isFunction()) return HType.UNKNOWN;
if (constant.isSentinel()) return HType.UNKNOWN;
- ObjectConstant objectConstant = constant;
- return new HBoundedType.exact(objectConstant.type);
+ if (constant.isType) {
ngeoffray 2012/11/15 16:07:24 You can remove this once TypeConstant extends Obje
karlklose 2012/11/19 15:08:58 Done.
+ TypeConstant typeConstant = constant;
+ return new HBoundedType.exact(typeConstant.type);
+ } else {
+ ObjectConstant objectConstant = constant;
+ return new HBoundedType.exact(objectConstant.type);
+ }
}
HConstant addConstant(Constant constant) {

Powered by Google App Engine
This is Rietveld 408576698