OLD | NEW |
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 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 InterceptorInfo* result = | 253 InterceptorInfo* result = |
254 IsElement() ? GetInterceptor<true>(JSObject::cast(*holder_)) | 254 IsElement() ? GetInterceptor<true>(JSObject::cast(*holder_)) |
255 : GetInterceptor<false>(JSObject::cast(*holder_)); | 255 : GetInterceptor<false>(JSObject::cast(*holder_)); |
256 return handle(result, isolate_); | 256 return handle(result, isolate_); |
257 } | 257 } |
258 Handle<InterceptorInfo> GetInterceptorForFailedAccessCheck() const; | 258 Handle<InterceptorInfo> GetInterceptorForFailedAccessCheck() const; |
259 Handle<Object> GetDataValue() const; | 259 Handle<Object> GetDataValue() const; |
260 void WriteDataValue(Handle<Object> value, bool initializing_store); | 260 void WriteDataValue(Handle<Object> value, bool initializing_store); |
261 inline void UpdateProtector() { | 261 inline void UpdateProtector() { |
262 if (IsElement()) return; | 262 if (IsElement()) return; |
| 263 // This list must be kept in sync with |
| 264 // CodeStubAssembler::HasAssociatedProtector! |
263 if (*name_ == heap()->is_concat_spreadable_symbol() || | 265 if (*name_ == heap()->is_concat_spreadable_symbol() || |
264 *name_ == heap()->constructor_string() || | 266 *name_ == heap()->constructor_string() || |
265 *name_ == heap()->species_symbol() || | 267 *name_ == heap()->species_symbol() || |
266 *name_ == heap()->has_instance_symbol() || | |
267 *name_ == heap()->iterator_symbol()) { | 268 *name_ == heap()->iterator_symbol()) { |
268 InternalUpdateProtector(); | 269 InternalUpdateProtector(); |
269 } | 270 } |
270 } | 271 } |
271 | 272 |
272 // Lookup a 'cached' private property for an accessor. | 273 // Lookup a 'cached' private property for an accessor. |
273 // If not found returns false and leaves the LookupIterator unmodified. | 274 // If not found returns false and leaves the LookupIterator unmodified. |
274 bool TryLookupCachedProperty(); | 275 bool TryLookupCachedProperty(); |
275 bool LookupCachedProperty(); | 276 bool LookupCachedProperty(); |
276 | 277 |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
367 const Handle<JSReceiver> initial_holder_; | 368 const Handle<JSReceiver> initial_holder_; |
368 const uint32_t index_; | 369 const uint32_t index_; |
369 uint32_t number_; | 370 uint32_t number_; |
370 }; | 371 }; |
371 | 372 |
372 | 373 |
373 } // namespace internal | 374 } // namespace internal |
374 } // namespace v8 | 375 } // namespace v8 |
375 | 376 |
376 #endif // V8_LOOKUP_H_ | 377 #endif // V8_LOOKUP_H_ |
OLD | NEW |