| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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; |
| 6 |
| 5 class HValidator extends HInstructionVisitor { | 7 class HValidator extends HInstructionVisitor { |
| 6 bool isValid = true; | 8 bool isValid = true; |
| 7 HGraph graph; | 9 HGraph graph; |
| 8 | 10 |
| 9 void visitGraph(HGraph visitee) { | 11 void visitGraph(HGraph visitee) { |
| 10 graph = visitee; | 12 graph = visitee; |
| 11 visitDominatorTree(visitee); | 13 visitDominatorTree(visitee); |
| 12 } | 14 } |
| 13 | 15 |
| 14 void markInvalid(String reason) { | 16 void markInvalid(String reason) { |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 markInvalid("Instruction in wrong block"); | 172 markInvalid("Instruction in wrong block"); |
| 171 } | 173 } |
| 172 if (!hasCorrectInputs()) { | 174 if (!hasCorrectInputs()) { |
| 173 markInvalid("Incorrect inputs"); | 175 markInvalid("Incorrect inputs"); |
| 174 } | 176 } |
| 175 if (!hasCorrectUses()) { | 177 if (!hasCorrectUses()) { |
| 176 markInvalid("Incorrect uses"); | 178 markInvalid("Incorrect uses"); |
| 177 } | 179 } |
| 178 } | 180 } |
| 179 } | 181 } |
| OLD | NEW |