OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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_JS_INTRINSIC_LOWERING_H_ | 5 #ifndef V8_COMPILER_JS_INTRINSIC_LOWERING_H_ |
6 #define V8_COMPILER_JS_INTRINSIC_LOWERING_H_ | 6 #define V8_COMPILER_JS_INTRINSIC_LOWERING_H_ |
7 | 7 |
8 #include "src/compiler/common-operator.h" | 8 #include "src/compiler/common-operator.h" |
9 #include "src/compiler/graph-reducer.h" | 9 #include "src/compiler/graph-reducer.h" |
10 #include "src/compiler/simplified-operator.h" | |
11 | 10 |
12 namespace v8 { | 11 namespace v8 { |
13 namespace internal { | 12 namespace internal { |
14 namespace compiler { | 13 namespace compiler { |
15 | 14 |
16 // Forward declarations. | 15 // Forward declarations. |
17 class CommonOperatorBuilder; | 16 class CommonOperatorBuilder; |
18 class JSOperatorBuilder; | 17 class JSOperatorBuilder; |
19 class JSGraph; | 18 class JSGraph; |
20 class MachineOperatorBuilder; | 19 class MachineOperatorBuilder; |
| 20 class SimplifiedOperatorBuilder; |
21 | 21 |
22 | 22 |
23 // Lowers certain JS-level runtime calls. | 23 // Lowers certain JS-level runtime calls. |
24 class JSIntrinsicLowering final : public AdvancedReducer { | 24 class JSIntrinsicLowering final : public AdvancedReducer { |
25 public: | 25 public: |
26 enum DeoptimizationMode { kDeoptimizationEnabled, kDeoptimizationDisabled }; | 26 enum DeoptimizationMode { kDeoptimizationEnabled, kDeoptimizationDisabled }; |
27 | 27 |
28 JSIntrinsicLowering(Editor* editor, JSGraph* jsgraph, | 28 JSIntrinsicLowering(Editor* editor, JSGraph* jsgraph, |
29 DeoptimizationMode mode); | 29 DeoptimizationMode mode); |
30 ~JSIntrinsicLowering() final {} | 30 ~JSIntrinsicLowering() final {} |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 Reduction Change(Node* node, const Operator* op, Node* a, Node* b, Node* c); | 65 Reduction Change(Node* node, const Operator* op, Node* a, Node* b, Node* c); |
66 Reduction Change(Node* node, const Operator* op, Node* a, Node* b, Node* c, | 66 Reduction Change(Node* node, const Operator* op, Node* a, Node* b, Node* c, |
67 Node* d); | 67 Node* d); |
68 Reduction ChangeToUndefined(Node* node, Node* effect = nullptr); | 68 Reduction ChangeToUndefined(Node* node, Node* effect = nullptr); |
69 | 69 |
70 Graph* graph() const; | 70 Graph* graph() const; |
71 JSGraph* jsgraph() const { return jsgraph_; } | 71 JSGraph* jsgraph() const { return jsgraph_; } |
72 CommonOperatorBuilder* common() const; | 72 CommonOperatorBuilder* common() const; |
73 JSOperatorBuilder* javascript() const; | 73 JSOperatorBuilder* javascript() const; |
74 MachineOperatorBuilder* machine() const; | 74 MachineOperatorBuilder* machine() const; |
| 75 SimplifiedOperatorBuilder* simplified() const; |
75 DeoptimizationMode mode() const { return mode_; } | 76 DeoptimizationMode mode() const { return mode_; } |
76 SimplifiedOperatorBuilder* simplified() { return &simplified_; } | |
77 | 77 |
78 JSGraph* const jsgraph_; | 78 JSGraph* const jsgraph_; |
79 DeoptimizationMode const mode_; | 79 DeoptimizationMode const mode_; |
80 SimplifiedOperatorBuilder simplified_; | |
81 }; | 80 }; |
82 | 81 |
83 } // namespace compiler | 82 } // namespace compiler |
84 } // namespace internal | 83 } // namespace internal |
85 } // namespace v8 | 84 } // namespace v8 |
86 | 85 |
87 #endif // V8_COMPILER_JS_INTRINSIC_LOWERING_H_ | 86 #endif // V8_COMPILER_JS_INTRINSIC_LOWERING_H_ |
OLD | NEW |