| 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 class BailoutInfo { | 5 class BailoutInfo { |
| 6 int instructionId; | 6 int instructionId; |
| 7 int bailoutId; | 7 int bailoutId; |
| 8 BailoutInfo(this.instructionId, this.bailoutId); | 8 BailoutInfo(this.instructionId, this.bailoutId); |
| 9 } | 9 } |
| 10 | 10 |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 environment.addAll(phisInput); | 164 environment.addAll(phisInput); |
| 165 } | 165 } |
| 166 } | 166 } |
| 167 | 167 |
| 168 void visitGoto(HGoto goto) { | 168 void visitGoto(HGoto goto) { |
| 169 HBasicBlock block = goto.block; | 169 HBasicBlock block = goto.block; |
| 170 if (block.successors[0].dominator != block) return; | 170 if (block.successors[0].dominator != block) return; |
| 171 visitBasicBlock(block.successors[0]); | 171 visitBasicBlock(block.successors[0]); |
| 172 } | 172 } |
| 173 | 173 |
| 174 void visitBreak(HBreak breakInstruction) { |
| 175 unimplemented(); |
| 176 } |
| 177 |
| 174 void visitLoopBranch(HLoopBranch branch) { | 178 void visitLoopBranch(HLoopBranch branch) { |
| 175 HBasicBlock block = branch.block; | 179 HBasicBlock block = branch.block; |
| 176 | 180 |
| 177 // Visit the code after the loop. | 181 // Visit the code after the loop. |
| 178 visitBasicBlock(block.successors[1]); | 182 visitBasicBlock(block.successors[1]); |
| 179 // TODO(ngeoffray): Remove the instructions of the loop-exit from | 183 // TODO(ngeoffray): Remove the instructions of the loop-exit from |
| 180 // the environment. | 184 // the environment. |
| 181 | 185 |
| 182 HBasicBlock header = block.isLoopHeader() ? block : block.parentLoopHeader; | 186 HBasicBlock header = block.isLoopHeader() ? block : block.parentLoopHeader; |
| 183 // Put the loop phis in the environment. | 187 // Put the loop phis in the environment. |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 compiler.internalError('Control flow instructions already dealt with.', | 340 compiler.internalError('Control flow instructions already dealt with.', |
| 337 instruction: instruction); | 341 instruction: instruction); |
| 338 } | 342 } |
| 339 | 343 |
| 340 visitBailoutTarget(HBailoutTarget target) { | 344 visitBailoutTarget(HBailoutTarget target) { |
| 341 blocks.forEach((HBasicBlock block) { | 345 blocks.forEach((HBasicBlock block) { |
| 342 block.bailouts.add(target); | 346 block.bailouts.add(target); |
| 343 }); | 347 }); |
| 344 } | 348 } |
| 345 } | 349 } |
| OLD | NEW |