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

Side by Side Diff: src/crankshaft/hydrogen.cc

Issue 2505853003: Refactor SharedFunctionInfo::IsBuiltin. (Closed)
Patch Set: rebase 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/compiler/pipeline.cc ('k') | src/heap/objects-visiting-inl.h » ('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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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/crankshaft/hydrogen.h" 5 #include "src/crankshaft/hydrogen.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <sstream> 8 #include <sstream>
9 9
10 #include "src/allocation-site-scopes.h" 10 #include "src/allocation-site-scopes.h"
(...skipping 7948 matching lines...) Expand 10 before | Expand all | Expand 10 after
7959 7959
7960 // Precondition: call is monomorphic and we have found a target with the 7960 // Precondition: call is monomorphic and we have found a target with the
7961 // appropriate arity. 7961 // appropriate arity.
7962 Handle<JSFunction> caller = current_info()->closure(); 7962 Handle<JSFunction> caller = current_info()->closure();
7963 Handle<SharedFunctionInfo> target_shared(target->shared()); 7963 Handle<SharedFunctionInfo> target_shared(target->shared());
7964 7964
7965 // Always inline functions that force inlining. 7965 // Always inline functions that force inlining.
7966 if (target_shared->force_inline()) { 7966 if (target_shared->force_inline()) {
7967 return 0; 7967 return 0;
7968 } 7968 }
7969 if (target->shared()->IsBuiltin()) { 7969 if (!target->shared()->IsUserJavaScript()) {
7970 return kNotInlinable; 7970 return kNotInlinable;
7971 } 7971 }
7972 7972
7973 if (target_shared->IsApiFunction()) { 7973 if (target_shared->IsApiFunction()) {
7974 TraceInline(target, caller, "target is api function"); 7974 TraceInline(target, caller, "target is api function");
7975 return kNotInlinable; 7975 return kNotInlinable;
7976 } 7976 }
7977 7977
7978 // Do a quick check on source code length to avoid parsing large 7978 // Do a quick check on source code length to avoid parsing large
7979 // inlining candidates. 7979 // inlining candidates.
(...skipping 5030 matching lines...) Expand 10 before | Expand all | Expand 10 after
13010 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 13010 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
13011 } 13011 }
13012 13012
13013 #ifdef DEBUG 13013 #ifdef DEBUG
13014 graph_->Verify(false); // No full verify. 13014 graph_->Verify(false); // No full verify.
13015 #endif 13015 #endif
13016 } 13016 }
13017 13017
13018 } // namespace internal 13018 } // namespace internal
13019 } // namespace v8 13019 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/pipeline.cc ('k') | src/heap/objects-visiting-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698