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/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 952 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
963 Handle<HeapType> type = receiver_type(); | 963 Handle<HeapType> type = receiver_type(); |
964 Handle<JSObject> holder = lookup->GetHolder<JSObject>(); | 964 Handle<JSObject> holder = lookup->GetHolder<JSObject>(); |
965 bool receiver_is_holder = receiver.is_identical_to(holder); | 965 bool receiver_is_holder = receiver.is_identical_to(holder); |
966 // -------------- Interceptors -------------- | 966 // -------------- Interceptors -------------- |
967 if (lookup->state() == LookupIterator::INTERCEPTOR) { | 967 if (lookup->state() == LookupIterator::INTERCEPTOR) { |
968 DCHECK(!holder->GetNamedInterceptor()->getter()->IsUndefined()); | 968 DCHECK(!holder->GetNamedInterceptor()->getter()->IsUndefined()); |
969 NamedLoadHandlerCompiler compiler(isolate(), receiver_type(), holder, | 969 NamedLoadHandlerCompiler compiler(isolate(), receiver_type(), holder, |
970 cache_holder); | 970 cache_holder); |
971 // Perform a lookup behind the interceptor. Copy the LookupIterator since | 971 // Perform a lookup behind the interceptor. Copy the LookupIterator since |
972 // the original iterator will be used to fetch the value. | 972 // the original iterator will be used to fetch the value. |
973 LookupIterator it(lookup); | 973 LookupIterator it = *lookup; |
974 it.Next(); | 974 it.Next(); |
975 LookupForRead(&it); | 975 LookupForRead(&it); |
976 return compiler.CompileLoadInterceptor(&it); | 976 return compiler.CompileLoadInterceptor(&it); |
977 } | 977 } |
978 | 978 |
979 // -------------- Accessors -------------- | 979 // -------------- Accessors -------------- |
980 DCHECK(lookup->state() == LookupIterator::PROPERTY); | 980 DCHECK(lookup->state() == LookupIterator::PROPERTY); |
981 if (lookup->property_kind() == LookupIterator::ACCESSOR) { | 981 if (lookup->property_kind() == LookupIterator::ACCESSOR) { |
982 // Use simple field loads for some well-known callback properties. | 982 // Use simple field loads for some well-known callback properties. |
983 if (receiver_is_holder) { | 983 if (receiver_is_holder) { |
(...skipping 2207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3191 static const Address IC_utilities[] = { | 3191 static const Address IC_utilities[] = { |
3192 #define ADDR(name) FUNCTION_ADDR(name), | 3192 #define ADDR(name) FUNCTION_ADDR(name), |
3193 IC_UTIL_LIST(ADDR) NULL | 3193 IC_UTIL_LIST(ADDR) NULL |
3194 #undef ADDR | 3194 #undef ADDR |
3195 }; | 3195 }; |
3196 | 3196 |
3197 | 3197 |
3198 Address IC::AddressFromUtilityId(IC::UtilityId id) { return IC_utilities[id]; } | 3198 Address IC::AddressFromUtilityId(IC::UtilityId id) { return IC_utilities[id]; } |
3199 } | 3199 } |
3200 } // namespace v8::internal | 3200 } // namespace v8::internal |
OLD | NEW |