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

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: Fix unittests. 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 44ef282300faad58683dd90b7411499850b6677f..2b0107718edb420e00e079a85d8aab397837d2d9 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) {
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/ssa/nodes.dart ('k') | sdk/lib/_internal/compiler/implementation/ssa/types.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698