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