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 #ifndef V8_COMPILER_SIMPLIFIED_LOWERING_H_ | 5 #ifndef V8_COMPILER_SIMPLIFIED_LOWERING_H_ |
6 #define V8_COMPILER_SIMPLIFIED_LOWERING_H_ | 6 #define V8_COMPILER_SIMPLIFIED_LOWERING_H_ |
7 | 7 |
8 #include "src/compiler/js-graph.h" | 8 #include "src/compiler/js-graph.h" |
9 #include "src/compiler/machine-operator.h" | 9 #include "src/compiler/machine-operator.h" |
10 #include "src/compiler/node.h" | 10 #include "src/compiler/node.h" |
11 #include "src/compiler/simplified-operator.h" | 11 #include "src/compiler/simplified-operator.h" |
12 | 12 |
13 namespace v8 { | 13 namespace v8 { |
14 namespace internal { | 14 namespace internal { |
15 namespace compiler { | 15 namespace compiler { |
16 | 16 |
| 17 // Forward declarations. |
| 18 class RepresentationChanger; |
| 19 |
| 20 |
17 class SimplifiedLowering FINAL { | 21 class SimplifiedLowering FINAL { |
18 public: | 22 public: |
19 explicit SimplifiedLowering(JSGraph* jsgraph) : jsgraph_(jsgraph) {} | 23 explicit SimplifiedLowering(JSGraph* jsgraph) : jsgraph_(jsgraph) {} |
20 ~SimplifiedLowering() {} | 24 ~SimplifiedLowering() {} |
21 | 25 |
22 void LowerAllNodes(); | 26 void LowerAllNodes(); |
23 | 27 |
24 // TODO(titzer): These are exposed for direct testing. Use a friend class. | 28 // TODO(titzer): These are exposed for direct testing. Use a friend class. |
25 void DoLoadField(Node* node); | 29 void DoLoadField(Node* node); |
26 void DoStoreField(Node* node); | 30 void DoStoreField(Node* node); |
27 // TODO(turbofan): The output_type can be removed once the result of the | 31 // TODO(turbofan): The output_type can be removed once the result of the |
28 // representation analysis is stored in the node bounds. | 32 // representation analysis is stored in the node bounds. |
29 void DoLoadElement(Node* node, MachineType output_type); | 33 void DoLoadBuffer(Node* node, MachineType output_type, |
| 34 RepresentationChanger* changer); |
| 35 void DoStoreBuffer(Node* node); |
| 36 void DoLoadElement(Node* node); |
30 void DoStoreElement(Node* node); | 37 void DoStoreElement(Node* node); |
31 void DoStringAdd(Node* node); | 38 void DoStringAdd(Node* node); |
32 void DoStringEqual(Node* node); | 39 void DoStringEqual(Node* node); |
33 void DoStringLessThan(Node* node); | 40 void DoStringLessThan(Node* node); |
34 void DoStringLessThanOrEqual(Node* node); | 41 void DoStringLessThanOrEqual(Node* node); |
35 | 42 |
36 private: | 43 private: |
37 JSGraph* jsgraph_; | 44 JSGraph* jsgraph_; |
38 | 45 |
39 Node* SmiTag(Node* node); | 46 Node* SmiTag(Node* node); |
(...skipping 14 matching lines...) Expand all Loading... |
54 Graph* graph() { return jsgraph()->graph(); } | 61 Graph* graph() { return jsgraph()->graph(); } |
55 CommonOperatorBuilder* common() { return jsgraph()->common(); } | 62 CommonOperatorBuilder* common() { return jsgraph()->common(); } |
56 MachineOperatorBuilder* machine() { return jsgraph()->machine(); } | 63 MachineOperatorBuilder* machine() { return jsgraph()->machine(); } |
57 }; | 64 }; |
58 | 65 |
59 } // namespace compiler | 66 } // namespace compiler |
60 } // namespace internal | 67 } // namespace internal |
61 } // namespace v8 | 68 } // namespace v8 |
62 | 69 |
63 #endif // V8_COMPILER_SIMPLIFIED_LOWERING_H_ | 70 #endif // V8_COMPILER_SIMPLIFIED_LOWERING_H_ |
OLD | NEW |