void InlineeFrameRecord::Finalize(Func* inlinee, uint32 currentOffset) { this->PopulateParent(inlinee); this->inlineeStartOffset = currentOffset; this->inlineDepth = inlinee->inlineDepth; #ifdef MD_GROW_LOCALS_AREA_UP Func* topFunc = inlinee->GetTopFunc(); int32 inlineeArgStackSize = topFunc->GetInlineeArgumentStackSize(); int localsSize = topFunc->m_localStackHeight + topFunc->m_ArgumentsOffset; this->MapOffsets([=](int& offset) { int realOffset = -(offset + BailOutInfo::StackSymBias); if (realOffset < 0) { // Not stack offset return; } // The locals size contains the inlined-arg-area size, so remove the inlined-arg-area size from the // adjustment for normal locals whose offsets are relative to the start of the locals area. realOffset -= (localsSize - inlineeArgStackSize); offset = realOffset; }); #endif Assert(this->inlineDepth != 0); }