44// -------------------------------------------------------------------------------------------------------
55#include " Backend.h"
66#include " Core/CRC.h"
7+ #include " NativeEntryPointData.h"
8+ #include " JitTransferData.h"
79
810// /----------------------------------------------------------------------------
911// /
@@ -74,8 +76,8 @@ Encoder::Encode()
7476#endif
7577
7678 m_pc = m_encodeBuffer;
77- m_inlineeFrameMap = Anew (m_tempAlloc, InlineeFrameMap , m_tempAlloc);
78- m_bailoutRecordMap = Anew (m_tempAlloc, BailoutRecordMap , m_tempAlloc);
79+ m_inlineeFrameMap = Anew (m_tempAlloc, ArenaInlineeFrameMap , m_tempAlloc);
80+ m_bailoutRecordMap = Anew (m_tempAlloc, ArenaBailoutRecordMap , m_tempAlloc);
7981
8082 IR ::PragmaInstr* pragmaInstr = nullptr ;
8183 uint32 pragmaOffsetInBuffer = 0 ;
@@ -435,7 +437,7 @@ Encoder::Encode()
435437 else
436438 {
437439 XDataAllocator::Register (&allocation->xdata , m_func->GetJITOutput ()->GetCodeAddress (), (DWORD )m_func->GetJITOutput ()->GetCodeSize ());
438- m_func->GetInProcJITEntryPointInfo ()->SetXDataInfo (&allocation->xdata );
440+ m_func->GetInProcJITEntryPointInfo ()->GetNativeEntryPointData ()-> SetXDataInfo (&allocation->xdata );
439441 }
440442 m_func->GetJITOutput ()->SetCodeAddress (m_func->GetJITOutput ()->GetCodeAddress () | 0x1 ); // Set thumb mode
441443#endif
@@ -447,7 +449,7 @@ Encoder::Encode()
447449 {
448450 if (!m_func->IsOOPJIT ()) // in-proc JIT
449451 {
450- m_func->GetInProcJITEntryPointInfo ()->RecordInlineeFrameMap (m_inlineeFrameMap);
452+ m_func->GetInProcJITEntryPointInfo ()->GetInProcNativeEntryPointData ()-> RecordInlineeFrameMap (m_inlineeFrameMap);
451453 }
452454 else // OOP JIT
453455 {
@@ -472,7 +474,7 @@ Encoder::Encode()
472474
473475 if (this ->m_bailoutRecordMap ->Count () > 0 )
474476 {
475- m_func->GetInProcJITEntryPointInfo ()->RecordBailOutMap (m_bailoutRecordMap);
477+ m_func->GetInProcJITEntryPointInfo ()->GetInProcNativeEntryPointData ()-> RecordBailOutMap (m_bailoutRecordMap);
476478 }
477479
478480 if (this ->m_func ->pinnedTypeRefs != nullptr )
@@ -492,7 +494,6 @@ Encoder::Encode()
492494
493495 pinnedTypeRefs->count = pinnedTypeRefCount;
494496 pinnedTypeRefs->isOOPJIT = true ;
495- this ->m_func ->GetJITOutput ()->GetOutputData ()->pinnedTypeRefs = pinnedTypeRefs;
496497 }
497498 else
498499 {
@@ -515,10 +516,7 @@ Encoder::Encode()
515516 Output::Flush ();
516517 }
517518
518- if (!this ->m_func ->IsOOPJIT ())
519- {
520- m_func->GetInProcJITEntryPointInfo ()->GetJitTransferData ()->SetRuntimeTypeRefs (pinnedTypeRefs);
521- }
519+ this ->m_func ->GetJITOutput ()->GetOutputData ()->pinnedTypeRefs = pinnedTypeRefs;
522520 }
523521
524522 // Save all equivalent type guards in a fixed size array on the JIT transfer data
@@ -642,7 +640,7 @@ Encoder::Encode()
642640
643641 Assert (reinterpret_cast <char *>(dstEntry) <= reinterpret_cast <char *>(typeGuardTransferRecord) + typeGuardTransferSize + sizeof (Js::TypeGuardTransferEntry));
644642
645- m_func->GetInProcJITEntryPointInfo ()->RecordTypeGuards (this ->m_func ->indexedPropertyGuardCount , typeGuardTransferRecord, typeGuardTransferSize);
643+ m_func->GetInProcJITEntryPointInfo ()->GetJitTransferData ()-> RecordTypeGuards (this ->m_func ->indexedPropertyGuardCount , typeGuardTransferRecord, typeGuardTransferSize);
646644 }
647645 else
648646 {
@@ -730,7 +728,7 @@ Encoder::Encode()
730728 }
731729 else
732730 {
733- Assert (m_func->GetInProcJITEntryPointInfo ()->GetConstructorCacheCount () > 0 );
731+ Assert (m_func->GetInProcJITEntryPointInfo ()->GetNativeEntryPointData ()-> GetConstructorCacheCount () > 0 );
734732
735733 size_t ctorCachesTransferSize = // Reserve enough room for:
736734 propertyCount * sizeof (Js::CtorCacheGuardTransferEntry) + // each propertyId,
@@ -763,7 +761,7 @@ Encoder::Encode()
763761
764762 Assert (reinterpret_cast <char *>(dstEntry) <= reinterpret_cast <char *>(ctorCachesTransferRecord) + ctorCachesTransferSize + sizeof (Js::CtorCacheGuardTransferEntry));
765763
766- m_func->GetInProcJITEntryPointInfo ()->RecordCtorCacheGuards (ctorCachesTransferRecord, ctorCachesTransferSize);
764+ m_func->GetInProcJITEntryPointInfo ()->GetJitTransferData ()-> RecordCtorCacheGuards (ctorCachesTransferRecord, ctorCachesTransferSize);
767765 }
768766 }
769767 m_func->GetJITOutput ()->FinalizeNativeCode ();
@@ -1413,7 +1411,7 @@ void Encoder::CopyMaps(OffsetList **m_origInlineeFrameRecords
14131411 )
14141412{
14151413 InlineeFrameRecords *recList = m_inlineeFrameRecords;
1416- InlineeFrameMap *mapList = m_inlineeFrameMap;
1414+ ArenaInlineeFrameMap *mapList = m_inlineeFrameMap;
14171415 PragmaInstrList *pInstrList = m_pragmaInstrToRecordOffset;
14181416
14191417 OffsetList *origRecList, *origMapList, *origPInstrList;
0 commit comments