OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/int64-lowering.h" | 5 #include "src/compiler/int64-lowering.h" |
6 #include "src/compiler/common-operator.h" | 6 #include "src/compiler/common-operator.h" |
7 #include "src/compiler/graph.h" | 7 #include "src/compiler/graph.h" |
8 #include "src/compiler/linkage.h" | 8 #include "src/compiler/linkage.h" |
9 #include "src/compiler/machine-operator.h" | 9 #include "src/compiler/machine-operator.h" |
10 #include "src/compiler/node-properties.h" | 10 #include "src/compiler/node-properties.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 machine_(machine), | 25 machine_(machine), |
26 common_(common), | 26 common_(common), |
27 state_(graph, 4), | 27 state_(graph, 4), |
28 stack_(zone), | 28 stack_(zone), |
29 replacements_(zone->NewArray<Replacement>(graph->NodeCount())), | 29 replacements_(zone->NewArray<Replacement>(graph->NodeCount())), |
30 signature_(signature) { | 30 signature_(signature) { |
31 memset(replacements_, 0, sizeof(Replacement) * graph->NodeCount()); | 31 memset(replacements_, 0, sizeof(Replacement) * graph->NodeCount()); |
32 } | 32 } |
33 | 33 |
34 void Int64Lowering::LowerGraph() { | 34 void Int64Lowering::LowerGraph() { |
35 if (4 != kPointerSize) { | 35 if (!machine()->Is32()) { |
36 return; | 36 return; |
37 } | 37 } |
38 stack_.push(graph()->end()); | 38 stack_.push(graph()->end()); |
39 state_.Set(graph()->end(), State::kOnStack); | 39 state_.Set(graph()->end(), State::kOnStack); |
40 | 40 |
41 while (!stack_.empty()) { | 41 while (!stack_.empty()) { |
42 Node* top = stack_.top(); | 42 Node* top = stack_.top(); |
43 if (state_.Get(top) == State::kInputsPushed) { | 43 if (state_.Get(top) == State::kInputsPushed) { |
44 stack_.pop(); | 44 stack_.pop(); |
45 state_.Set(top, State::kVisited); | 45 state_.Set(top, State::kVisited); |
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
435 } | 435 } |
436 | 436 |
437 Node* Int64Lowering::GetReplacementHigh(Node* node) { | 437 Node* Int64Lowering::GetReplacementHigh(Node* node) { |
438 Node* result = replacements_[node->id()].high; | 438 Node* result = replacements_[node->id()].high; |
439 DCHECK(result); | 439 DCHECK(result); |
440 return result; | 440 return result; |
441 } | 441 } |
442 } // namespace compiler | 442 } // namespace compiler |
443 } // namespace internal | 443 } // namespace internal |
444 } // namespace v8 | 444 } // namespace v8 |
OLD | NEW |