Skip to content

Commit 283894f

Browse files
committed
Merge branch 'master' into swb
# Conflicts: # lib/Common/Memory/Recycler.h # lib/Common/Memory/Recycler.cpp # lib/Runtime/Library/JavascriptLibrary.h
2 parents 6999edb + e289270 commit 283894f

32 files changed

+15612
-15269
lines changed

lib/Backend/AsmJsJITInfo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ WAsmJs::TypedSlotInfo
1616
AsmJsJITInfo::GetTypedSlotInfo(WAsmJs::Types type) const
1717
{
1818
WAsmJs::TypedSlotInfo info;
19-
if (type < WAsmJs::LIMIT)
19+
if (type >= 0 && type < WAsmJs::LIMIT)
2020
{
2121
info.byteOffset = m_data.typedSlotInfos[type].byteOffset;
2222
info.constCount = m_data.typedSlotInfos[type].constCount;

lib/Backend/Lower.cpp

Lines changed: 29 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3930,7 +3930,7 @@ Lowerer::GenerateProfiledNewScArrayFastPath(IR::Instr *instr, Js::ArrayCallSiteI
39303930
}
39313931
GenerateArrayInfoIsNativeIntArrayTest(instr, arrayInfo, arrayInfoAddr, helperLabel);
39323932
Assert(Js::JavascriptNativeIntArray::GetOffsetOfArrayFlags() + sizeof(uint16) == Js::JavascriptNativeIntArray::GetOffsetOfArrayCallSiteIndex());
3933-
headOpnd = GenerateArrayAlloc<Js::JavascriptNativeIntArray>(instr, &size, arrayInfo, &isZeroed);
3933+
headOpnd = GenerateArrayLiteralsAlloc<Js::JavascriptNativeIntArray>(instr, &size, arrayInfo, &isZeroed);
39343934
const IR::AutoReuseOpnd autoReuseHeadOpnd(headOpnd, func);
39353935

39363936
GenerateMemInit(dstOpnd, Js::JavascriptNativeIntArray::GetOffsetOfWeakFuncRef(), IR::AddrOpnd::New(weakFuncRef, IR::AddrOpndKindDynamicFunctionBodyWeakRef, m_func), instr, isZeroed);
@@ -3948,7 +3948,7 @@ Lowerer::GenerateProfiledNewScArrayFastPath(IR::Instr *instr, Js::ArrayCallSiteI
39483948
}
39493949
GenerateArrayInfoIsNativeFloatAndNotIntArrayTest(instr, arrayInfo, arrayInfoAddr, helperLabel);
39503950
Assert(Js::JavascriptNativeFloatArray::GetOffsetOfArrayFlags() + sizeof(uint16) == Js::JavascriptNativeFloatArray::GetOffsetOfArrayCallSiteIndex());
3951-
headOpnd = GenerateArrayAlloc<Js::JavascriptNativeFloatArray>(instr, &size, arrayInfo, &isZeroed);
3951+
headOpnd = GenerateArrayLiteralsAlloc<Js::JavascriptNativeFloatArray>(instr, &size, arrayInfo, &isZeroed);
39523952
const IR::AutoReuseOpnd autoReuseHeadOpnd(headOpnd, func);
39533953

39543954
GenerateMemInit(dstOpnd, Js::JavascriptNativeFloatArray::GetOffsetOfWeakFuncRef(), IR::AddrOpnd::New(weakFuncRef, IR::AddrOpndKindDynamicFunctionBodyWeakRef, m_func), instr, isZeroed);
@@ -3971,7 +3971,7 @@ Lowerer::GenerateProfiledNewScArrayFastPath(IR::Instr *instr, Js::ArrayCallSiteI
39713971
return;
39723972
}
39733973
uint const offsetStart = sizeof(Js::SparseArraySegmentBase);
3974-
headOpnd = GenerateArrayAlloc<Js::JavascriptArray>(instr, &size, arrayInfo, &isZeroed);
3974+
headOpnd = GenerateArrayLiteralsAlloc<Js::JavascriptArray>(instr, &size, arrayInfo, &isZeroed);
39753975
const IR::AutoReuseOpnd autoReuseHeadOpnd(headOpnd, func);
39763976
for (; i < size; i++)
39773977
{
@@ -4026,7 +4026,22 @@ IR::JnHelperMethod GetArrayAllocMemHelper<Js::JavascriptNativeFloatArray>()
40264026

40274027
template <typename ArrayType>
40284028
IR::RegOpnd *
4029-
Lowerer::GenerateArrayAlloc(IR::Instr *instr, uint32 * psize, Js::ArrayCallSiteInfo * arrayInfo, bool * pIsHeadSegmentZeroed, bool isArrayObjCtor /* = false */)
4029+
Lowerer::GenerateArrayLiteralsAlloc(IR::Instr *instr, uint32 * psize, Js::ArrayCallSiteInfo * arrayInfo, bool * pIsHeadSegmentZeroed)
4030+
{
4031+
return GenerateArrayAllocHelper<ArrayType>(instr, psize, arrayInfo, pIsHeadSegmentZeroed, false /* isArrayObjCtor */, false /* isNoArgs */);
4032+
}
4033+
4034+
template <typename ArrayType>
4035+
IR::RegOpnd *
4036+
Lowerer::GenerateArrayObjectsAlloc(IR::Instr *instr, uint32 * psize, Js::ArrayCallSiteInfo * arrayInfo, bool * pIsHeadSegmentZeroed, bool isNoArgs)
4037+
{
4038+
return GenerateArrayAllocHelper<ArrayType>(instr, psize, arrayInfo, pIsHeadSegmentZeroed, true /* isArrayObjCtor */, isNoArgs);
4039+
}
4040+
4041+
4042+
template <typename ArrayType>
4043+
IR::RegOpnd *
4044+
Lowerer::GenerateArrayAllocHelper(IR::Instr *instr, uint32 * psize, Js::ArrayCallSiteInfo * arrayInfo, bool * pIsHeadSegmentZeroed, bool isArrayObjCtor, bool isNoArgs)
40304045
{
40314046
Func * func = this->m_func;
40324047
IR::RegOpnd * dstOpnd = instr->GetDst()->AsRegOpnd();
@@ -4045,7 +4060,8 @@ Lowerer::GenerateArrayAlloc(IR::Instr *instr, uint32 * psize, Js::ArrayCallSiteI
40454060
{
40464061
if (isArrayObjCtor)
40474062
{
4048-
arrayAllocSize = Js::JavascriptArray::DetermineAllocationSizeForArrayObjects<ArrayType, 0>(count, nullptr, &alignedHeadSegmentSize);
4063+
uint32 allocCount = isNoArgs ? Js::SparseArraySegmentBase::SMALL_CHUNK_SIZE : count;
4064+
arrayAllocSize = Js::JavascriptArray::DetermineAllocationSizeForArrayObjects<ArrayType, 0>(allocCount, nullptr, &alignedHeadSegmentSize);
40494065
}
40504066
else
40514067
{
@@ -4234,7 +4250,7 @@ Lowerer::GenerateArrayAlloc(IR::Instr *instr, IR::Opnd * arrayLenOpnd, Js::Array
42344250

42354251

42364252
void
4237-
Lowerer::GenerateProfiledNewScObjArrayFastPath(IR::Instr *instr, Js::ArrayCallSiteInfo * arrayInfo, intptr_t arrayInfoAddr, intptr_t weakFuncRef, uint32 length, IR::LabelInstr* labelDone)
4253+
Lowerer::GenerateProfiledNewScObjArrayFastPath(IR::Instr *instr, Js::ArrayCallSiteInfo * arrayInfo, intptr_t arrayInfoAddr, intptr_t weakFuncRef, uint32 length, IR::LabelInstr* labelDone, bool isNoArgs)
42384254
{
42394255
if (PHASE_OFF(Js::ArrayCtorFastPathPhase, m_func))
42404256
{
@@ -4252,7 +4268,7 @@ Lowerer::GenerateProfiledNewScObjArrayFastPath(IR::Instr *instr, Js::ArrayCallSi
42524268
{
42534269
GenerateArrayInfoIsNativeIntArrayTest(instr, arrayInfo, arrayInfoAddr, helperLabel);
42544270
Assert(Js::JavascriptNativeIntArray::GetOffsetOfArrayFlags() + sizeof(uint16) == Js::JavascriptNativeIntArray::GetOffsetOfArrayCallSiteIndex());
4255-
headOpnd = GenerateArrayAlloc<Js::JavascriptNativeIntArray>(instr, &size, arrayInfo, &isZeroed, true);
4271+
headOpnd = GenerateArrayObjectsAlloc<Js::JavascriptNativeIntArray>(instr, &size, arrayInfo, &isZeroed, isNoArgs);
42564272

42574273
GenerateMemInit(dstOpnd, Js::JavascriptNativeIntArray::GetOffsetOfArrayCallSiteIndex(), IR::IntConstOpnd::New(profileId, TyUint16, func, true), instr, isZeroed);
42584274
GenerateMemInit(dstOpnd, Js::JavascriptNativeIntArray::GetOffsetOfWeakFuncRef(), IR::AddrOpnd::New(weakFuncRef, IR::AddrOpndKindDynamicFunctionBodyWeakRef, m_func), instr, isZeroed);
@@ -4266,7 +4282,7 @@ Lowerer::GenerateProfiledNewScObjArrayFastPath(IR::Instr *instr, Js::ArrayCallSi
42664282
{
42674283
GenerateArrayInfoIsNativeFloatAndNotIntArrayTest(instr, arrayInfo, arrayInfoAddr, helperLabel);
42684284
Assert(Js::JavascriptNativeFloatArray::GetOffsetOfArrayFlags() + sizeof(uint16) == Js::JavascriptNativeFloatArray::GetOffsetOfArrayCallSiteIndex());
4269-
headOpnd = GenerateArrayAlloc<Js::JavascriptNativeFloatArray>(instr, &size, arrayInfo, &isZeroed, true);
4285+
headOpnd = GenerateArrayObjectsAlloc<Js::JavascriptNativeFloatArray>(instr, &size, arrayInfo, &isZeroed, isNoArgs);
42704286

42714287
GenerateMemInit(dstOpnd, Js::JavascriptNativeFloatArray::GetOffsetOfArrayCallSiteIndex(), IR::IntConstOpnd::New(profileId, TyUint16, func, true), instr, isZeroed);
42724288
GenerateMemInit(dstOpnd, Js::JavascriptNativeFloatArray::GetOffsetOfWeakFuncRef(), IR::AddrOpnd::New(weakFuncRef, IR::AddrOpndKindDynamicFunctionBodyWeakRef, m_func), instr, isZeroed);
@@ -4285,7 +4301,7 @@ Lowerer::GenerateProfiledNewScObjArrayFastPath(IR::Instr *instr, Js::ArrayCallSi
42854301
else
42864302
{
42874303
uint const offsetStart = sizeof(Js::SparseArraySegmentBase);
4288-
headOpnd = GenerateArrayAlloc<Js::JavascriptArray>(instr, &size, arrayInfo, &isZeroed, true);
4304+
headOpnd = GenerateArrayObjectsAlloc<Js::JavascriptArray>(instr, &size, arrayInfo, &isZeroed, isNoArgs);
42894305
for (uint i = 0; i < size; i++)
42904306
{
42914307
GenerateMemInit(
@@ -4436,7 +4452,7 @@ Lowerer::GenerateProfiledNewScIntArrayFastPath(IR::Instr *instr, Js::ArrayCallSi
44364452
bool isHeadSegmentZeroed;
44374453
IR::RegOpnd * dstOpnd = instr->GetDst()->AsRegOpnd();
44384454
Assert(Js::JavascriptNativeIntArray::GetOffsetOfArrayFlags() + sizeof(uint16) == Js::JavascriptNativeIntArray::GetOffsetOfArrayCallSiteIndex());
4439-
IR::RegOpnd * headOpnd = GenerateArrayAlloc<Js::JavascriptNativeIntArray>(instr, &size, arrayInfo, &isHeadSegmentZeroed);
4455+
IR::RegOpnd * headOpnd = GenerateArrayLiteralsAlloc<Js::JavascriptNativeIntArray>(instr, &size, arrayInfo, &isHeadSegmentZeroed);
44404456
const IR::AutoReuseOpnd autoReuseHeadOpnd(headOpnd, func);
44414457

44424458
GenerateMemInit(dstOpnd, Js::JavascriptNativeIntArray::GetOffsetOfWeakFuncRef(), IR::AddrOpnd::New(weakFuncRef, IR::AddrOpndKindDynamicMisc, m_func), instr, isHeadSegmentZeroed);
@@ -4508,7 +4524,7 @@ Lowerer::GenerateProfiledNewScFloatArrayFastPath(IR::Instr *instr, Js::ArrayCall
45084524
bool isHeadSegmentZeroed;
45094525
IR::RegOpnd * dstOpnd = instr->GetDst()->AsRegOpnd();
45104526
Assert(Js::JavascriptNativeFloatArray::GetOffsetOfArrayFlags() + sizeof(uint16) == Js::JavascriptNativeFloatArray::GetOffsetOfArrayCallSiteIndex());
4511-
IR::RegOpnd * headOpnd = GenerateArrayAlloc<Js::JavascriptNativeFloatArray>(instr, &size, arrayInfo, &isHeadSegmentZeroed);
4527+
IR::RegOpnd * headOpnd = GenerateArrayLiteralsAlloc<Js::JavascriptNativeFloatArray>(instr, &size, arrayInfo, &isHeadSegmentZeroed);
45124528
const IR::AutoReuseOpnd autoReuseHeadOpnd(headOpnd, func);
45134529

45144530
GenerateMemInit(dstOpnd, Js::JavascriptNativeFloatArray::GetOffsetOfWeakFuncRef(), IR::AddrOpnd::New(weakFuncRef, IR::AddrOpndKindDynamicFunctionBodyWeakRef, m_func), instr, isHeadSegmentZeroed);
@@ -5507,7 +5523,7 @@ Lowerer::LowerNewScObjArray(IR::Instr *newObjInstr)
55075523
int32 length = linkSym->GetIntConstValue();
55085524
if (length >= 0 && length <= upperBoundValue)
55095525
{
5510-
GenerateProfiledNewScObjArrayFastPath(newObjInstr, arrayInfo, arrayInfoAddr, weakFuncRef, (uint32)length, labelDone);
5526+
GenerateProfiledNewScObjArrayFastPath(newObjInstr, arrayInfo, arrayInfoAddr, weakFuncRef, (uint32)length, labelDone, false);
55115527
}
55125528
else
55135529
{
@@ -5625,7 +5641,7 @@ Lowerer::LowerNewScObjArrayNoArg(IR::Instr *newObjInstr)
56255641
}
56265642

56275643
IR::LabelInstr *labelDone = IR::LabelInstr::New(Js::OpCode::Label, func);
5628-
GenerateProfiledNewScObjArrayFastPath(newObjInstr, arrayInfo, arrayInfoAddr, weakFuncRef, 0, labelDone);
5644+
GenerateProfiledNewScObjArrayFastPath(newObjInstr, arrayInfo, arrayInfoAddr, weakFuncRef, 0, labelDone, true);
56295645
newObjInstr->InsertAfter(labelDone);
56305646

56315647
m_lowererMD.LoadHelperArgument(newObjInstr, IR::AddrOpnd::New(weakFuncRef, IR::AddrOpndKindDynamicFunctionBodyWeakRef, func));

lib/Backend/Lower.h

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -529,11 +529,16 @@ class Lowerer
529529
void GenerateRecyclerAlloc(IR::JnHelperMethod allocHelper, size_t allocSize, IR::RegOpnd* newObjDst, IR::Instr* insertionPointInstr, bool inOpHelper = false);
530530

531531
template <typename ArrayType>
532-
IR::RegOpnd * GenerateArrayAlloc(IR::Instr *instr, uint32 * psize, Js::ArrayCallSiteInfo * arrayInfo, bool * pIsHeadSegmentZeroed, bool isArrayObjCtor = false);
532+
IR::RegOpnd * GenerateArrayAllocHelper(IR::Instr *instr, uint32 * psize, Js::ArrayCallSiteInfo * arrayInfo, bool * pIsHeadSegmentZeroed, bool isArrayObjCtor, bool isNoArgs);
533+
template <typename ArrayType>
534+
IR::RegOpnd * GenerateArrayLiteralsAlloc(IR::Instr *instr, uint32 * psize, Js::ArrayCallSiteInfo * arrayInfo, bool * pIsHeadSegmentZeroed);
535+
template <typename ArrayType>
536+
IR::RegOpnd * GenerateArrayObjectsAlloc(IR::Instr *instr, uint32 * psize, Js::ArrayCallSiteInfo * arrayInfo, bool * pIsHeadSegmentZeroed, bool isNoArgs);
537+
533538
template <typename ArrayType>
534539
IR::RegOpnd * GenerateArrayAlloc(IR::Instr *instr, IR::Opnd * sizeOpnd, Js::ArrayCallSiteInfo * arrayInfo);
535540

536-
void GenerateProfiledNewScObjArrayFastPath(IR::Instr *instr, Js::ArrayCallSiteInfo * arrayInfo, intptr_t arrayInfoAddr, intptr_t weakFuncRef, uint32 length, IR::LabelInstr* labelDone);
541+
void GenerateProfiledNewScObjArrayFastPath(IR::Instr *instr, Js::ArrayCallSiteInfo * arrayInfo, intptr_t arrayInfoAddr, intptr_t weakFuncRef, uint32 length, IR::LabelInstr* labelDone, bool isNoArgs);
537542

538543
template <typename ArrayType>
539544
void GenerateProfiledNewScObjArrayFastPath(IR::Instr *instr, Js::ArrayCallSiteInfo * arrayInfo, intptr_t arrayInfoAddr, intptr_t weakFuncRef, IR::LabelInstr* helperLabel, IR::LabelInstr* labelDone, IR::Opnd* lengthOpnd, uint32 offsetOfCallSiteIndex, uint32 offsetOfWeakFuncRef);

lib/Common/Memory/Recycler.cpp

Lines changed: 15 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -729,9 +729,9 @@ Recycler::RootRelease(void* obj, uint *count)
729729
RECYCLER_PERF_COUNTER_DEC(PinnedObject);
730730
}
731731

732-
// Not a real collection. This doesn't activate GC.
733-
// This tell the GC that we have an exhaustive candidate, and should trigger
734-
// another GC if there is an exhaustive GC going on.
732+
// Any time a root is removed during a GC, it indicates that an exhaustive
733+
// collection is likely going to have work to do so trigger an exhaustive
734+
// candidate GC to indicate this fact
735735
this->CollectNow<CollectExhaustiveCandidate>();
736736
}
737737
#if DBG && GLOBAL_ENABLE_WRITE_BARRIER
@@ -4208,7 +4208,7 @@ Recycler::BackgroundRescan(RescanFlags rescanFlags)
42084208

42094209
GCETW(GC_BACKGROUNDRESCAN_START, (this, backgroundRescanCount));
42104210
RECYCLER_PROFILE_EXEC_BACKGROUND_BEGIN(this, Js::BackgroundRescanPhase);
4211-
4211+
42124212
#if GLOBAL_ENABLE_WRITE_BARRIER
42134213
if (CONFIG_FLAG(ForceSoftwareWriteBarrier))
42144214
{
@@ -6133,24 +6133,6 @@ Recycler::SetExternalRootMarker(ExternalRootMarker fn, void * context)
61336133
externalRootMarker = fn;
61346134
externalRootMarkerContext = context;
61356135
}
6136-
// TODO: (leish) remove following function? seems not make sense to re-allocate in recycler
6137-
ArenaData **
6138-
Recycler::RegisterExternalGuestArena(ArenaData* guestArena)
6139-
{
6140-
return externalGuestArenaList.PrependNode(&NoThrowHeapAllocator::Instance, guestArena);
6141-
}
6142-
6143-
void
6144-
Recycler::UnregisterExternalGuestArena(ArenaData* guestArena)
6145-
{
6146-
externalGuestArenaList.Remove(&NoThrowHeapAllocator::Instance, guestArena);
6147-
}
6148-
6149-
void
6150-
Recycler::UnregisterExternalGuestArena(ArenaData** guestArena)
6151-
{
6152-
externalGuestArenaList.RemoveElement(&NoThrowHeapAllocator::Instance, guestArena);
6153-
}
61546136

61556137
void
61566138
Recycler::SetCollectionWrapper(RecyclerCollectionWrapper * wrapper)
@@ -6163,6 +6145,7 @@ Recycler::SetCollectionWrapper(RecyclerCollectionWrapper * wrapper)
61636145
#endif
61646146
}
61656147

6148+
// TODO: (leish) remove following function? seems not make sense to re-allocate in recycler
61666149
char *
61676150
Recycler::Realloc(void* buffer, DECLSPEC_GUARD_OVERFLOW size_t existingBytes, DECLSPEC_GUARD_OVERFLOW size_t requestedBytes, bool truncate)
61686151
{
@@ -7609,7 +7592,7 @@ Recycler::TrackAllocCore(void * object, size_t size, const TrackAllocData& track
76097592
isArray = false;
76107593
allocCount = 1;
76117594
}
7612-
7595+
76137596
if (!trackerDictionary->TryGetValue(typeInfo, &item))
76147597
{
76157598
#ifdef STACK_BACK_TRACE
@@ -8051,6 +8034,11 @@ Recycler::DeleteGuestArena(ArenaAllocator * arenaAllocator)
80518034
{
80528035
guestArenaList.RemoveElement(&HeapAllocator::Instance, guestArenaAllocator);
80538036
}
8037+
8038+
// Any time a root is removed during a GC, it indicates that an exhaustive
8039+
// collection is likely going to have work to do so trigger an exhaustive
8040+
// candidate GC to indicate this fact
8041+
this->CollectNow<CollectExhaustiveCandidate>();
80548042
}
80558043

80568044
#ifdef LEAK_REPORT
@@ -8536,7 +8524,7 @@ Recycler::NotifyFree(__in char *address, size_t size)
85368524
}
85378525

85388526
#if GLOBAL_ENABLE_WRITE_BARRIER
8539-
void
8527+
void
85408528
Recycler::RegisterPendingWriteBarrierBlock(void* address, size_t bytes)
85418529
{
85428530
if (CONFIG_FLAG(ForceSoftwareWriteBarrier))
@@ -8545,7 +8533,7 @@ Recycler::RegisterPendingWriteBarrierBlock(void* address, size_t bytes)
85458533
pendingWriteBarrierBlockMap.Item(address, bytes);
85468534
}
85478535
}
8548-
void
8536+
void
85498537
Recycler::UnRegisterPendingWriteBarrierBlock(void* address)
85508538
{
85518539
if (CONFIG_FLAG(ForceSoftwareWriteBarrier))
@@ -8556,7 +8544,7 @@ Recycler::UnRegisterPendingWriteBarrierBlock(void* address)
85568544
#endif
85578545

85588546
#if DBG && GLOBAL_ENABLE_WRITE_BARRIER
8559-
void
8547+
void
85608548
Recycler::WBSetBit(char* addr)
85618549
{
85628550
Recycler* recycler = Recycler::recyclerList;
@@ -8585,7 +8573,7 @@ Recycler::WBSetBits(char* addr, uint length)
85858573
recycler = recycler->next;
85868574
}
85878575
}
8588-
bool
8576+
bool
85898577
Recycler::WBCheckIsRecyclerAddress(char* addr)
85908578
{
85918579
Recycler* recycler = Recycler::recyclerList;

lib/Common/Memory/Recycler.h

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1148,9 +1148,29 @@ class Recycler
11481148
void SetExternalRootMarker(ExternalRootMarker fn, void * context);
11491149
ArenaAllocator * CreateGuestArena(char16 const * name, void (*outOfMemoryFunc)());
11501150
void DeleteGuestArena(ArenaAllocator * arenaAllocator);
1151-
ArenaData ** RegisterExternalGuestArena(ArenaData* guestArena);
1152-
void UnregisterExternalGuestArena(ArenaData* guestArena);
1153-
void UnregisterExternalGuestArena(ArenaData** guestArena);
1151+
ArenaData ** RegisterExternalGuestArena(ArenaData* guestArena)
1152+
{
1153+
return externalGuestArenaList.PrependNode(&NoThrowHeapAllocator::Instance, guestArena);
1154+
}
1155+
void UnregisterExternalGuestArena(ArenaData* guestArena)
1156+
{
1157+
externalGuestArenaList.Remove(&NoThrowHeapAllocator::Instance, guestArena);
1158+
1159+
// Any time a root is removed during a GC, it indicates that an exhaustive
1160+
// collection is likely going to have work to do so trigger an exhaustive
1161+
// candidate GC to indicate this fact
1162+
this->CollectNow<CollectExhaustiveCandidate>();
1163+
}
1164+
1165+
void UnregisterExternalGuestArena(ArenaData** guestArena)
1166+
{
1167+
externalGuestArenaList.RemoveElement(&NoThrowHeapAllocator::Instance, guestArena);
1168+
1169+
// Any time a root is removed during a GC, it indicates that an exhaustive
1170+
// collection is likely going to have work to do so trigger an exhaustive
1171+
// candidate GC to indicate this fact
1172+
this->CollectNow<CollectExhaustiveCandidate>();
1173+
}
11541174

11551175
#ifdef RECYCLER_TEST_SUPPORT
11561176
void SetCheckFn(BOOL(*checkFn)(char* addr, size_t size));

lib/Parser/ParserCommon.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ enum ErrorTypeEnum
2727
kjstURIError,
2828
kjstWebAssemblyCompileError,
2929
kjstWebAssemblyRuntimeError,
30+
kjstWebAssemblyLinkError,
3031
kjstCustomError,
3132
#ifdef ENABLE_PROJECTION
3233
kjstWinRTError,

0 commit comments

Comments
 (0)