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/ic/ic.h" | 5 #include "src/ic/ic.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 2796 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2807 Handle<Name> name = | 2807 Handle<Name> name = |
2808 args.at<Name>(NamedLoadHandlerCompiler::kInterceptorArgsNameIndex); | 2808 args.at<Name>(NamedLoadHandlerCompiler::kInterceptorArgsNameIndex); |
2809 Handle<JSObject> receiver = | 2809 Handle<JSObject> receiver = |
2810 args.at<JSObject>(NamedLoadHandlerCompiler::kInterceptorArgsThisIndex); | 2810 args.at<JSObject>(NamedLoadHandlerCompiler::kInterceptorArgsThisIndex); |
2811 Handle<JSObject> holder = | 2811 Handle<JSObject> holder = |
2812 args.at<JSObject>(NamedLoadHandlerCompiler::kInterceptorArgsHolderIndex); | 2812 args.at<JSObject>(NamedLoadHandlerCompiler::kInterceptorArgsHolderIndex); |
2813 | 2813 |
2814 Handle<Object> result; | 2814 Handle<Object> result; |
2815 LookupIterator it(receiver, name, holder); | 2815 LookupIterator it(receiver, name, holder); |
2816 // TODO(conradw): Investigate strong mode semantics for this. | 2816 // TODO(conradw): Investigate strong mode semantics for this. |
2817 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, | 2817 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, Object::GetProperty(&it)); |
2818 JSObject::GetProperty(&it)); | |
2819 | 2818 |
2820 if (it.IsFound()) return *result; | 2819 if (it.IsFound()) return *result; |
2821 | 2820 |
2822 // Return the undefined result if the reference error should not be thrown. | 2821 // Return the undefined result if the reference error should not be thrown. |
2823 // Note that both keyed and non-keyed loads may end up here. | 2822 // Note that both keyed and non-keyed loads may end up here. |
2824 LoadICNexus nexus(isolate); | 2823 LoadICNexus nexus(isolate); |
2825 LoadIC ic(IC::NO_EXTRA_FRAME, isolate, &nexus); | 2824 LoadIC ic(IC::NO_EXTRA_FRAME, isolate, &nexus); |
2826 if (!ic.ShouldThrowReferenceError(it.GetReceiver())) { | 2825 if (!ic.ShouldThrowReferenceError(it.GetReceiver())) { |
2827 return isolate->heap()->undefined_value(); | 2826 return isolate->heap()->undefined_value(); |
2828 } | 2827 } |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2903 KeyedLoadICNexus nexus(vector, vector_slot); | 2902 KeyedLoadICNexus nexus(vector, vector_slot); |
2904 KeyedLoadIC ic(IC::EXTRA_CALL_FRAME, isolate, &nexus); | 2903 KeyedLoadIC ic(IC::EXTRA_CALL_FRAME, isolate, &nexus); |
2905 ic.UpdateState(receiver, key); | 2904 ic.UpdateState(receiver, key); |
2906 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, ic.Load(receiver, key)); | 2905 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, ic.Load(receiver, key)); |
2907 } | 2906 } |
2908 | 2907 |
2909 return *result; | 2908 return *result; |
2910 } | 2909 } |
2911 } // namespace internal | 2910 } // namespace internal |
2912 } // namespace v8 | 2911 } // namespace v8 |
OLD | NEW |