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 2837 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2848 #endif | 2848 #endif |
2849 Handle<Object> result; | 2849 Handle<Object> result; |
2850 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( | 2850 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( |
2851 isolate, result, | 2851 isolate, result, |
2852 JSObject::SetProperty(receiver, name, value, ic.language_mode())); | 2852 JSObject::SetProperty(receiver, name, value, ic.language_mode())); |
2853 return *result; | 2853 return *result; |
2854 } | 2854 } |
2855 | 2855 |
2856 | 2856 |
2857 RUNTIME_FUNCTION(LoadElementWithInterceptor) { | 2857 RUNTIME_FUNCTION(LoadElementWithInterceptor) { |
| 2858 // TODO(verwaest): This should probably get the holder and receiver as input. |
2858 HandleScope scope(isolate); | 2859 HandleScope scope(isolate); |
2859 Handle<JSObject> receiver = args.at<JSObject>(0); | 2860 Handle<JSObject> receiver = args.at<JSObject>(0); |
2860 DCHECK(args.smi_at(1) >= 0); | 2861 DCHECK(args.smi_at(1) >= 0); |
2861 uint32_t index = args.smi_at(1); | 2862 uint32_t index = args.smi_at(1); |
2862 Handle<Object> result; | 2863 Handle<Object> result; |
2863 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( | 2864 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( |
2864 isolate, result, | 2865 isolate, result, Object::GetElement(isolate, receiver, index)); |
2865 JSObject::GetElementWithInterceptor(receiver, receiver, index, true)); | |
2866 return *result; | 2866 return *result; |
2867 } | 2867 } |
2868 | 2868 |
2869 | 2869 |
2870 RUNTIME_FUNCTION(LoadIC_MissFromStubFailure) { | 2870 RUNTIME_FUNCTION(LoadIC_MissFromStubFailure) { |
2871 TimerEventScope<TimerEventIcMiss> timer(isolate); | 2871 TimerEventScope<TimerEventIcMiss> timer(isolate); |
2872 HandleScope scope(isolate); | 2872 HandleScope scope(isolate); |
2873 Handle<Object> receiver = args.at<Object>(0); | 2873 Handle<Object> receiver = args.at<Object>(0); |
2874 Handle<Name> key = args.at<Name>(1); | 2874 Handle<Name> key = args.at<Name>(1); |
2875 Handle<Object> result; | 2875 Handle<Object> result; |
(...skipping 25 matching lines...) Expand all Loading... |
2901 static const Address IC_utilities[] = { | 2901 static const Address IC_utilities[] = { |
2902 #define ADDR(name) FUNCTION_ADDR(name), | 2902 #define ADDR(name) FUNCTION_ADDR(name), |
2903 IC_UTIL_LIST(ADDR) NULL | 2903 IC_UTIL_LIST(ADDR) NULL |
2904 #undef ADDR | 2904 #undef ADDR |
2905 }; | 2905 }; |
2906 | 2906 |
2907 | 2907 |
2908 Address IC::AddressFromUtilityId(IC::UtilityId id) { return IC_utilities[id]; } | 2908 Address IC::AddressFromUtilityId(IC::UtilityId id) { return IC_utilities[id]; } |
2909 } // namespace internal | 2909 } // namespace internal |
2910 } // namespace v8 | 2910 } // namespace v8 |
OLD | NEW |