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

Side by Side Diff: src/ic/ic.cc

Issue 1148583002: Simplify GetProperty helpers to ease element support (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 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 | « no previous file | src/lookup.h » ('j') | src/lookup.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | src/lookup.h » ('j') | src/lookup.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698