فهرست منبع

swb: misc fixes to build chakra full

Jianchun Xu 9 سال پیش
والد
کامیت
99c6eee4df
4فایلهای تغییر یافته به همراه11 افزوده شده و 4 حذف شده
  1. 1 1
      lib/Common/DataStructures/List.h
  2. 5 0
      lib/Common/Memory/PageAllocator.h
  3. 4 2
      lib/Parser/pnodediff.h
  4. 1 1
      lib/Runtime/Base/FunctionBody.h

+ 1 - 1
lib/Common/DataStructures/List.h

@@ -507,7 +507,7 @@ namespace JsUtil
         template<class DebugSite, class TMapFunction>
         HRESULT Map(DebugSite site, TMapFunction map) const // external debugging version
         {
-            return Js::Map(site, this->buffer, this->count, map);
+            return Js::Map(site, PointerValue(this->buffer), this->count, map);
         }
 
         template<class TMapFunction>

+ 5 - 0
lib/Common/Memory/PageAllocator.h

@@ -731,7 +731,9 @@ protected:
 
     template <bool notPageAligned>
     char * TryAllocFreePages(DECLSPEC_GUARD_OVERFLOW uint pageCount, PageSegmentBase<TVirtualAlloc> ** pageSegment);
+#if ENABLE_BACKGROUND_PAGE_FREEING
     char * TryAllocFromZeroPagesList(DECLSPEC_GUARD_OVERFLOW uint pageCount, PageSegmentBase<TVirtualAlloc> ** pageSegment, BackgroundPageQueue* bgPageQueue, bool isPendingZeroList);
+#endif
     char * TryAllocFromZeroPages(DECLSPEC_GUARD_OVERFLOW uint pageCount, PageSegmentBase<TVirtualAlloc> ** pageSegment);
 
     template <bool notPageAligned>
@@ -767,7 +769,10 @@ protected:
     bool QueueZeroPages() const { return queueZeroPages; }
 #endif
 
+#if ENABLE_BACKGROUND_PAGE_FREEING
     FreePageEntry * PopPendingZeroPage();
+#endif
+
 #if DBG
     void Check();
     bool disableThreadAccessCheck;

+ 4 - 2
lib/Parser/pnodediff.h

@@ -793,7 +793,8 @@ private:
             }
         }
 
-        static void SetMatched(PNode& node)
+        template <class P>
+        static void SetMatched(P& node)
         {
             SetNext(node, 0);
         }
@@ -803,7 +804,8 @@ private:
             return !!(reinterpret_cast<UINT_PTR>(node) & 1);
         }
 
-        static void SetNext(PNode& node, int next)
+        template <class P>
+        static void SetNext(P& node, int next)
         {
             UINT_PTR value = (static_cast<UINT_PTR>(next) << 1) | 1;
             node = reinterpret_cast<PNode>(value);

+ 1 - 1
lib/Runtime/Base/FunctionBody.h

@@ -1259,7 +1259,7 @@ namespace Js
         template <class DebugSite, class Fn>
         HRESULT MapEntryPoints(DebugSite site, Fn fn) const // external debugging version
         {
-            return Map(site, this->entryPoints, [&](int index, LoopEntryPointInfo * entryPoint)
+            return Map(site, PointerValue(this->entryPoints), [&](int index, LoopEntryPointInfo * entryPoint)
             {
                 if (entryPoint != nullptr)
                 {