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

Unified Diff: src/hydrogen.cc

Issue 10162001: Replaced the --limit-inling flag by three separate flags and bumped hard limits. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/hydrogen.h ('k') | test/mjsunit/compiler/alloc-object-huge.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index 1b61da244825ba264193c8dd5db0dbe54536c1a9..fecdcf0774a70cbbfbf5bc70976d759619160aaf 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -5355,8 +5355,8 @@ bool HGraphBuilder::TryInline(CallKind call_kind,
// Do a quick check on source code length to avoid parsing large
// inlining candidates.
- if ((FLAG_limit_inlining && target_shared->SourceSize() > kMaxSourceSize)
- || target_shared->SourceSize() > kUnlimitedMaxSourceSize) {
+ if (target_shared->SourceSize() >
+ Min(FLAG_max_inlined_source_size, kUnlimitedMaxInlinedSourceSize)) {
TraceInline(target, caller, "target text too big");
return false;
}
@@ -5372,8 +5372,7 @@ bool HGraphBuilder::TryInline(CallKind call_kind,
}
int nodes_added = target_shared->ast_node_count();
- if ((FLAG_limit_inlining && nodes_added > kMaxInlinedSize) ||
- nodes_added > kUnlimitedMaxInlinedSize) {
+ if (nodes_added > Min(FLAG_max_inlined_nodes, kUnlimitedMaxInlinedNodes)) {
TraceInline(target, caller, "target AST is too large [early]");
return false;
}
@@ -5415,8 +5414,8 @@ bool HGraphBuilder::TryInline(CallKind call_kind,
}
// We don't want to add more than a certain number of nodes from inlining.
- if ((FLAG_limit_inlining && inlined_count_ > kMaxInlinedNodes) ||
- inlined_count_ > kUnlimitedMaxInlinedNodes) {
+ if (inlined_count_ > Min(FLAG_max_inlined_nodes_cumulative,
+ kUnlimitedMaxInlinedNodesCumulative)) {
TraceInline(target, caller, "cumulative AST node limit reached");
return false;
}
@@ -5443,8 +5442,7 @@ bool HGraphBuilder::TryInline(CallKind call_kind,
// The following conditions must be checked again after re-parsing, because
// earlier the information might not have been complete due to lazy parsing.
nodes_added = function->ast_node_count();
- if ((FLAG_limit_inlining && nodes_added > kMaxInlinedSize) ||
- nodes_added > kUnlimitedMaxInlinedSize) {
+ if (nodes_added > Min(FLAG_max_inlined_nodes, kUnlimitedMaxInlinedNodes)) {
TraceInline(target, caller, "target AST is too large [late]");
return false;
}
« no previous file with comments | « src/hydrogen.h ('k') | test/mjsunit/compiler/alloc-object-huge.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698