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

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

Issue 11412245: MalformedType used for all invalid type annotations. (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/bailout.dart
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/bailout.dart b/sdk/lib/_internal/compiler/implementation/ssa/bailout.dart
index a001ad58ce0099964c2876cb8685c745ae2c725e..fbc2ec1ed82d9da293bb42bf8ff64233f4d2da9e 100644
--- a/sdk/lib/_internal/compiler/implementation/ssa/bailout.dart
+++ b/sdk/lib/_internal/compiler/implementation/ssa/bailout.dart
@@ -112,8 +112,10 @@ class SsaTypeGuardInserter extends HGraphVisitor implements OptimizationPhase {
if (source != null) {
DartType sourceType = source.computeType(compiler);
DartType speculatedType = speculativeType.computeType(compiler);
- if (speculatedType != null
- && !compiler.types.isAssignable(speculatedType, sourceType)) {
+ if (speculatedType != null &&
+ !speculatedType.isMalformed &&
+ !sourceType.isMalformed &&
ngeoffray 2012/11/30 12:00:40 I wouldn't bother here. Let it have type guards. T
Johnni Winther 2012/12/04 10:07:17 Done.
+ !compiler.types.isAssignable(speculatedType, sourceType)) {
return false;
}
}

Powered by Google App Engine
This is Rietveld 408576698