From 73e80c3ae76fafdb53afe3a85306dcb491fb5b00 Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Tue, 22 Jul 2014 17:47:56 +0100 Subject: Make unit test tell if a method is a leaf. The runtime is not initialized completely in gtests, so we cannot run code (such as explicit stack overflow checks) that look at tls values. Change-Id: I74a4449b01eb203f1b411dda700e9459878d0d55 --- compiler/optimizing/code_generator.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'compiler/optimizing/code_generator.cc') diff --git a/compiler/optimizing/code_generator.cc b/compiler/optimizing/code_generator.cc index c0964e6481..bd8c27ec3e 100644 --- a/compiler/optimizing/code_generator.cc +++ b/compiler/optimizing/code_generator.cc @@ -30,16 +30,16 @@ namespace art { -void CodeGenerator::CompileBaseline(CodeAllocator* allocator) { +void CodeGenerator::CompileBaseline(CodeAllocator* allocator, bool is_leaf) { const GrowableArray& blocks = GetGraph()->GetBlocks(); DCHECK(blocks.Get(0) == GetGraph()->GetEntryBlock()); DCHECK(GoesToNextBlock(GetGraph()->GetEntryBlock(), blocks.Get(1))); block_labels_.SetSize(blocks.Size()); DCHECK_EQ(frame_size_, kUninitializedFrameSize); - // The baseline compiler does not do graph analysis prior to generating - // code. - MarkNotLeaf(); + if (!is_leaf) { + MarkNotLeaf(); + } ComputeFrameSize(GetGraph()->GetMaximumNumberOfOutVRegs() + GetGraph()->GetNumberOfLocalVRegs() + GetGraph()->GetNumberOfTemporaries() -- cgit v1.2.3-59-g8ed1b