From f85bcba4794e23cf20db875bca8875d134e90814 Mon Sep 17 00:00:00 2001 From: "fschneider@chromium.org" Date: Wed, 28 Sep 2011 11:34:54 +0000 Subject: [PATCH] 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 --- src/hydrogen.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/hydrogen.cc b/src/hydrogen.cc index c62b983..8c7f2e3 100644 --- a/src/hydrogen.cc +++ b/src/hydrogen.cc @@ -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; } -- 2.7.4