Skip to content

Commit 2b1913b

Browse files
committed
cleanup more jnfunction refs
1 parent 35dd3bc commit 2b1913b

28 files changed

+326
-87
lines changed

lib/Backend/BackwardPass.cpp

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -704,11 +704,12 @@ BackwardPass::MergeSuccBlocksInfo(BasicBlock * block)
704704
if (PHASE_VERBOSE_TRACE(Js::TraceObjTypeSpecWriteGuardsPhase, this->func))
705705
{
706706
wchar_t debugStringBuffer2[MAX_FUNCTION_BODY_DEBUG_STRING_SIZE];
707-
Js::FunctionBody* topFunctionBody = this->func->GetTopFunc()->GetJnFunction();
708-
Js::FunctionBody* functionBody = this->func->GetJnFunction();
709707
Output::Print(L"ObjTypeSpec: top function %s (%s), function %s (%s), write guard symbols on edge %d => %d: ",
710-
topFunctionBody->GetDisplayName(), topFunctionBody->GetDebugNumberSet(debugStringBuffer), functionBody->GetDisplayName(),
711-
functionBody->GetDebugNumberSet(debugStringBuffer2), block->GetBlockNum(), blockSucc->GetBlockNum());
708+
this->func->GetTopFunc()->GetWorkItem()->GetDisplayName(),
709+
this->func->GetTopFunc()->GetJITFunctionBody()->GetDebugNumberSet(debugStringBuffer),
710+
this->func->GetWorkItem()->GetDisplayName(),
711+
this->func->GetJITFunctionBody()->GetDebugNumberSet(debugStringBuffer2), block->GetBlockNum(),
712+
blockSucc->GetBlockNum());
712713
}
713714
#endif
714715
if (blockSucc->stackSymToWriteGuardsMap != nullptr)
@@ -751,11 +752,12 @@ BackwardPass::MergeSuccBlocksInfo(BasicBlock * block)
751752
#if DBG_DUMP
752753
if (PHASE_VERBOSE_TRACE(Js::TraceObjTypeSpecTypeGuardsPhase, this->func))
753754
{
754-
Js::FunctionBody* topFunctionBody = this->func->GetTopFunc()->GetJnFunction();
755-
Js::FunctionBody* functionBody = this->func->GetJnFunction();
756755
wchar_t debugStringBuffer2[MAX_FUNCTION_BODY_DEBUG_STRING_SIZE];
757756
Output::Print(L"ObjTypeSpec: top function %s (%s), function %s (%s), guarded property operations on edge %d => %d: \n",
758-
topFunctionBody->GetDisplayName(), topFunctionBody->GetDebugNumberSet(debugStringBuffer), functionBody->GetDisplayName(), functionBody->GetDebugNumberSet(debugStringBuffer2),
757+
this->func->GetTopFunc()->GetWorkItem()->GetDisplayName(),
758+
this->func->GetTopFunc()->GetJITFunctionBody()->GetDebugNumberSet(debugStringBuffer),
759+
this->func->GetWorkItem()->GetDisplayName(),
760+
this->func->GetJITFunctionBody()->GetDebugNumberSet(debugStringBuffer2),
759761
block->GetBlockNum(), blockSucc->GetBlockNum());
760762
}
761763
#endif
@@ -3969,11 +3971,10 @@ BackwardPass::TrackObjTypeSpecProperties(IR::PropertySymOpnd *opnd, BasicBlock *
39693971
(existingFldInfo->GetSlotIndex() != opnd->GetSlotIndex())))
39703972
{
39713973
wchar_t debugStringBuffer[MAX_FUNCTION_BODY_DEBUG_STRING_SIZE];
3972-
Js::FunctionBody* topFunctionBody = this->func->GetJnFunction();
3973-
Js::ScriptContext* scriptContext = topFunctionBody->GetScriptContext();
3974+
Js::ScriptContext* scriptContext = this->func->GetScriptContext();
39743975

39753976
Output::Print(L"EquivObjTypeSpec: top function %s (%s): duplicate property clash on %s(#%d) on operation %u \n",
3976-
topFunctionBody->GetDisplayName(), topFunctionBody->GetDebugNumberSet(debugStringBuffer),
3977+
this->func->GetWorkItem()->GetDisplayName(), this->func->GetJITFunctionBody()->GetDebugNumberSet(debugStringBuffer),
39773978
scriptContext->GetPropertyNameLocked(opnd->GetPropertyId())->GetBuffer(), opnd->GetPropertyId(), opnd->GetObjTypeSpecFldId());
39783979
Output::Flush();
39793980
}

lib/Backend/CodeGenWorkItem.cpp

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ CodeGenWorkItem::CodeGenWorkItem(
100100
this->jitData.bodyData.nestedCount = functionBody->GetNestedCount();
101101
this->jitData.bodyData.scopeSlotArraySize = functionBody->scopeSlotArraySize;
102102
this->jitData.bodyData.attributes = functionBody->GetAttributes();
103+
this->jitData.bodyData.isInstInlineCacheCount = functionBody->GetIsInstInlineCacheCount();
103104

104105
if (functionBody->GetUtf8SourceInfo()->GetCbLength() > UINT_MAX)
105106
{
@@ -110,6 +111,19 @@ CodeGenWorkItem::CodeGenWorkItem(
110111
this->jitData.bodyData.byteCodeInLoopCount = functionBody->GetByteCodeInLoopCount();
111112
this->jitData.bodyData.nonLoadByteCodeCount = functionBody->GetByteCodeWithoutLDACount();
112113
this->jitData.bodyData.loopCount = functionBody->GetLoopCount();
114+
115+
if (functionBody->GetLoopCount() > 0)
116+
{
117+
this->jitData.bodyData.loopHeaderArrayAddr = (intptr_t)functionBody->GetLoopHeaderArrayPtr();
118+
this->jitData.bodyData.loopHeaders = HeapNewArray(JITLoopHeader, functionBody->GetLoopCount());
119+
for (uint i = 0; i < functionBody->GetLoopCount(); ++i)
120+
{
121+
this->jitData.bodyData.loopHeaders->startOffset = functionBody->GetLoopHeader(i)->startOffset;
122+
this->jitData.bodyData.loopHeaders->endOffset = functionBody->GetLoopHeader(i)->endOffset;
123+
this->jitData.bodyData.loopHeaders->isNested = functionBody->GetLoopHeader(i)->isNested;
124+
}
125+
} // TODO: OOP JIT, in else case, maybe we should pass specific bad data or nullptr to be defensive/help assert we don't use this
126+
113127
this->jitData.bodyData.localFrameDisplayReg = functionBody->GetLocalFrameDisplayReg();
114128
this->jitData.bodyData.localClosureReg = functionBody->GetLocalClosureReg();
115129
this->jitData.bodyData.envReg = functionBody->GetEnvReg();
@@ -133,13 +147,22 @@ CodeGenWorkItem::CodeGenWorkItem(
133147
this->jitData.bodyData.isLibraryCode = functionBody->GetUtf8SourceInfo()->GetIsLibraryCode();
134148
this->jitData.bodyData.isAsmJsMode = functionBody->GetIsAsmjsMode();
135149
this->jitData.bodyData.isStrictMode = functionBody->GetIsStrictMode();
150+
this->jitData.bodyData.isEval = functionBody->IsEval();
136151
this->jitData.bodyData.isGlobalFunc = functionBody->GetIsGlobalFunc();
137152
this->jitData.bodyData.doJITLoopBody = functionBody->DoJITLoopBody();
138153
this->jitData.bodyData.hasScopeObject = functionBody->HasScopeObject();
139154
this->jitData.bodyData.hasImplicitArgIns = functionBody->GetHasImplicitArgIns();
140155
this->jitData.bodyData.hasCachedScopePropIds = functionBody->HasCachedScopePropIds();
141156
this->jitData.bodyData.inlineCachesOnFunctionObject = functionBody->GetInlineCachesOnFunctionObject();
142157
this->jitData.bodyData.doInterruptProbe = functionBody->GetScriptContext()->GetThreadContext()->DoInterruptProbe(functionBody);
158+
this->jitData.bodyData.disableInlineSpread = functionBody->IsInlineSpreadDisabled();
159+
160+
this->jitData.bodyData.scriptIdAddr = (intptr_t)functionBody->GetAddressOfScriptId();
161+
this->jitData.bodyData.flagsAddr = (intptr_t)functionBody->GetAddressOfFlags();
162+
this->jitData.bodyData.probeCountAddr = (intptr_t)&functionBody->GetSourceInfo()->m_probeCount;
163+
164+
this->jitData.bodyData.referencedPropertyIdCount = functionBody->GetReferencedPropertyIdCount();
165+
this->jitData.bodyData.referencedPropertyIdMap = functionBody->GetReferencedPropertyIdMap();
143166

144167
// work item data
145168
this->jitData.type = type;

lib/Backend/Func.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -617,12 +617,18 @@ Func::AjustLocalVarSlotOffset()
617617
#endif
618618

619619
bool
620-
Func::DoGlobOptsForGeneratorFunc()
620+
Func::DoGlobOptsForGeneratorFunc() const
621621
{
622622
// Disable GlobOpt optimizations for generators initially. Will visit and enable each one by one.
623623
return !GetJITFunctionBody()->IsGenerator();
624624
}
625625

626+
bool
627+
Func::DoSimpleJitDynamicProfile() const
628+
{
629+
return IsSimpleJit() && !PHASE_OFF(Js::SimpleJitDynamicProfilePhase, GetTopFunc()) && !CONFIG_FLAG(NewSimpleJit);
630+
}
631+
626632
void
627633
Func::SetDoFastPaths()
628634
{

lib/Backend/Func.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ class Func
155155
return !this->HasFinally() && !this->m_workItem->IsLoopBody() && !PHASE_OFF(Js::OptimizeTryCatchPhase, this);
156156
}
157157

158-
bool DoSimpleJitDynamicProfile() const { return IsSimpleJit() && GetTopFunc()->GetJnFunction()->DoSimpleJitDynamicProfile(); }
158+
bool DoSimpleJitDynamicProfile() const;
159159
bool IsSimpleJit() const { return m_workItem->GetJitMode() == ExecutionMode::SimpleJit; }
160160

161161
JITTimeWorkItem * GetWorkItem() const
@@ -211,7 +211,7 @@ class Func
211211
void AjustLocalVarSlotOffset();
212212
#endif
213213

214-
bool DoGlobOptsForGeneratorFunc();
214+
bool DoGlobOptsForGeneratorFunc() const;
215215

216216
static int32 AdjustOffsetValue(int32 offset);
217217

lib/Backend/GlobOpt.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4042,13 +4042,12 @@ GlobOpt::MarkArgumentsUsedForBranch(IR::Instr * instr)
40424042
if (defSym && defSym->IsSymOpnd() && defSym->AsSymOpnd()->m_sym->IsStackSym()
40434043
&& defSym->AsSymOpnd()->m_sym->AsStackSym()->IsParamSlotSym())
40444044
{
4045-
Js::FunctionBody *funcBody = this->func->GetJnFunction();
40464045
uint16 param = defSym->AsSymOpnd()->m_sym->AsStackSym()->GetParamSlotNum();
40474046

40484047
// We only support functions with 13 arguments to ensure optimal size of callSiteInfo
40494048
if (param < Js::Constants::MaximumArgumentCountForConstantArgumentInlining)
40504049
{
4051-
funcBody->m_argUsedForBranch = funcBody->m_argUsedForBranch | (1 << (param - 1));
4050+
this->func->GetJITOutput()->SetArgUsedForBranch((uint8)param);
40524051
}
40534052
}
40544053
}

lib/Backend/IR.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3918,11 +3918,14 @@ Instr::DumpFieldCopyPropTestTrace()
39183918
case Js::OpCode::TypeofElem:
39193919

39203920
wchar_t debugStringBuffer[MAX_FUNCTION_BODY_DEBUG_STRING_SIZE];
3921-
Output::Print(L"TestTrace fieldcopyprop: function %s (%s) ", this->m_func->GetWorkItem()->GetDisplayName(), this->m_func->GetJITFunctionBody()->GetDebugNumberSet(debugStringBuffer));
3921+
Output::Print(L"TestTrace fieldcopyprop: function %s (%s) ",
3922+
this->m_func->GetWorkItem()->GetDisplayName(),
3923+
this->m_func->GetJITFunctionBody()->GetDebugNumberSet(debugStringBuffer));
39223924
if (this->IsInlined())
39233925
{
3924-
Js::FunctionBody* topFunctionBody = this->m_func->GetTopFunc()->GetJnFunction();
3925-
Output::Print(L"inlined caller function %s (%s) ", topFunctionBody->GetDisplayName(), topFunctionBody->GetDebugNumberSet(debugStringBuffer));
3926+
Output::Print(L"inlined caller function %s (%s) ",
3927+
this->m_func->GetTopFunc()->GetWorkItem()->GetDisplayName(),
3928+
this->m_func->GetTopFunc()->GetJITFunctionBody()->GetDebugNumberSet(debugStringBuffer));
39263929
}
39273930
this->DumpTestTrace();
39283931
default:

lib/Backend/IRBuilder.cpp

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2654,17 +2654,20 @@ IRBuilder::BuildUnsigned1(Js::OpCode newOpcode, uint32 offset, uint32 num)
26542654
// See we are ending an outer loop and load the return IP to the ProfiledLoopEnd opcode
26552655
// instead of following the normal branch
26562656

2657-
Js::LoopHeader * loopHeader = this->m_func->GetJnFunction()->GetLoopHeader(num);
2658-
2657+
// TODO: OOP JIT, JIT loop bodies
2658+
#if 0
2659+
JITLoopHeader * loopHeader = m_func->GetJITFunctionBody()->GetLoopHeaderData(num);
26592660
JsLoopBodyCodeGen* loopBodyCodeGen = (JsLoopBodyCodeGen*)m_func->m_workItem;
2660-
if (loopHeader != loopBodyCodeGen->loopHeader && loopHeader->Contains(loopBodyCodeGen->loopHeader))
2661+
if (m_func->GetJITFunctionBody()->GetLoopHeaderAddr(num) != (intptr_t)loopBodyCodeGen->loopHeader &&
2662+
JITTimeFunctionBody::LoopContains(loopHeader, loopBodyCodeGen->loopHeader))
26612663
{
26622664
this->InsertLoopBodyReturnIPInstr(offset, offset);
26632665
}
26642666
else
26652667
{
26662668
Assert(loopBodyCodeGen->loopHeader->Contains(loopHeader));
26672669
}
2670+
#endif
26682671
break;
26692672
}
26702673

@@ -3008,8 +3011,7 @@ void
30083011
IRBuilder::BuildElementScopedC(Js::OpCode newOpcode, uint32 offset, Js::RegSlot regSlot, Js::PropertyIdIndexType propertyIdIndex)
30093012
{
30103013
IR::Instr * instr;
3011-
Js::FunctionBody * functionBody = this->m_func->GetJnFunction();
3012-
Js::PropertyId propertyId = functionBody->GetReferencedPropertyId(propertyIdIndex);
3014+
Js::PropertyId propertyId = m_func->GetJITFunctionBody()->GetReferencedPropertyId(propertyIdIndex);
30133015
PropertyKind propertyKind = PropertyKindData;
30143016
IR::RegOpnd * regOpnd;
30153017
Js::RegSlot fieldRegSlot = this->GetEnvRegForEvalCode();
@@ -3072,8 +3074,7 @@ void
30723074
IRBuilder::BuildElementC(Js::OpCode newOpcode, uint32 offset, Js::RegSlot fieldRegSlot, Js::RegSlot regSlot, Js::PropertyIdIndexType propertyIdIndex)
30733075
{
30743076
IR::Instr * instr;
3075-
Js::FunctionBody * functionBody = this->m_func->GetJnFunction();
3076-
Js::PropertyId propertyId = functionBody->GetReferencedPropertyId(propertyIdIndex);
3077+
Js::PropertyId propertyId = m_func->GetJITFunctionBody()->GetReferencedPropertyId(propertyIdIndex);
30773078
PropertyKind propertyKind = PropertyKindData;
30783079
IR::SymOpnd * fieldSymOpnd = this->BuildFieldOpnd(newOpcode, fieldRegSlot, propertyId, propertyIdIndex, propertyKind);
30793080
IR::RegOpnd * regOpnd;
@@ -3126,11 +3127,11 @@ IRBuilder::BuildProfiledSlotLoad(Js::OpCode loadOp, IR::RegOpnd *dstOpnd, IR::Sy
31263127
instr = IR::JitProfilingInstr::New(loadOp, dstOpnd, srcOpnd, m_func);
31273128
instr->AsJitProfilingInstr()->profileId = profileId;
31283129
}
3129-
else if(this->m_func->GetJnFunction()->HasDynamicProfileInfo())
3130+
else if(this->m_func->HasProfileInfo())
31303131
{
31313132
instr = IR::ProfiledInstr::New(loadOp, dstOpnd, srcOpnd, m_func);
31323133
instr->AsProfiledInstr()->u.FldInfo().valueType =
3133-
this->m_func->GetJnFunction()->GetAnyDynamicProfileInfo()->GetSlotLoad(this->m_func->GetJnFunction(), profileId);
3134+
this->m_func->GetProfileInfo()->GetSlotLoad(profileId);
31343135
*pUnprofiled = instr->AsProfiledInstr()->u.FldInfo().valueType.IsUninitialized();
31353136
#if ENABLE_DEBUG_CONFIG_OPTIONS
31363137
if(Js::Configuration::Global.flags.TestTrace.IsEnabled(Js::DynamicProfilePhase))
@@ -4341,7 +4342,6 @@ IRBuilder::BuildElementScopedC2(Js::OpCode newOpcode, uint32 offset, Js::RegSlot
43414342
{
43424343
IR::Instr * instr = nullptr;
43434344

4344-
Js::FunctionBody * functionBody = this->m_func->GetJnFunction();
43454345
Js::PropertyId propertyId;
43464346
IR::RegOpnd * regOpnd;
43474347
IR::RegOpnd * value2Opnd;
@@ -4353,7 +4353,7 @@ IRBuilder::BuildElementScopedC2(Js::OpCode newOpcode, uint32 offset, Js::RegSlot
43534353
{
43544354
case Js::OpCode::ScopedLdInst:
43554355
{
4356-
propertyId = functionBody->GetReferencedPropertyId(propertyIdIndex);
4356+
propertyId = m_func->GetJITFunctionBody()->GetReferencedPropertyId(propertyIdIndex);
43574357
fieldSymOpnd = this->BuildFieldOpnd(newOpcode, instanceSlot, propertyId, propertyIdIndex, PropertyKindData);
43584358
regOpnd = this->BuildDstOpnd(regSlot);
43594359
value2Opnd = this->BuildDstOpnd(value2Slot);
@@ -4502,8 +4502,7 @@ IRBuilder::BuildElementU(Js::OpCode newOpcode, uint32 offset, Js::RegSlot instan
45024502
IR::Instr * instr;
45034503
IR::RegOpnd * regOpnd;
45044504
IR::SymOpnd * fieldSymOpnd;
4505-
Js::FunctionBody * functionBody = this->m_func->GetJnFunction();
4506-
Js::PropertyId propertyId = functionBody->GetReferencedPropertyId(propertyIdIndex);
4505+
Js::PropertyId propertyId = m_func->GetJITFunctionBody()->GetReferencedPropertyId(propertyIdIndex);
45074506

45084507
switch (newOpcode)
45094508
{
@@ -6861,7 +6860,7 @@ IRBuilder::BuildBrProperty(Js::OpCode newOpcode, uint32 offset)
68616860

68626861
IR::BranchInstr * branchInstr;
68636862
Js::PropertyId propertyId =
6864-
this->m_func->GetJnFunction()->GetReferencedPropertyId(branchInsn->PropertyIdIndex);
6863+
m_func->GetJITFunctionBody()->GetReferencedPropertyId(branchInsn->PropertyIdIndex);
68656864
unsigned int targetOffset = m_jnReader.GetCurrentOffset() + branchInsn->RelativeJumpOffset;
68666865
IR::SymOpnd * fieldSymOpnd = this->BuildFieldOpnd(newOpcode, branchInsn->Instance, propertyId, branchInsn->PropertyIdIndex, PropertyKindData);
68676866

@@ -6897,7 +6896,7 @@ IRBuilder::BuildBrLocalProperty(Js::OpCode newOpcode, uint32 offset)
68976896

68986897
IR::BranchInstr * branchInstr;
68996898
Js::PropertyId propertyId =
6900-
this->m_func->GetJnFunction()->GetReferencedPropertyId(branchInsn->PropertyIdIndex);
6899+
m_func->GetJITFunctionBody()->GetReferencedPropertyId(branchInsn->PropertyIdIndex);
69016900
unsigned int targetOffset = m_jnReader.GetCurrentOffset() + branchInsn->RelativeJumpOffset;
69026901
IR::SymOpnd * fieldSymOpnd = this->BuildFieldOpnd(newOpcode, m_func->GetJITFunctionBody()->GetLocalClosureReg(), propertyId, branchInsn->PropertyIdIndex, PropertyKindData);
69036902

@@ -6923,7 +6922,7 @@ IRBuilder::BuildBrEnvProperty(Js::OpCode newOpcode, uint32 offset)
69236922
this->AddInstr(instr, offset);
69246923

69256924
Js::PropertyId propertyId =
6926-
this->m_func->GetJnFunction()->GetReferencedPropertyId(branchInsn->PropertyIdIndex);
6925+
m_func->GetJITFunctionBody()->GetReferencedPropertyId(branchInsn->PropertyIdIndex);
69276926
unsigned int targetOffset = m_jnReader.GetCurrentOffset() + branchInsn->RelativeJumpOffset;\
69286927
fieldSym = PropertySym::New(regOpnd->m_sym, propertyId, branchInsn->PropertyIdIndex, (uint)-1, PropertyKindData, m_func);
69296928
fieldOpnd = IR::SymOpnd::New(fieldSym, TyVar, m_func);
@@ -7176,9 +7175,9 @@ IRBuilder::InsertInitLoopBodyLoopCounter(uint loopNum)
71767175
{
71777176
Assert(this->IsLoopBody());
71787177

7179-
Js::LoopHeader * loopHeader = this->m_func->GetJnFunction()->GetLoopHeader(loopNum);
7178+
intptr_t loopHeader = this->m_func->GetJITFunctionBody()->GetLoopHeaderAddr(loopNum);
71807179
JsLoopBodyCodeGen* loopBodyCodeGen = (JsLoopBodyCodeGen*)m_func->m_workItem;
7181-
Assert(loopBodyCodeGen->loopHeader == loopHeader); //Init only once
7180+
Assert((intptr_t)loopBodyCodeGen->loopHeader == loopHeader); //Init only once
71827181

71837182
m_loopCounterSym = StackSym::New(TyVar, this->m_func);
71847183

lib/Backend/Inline.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5185,8 +5185,8 @@ Inline::InlineSpread(IR::Instr *spreadCall)
51855185
{
51865186
Assert(Lowerer::IsSpreadCall(spreadCall));
51875187

5188-
if (spreadCall->m_func->GetJnFunction()->IsInlineSpreadDisabled()
5189-
|| this->topFunc->GetJnFunction()->IsInlineSpreadDisabled())
5188+
if (spreadCall->m_func->GetJITFunctionBody()->IsInlineSpreadDisabled()
5189+
|| this->topFunc->GetJITFunctionBody()->IsInlineSpreadDisabled())
51905190
{
51915191
return spreadCall;
51925192
}

lib/Backend/Inline.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ class Inline
9393
IR::PropertySymOpnd* GetMethodLdOpndForCallInstr(IR::Instr* callInstr);
9494
void Simd128FixLoadStoreInstr(Js::BuiltinFunction builtInId, IR::Instr * callInstr);
9595
IR::Instr* InsertInlineeBuiltInStartEndTags(IR::Instr* callInstr, uint actualcount, IR::Instr** builtinStartInstr = nullptr);
96-
bool IsInliningOutSideLoops(){return topFunc->GetJnFunction()->GetHasLoops() && isInLoop == 0; }
96+
bool IsInliningOutSideLoops(){ return topFunc->GetJITFunctionBody()->HasLoops() && isInLoop == 0; }
9797

9898
struct InlineeData
9999
{

lib/Backend/InlineeFrameInfo.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Js::Var BailoutConstantValue::ToVar(Func* func, Js::ScriptContext* scriptContext
5454
}
5555

5656

57-
void InlineeFrameInfo::AllocateRecord(Func* func, Js::FunctionBody* functionBody)
57+
void InlineeFrameInfo::AllocateRecord(Func* func, intptr_t functionBodyAddr)
5858
{
5959
uint constantCount = 0;
6060

@@ -77,7 +77,7 @@ void InlineeFrameInfo::AllocateRecord(Func* func, Js::FunctionBody* functionBody
7777
// update the record
7878
if (!this->record)
7979
{
80-
this->record = InlineeFrameRecord::New(func->GetNativeCodeDataAllocator(), (uint)arguments->Count(), constantCount, functionBody, this);
80+
this->record = InlineeFrameRecord::New(func->GetNativeCodeDataAllocator(), (uint)arguments->Count(), constantCount, functionBodyAddr, this);
8181
}
8282

8383
uint i = 0;

0 commit comments

Comments
 (0)