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/bailout.dart

Issue 11543017: Revert r16032: it revealed a bug in our bailout environment computation. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years 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
===================================================================
--- sdk/lib/_internal/compiler/implementation/ssa/bailout.dart (revision 16033)
+++ sdk/lib/_internal/compiler/implementation/ssa/bailout.dart (working copy)
@@ -139,12 +139,6 @@
if (isNested(userLoopHeader, currentLoopHeader)) return true;
}
- bool isIndexOperatorOnIndexablePrimitive(instruction, types) {
- return instruction is HIndex
- || (instruction is HInvokeDynamicMethod
- && instruction.isIndexOperatorOnIndexablePrimitive(types));
- }
-
// To speed up computations on values loaded from arrays, we
// insert type guards for builtin array indexing operations in
// nested loops. Since this can blow up code size quite
@@ -152,8 +146,9 @@
// inserted for this method. The code size price for an additional
// type guard is much smaller than the first one that causes the
// generation of a bailout method.
- if (hasTypeGuards
- && isIndexOperatorOnIndexablePrimitive(instruction, types)) {
+ if (instruction is HIndex &&
+ (instruction as HIndex).isBuiltin(types) &&
+ hasTypeGuards) {
HBasicBlock loopHeader = instruction.block.enclosingLoopHeader;
if (loopHeader != null && loopHeader.parentLoopHeader != null) {
return true;

Powered by Google App Engine
This is Rietveld 408576698