OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/api.h" | 8 #include "src/api.h" |
9 #include "src/arguments.h" | 9 #include "src/arguments.h" |
10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
(...skipping 2768 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2779 */ | 2779 */ |
2780 RUNTIME_FUNCTION(LoadPropertyWithInterceptorOnly) { | 2780 RUNTIME_FUNCTION(LoadPropertyWithInterceptorOnly) { |
2781 DCHECK(args.length() == NamedLoadHandlerCompiler::kInterceptorArgsLength); | 2781 DCHECK(args.length() == NamedLoadHandlerCompiler::kInterceptorArgsLength); |
2782 Handle<Name> name = | 2782 Handle<Name> name = |
2783 args.at<Name>(NamedLoadHandlerCompiler::kInterceptorArgsNameIndex); | 2783 args.at<Name>(NamedLoadHandlerCompiler::kInterceptorArgsNameIndex); |
2784 Handle<JSObject> receiver = | 2784 Handle<JSObject> receiver = |
2785 args.at<JSObject>(NamedLoadHandlerCompiler::kInterceptorArgsThisIndex); | 2785 args.at<JSObject>(NamedLoadHandlerCompiler::kInterceptorArgsThisIndex); |
2786 Handle<JSObject> holder = | 2786 Handle<JSObject> holder = |
2787 args.at<JSObject>(NamedLoadHandlerCompiler::kInterceptorArgsHolderIndex); | 2787 args.at<JSObject>(NamedLoadHandlerCompiler::kInterceptorArgsHolderIndex); |
2788 HandleScope scope(isolate); | 2788 HandleScope scope(isolate); |
2789 auto res = JSObject::GetPropertyWithInterceptor(holder, receiver, name); | 2789 LookupIterator it(receiver, name, holder, LookupIterator::OWN); |
| 2790 auto res = JSObject::GetPropertyWithInterceptor(&it); |
2790 RETURN_FAILURE_IF_SCHEDULED_EXCEPTION(isolate); | 2791 RETURN_FAILURE_IF_SCHEDULED_EXCEPTION(isolate); |
2791 Handle<Object> result; | 2792 Handle<Object> result; |
2792 if (res.ToHandle(&result)) return *result; | 2793 if (res.ToHandle(&result)) return *result; |
2793 return isolate->heap()->no_interceptor_result_sentinel(); | 2794 return isolate->heap()->no_interceptor_result_sentinel(); |
2794 } | 2795 } |
2795 | 2796 |
2796 | 2797 |
2797 static Object* ThrowReferenceError(Isolate* isolate, Name* name) { | 2798 static Object* ThrowReferenceError(Isolate* isolate, Name* name) { |
2798 // If the load is non-contextual, just return the undefined result. | 2799 // If the load is non-contextual, just return the undefined result. |
2799 // Note that both keyed and non-keyed loads may end up here. | 2800 // Note that both keyed and non-keyed loads may end up here. |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2911 static const Address IC_utilities[] = { | 2912 static const Address IC_utilities[] = { |
2912 #define ADDR(name) FUNCTION_ADDR(name), | 2913 #define ADDR(name) FUNCTION_ADDR(name), |
2913 IC_UTIL_LIST(ADDR) NULL | 2914 IC_UTIL_LIST(ADDR) NULL |
2914 #undef ADDR | 2915 #undef ADDR |
2915 }; | 2916 }; |
2916 | 2917 |
2917 | 2918 |
2918 Address IC::AddressFromUtilityId(IC::UtilityId id) { return IC_utilities[id]; } | 2919 Address IC::AddressFromUtilityId(IC::UtilityId id) { return IC_utilities[id]; } |
2919 } | 2920 } |
2920 } // namespace v8::internal | 2921 } // namespace v8::internal |
OLD | NEW |