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_NATIVE_CONTEXT_SPECIALIZATION_H_ | 5 #ifndef V8_COMPILER_JS_NATIVE_CONTEXT_SPECIALIZATION_H_ |
6 #define V8_COMPILER_JS_NATIVE_CONTEXT_SPECIALIZATION_H_ | 6 #define V8_COMPILER_JS_NATIVE_CONTEXT_SPECIALIZATION_H_ |
7 | 7 |
8 #include "src/base/flags.h" | 8 #include "src/base/flags.h" |
9 #include "src/compiler/graph-reducer.h" | 9 #include "src/compiler/graph-reducer.h" |
10 #include "src/deoptimize-reason.h" | 10 #include "src/deoptimize-reason.h" |
| 11 #include "src/type-feedback-vector.h" |
11 | 12 |
12 namespace v8 { | 13 namespace v8 { |
13 namespace internal { | 14 namespace internal { |
14 | 15 |
15 // Forward declarations. | 16 // Forward declarations. |
16 class CompilationDependencies; | 17 class CompilationDependencies; |
17 class Factory; | 18 class Factory; |
18 class FeedbackNexus; | |
19 | 19 |
20 namespace compiler { | 20 namespace compiler { |
21 | 21 |
22 // Forward declarations. | 22 // Forward declarations. |
23 enum class AccessMode; | 23 enum class AccessMode; |
24 class CommonOperatorBuilder; | 24 class CommonOperatorBuilder; |
25 class ElementAccessInfo; | 25 class ElementAccessInfo; |
26 class JSGraph; | 26 class JSGraph; |
27 class JSOperatorBuilder; | 27 class JSOperatorBuilder; |
28 class MachineOperatorBuilder; | 28 class MachineOperatorBuilder; |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 KeyedAccessStoreMode store_mode); | 71 KeyedAccessStoreMode store_mode); |
72 Reduction ReduceNamedAccessFromNexus(Node* node, Node* value, | 72 Reduction ReduceNamedAccessFromNexus(Node* node, Node* value, |
73 FeedbackNexus const& nexus, | 73 FeedbackNexus const& nexus, |
74 Handle<Name> name, | 74 Handle<Name> name, |
75 AccessMode access_mode, | 75 AccessMode access_mode, |
76 LanguageMode language_mode); | 76 LanguageMode language_mode); |
77 Reduction ReduceNamedAccess(Node* node, Node* value, | 77 Reduction ReduceNamedAccess(Node* node, Node* value, |
78 MapHandleList const& receiver_maps, | 78 MapHandleList const& receiver_maps, |
79 Handle<Name> name, AccessMode access_mode, | 79 Handle<Name> name, AccessMode access_mode, |
80 LanguageMode language_mode, | 80 LanguageMode language_mode, |
81 Node* index = nullptr); | 81 Handle<TypeFeedbackVector> vector, |
| 82 FeedbackVectorSlot slot, Node* index = nullptr); |
82 | 83 |
83 Reduction ReduceSoftDeoptimize(Node* node, DeoptimizeReason reason); | 84 Reduction ReduceSoftDeoptimize(Node* node, DeoptimizeReason reason); |
84 | 85 |
85 // A triple of nodes that represents a continuation. | 86 // A triple of nodes that represents a continuation. |
86 class ValueEffectControl final { | 87 class ValueEffectControl final { |
87 public: | 88 public: |
88 ValueEffectControl(Node* value, Node* effect, Node* control) | 89 ValueEffectControl(Node* value, Node* effect, Node* control) |
89 : value_(value), effect_(effect), control_(control) {} | 90 : value_(value), effect_(effect), control_(control) {} |
90 | 91 |
91 Node* value() const { return value_; } | 92 Node* value() const { return value_; } |
92 Node* effect() const { return effect_; } | 93 Node* effect() const { return effect_; } |
93 Node* control() const { return control_; } | 94 Node* control() const { return control_; } |
94 | 95 |
95 private: | 96 private: |
96 Node* const value_; | 97 Node* const value_; |
97 Node* const effect_; | 98 Node* const effect_; |
98 Node* const control_; | 99 Node* const control_; |
99 }; | 100 }; |
100 | 101 |
101 // Construct the appropriate subgraph for property access. | 102 // Construct the appropriate subgraph for property access. |
102 ValueEffectControl BuildPropertyAccess(Node* receiver, Node* value, | 103 ValueEffectControl BuildPropertyAccess( |
103 Node* context, Node* frame_state, | 104 Node* receiver, Node* value, Node* context, Node* frame_state, |
104 Node* effect, Node* control, | 105 Node* effect, Node* control, Handle<Name> name, |
105 Handle<Name> name, | 106 PropertyAccessInfo const& access_info, AccessMode access_mode, |
106 PropertyAccessInfo const& access_info, | 107 LanguageMode language_mode, Handle<TypeFeedbackVector> vector, |
107 AccessMode access_mode); | 108 FeedbackVectorSlot slot); |
108 | 109 |
109 // Construct the appropriate subgraph for element access. | 110 // Construct the appropriate subgraph for element access. |
110 ValueEffectControl BuildElementAccess(Node* receiver, Node* index, | 111 ValueEffectControl BuildElementAccess(Node* receiver, Node* index, |
111 Node* value, Node* effect, | 112 Node* value, Node* effect, |
112 Node* control, | 113 Node* control, |
113 ElementAccessInfo const& access_info, | 114 ElementAccessInfo const& access_info, |
114 AccessMode access_mode, | 115 AccessMode access_mode, |
115 KeyedAccessStoreMode store_mode); | 116 KeyedAccessStoreMode store_mode); |
116 | 117 |
117 // Construct an appropriate map check. | 118 // Construct an appropriate map check. |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 DISALLOW_COPY_AND_ASSIGN(JSNativeContextSpecialization); | 172 DISALLOW_COPY_AND_ASSIGN(JSNativeContextSpecialization); |
172 }; | 173 }; |
173 | 174 |
174 DEFINE_OPERATORS_FOR_FLAGS(JSNativeContextSpecialization::Flags) | 175 DEFINE_OPERATORS_FOR_FLAGS(JSNativeContextSpecialization::Flags) |
175 | 176 |
176 } // namespace compiler | 177 } // namespace compiler |
177 } // namespace internal | 178 } // namespace internal |
178 } // namespace v8 | 179 } // namespace v8 |
179 | 180 |
180 #endif // V8_COMPILER_JS_NATIVE_CONTEXT_SPECIALIZATION_H_ | 181 #endif // V8_COMPILER_JS_NATIVE_CONTEXT_SPECIALIZATION_H_ |
OLD | NEW |