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

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

Issue 10831392: If an instruction is known to already by a number, the integer check will try to make it an integer. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 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
« no previous file with comments | « no previous file | lib/compiler/implementation/ssa/nodes.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/ssa/bailout.dart
===================================================================
--- lib/compiler/implementation/ssa/bailout.dart (revision 10938)
+++ lib/compiler/implementation/ssa/bailout.dart (working copy)
@@ -162,6 +162,16 @@
}
}
+ // If the instruction is used by a phi where a guard would be
+ // valuable, put the guard on that instruction.
+ for (HInstruction user in instruction.usedBy) {
+ if (user is HPhi
+ && user.block.id > instruction.id
+ && typeGuardWouldBeValuable(user, speculativeType)) {
+ return true;
+ }
+ }
+
// Insert type guards if the method is likely to be called in a
// loop.
return calledInLoop;
« no previous file with comments | « no previous file | lib/compiler/implementation/ssa/nodes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698