| 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_IMPL_H_ | 5 #ifndef V8_SRC_IC_ACCESSOR_ASSEMBLER_IMPL_H_ |
| 6 #define V8_SRC_IC_ACCESSOR_ASSEMBLER_IMPL_H_ | 6 #define V8_SRC_IC_ACCESSOR_ASSEMBLER_IMPL_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 { |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 }; | 74 }; |
| 75 | 75 |
| 76 struct StoreICParameters : public LoadICParameters { | 76 struct StoreICParameters : public LoadICParameters { |
| 77 StoreICParameters(Node* context, Node* receiver, Node* name, Node* value, | 77 StoreICParameters(Node* context, Node* receiver, Node* name, Node* value, |
| 78 Node* slot, Node* vector) | 78 Node* slot, Node* vector) |
| 79 : LoadICParameters(context, receiver, name, slot, vector), | 79 : LoadICParameters(context, receiver, name, slot, vector), |
| 80 value(value) {} | 80 value(value) {} |
| 81 Node* value; | 81 Node* value; |
| 82 }; | 82 }; |
| 83 | 83 |
| 84 enum ElementSupport { kOnlyProperties, kSupportElements }; | 84 void HandleStoreICHandlerCase(const StoreICParameters* p, Node* handler, |
| 85 void HandleStoreICHandlerCase( | 85 Label* miss); |
| 86 const StoreICParameters* p, Node* handler, Label* miss, | |
| 87 ElementSupport support_elements = kOnlyProperties); | |
| 88 | 86 |
| 89 private: | 87 private: |
| 88 enum ElementSupport { kOnlyProperties, kSupportElements }; |
| 89 |
| 90 // Stub generation entry points. | 90 // Stub generation entry points. |
| 91 | 91 |
| 92 void LoadIC(const LoadICParameters* p); | 92 void LoadIC(const LoadICParameters* p); |
| 93 void LoadICProtoArray(const LoadICParameters* p, Node* handler, | 93 void LoadICProtoArray(const LoadICParameters* p, Node* handler, |
| 94 bool throw_reference_error_if_nonexistent); | 94 bool throw_reference_error_if_nonexistent); |
| 95 void LoadGlobalIC(const LoadICParameters* p, TypeofMode typeof_mode); | 95 void LoadGlobalIC(const LoadICParameters* p, TypeofMode typeof_mode); |
| 96 void KeyedLoadIC(const LoadICParameters* p); | 96 void KeyedLoadIC(const LoadICParameters* p); |
| 97 void KeyedLoadICGeneric(const LoadICParameters* p); | 97 void KeyedLoadICGeneric(const LoadICParameters* p); |
| 98 void StoreIC(const StoreICParameters* p); | 98 void StoreIC(const StoreICParameters* p); |
| 99 void KeyedStoreIC(const StoreICParameters* p, LanguageMode language_mode); | 99 void KeyedStoreIC(const StoreICParameters* p, LanguageMode language_mode); |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 bool throw_reference_error_if_nonexistent); | 135 bool throw_reference_error_if_nonexistent); |
| 136 | 136 |
| 137 // LoadGlobalIC implementation. | 137 // LoadGlobalIC implementation. |
| 138 | 138 |
| 139 void HandleLoadGlobalICHandlerCase(const LoadICParameters* p, Node* handler, | 139 void HandleLoadGlobalICHandlerCase(const LoadICParameters* p, Node* handler, |
| 140 Label* miss, | 140 Label* miss, |
| 141 bool throw_reference_error_if_nonexistent); | 141 bool throw_reference_error_if_nonexistent); |
| 142 | 142 |
| 143 // StoreIC implementation. | 143 // StoreIC implementation. |
| 144 | 144 |
| 145 void HandleStoreICElementHandlerCase(const StoreICParameters* p, | |
| 146 Node* handler, Label* miss); | |
| 147 | |
| 148 void HandleStoreICProtoHandler(const StoreICParameters* p, Node* handler, | 145 void HandleStoreICProtoHandler(const StoreICParameters* p, Node* handler, |
| 149 Label* miss); | 146 Label* miss); |
| 150 // If |transition| is nullptr then the normal field store is generated or | 147 // If |transition| is nullptr then the normal field store is generated or |
| 151 // transitioning store otherwise. | 148 // transitioning store otherwise. |
| 152 void HandleStoreICSmiHandlerCase(Node* handler_word, Node* holder, | 149 void HandleStoreICSmiHandlerCase(Node* handler_word, Node* holder, |
| 153 Node* value, Node* transition, Label* miss); | 150 Node* value, Node* transition, Label* miss); |
| 154 // If |transition| is nullptr then the normal field store is generated or | 151 // If |transition| is nullptr then the normal field store is generated or |
| 155 // transitioning store otherwise. | 152 // transitioning store otherwise. |
| 156 void HandleStoreFieldAndReturn(Node* handler_word, Node* holder, | 153 void HandleStoreFieldAndReturn(Node* handler_word, Node* holder, |
| 157 Representation representation, Node* value, | 154 Representation representation, Node* value, |
| (...skipping 24 matching lines...) Expand all Loading... |
| 182 void TryProbeStubCacheTable(StubCache* stub_cache, StubCacheTable table_id, | 179 void TryProbeStubCacheTable(StubCache* stub_cache, StubCacheTable table_id, |
| 183 Node* entry_offset, Node* name, Node* map, | 180 Node* entry_offset, Node* name, Node* map, |
| 184 Label* if_handler, Variable* var_handler, | 181 Label* if_handler, Variable* var_handler, |
| 185 Label* if_miss); | 182 Label* if_miss); |
| 186 }; | 183 }; |
| 187 | 184 |
| 188 } // namespace internal | 185 } // namespace internal |
| 189 } // namespace v8 | 186 } // namespace v8 |
| 190 | 187 |
| 191 #endif // V8_SRC_IC_ACCESSOR_ASSEMBLER_IMPL_H_ | 188 #endif // V8_SRC_IC_ACCESSOR_ASSEMBLER_IMPL_H_ |
| OLD | NEW |