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

Unified Diff: sdk/lib/_internal/compiler/implementation/ssa/nodes.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/nodes.dart
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/nodes.dart b/sdk/lib/_internal/compiler/implementation/ssa/nodes.dart
index be461359bf206dd3b11f56ba11ecf106d779be47..38e9e4fd72e9471b5649985f29076ce6e3c9da8d 100644
--- a/sdk/lib/_internal/compiler/implementation/ssa/nodes.dart
+++ b/sdk/lib/_internal/compiler/implementation/ssa/nodes.dart
@@ -1116,12 +1116,13 @@ abstract class HInstruction implements Spannable {
// instructions with generics. It has the generic type context
// available.
assert(type.kind != TypeKind.TYPE_VARIABLE);
- assert(type.isRaw
- || type.isMalformed
- || type.kind == TypeKind.FUNCTION);
- if (identical(type.element, compiler.dynamicClass)) return this;
+ assert(type.isRaw || type.kind == TypeKind.FUNCTION);
+ if (type.containsAmbiguousTypes) {
+ return new HTypeConversion(type, kind, HType.UNKNOWN, this);
+ }
+ if (type.treatAsDynamic) return this;
if (identical(type.element, compiler.objectClass)) return this;
- if (type.isMalformed || type.kind != TypeKind.INTERFACE) {
+ if (type.kind != TypeKind.INTERFACE) {
return new HTypeConversion(type, kind, HType.UNKNOWN, this);
} else if (kind == HTypeConversion.BOOLEAN_CONVERSION_CHECK) {
// Boolean conversion checks work on non-nullable booleans.

Powered by Google App Engine
This is Rietveld 408576698