Chromium Code Reviews| Index: sdk/lib/_internal/compiler/implementation/ssa/bailout.dart |
| =================================================================== |
| --- sdk/lib/_internal/compiler/implementation/ssa/bailout.dart (revision 15541) |
| +++ sdk/lib/_internal/compiler/implementation/ssa/bailout.dart (working copy) |
| @@ -146,9 +146,11 @@ |
| // 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 (instruction is HIndex && |
| - (instruction as HIndex).isBuiltin(types) && |
| - hasTypeGuards) { |
| + var temp = instruction; |
|
kasperl
2012/11/30 09:23:04
How about factoring this condition out into a sepa
ngeoffray
2012/11/30 13:18:14
Done.
|
| + if ((temp is HIndex |
| + || (temp is HInvokeDynamicMethod |
| + && temp.isIndexOperatorOnIndexablePrimitive(types))) |
| + && hasTypeGuards) { |
| HBasicBlock loopHeader = instruction.block.enclosingLoopHeader; |
| if (loopHeader != null && loopHeader.parentLoopHeader != null) { |
| return true; |