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

Side by Side Diff: src/lookup.h

Issue 2598543003: [runtime][ic] Constant field tracking support. (Closed)
Patch Set: Addressing comments Created 3 years, 10 months 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
« no previous file with comments | « src/json-parser.cc ('k') | src/lookup.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_LOOKUP_H_ 5 #ifndef V8_LOOKUP_H_
6 #define V8_LOOKUP_H_ 6 #define V8_LOOKUP_H_
7 7
8 #include "src/factory.h" 8 #include "src/factory.h"
9 #include "src/globals.h" 9 #include "src/globals.h"
10 #include "src/isolate.h" 10 #include "src/isolate.h"
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 } 229 }
230 PropertyAttributes property_attributes() const { 230 PropertyAttributes property_attributes() const {
231 return property_details().attributes(); 231 return property_details().attributes();
232 } 232 }
233 bool IsConfigurable() const { return property_details().IsConfigurable(); } 233 bool IsConfigurable() const { return property_details().IsConfigurable(); }
234 bool IsReadOnly() const { return property_details().IsReadOnly(); } 234 bool IsReadOnly() const { return property_details().IsReadOnly(); }
235 bool IsEnumerable() const { return property_details().IsEnumerable(); } 235 bool IsEnumerable() const { return property_details().IsEnumerable(); }
236 Representation representation() const { 236 Representation representation() const {
237 return property_details().representation(); 237 return property_details().representation();
238 } 238 }
239 PropertyConstness constness() const { return property_details().constness(); }
239 FieldIndex GetFieldIndex() const; 240 FieldIndex GetFieldIndex() const;
240 Handle<FieldType> GetFieldType() const; 241 Handle<FieldType> GetFieldType() const;
241 int GetFieldDescriptorIndex() const; 242 int GetFieldDescriptorIndex() const;
242 int GetAccessorIndex() const; 243 int GetAccessorIndex() const;
243 int GetConstantIndex() const; 244 int GetConstantIndex() const;
244 Handle<PropertyCell> GetPropertyCell() const; 245 Handle<PropertyCell> GetPropertyCell() const;
245 Handle<Object> GetAccessors() const; 246 Handle<Object> GetAccessors() const;
246 inline Handle<InterceptorInfo> GetInterceptor() const { 247 inline Handle<InterceptorInfo> GetInterceptor() const {
247 DCHECK_EQ(INTERCEPTOR, state_); 248 DCHECK_EQ(INTERCEPTOR, state_);
248 InterceptorInfo* result = 249 InterceptorInfo* result =
249 IsElement() ? GetInterceptor<true>(JSObject::cast(*holder_)) 250 IsElement() ? GetInterceptor<true>(JSObject::cast(*holder_))
250 : GetInterceptor<false>(JSObject::cast(*holder_)); 251 : GetInterceptor<false>(JSObject::cast(*holder_));
251 return handle(result, isolate_); 252 return handle(result, isolate_);
252 } 253 }
253 Handle<InterceptorInfo> GetInterceptorForFailedAccessCheck() const; 254 Handle<InterceptorInfo> GetInterceptorForFailedAccessCheck() const;
254 Handle<Object> GetDataValue() const; 255 Handle<Object> GetDataValue() const;
255 void WriteDataValue(Handle<Object> value); 256 void WriteDataValue(Handle<Object> value, bool initializing_store);
256 inline void UpdateProtector() { 257 inline void UpdateProtector() {
257 if (IsElement()) return; 258 if (IsElement()) return;
258 if (*name_ == heap()->is_concat_spreadable_symbol() || 259 if (*name_ == heap()->is_concat_spreadable_symbol() ||
259 *name_ == heap()->constructor_string() || 260 *name_ == heap()->constructor_string() ||
260 *name_ == heap()->species_symbol() || 261 *name_ == heap()->species_symbol() ||
261 *name_ == heap()->has_instance_symbol() || 262 *name_ == heap()->has_instance_symbol() ||
262 *name_ == heap()->iterator_symbol()) { 263 *name_ == heap()->iterator_symbol()) {
263 InternalUpdateProtector(); 264 InternalUpdateProtector();
264 } 265 }
265 } 266 }
(...skipping 30 matching lines...) Expand all
296 State LookupInRegularHolder(Map* map, JSReceiver* holder); 297 State LookupInRegularHolder(Map* map, JSReceiver* holder);
297 template <bool is_element> 298 template <bool is_element>
298 State LookupInSpecialHolder(Map* map, JSReceiver* holder); 299 State LookupInSpecialHolder(Map* map, JSReceiver* holder);
299 template <bool is_element> 300 template <bool is_element>
300 void RestartLookupForNonMaskingInterceptors() { 301 void RestartLookupForNonMaskingInterceptors() {
301 RestartInternal<is_element>(InterceptorState::kProcessNonMasking); 302 RestartInternal<is_element>(InterceptorState::kProcessNonMasking);
302 } 303 }
303 template <bool is_element> 304 template <bool is_element>
304 void RestartInternal(InterceptorState interceptor_state); 305 void RestartInternal(InterceptorState interceptor_state);
305 Handle<Object> FetchValue() const; 306 Handle<Object> FetchValue() const;
307 bool IsConstFieldValueEqualTo(Object* value) const;
306 template <bool is_element> 308 template <bool is_element>
307 void ReloadPropertyInformation(); 309 void ReloadPropertyInformation();
308 310
309 template <bool is_element> 311 template <bool is_element>
310 bool SkipInterceptor(JSObject* holder); 312 bool SkipInterceptor(JSObject* holder);
311 template <bool is_element> 313 template <bool is_element>
312 inline InterceptorInfo* GetInterceptor(JSObject* holder) const { 314 inline InterceptorInfo* GetInterceptor(JSObject* holder) const {
313 return is_element ? holder->GetIndexedInterceptor() 315 return is_element ? holder->GetIndexedInterceptor()
314 : holder->GetNamedInterceptor(); 316 : holder->GetNamedInterceptor();
315 } 317 }
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 const Handle<JSReceiver> initial_holder_; 363 const Handle<JSReceiver> initial_holder_;
362 const uint32_t index_; 364 const uint32_t index_;
363 uint32_t number_; 365 uint32_t number_;
364 }; 366 };
365 367
366 368
367 } // namespace internal 369 } // namespace internal
368 } // namespace v8 370 } // namespace v8
369 371
370 #endif // V8_LOOKUP_H_ 372 #endif // V8_LOOKUP_H_
OLDNEW
« no previous file with comments | « src/json-parser.cc ('k') | src/lookup.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698