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" |
(...skipping 18 matching lines...) Expand all Loading... |
29 SourcePositionTable* source_positions); | 29 SourcePositionTable* source_positions); |
30 ~SimplifiedLowering() {} | 30 ~SimplifiedLowering() {} |
31 | 31 |
32 void LowerAllNodes(); | 32 void LowerAllNodes(); |
33 | 33 |
34 // TODO(turbofan): The representation can be removed once the result of the | 34 // TODO(turbofan): The representation can be removed once the result of the |
35 // representation analysis is stored in the node bounds. | 35 // representation analysis is stored in the node bounds. |
36 void DoLoadBuffer(Node* node, MachineRepresentation rep, | 36 void DoLoadBuffer(Node* node, MachineRepresentation rep, |
37 RepresentationChanger* changer); | 37 RepresentationChanger* changer); |
38 void DoStoreBuffer(Node* node); | 38 void DoStoreBuffer(Node* node); |
39 void DoObjectIsNumber(Node* node); | |
40 void DoObjectIsReceiver(Node* node); | |
41 void DoObjectIsSmi(Node* node); | |
42 void DoShift(Node* node, Operator const* op, Type* rhs_type); | 39 void DoShift(Node* node, Operator const* op, Type* rhs_type); |
43 void DoStringEqual(Node* node); | 40 void DoStringEqual(Node* node); |
44 void DoStringLessThan(Node* node); | 41 void DoStringLessThan(Node* node); |
45 void DoStringLessThanOrEqual(Node* node); | 42 void DoStringLessThanOrEqual(Node* node); |
46 | 43 |
47 private: | 44 private: |
48 JSGraph* const jsgraph_; | 45 JSGraph* const jsgraph_; |
49 Zone* const zone_; | 46 Zone* const zone_; |
50 TypeCache const& type_cache_; | 47 TypeCache const& type_cache_; |
51 | 48 |
52 // TODO(danno): SimplifiedLowering shouldn't know anything about the source | 49 // TODO(danno): SimplifiedLowering shouldn't know anything about the source |
53 // positions table, but must for now since there currently is no other way to | 50 // positions table, but must for now since there currently is no other way to |
54 // pass down source position information to nodes created during | 51 // pass down source position information to nodes created during |
55 // lowering. Once this phase becomes a vanilla reducer, it should get source | 52 // lowering. Once this phase becomes a vanilla reducer, it should get source |
56 // position information via the SourcePositionWrapper like all other reducers. | 53 // position information via the SourcePositionWrapper like all other reducers. |
57 SourcePositionTable* source_positions_; | 54 SourcePositionTable* source_positions_; |
58 | 55 |
59 Node* IsSmi(Node* value); | |
60 Node* LoadHeapObjectMap(Node* object, Node* control); | |
61 Node* LoadMapInstanceType(Node* map); | |
62 Node* StringComparison(Node* node); | 56 Node* StringComparison(Node* node); |
63 Node* Int32Div(Node* const node); | 57 Node* Int32Div(Node* const node); |
64 Node* Int32Mod(Node* const node); | 58 Node* Int32Mod(Node* const node); |
65 Node* Uint32Div(Node* const node); | 59 Node* Uint32Div(Node* const node); |
66 Node* Uint32Mod(Node* const node); | 60 Node* Uint32Mod(Node* const node); |
67 | 61 |
68 friend class RepresentationSelector; | 62 friend class RepresentationSelector; |
69 | 63 |
70 Isolate* isolate() { return jsgraph_->isolate(); } | 64 Isolate* isolate() { return jsgraph_->isolate(); } |
71 Zone* zone() { return jsgraph_->zone(); } | 65 Zone* zone() { return jsgraph_->zone(); } |
72 JSGraph* jsgraph() { return jsgraph_; } | 66 JSGraph* jsgraph() { return jsgraph_; } |
73 Graph* graph() { return jsgraph()->graph(); } | 67 Graph* graph() { return jsgraph()->graph(); } |
74 CommonOperatorBuilder* common() { return jsgraph()->common(); } | 68 CommonOperatorBuilder* common() { return jsgraph()->common(); } |
75 MachineOperatorBuilder* machine() { return jsgraph()->machine(); } | 69 MachineOperatorBuilder* machine() { return jsgraph()->machine(); } |
76 }; | 70 }; |
77 | 71 |
78 } // namespace compiler | 72 } // namespace compiler |
79 } // namespace internal | 73 } // namespace internal |
80 } // namespace v8 | 74 } // namespace v8 |
81 | 75 |
82 #endif // V8_COMPILER_SIMPLIFIED_LOWERING_H_ | 76 #endif // V8_COMPILER_SIMPLIFIED_LOWERING_H_ |
OLD | NEW |