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

Side by Side Diff: src/hydrogen.cc

Issue 1140743004: Generalize builtins inlining flag to allow forced inlining of any function (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 months 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
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/hydrogen.h" 5 #include "src/hydrogen.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "src/v8.h" 9 #include "src/v8.h"
10 10
(...skipping 7932 matching lines...) Expand 10 before | Expand all | Expand 10 after
7943 7943
7944 7944
7945 int HOptimizedGraphBuilder::InliningAstSize(Handle<JSFunction> target) { 7945 int HOptimizedGraphBuilder::InliningAstSize(Handle<JSFunction> target) {
7946 if (!FLAG_use_inlining) return kNotInlinable; 7946 if (!FLAG_use_inlining) return kNotInlinable;
7947 7947
7948 // Precondition: call is monomorphic and we have found a target with the 7948 // Precondition: call is monomorphic and we have found a target with the
7949 // appropriate arity. 7949 // appropriate arity.
7950 Handle<JSFunction> caller = current_info()->closure(); 7950 Handle<JSFunction> caller = current_info()->closure();
7951 Handle<SharedFunctionInfo> target_shared(target->shared()); 7951 Handle<SharedFunctionInfo> target_shared(target->shared());
7952 7952
7953 // Always inline builtins marked for inlining. 7953 // Always inline builtins marked for inlining.
Michael Starzinger 2015/05/20 10:37:35 nit: Comment is outdated now.
danno 2015/05/20 12:19:19 Done.
7954 if (target_shared->force_inline()) {
7955 return 0;
7956 }
7954 if (target->IsBuiltin()) { 7957 if (target->IsBuiltin()) {
7955 return target_shared->inline_builtin() ? 0 : kNotInlinable; 7958 return kNotInlinable;
7956 } 7959 }
7957 7960
7958 if (target_shared->IsApiFunction()) { 7961 if (target_shared->IsApiFunction()) {
7959 TraceInline(target, caller, "target is api function"); 7962 TraceInline(target, caller, "target is api function");
7960 return kNotInlinable; 7963 return kNotInlinable;
7961 } 7964 }
7962 7965
7963 // Do a quick check on source code length to avoid parsing large 7966 // Do a quick check on source code length to avoid parsing large
7964 // inlining candidates. 7967 // inlining candidates.
7965 if (target_shared->SourceSize() > 7968 if (target_shared->SourceSize() >
(...skipping 5160 matching lines...) Expand 10 before | Expand all | Expand 10 after
13126 if (ShouldProduceTraceOutput()) { 13129 if (ShouldProduceTraceOutput()) {
13127 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 13130 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
13128 } 13131 }
13129 13132
13130 #ifdef DEBUG 13133 #ifdef DEBUG
13131 graph_->Verify(false); // No full verify. 13134 graph_->Verify(false); // No full verify.
13132 #endif 13135 #endif
13133 } 13136 }
13134 13137
13135 } } // namespace v8::internal 13138 } } // namespace v8::internal
OLDNEW
« src/compiler/js-inlining.cc ('K') | « src/compiler/js-inlining.cc ('k') | src/math.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698