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" |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 KeyedAccessStoreMode store_mode); | 78 KeyedAccessStoreMode store_mode); |
79 Reduction ReduceNamedAccessFromNexus(Node* node, Node* value, | 79 Reduction ReduceNamedAccessFromNexus(Node* node, Node* value, |
80 FeedbackNexus const& nexus, | 80 FeedbackNexus const& nexus, |
81 Handle<Name> name, | 81 Handle<Name> name, |
82 AccessMode access_mode, | 82 AccessMode access_mode, |
83 LanguageMode language_mode); | 83 LanguageMode language_mode); |
84 Reduction ReduceNamedAccess(Node* node, Node* value, | 84 Reduction ReduceNamedAccess(Node* node, Node* value, |
85 MapHandleList const& receiver_maps, | 85 MapHandleList const& receiver_maps, |
86 Handle<Name> name, AccessMode access_mode, | 86 Handle<Name> name, AccessMode access_mode, |
87 LanguageMode language_mode, | 87 LanguageMode language_mode, |
88 Handle<FeedbackVector> vector, FeedbackSlot slot, | |
89 Node* index = nullptr); | 88 Node* index = nullptr); |
90 Reduction ReduceGlobalAccess(Node* node, Node* receiver, Node* value, | 89 Reduction ReduceGlobalAccess(Node* node, Node* receiver, Node* value, |
91 Handle<Name> name, AccessMode access_mode, | 90 Handle<Name> name, AccessMode access_mode, |
92 Node* index = nullptr); | 91 Node* index = nullptr); |
93 | 92 |
94 Reduction ReduceSoftDeoptimize(Node* node, DeoptimizeReason reason); | 93 Reduction ReduceSoftDeoptimize(Node* node, DeoptimizeReason reason); |
95 | 94 |
96 // A triple of nodes that represents a continuation. | 95 // A triple of nodes that represents a continuation. |
97 class ValueEffectControl final { | 96 class ValueEffectControl final { |
98 public: | 97 public: |
99 ValueEffectControl(Node* value, Node* effect, Node* control) | 98 ValueEffectControl(Node* value, Node* effect, Node* control) |
100 : value_(value), effect_(effect), control_(control) {} | 99 : value_(value), effect_(effect), control_(control) {} |
101 | 100 |
102 Node* value() const { return value_; } | 101 Node* value() const { return value_; } |
103 Node* effect() const { return effect_; } | 102 Node* effect() const { return effect_; } |
104 Node* control() const { return control_; } | 103 Node* control() const { return control_; } |
105 | 104 |
106 private: | 105 private: |
107 Node* const value_; | 106 Node* const value_; |
108 Node* const effect_; | 107 Node* const effect_; |
109 Node* const control_; | 108 Node* const control_; |
110 }; | 109 }; |
111 | 110 |
112 // Construct the appropriate subgraph for property access. | 111 // Construct the appropriate subgraph for property access. |
113 ValueEffectControl BuildPropertyAccess( | 112 ValueEffectControl BuildPropertyAccess(Node* receiver, Node* value, |
114 Node* receiver, Node* value, Node* context, Node* frame_state, | 113 Node* context, Node* frame_state, |
115 Node* effect, Node* control, Handle<Name> name, | 114 Node* effect, Node* control, |
116 PropertyAccessInfo const& access_info, AccessMode access_mode, | 115 Handle<Name> name, |
117 LanguageMode language_mode, Handle<FeedbackVector> vector, | 116 PropertyAccessInfo const& access_info, |
118 FeedbackSlot slot); | 117 AccessMode access_mode, |
| 118 LanguageMode language_mode); |
119 | 119 |
120 // Construct the appropriate subgraph for element access. | 120 // Construct the appropriate subgraph for element access. |
121 ValueEffectControl BuildElementAccess(Node* receiver, Node* index, | 121 ValueEffectControl BuildElementAccess(Node* receiver, Node* index, |
122 Node* value, Node* effect, | 122 Node* value, Node* effect, |
123 Node* control, | 123 Node* control, |
124 ElementAccessInfo const& access_info, | 124 ElementAccessInfo const& access_info, |
125 AccessMode access_mode, | 125 AccessMode access_mode, |
126 KeyedAccessStoreMode store_mode); | 126 KeyedAccessStoreMode store_mode); |
127 | 127 |
128 // Construct an appropriate heap object check. | 128 // Construct an appropriate heap object check. |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 DISALLOW_COPY_AND_ASSIGN(JSNativeContextSpecialization); | 200 DISALLOW_COPY_AND_ASSIGN(JSNativeContextSpecialization); |
201 }; | 201 }; |
202 | 202 |
203 DEFINE_OPERATORS_FOR_FLAGS(JSNativeContextSpecialization::Flags) | 203 DEFINE_OPERATORS_FOR_FLAGS(JSNativeContextSpecialization::Flags) |
204 | 204 |
205 } // namespace compiler | 205 } // namespace compiler |
206 } // namespace internal | 206 } // namespace internal |
207 } // namespace v8 | 207 } // namespace v8 |
208 | 208 |
209 #endif // V8_COMPILER_JS_NATIVE_CONTEXT_SPECIALIZATION_H_ | 209 #endif // V8_COMPILER_JS_NATIVE_CONTEXT_SPECIALIZATION_H_ |
OLD | NEW |