Chromium Code Reviews| 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 #include "src/lookup.h" | 5 #include "src/lookup.h" |
| 6 | 6 |
| 7 #include "src/bootstrapper.h" | 7 #include "src/bootstrapper.h" |
| 8 #include "src/deoptimizer.h" | 8 #include "src/deoptimizer.h" |
| 9 #include "src/elements.h" | 9 #include "src/elements.h" |
| 10 #include "src/field-type.h" | 10 #include "src/field-type.h" |
| (...skipping 817 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 828 if (access_check_info) { | 828 if (access_check_info) { |
| 829 Object* interceptor = IsElement() ? access_check_info->indexed_interceptor() | 829 Object* interceptor = IsElement() ? access_check_info->indexed_interceptor() |
| 830 : access_check_info->named_interceptor(); | 830 : access_check_info->named_interceptor(); |
| 831 if (interceptor) { | 831 if (interceptor) { |
| 832 return handle(InterceptorInfo::cast(interceptor), isolate_); | 832 return handle(InterceptorInfo::cast(interceptor), isolate_); |
| 833 } | 833 } |
| 834 } | 834 } |
| 835 return Handle<InterceptorInfo>(); | 835 return Handle<InterceptorInfo>(); |
| 836 } | 836 } |
| 837 | 837 |
| 838 bool LookupIterator::TryLookupCacheProperty() { | |
| 839 if (state() != LookupIterator::ACCESSOR) return false; | |
| 840 | |
| 841 Handle<Object> accessors = GetAccessors(); | |
| 842 if (!accessors->IsAccessorPair()) return false; | |
|
Toon Verwaest
2016/10/21 08:22:14
You should be able to make this a DCHECK and only
vogelheim
2016/11/03 16:12:24
Mostly done.
There's now a LookupCachedProperty,
| |
| 843 | |
| 844 Handle<Object> getter(Handle<AccessorPair>::cast(accessors)->getter(), | |
| 845 isolate()); | |
|
Toon Verwaest
2016/10/21 08:22:14
you don't need isolate() here
vogelheim
2016/11/03 16:12:23
The compiler disagrees. With only one param, this
Toon Verwaest
2016/11/04 10:19:52
You're right; I misread I guess. Object includes S
| |
| 846 MaybeHandle<Name> maybe_name = | |
| 847 FunctionTemplateInfo::TryGetCachePropertyName(isolate(), getter); | |
| 848 if (maybe_name.is_null()) return false; | |
| 849 | |
| 850 // We have found a cached property! Modify the iterator accordingly. | |
| 851 name_ = maybe_name.ToHandleChecked(); | |
| 852 Restart(); | |
| 853 CHECK_EQ(state(), LookupIterator::DATA); | |
| 854 return true; | |
| 855 } | |
| 856 | |
| 838 } // namespace internal | 857 } // namespace internal |
| 839 } // namespace v8 | 858 } // namespace v8 |
| OLD | NEW |