Fix some build breaks seen with the older VS we use to build with on desktop. (#18736)
authorAndy Ayers <andya@microsoft.com>
Sun, 1 Jul 2018 22:43:16 +0000 (15:43 -0700)
committerGitHub <noreply@github.com>
Sun, 1 Jul 2018 22:43:16 +0000 (15:43 -0700)
src/jit/alloc.cpp
src/jit/disasm.cpp

index 8f1e0cc..d2c58e6 100644 (file)
@@ -110,7 +110,7 @@ public:
     }
 };
 
-ArenaAllocator::SinglePagePool ArenaAllocator::s_pagePool;
+ArenaAllocator::SinglePagePool ArenaAllocator::s_pagePool = {};
 
 //------------------------------------------------------------------------
 // ArenaAllocator::bypassHostAllocator:
@@ -200,7 +200,6 @@ void* ArenaAllocator::allocateNewPage(size_t size)
     if (pageSize < size)
     {
         NOMEM();
-        return nullptr;
     }
 
     // If the current page is now full, update a few statistics
@@ -247,7 +246,6 @@ void* ArenaAllocator::allocateNewPage(size_t size)
         if (newPage == nullptr)
         {
             NOMEM();
-            return nullptr;
         }
 
         if (tryPoolNewPage)
index e76d5b3..99b71ac 100644 (file)
@@ -864,7 +864,6 @@ AddrToMethodHandleMap* DisAssembler::GetAddrToMethodHandleMap()
 {
     if (disAddrToMethodHandleMap == nullptr)
     {
-        assert(disComp->getAllocator() != nullptr);
         disAddrToMethodHandleMap = new (disComp->getAllocator()) AddrToMethodHandleMap(disComp->getAllocator());
     }
     return disAddrToMethodHandleMap;
@@ -877,7 +876,6 @@ AddrToMethodHandleMap* DisAssembler::GetHelperAddrToMethodHandleMap()
 {
     if (disHelperAddrToMethodHandleMap == nullptr)
     {
-        assert(disComp->getAllocator() != nullptr);
         disHelperAddrToMethodHandleMap = new (disComp->getAllocator()) AddrToMethodHandleMap(disComp->getAllocator());
     }
     return disHelperAddrToMethodHandleMap;
@@ -890,7 +888,6 @@ AddrToAddrMap* DisAssembler::GetRelocationMap()
 {
     if (disRelocationMap == nullptr)
     {
-        assert(disComp->getAllocator() != nullptr);
         disRelocationMap = new (disComp->getAllocator()) AddrToAddrMap(disComp->getAllocator());
     }
     return disRelocationMap;