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" | 10 #include "src/compiler/simplified-operator.h" |
11 | 11 |
12 namespace v8 { | 12 namespace v8 { |
13 namespace internal { | 13 namespace internal { |
14 namespace compiler { | 14 namespace compiler { |
15 | 15 |
16 // Forward declarations. | 16 // Forward declarations. |
17 class CommonOperatorBuilder; | 17 class CommonOperatorBuilder; |
| 18 class JSOperatorBuilder; |
18 class JSGraph; | 19 class JSGraph; |
19 class MachineOperatorBuilder; | 20 class MachineOperatorBuilder; |
20 | 21 |
21 | 22 |
22 // Lowers certain JS-level runtime calls. | 23 // Lowers certain JS-level runtime calls. |
23 class JSIntrinsicLowering final : public AdvancedReducer { | 24 class JSIntrinsicLowering final : public AdvancedReducer { |
24 public: | 25 public: |
25 enum DeoptimizationMode { kDeoptimizationEnabled, kDeoptimizationDisabled }; | 26 enum DeoptimizationMode { kDeoptimizationEnabled, kDeoptimizationDisabled }; |
26 | 27 |
27 JSIntrinsicLowering(Editor* editor, JSGraph* jsgraph, | 28 JSIntrinsicLowering(Editor* editor, JSGraph* jsgraph, |
(...skipping 21 matching lines...) Expand all Loading... |
49 Reduction ReduceMathSqrt(Node* node); | 50 Reduction ReduceMathSqrt(Node* node); |
50 Reduction ReduceSeqStringGetChar(Node* node, String::Encoding encoding); | 51 Reduction ReduceSeqStringGetChar(Node* node, String::Encoding encoding); |
51 Reduction ReduceSeqStringSetChar(Node* node, String::Encoding encoding); | 52 Reduction ReduceSeqStringSetChar(Node* node, String::Encoding encoding); |
52 Reduction ReduceStringGetLength(Node* node); | 53 Reduction ReduceStringGetLength(Node* node); |
53 Reduction ReduceUnLikely(Node* node, BranchHint hint); | 54 Reduction ReduceUnLikely(Node* node, BranchHint hint); |
54 Reduction ReduceValueOf(Node* node); | 55 Reduction ReduceValueOf(Node* node); |
55 Reduction ReduceFixedArraySet(Node* node); | 56 Reduction ReduceFixedArraySet(Node* node); |
56 Reduction ReduceGetTypeFeedbackVector(Node* node); | 57 Reduction ReduceGetTypeFeedbackVector(Node* node); |
57 Reduction ReduceGetCallerJSFunction(Node* node); | 58 Reduction ReduceGetCallerJSFunction(Node* node); |
58 Reduction ReduceThrowNotDateError(Node* node); | 59 Reduction ReduceThrowNotDateError(Node* node); |
| 60 Reduction ReduceCallFunction(Node* node); |
59 | 61 |
60 Reduction Change(Node* node, const Operator* op); | 62 Reduction Change(Node* node, const Operator* op); |
61 Reduction Change(Node* node, const Operator* op, Node* a, Node* b); | 63 Reduction Change(Node* node, const Operator* op, Node* a, Node* b); |
62 Reduction Change(Node* node, const Operator* op, Node* a, Node* b, Node* c); | 64 Reduction Change(Node* node, const Operator* op, Node* a, Node* b, Node* c); |
63 Reduction ChangeToUndefined(Node* node, Node* effect = nullptr); | 65 Reduction ChangeToUndefined(Node* node, Node* effect = nullptr); |
64 | 66 |
65 Graph* graph() const; | 67 Graph* graph() const; |
66 JSGraph* jsgraph() const { return jsgraph_; } | 68 JSGraph* jsgraph() const { return jsgraph_; } |
67 CommonOperatorBuilder* common() const; | 69 CommonOperatorBuilder* common() const; |
| 70 JSOperatorBuilder* javascript() const; |
68 MachineOperatorBuilder* machine() const; | 71 MachineOperatorBuilder* machine() const; |
69 DeoptimizationMode mode() const { return mode_; } | 72 DeoptimizationMode mode() const { return mode_; } |
70 SimplifiedOperatorBuilder* simplified() { return &simplified_; } | 73 SimplifiedOperatorBuilder* simplified() { return &simplified_; } |
71 | 74 |
72 JSGraph* const jsgraph_; | 75 JSGraph* const jsgraph_; |
73 DeoptimizationMode const mode_; | 76 DeoptimizationMode const mode_; |
74 SimplifiedOperatorBuilder simplified_; | 77 SimplifiedOperatorBuilder simplified_; |
75 }; | 78 }; |
76 | 79 |
77 } // namespace compiler | 80 } // namespace compiler |
78 } // namespace internal | 81 } // namespace internal |
79 } // namespace v8 | 82 } // namespace v8 |
80 | 83 |
81 #endif // V8_COMPILER_JS_INTRINSIC_LOWERING_H_ | 84 #endif // V8_COMPILER_JS_INTRINSIC_LOWERING_H_ |
OLD | NEW |