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

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

Issue 10098001: Refactor type propagation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix type for null and update tests. Created 8 years, 8 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: lib/compiler/implementation/ssa/bailout.dart
diff --git a/lib/compiler/implementation/ssa/bailout.dart b/lib/compiler/implementation/ssa/bailout.dart
index c1c814d51bcd81ed725605a005a61ac0da8f4e2d..9828599d4922f6b635f44c2bf4ac31e9429c3b45 100644
--- a/lib/compiler/implementation/ssa/bailout.dart
+++ b/lib/compiler/implementation/ssa/bailout.dart
@@ -276,7 +276,9 @@ class SsaTypeGuardBuilder extends HBaseVisitor implements OptimizationPhase {
}
bool shouldCaptureEnvironment(HInstruction instruction) {
- return instruction.type.isKnown() && !instruction.hasExpectedType();
+ HType propagatedType = instruction.propagatedType;
+ return propagatedType.isUseful()
+ && propagatedType != instruction.computeTypeFromInputTypes();
}
void insertCapturedEnvironments() {

Powered by Google App Engine
This is Rietveld 408576698