Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Side by Side Diff: src/ic/accessor-assembler-impl.h

Issue 2534613002: [ic] Use validity cells to protect keyed element stores against object's prototype chain modificati… (Closed)
Patch Set: The fix Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 void HandleStoreICHandlerCase(const StoreICParameters* p, Node* handler, 84 enum ElementSupport { kOnlyProperties, kSupportElements };
85 Label* miss); 85 void HandleStoreICHandlerCase(
86 const StoreICParameters* p, Node* handler, Label* miss,
87 ElementSupport support_elements = kOnlyProperties);
86 88
87 private: 89 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
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
145 void HandleStoreICProtoHandler(const StoreICParameters* p, Node* handler, 148 void HandleStoreICProtoHandler(const StoreICParameters* p, Node* handler,
146 Label* miss); 149 Label* miss);
147 // If |transition| is nullptr then the normal field store is generated or 150 // If |transition| is nullptr then the normal field store is generated or
148 // transitioning store otherwise. 151 // transitioning store otherwise.
149 void HandleStoreICSmiHandlerCase(Node* handler_word, Node* holder, 152 void HandleStoreICSmiHandlerCase(Node* handler_word, Node* holder,
150 Node* value, Node* transition, Label* miss); 153 Node* value, Node* transition, Label* miss);
151 // If |transition| is nullptr then the normal field store is generated or 154 // If |transition| is nullptr then the normal field store is generated or
152 // transitioning store otherwise. 155 // transitioning store otherwise.
153 void HandleStoreFieldAndReturn(Node* handler_word, Node* holder, 156 void HandleStoreFieldAndReturn(Node* handler_word, Node* holder,
154 Representation representation, Node* value, 157 Representation representation, Node* value,
(...skipping 24 matching lines...) Expand all
179 void TryProbeStubCacheTable(StubCache* stub_cache, StubCacheTable table_id, 182 void TryProbeStubCacheTable(StubCache* stub_cache, StubCacheTable table_id,
180 Node* entry_offset, Node* name, Node* map, 183 Node* entry_offset, Node* name, Node* map,
181 Label* if_handler, Variable* var_handler, 184 Label* if_handler, Variable* var_handler,
182 Label* if_miss); 185 Label* if_miss);
183 }; 186 };
184 187
185 } // namespace internal 188 } // namespace internal
186 } // namespace v8 189 } // namespace v8
187 190
188 #endif // V8_SRC_IC_ACCESSOR_ASSEMBLER_IMPL_H_ 191 #endif // V8_SRC_IC_ACCESSOR_ASSEMBLER_IMPL_H_
OLDNEW
« src/ic/accessor-assembler.cc ('K') | « src/ic/accessor-assembler.cc ('k') | src/ic/ic.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698