From fbb26b21c824c8ab41e506b0389d0fe9a32c740c Mon Sep 17 00:00:00 2001 From: titzer Date: Tue, 24 Feb 2015 10:25:47 -0800 Subject: [PATCH] [turbofan] Only compile hot asm functions with TurboFan if --turbo-osr flag is turned on. R=bmeurer@chromium.org Review URL: https://codereview.chromium.org/951053002 Cr-Commit-Position: refs/heads/master@{#26832} --- src/compiler.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/compiler.cc b/src/compiler.cc index 4b8157bee6..f3f8dbd086 100644 --- a/src/compiler.cc +++ b/src/compiler.cc @@ -501,6 +501,11 @@ OptimizedCompileJob::Status OptimizedCompileJob::CreateGraph() { if (info()->is_osr()) os << " OSR"; os << "]" << std::endl; } + + if (info()->shared_info()->asm_function()) { + info()->MarkAsContextSpecializing(); + } + Timer t(this, &time_taken_to_create_graph_); compiler::Pipeline pipeline(info()); pipeline.GenerateCode(); @@ -930,7 +935,8 @@ MaybeHandle Compiler::GetLazyCode(Handle function) { // If the debugger is active, do not compile with turbofan unless we can // deopt from turbofan code. if (FLAG_turbo_asm && function->shared()->asm_function() && - (FLAG_turbo_deoptimization || !isolate->debug()->is_active())) { + (FLAG_turbo_deoptimization || !isolate->debug()->is_active()) && + !FLAG_turbo_osr) { CompilationInfoWithZone info(function); VMState state(isolate);