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

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

Issue 1159433003: Use GetProperty for getting elements. (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
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 2848 matching lines...) Expand 10 before | Expand all | Expand 10 after
2859 #endif 2859 #endif
2860 Handle<Object> result; 2860 Handle<Object> result;
2861 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( 2861 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
2862 isolate, result, 2862 isolate, result,
2863 JSObject::SetProperty(receiver, name, value, ic.language_mode())); 2863 JSObject::SetProperty(receiver, name, value, ic.language_mode()));
2864 return *result; 2864 return *result;
2865 } 2865 }
2866 2866
2867 2867
2868 RUNTIME_FUNCTION(LoadElementWithInterceptor) { 2868 RUNTIME_FUNCTION(LoadElementWithInterceptor) {
2869 // TODO(verwaest): This should probably get the holder and receiver as input.
2869 HandleScope scope(isolate); 2870 HandleScope scope(isolate);
2870 Handle<JSObject> receiver = args.at<JSObject>(0); 2871 Handle<JSObject> receiver = args.at<JSObject>(0);
2871 DCHECK(args.smi_at(1) >= 0); 2872 DCHECK(args.smi_at(1) >= 0);
2872 uint32_t index = args.smi_at(1); 2873 uint32_t index = args.smi_at(1);
2873 Handle<Object> result; 2874 Handle<Object> result;
2874 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( 2875 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
2875 isolate, result, 2876 isolate, result, Object::GetElement(isolate, receiver, index));
2876 JSObject::GetElementWithInterceptor(receiver, receiver, index, true));
2877 return *result; 2877 return *result;
2878 } 2878 }
2879 2879
2880 2880
2881 RUNTIME_FUNCTION(LoadIC_MissFromStubFailure) { 2881 RUNTIME_FUNCTION(LoadIC_MissFromStubFailure) {
2882 TimerEventScope<TimerEventIcMiss> timer(isolate); 2882 TimerEventScope<TimerEventIcMiss> timer(isolate);
2883 HandleScope scope(isolate); 2883 HandleScope scope(isolate);
2884 Handle<Object> receiver = args.at<Object>(0); 2884 Handle<Object> receiver = args.at<Object>(0);
2885 Handle<Name> key = args.at<Name>(1); 2885 Handle<Name> key = args.at<Name>(1);
2886 Handle<Object> result; 2886 Handle<Object> result;
(...skipping 25 matching lines...) Expand all
2912 static const Address IC_utilities[] = { 2912 static const Address IC_utilities[] = {
2913 #define ADDR(name) FUNCTION_ADDR(name), 2913 #define ADDR(name) FUNCTION_ADDR(name),
2914 IC_UTIL_LIST(ADDR) NULL 2914 IC_UTIL_LIST(ADDR) NULL
2915 #undef ADDR 2915 #undef ADDR
2916 }; 2916 };
2917 2917
2918 2918
2919 Address IC::AddressFromUtilityId(IC::UtilityId id) { return IC_utilities[id]; } 2919 Address IC::AddressFromUtilityId(IC::UtilityId id) { return IC_utilities[id]; }
2920 } 2920 }
2921 } // namespace v8::internal 2921 } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698