OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 part of ssa; | 5 part of ssa; |
6 | 6 |
7 class BailoutInfo { | 7 class BailoutInfo { |
8 int instructionId; | 8 int instructionId; |
9 int bailoutId; | 9 int bailoutId; |
10 BailoutInfo(this.instructionId, this.bailoutId); | 10 BailoutInfo(this.instructionId, this.bailoutId); |
(...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
727 int inputLength = target.inputs.length; | 727 int inputLength = target.inputs.length; |
728 for (HInstruction input in target.inputs) { | 728 for (HInstruction input in target.inputs) { |
729 String inputName = variableNames.getName(input); | 729 String inputName = variableNames.getName(input); |
730 int position = parameterNames[inputName]; | 730 int position = parameterNames[inputName]; |
731 if (position == null) { | 731 if (position == null) { |
732 position = parameterNames[inputName] = bailoutArity++; | 732 position = parameterNames[inputName] = bailoutArity++; |
733 } | 733 } |
734 } | 734 } |
735 | 735 |
736 if (blocks.isEmpty) { | 736 if (blocks.isEmpty) { |
737 if (firstBailoutTarget == null) { | 737 // If [currentBlockInformation] is not null, we are in the |
| 738 // middle of a loop/labeled block and this is too complex to handle for |
| 739 // now. |
| 740 if (firstBailoutTarget == null && currentBlockInformation == null) { |
738 firstBailoutTarget = target; | 741 firstBailoutTarget = target; |
739 } else { | 742 } else { |
740 hasComplexBailoutTargets = true; | 743 hasComplexBailoutTargets = true; |
741 } | 744 } |
742 } else { | 745 } else { |
743 hasComplexBailoutTargets = true; | 746 hasComplexBailoutTargets = true; |
744 blocks.forEach((HBasicBlock block) { | 747 blocks.forEach((HBasicBlock block) { |
745 block.bailoutTargets.add(target); | 748 block.bailoutTargets.add(target); |
746 }); | 749 }); |
747 } | 750 } |
748 } | 751 } |
749 } | 752 } |
OLD | NEW |