OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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_SRC_IC_ACCESSOR_ASSEMBLER_H_ | 5 #ifndef V8_SRC_IC_ACCESSOR_ASSEMBLER_H_ |
6 #define V8_SRC_IC_ACCESSOR_ASSEMBLER_H_ | 6 #define V8_SRC_IC_ACCESSOR_ASSEMBLER_H_ |
7 | 7 |
8 #include "src/code-stub-assembler.h" | 8 #include "src/code-stub-assembler.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
11 namespace internal { | 11 namespace internal { |
12 | 12 |
13 namespace compiler { | 13 namespace compiler { |
14 class CodeAssemblerState; | 14 class CodeAssemblerState; |
15 } | 15 } |
16 | 16 |
17 class ExitPoint; | 17 class ExitPoint; |
18 | 18 |
19 class AccessorAssembler : public CodeStubAssembler { | 19 class AccessorAssembler : public CodeStubAssembler { |
20 public: | 20 public: |
21 typedef compiler::Node Node; | 21 typedef compiler::Node Node; |
22 | 22 |
23 explicit AccessorAssembler(compiler::CodeAssemblerState* state) | 23 explicit AccessorAssembler(compiler::CodeAssemblerState* state) |
24 : CodeStubAssembler(state) {} | 24 : CodeStubAssembler(state) {} |
25 | 25 |
26 void GenerateLoadIC(); | 26 void GenerateLoadIC(); |
| 27 void GenerateLoadIC_Uninitialized(); |
27 void GenerateLoadField(); | 28 void GenerateLoadField(); |
28 void GenerateLoadICTrampoline(); | 29 void GenerateLoadICTrampoline(); |
29 void GenerateKeyedLoadIC(); | 30 void GenerateKeyedLoadIC(); |
30 void GenerateKeyedLoadICTrampoline(); | 31 void GenerateKeyedLoadICTrampoline(); |
31 void GenerateKeyedLoadIC_Megamorphic(); | 32 void GenerateKeyedLoadIC_Megamorphic(); |
32 void GenerateStoreIC(); | 33 void GenerateStoreIC(); |
33 void GenerateStoreICTrampoline(); | 34 void GenerateStoreICTrampoline(); |
34 | 35 |
35 void GenerateLoadICProtoArray(bool throw_reference_error_if_nonexistent); | 36 void GenerateLoadICProtoArray(bool throw_reference_error_if_nonexistent); |
36 | 37 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 | 87 |
87 enum ElementSupport { kOnlyProperties, kSupportElements }; | 88 enum ElementSupport { kOnlyProperties, kSupportElements }; |
88 void HandleStoreICHandlerCase( | 89 void HandleStoreICHandlerCase( |
89 const StoreICParameters* p, Node* handler, Label* miss, | 90 const StoreICParameters* p, Node* handler, Label* miss, |
90 ElementSupport support_elements = kOnlyProperties); | 91 ElementSupport support_elements = kOnlyProperties); |
91 | 92 |
92 private: | 93 private: |
93 // Stub generation entry points. | 94 // Stub generation entry points. |
94 | 95 |
95 void LoadIC(const LoadICParameters* p); | 96 void LoadIC(const LoadICParameters* p); |
| 97 void LoadIC_Uninitialized(const LoadICParameters* p); |
96 void LoadICProtoArray(const LoadICParameters* p, Node* handler, | 98 void LoadICProtoArray(const LoadICParameters* p, Node* handler, |
97 bool throw_reference_error_if_nonexistent); | 99 bool throw_reference_error_if_nonexistent); |
98 void LoadGlobalIC(const LoadICParameters* p, TypeofMode typeof_mode); | 100 void LoadGlobalIC(const LoadICParameters* p, TypeofMode typeof_mode); |
99 void KeyedLoadIC(const LoadICParameters* p); | 101 void KeyedLoadIC(const LoadICParameters* p); |
100 void KeyedLoadICGeneric(const LoadICParameters* p); | 102 void KeyedLoadICGeneric(const LoadICParameters* p); |
101 void StoreIC(const StoreICParameters* p); | 103 void StoreIC(const StoreICParameters* p); |
102 void KeyedStoreIC(const StoreICParameters* p, LanguageMode language_mode); | 104 void KeyedStoreIC(const StoreICParameters* p, LanguageMode language_mode); |
103 | 105 |
104 // IC dispatcher behavior. | 106 // IC dispatcher behavior. |
105 | 107 |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 // transitioning store otherwise. | 162 // transitioning store otherwise. |
161 void HandleStoreFieldAndReturn(Node* handler_word, Node* holder, | 163 void HandleStoreFieldAndReturn(Node* handler_word, Node* holder, |
162 Representation representation, Node* value, | 164 Representation representation, Node* value, |
163 Node* transition, Label* miss); | 165 Node* transition, Label* miss); |
164 | 166 |
165 // KeyedLoadIC_Generic implementation. | 167 // KeyedLoadIC_Generic implementation. |
166 | 168 |
167 void GenericElementLoad(Node* receiver, Node* receiver_map, | 169 void GenericElementLoad(Node* receiver, Node* receiver_map, |
168 Node* instance_type, Node* index, Label* slow); | 170 Node* instance_type, Node* index, Label* slow); |
169 | 171 |
| 172 enum UseStubCache { kUseStubCache, kDontUseStubCache }; |
170 void GenericPropertyLoad(Node* receiver, Node* receiver_map, | 173 void GenericPropertyLoad(Node* receiver, Node* receiver_map, |
171 Node* instance_type, Node* key, | 174 Node* instance_type, Node* key, |
172 const LoadICParameters* p, Label* slow); | 175 const LoadICParameters* p, Label* slow, |
| 176 UseStubCache use_stub_cache = kUseStubCache); |
173 | 177 |
174 // Low-level helpers. | 178 // Low-level helpers. |
175 | 179 |
176 Node* PrepareValueForStore(Node* handler_word, Node* holder, | 180 Node* PrepareValueForStore(Node* handler_word, Node* holder, |
177 Representation representation, Node* transition, | 181 Representation representation, Node* transition, |
178 Node* value, Label* bailout); | 182 Node* value, Label* bailout); |
179 | 183 |
180 // Extends properties backing store by JSObject::kFieldsAdded elements. | 184 // Extends properties backing store by JSObject::kFieldsAdded elements. |
181 void ExtendPropertiesBackingStore(Node* object); | 185 void ExtendPropertiesBackingStore(Node* object); |
182 | 186 |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 | 279 |
276 CodeAssemblerLabel* const out_; | 280 CodeAssemblerLabel* const out_; |
277 CodeAssemblerVariable* const var_result_; | 281 CodeAssemblerVariable* const var_result_; |
278 CodeStubAssembler* const asm_; | 282 CodeStubAssembler* const asm_; |
279 }; | 283 }; |
280 | 284 |
281 } // namespace internal | 285 } // namespace internal |
282 } // namespace v8 | 286 } // namespace v8 |
283 | 287 |
284 #endif // V8_SRC_IC_ACCESSOR_ASSEMBLER_H_ | 288 #endif // V8_SRC_IC_ACCESSOR_ASSEMBLER_H_ |
OLD | NEW |