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

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

Issue 2512463002: Revert of Refactor SharedFunctionInfo::IsBuiltin. (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « src/heap/objects-visiting-inl.h ('k') | src/isolate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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
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()->IsUserJavaScript() && 1036 if (!receiver->IsJSObject() && !function->shared()->IsBuiltin() &&
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 2193 matching lines...) Expand 10 before | Expand all | Expand 10 after
3240 DCHECK_EQ(LookupIterator::INTERCEPTOR, it.state()); 3240 DCHECK_EQ(LookupIterator::INTERCEPTOR, it.state());
3241 it.Next(); 3241 it.Next();
3242 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, 3242 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result,
3243 Object::GetProperty(&it)); 3243 Object::GetProperty(&it));
3244 } 3244 }
3245 3245
3246 return *result; 3246 return *result;
3247 } 3247 }
3248 } // namespace internal 3248 } // namespace internal
3249 } // namespace v8 3249 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap/objects-visiting-inl.h ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698