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