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 <iostream> | 7 #include <iostream> |
8 | 8 |
9 #include "src/accessors.h" | 9 #include "src/accessors.h" |
10 #include "src/api-arguments-inl.h" | 10 #include "src/api-arguments-inl.h" |
(...skipping 1015 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1026 Handle<Object> getter(Handle<AccessorPair>::cast(accessors)->getter(), | 1026 Handle<Object> getter(Handle<AccessorPair>::cast(accessors)->getter(), |
1027 isolate); | 1027 isolate); |
1028 if (!getter->IsJSFunction() && !getter->IsFunctionTemplateInfo()) { | 1028 if (!getter->IsJSFunction() && !getter->IsFunctionTemplateInfo()) { |
1029 return false; | 1029 return false; |
1030 } | 1030 } |
1031 Handle<JSObject> holder = lookup->GetHolder<JSObject>(); | 1031 Handle<JSObject> holder = lookup->GetHolder<JSObject>(); |
1032 Handle<Object> receiver = lookup->GetReceiver(); | 1032 Handle<Object> receiver = lookup->GetReceiver(); |
1033 if (holder->HasFastProperties()) { | 1033 if (holder->HasFastProperties()) { |
1034 if (getter->IsJSFunction()) { | 1034 if (getter->IsJSFunction()) { |
1035 Handle<JSFunction> function = Handle<JSFunction>::cast(getter); | 1035 Handle<JSFunction> function = Handle<JSFunction>::cast(getter); |
1036 if (!receiver->IsJSObject() && !function->shared()->IsBuiltin() && | 1036 if (!receiver->IsJSObject() && function->shared()->IsUserJavaScript() && |
1037 is_sloppy(function->shared()->language_mode())) { | 1037 is_sloppy(function->shared()->language_mode())) { |
1038 // Calling sloppy non-builtins with a value as the receiver | 1038 // Calling sloppy non-builtins with a value as the receiver |
1039 // requires boxing. | 1039 // requires boxing. |
1040 return false; | 1040 return false; |
1041 } | 1041 } |
1042 } | 1042 } |
1043 CallOptimization call_optimization(getter); | 1043 CallOptimization call_optimization(getter); |
1044 if (call_optimization.is_simple_api_call() && | 1044 if (call_optimization.is_simple_api_call() && |
1045 !call_optimization.IsCompatibleReceiverMap(receiver_map, holder)) { | 1045 !call_optimization.IsCompatibleReceiverMap(receiver_map, holder)) { |
1046 return false; | 1046 return false; |
(...skipping 2188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3235 DCHECK_EQ(LookupIterator::INTERCEPTOR, it.state()); | 3235 DCHECK_EQ(LookupIterator::INTERCEPTOR, it.state()); |
3236 it.Next(); | 3236 it.Next(); |
3237 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, | 3237 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, |
3238 Object::GetProperty(&it)); | 3238 Object::GetProperty(&it)); |
3239 } | 3239 } |
3240 | 3240 |
3241 return *result; | 3241 return *result; |
3242 } | 3242 } |
3243 } // namespace internal | 3243 } // namespace internal |
3244 } // namespace v8 | 3244 } // namespace v8 |
OLD | NEW |