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 19 matching lines...) Expand all Loading... |
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 DoShift(Node* node, Operator const* op, Type* rhs_type); | 39 void DoShift(Node* node, Operator const* op, Type* rhs_type); |
40 void DoStringLessThan(Node* node); | |
41 void DoStringLessThanOrEqual(Node* node); | |
42 | 40 |
43 // TODO(bmeurer): This is a gigantic hack to support the gigantic LoadBuffer | 41 // TODO(bmeurer): This is a gigantic hack to support the gigantic LoadBuffer |
44 // typing hack to support the gigantic "asm.js should be fast without proper | 42 // typing hack to support the gigantic "asm.js should be fast without proper |
45 // verifier"-hack, ... Kill this! Soon! Really soon! I'm serious! | 43 // verifier"-hack, ... Kill this! Soon! Really soon! I'm serious! |
46 bool abort_compilation_ = false; | 44 bool abort_compilation_ = false; |
47 | 45 |
48 private: | 46 private: |
49 JSGraph* const jsgraph_; | 47 JSGraph* const jsgraph_; |
50 Zone* const zone_; | 48 Zone* const zone_; |
51 TypeCache const& type_cache_; | 49 TypeCache const& type_cache_; |
52 | 50 |
53 // TODO(danno): SimplifiedLowering shouldn't know anything about the source | 51 // TODO(danno): SimplifiedLowering shouldn't know anything about the source |
54 // positions table, but must for now since there currently is no other way to | 52 // positions table, but must for now since there currently is no other way to |
55 // pass down source position information to nodes created during | 53 // pass down source position information to nodes created during |
56 // lowering. Once this phase becomes a vanilla reducer, it should get source | 54 // lowering. Once this phase becomes a vanilla reducer, it should get source |
57 // position information via the SourcePositionWrapper like all other reducers. | 55 // position information via the SourcePositionWrapper like all other reducers. |
58 SourcePositionTable* source_positions_; | 56 SourcePositionTable* source_positions_; |
59 | 57 |
60 Node* StringComparison(Node* node); | |
61 Node* Int32Div(Node* const node); | 58 Node* Int32Div(Node* const node); |
62 Node* Int32Mod(Node* const node); | 59 Node* Int32Mod(Node* const node); |
63 Node* Uint32Div(Node* const node); | 60 Node* Uint32Div(Node* const node); |
64 Node* Uint32Mod(Node* const node); | 61 Node* Uint32Mod(Node* const node); |
65 | 62 |
66 friend class RepresentationSelector; | 63 friend class RepresentationSelector; |
67 | 64 |
68 Isolate* isolate() { return jsgraph_->isolate(); } | 65 Isolate* isolate() { return jsgraph_->isolate(); } |
69 Zone* zone() { return jsgraph_->zone(); } | 66 Zone* zone() { return jsgraph_->zone(); } |
70 JSGraph* jsgraph() { return jsgraph_; } | 67 JSGraph* jsgraph() { return jsgraph_; } |
71 Graph* graph() { return jsgraph()->graph(); } | 68 Graph* graph() { return jsgraph()->graph(); } |
72 CommonOperatorBuilder* common() { return jsgraph()->common(); } | 69 CommonOperatorBuilder* common() { return jsgraph()->common(); } |
73 MachineOperatorBuilder* machine() { return jsgraph()->machine(); } | 70 MachineOperatorBuilder* machine() { return jsgraph()->machine(); } |
74 }; | 71 }; |
75 | 72 |
76 } // namespace compiler | 73 } // namespace compiler |
77 } // namespace internal | 74 } // namespace internal |
78 } // namespace v8 | 75 } // namespace v8 |
79 | 76 |
80 #endif // V8_COMPILER_SIMPLIFIED_LOWERING_H_ | 77 #endif // V8_COMPILER_SIMPLIFIED_LOWERING_H_ |
OLD | NEW |