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

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

Issue 19097003: Support new malformed types semantics. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 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/ssa/optimize.dart
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/optimize.dart b/sdk/lib/_internal/compiler/implementation/ssa/optimize.dart
index f8ef54e8c134f8f613b17c7e6f0e5c1da1cb5b30..1772d434285b7ab52640a98f16d0a507b6ecd1c3 100644
--- a/sdk/lib/_internal/compiler/implementation/ssa/optimize.dart
+++ b/sdk/lib/_internal/compiler/implementation/ssa/optimize.dart
@@ -540,7 +540,7 @@ class SsaConstantFolder extends HBaseVisitor implements OptimizationPhase {
return node;
}
- if (element == compiler.objectClass || element == compiler.dynamicClass) {
+ if (element == compiler.objectClass || type.treatAsDynamic) {
return graph.addConstantBool(true, compiler);
}
@@ -581,7 +581,7 @@ class SsaConstantFolder extends HBaseVisitor implements OptimizationPhase {
// the notion of generics in the backend. For example, [:this:] in
// a class [:A<T>:], is currently always considered to have the
// raw type.
- } else if (!RuntimeTypes.hasTypeArguments(type) && !type.isMalformed) {
+ } else if (!RuntimeTypes.hasTypeArguments(type)) {
TypeMask expressionMask = expressionType.computeMask(compiler);
TypeMask typeMask = new TypeMask.nonNullSubtype(type);
if (expressionMask.union(typeMask, compiler) == typeMask) {

Powered by Google App Engine
This is Rietveld 408576698