Skip to content

Commit c89ab41

Browse files
committed
Assert for rejitCounter
1 parent c50a992 commit c89ab41

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/Backend/Func.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,8 +303,10 @@ Func::Codegen(JitArenaAllocator *alloc, JITTimeWorkItem * workItem,
303303
Js::ScriptContextProfiler *const codeGenProfiler, const bool isBackgroundJIT)
304304
{
305305
bool rejit;
306+
int rejitCounter = 0;
306307
do
307308
{
309+
Assert(rejitCounter < 25);
308310
Func func(alloc, workItem, threadContextInfo,
309311
scriptContextInfo, outputData, epInfo, runtimeInfo,
310312
polymorphicInlineCacheInfo, codeGenAllocators,
@@ -364,6 +366,7 @@ Func::Codegen(JitArenaAllocator *alloc, JITTimeWorkItem * workItem,
364366
}
365367

366368
rejit = true;
369+
rejitCounter++;
367370
}
368371
// Either the entry point has a reference to the number now, or we failed to code gen and we
369372
// don't need to numbers, we can flush the completed page now.

0 commit comments

Comments
 (0)