Limit depth of inlining for --stress-opt runs to avoid going into infinite recursion.

Review URL: http://codereview.chromium.org/8060033

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9464 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 355a2bf0
......@@ -4559,7 +4559,9 @@ bool HGraphBuilder::TryInline(Call* expr) {
HEnvironment* env = environment();
int current_level = 1;
while (env->outer() != NULL) {
if (FLAG_limit_inlining && current_level == Compiler::kMaxInliningLevels) {
if (current_level == (FLAG_limit_inlining
? Compiler::kMaxInliningLevels
: 2 * Compiler::kMaxInliningLevels)) {
TraceInline(target, caller, "inline depth limit reached");
return false;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment