Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/compiler/machine-graph-verifier.h" | 5 #include "src/compiler/machine-graph-verifier.h" |
| 6 | 6 |
| 7 #include "src/compiler/common-operator.h" | 7 #include "src/compiler/common-operator.h" |
| 8 #include "src/compiler/graph.h" | 8 #include "src/compiler/graph.h" |
| 9 #include "src/compiler/linkage.h" | 9 #include "src/compiler/linkage.h" |
| 10 #include "src/compiler/machine-operator.h" | 10 #include "src/compiler/machine-operator.h" |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 141 } else { | 141 } else { |
| 142 representation_vector_[node->id()] = | 142 representation_vector_[node->id()] = |
| 143 MachineRepresentation::kTagged; | 143 MachineRepresentation::kTagged; |
| 144 } | 144 } |
| 145 break; | 145 break; |
| 146 } | 146 } |
| 147 case IrOpcode::kAtomicStore: | 147 case IrOpcode::kAtomicStore: |
| 148 representation_vector_[node->id()] = | 148 representation_vector_[node->id()] = |
| 149 PromoteRepresentation(AtomicStoreRepresentationOf(node->op())); | 149 PromoteRepresentation(AtomicStoreRepresentationOf(node->op())); |
| 150 break; | 150 break; |
| 151 case IrOpcode::kAtomicExchange: | |
| 152 representation_vector_[node->id()] = PromoteRepresentation( | |
| 153 AtomicExchangeRepresentationOf(node->op()).representation()); | |
| 154 break; | |
| 151 case IrOpcode::kStore: | 155 case IrOpcode::kStore: |
| 152 case IrOpcode::kProtectedStore: | 156 case IrOpcode::kProtectedStore: |
| 153 representation_vector_[node->id()] = PromoteRepresentation( | 157 representation_vector_[node->id()] = PromoteRepresentation( |
| 154 StoreRepresentationOf(node->op()).representation()); | 158 StoreRepresentationOf(node->op()).representation()); |
| 155 break; | 159 break; |
| 156 case IrOpcode::kCheckedStore: | 160 case IrOpcode::kCheckedStore: |
| 157 representation_vector_[node->id()] = | 161 representation_vector_[node->id()] = |
| 158 PromoteRepresentation(CheckedStoreRepresentationOf(node->op())); | 162 PromoteRepresentation(CheckedStoreRepresentationOf(node->op())); |
| 159 break; | 163 break; |
| 160 case IrOpcode::kUnalignedStore: | 164 case IrOpcode::kUnalignedStore: |
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 442 case MachineRepresentation::kTaggedPointer: | 446 case MachineRepresentation::kTaggedPointer: |
| 443 case MachineRepresentation::kTaggedSigned: | 447 case MachineRepresentation::kTaggedSigned: |
| 444 CheckValueInputIsTagged(node, 2); | 448 CheckValueInputIsTagged(node, 2); |
| 445 break; | 449 break; |
| 446 default: | 450 default: |
| 447 CheckValueInputRepresentationIs( | 451 CheckValueInputRepresentationIs( |
| 448 node, 2, inferrer_->GetRepresentation(node)); | 452 node, 2, inferrer_->GetRepresentation(node)); |
| 449 } | 453 } |
| 450 break; | 454 break; |
| 451 case IrOpcode::kAtomicStore: | 455 case IrOpcode::kAtomicStore: |
| 456 case IrOpcode::kAtomicExchange: | |
|
binji
2017/01/13 00:08:50
Looks like kStore above is identical, can it be ro
aseemgarg
2017/01/14 01:48:19
Done.
| |
| 452 CheckValueInputIsTaggedOrPointer(node, 0); | 457 CheckValueInputIsTaggedOrPointer(node, 0); |
| 453 CheckValueInputRepresentationIs( | 458 CheckValueInputRepresentationIs( |
| 454 node, 1, MachineType::PointerRepresentation()); | 459 node, 1, MachineType::PointerRepresentation()); |
| 455 switch (inferrer_->GetRepresentation(node)) { | 460 switch (inferrer_->GetRepresentation(node)) { |
| 456 case MachineRepresentation::kTagged: | 461 case MachineRepresentation::kTagged: |
| 457 case MachineRepresentation::kTaggedPointer: | 462 case MachineRepresentation::kTaggedPointer: |
| 458 case MachineRepresentation::kTaggedSigned: | 463 case MachineRepresentation::kTaggedSigned: |
| 459 CheckValueInputIsTagged(node, 2); | 464 CheckValueInputIsTagged(node, 2); |
| 460 break; | 465 break; |
| 461 default: | 466 default: |
| (...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 801 MachineRepresentationInferrer representation_inferrer(schedule, graph, | 806 MachineRepresentationInferrer representation_inferrer(schedule, graph, |
| 802 linkage, temp_zone); | 807 linkage, temp_zone); |
| 803 MachineRepresentationChecker checker(schedule, &representation_inferrer, | 808 MachineRepresentationChecker checker(schedule, &representation_inferrer, |
| 804 is_stub, name); | 809 is_stub, name); |
| 805 checker.Run(); | 810 checker.Run(); |
| 806 } | 811 } |
| 807 | 812 |
| 808 } // namespace compiler | 813 } // namespace compiler |
| 809 } // namespace internal | 814 } // namespace internal |
| 810 } // namespace v8 | 815 } // namespace v8 |
| OLD | NEW |