#endif // MEASURE_NODE_SIZE
assert(size >= sz);
- void* mem = comp->compGetMem(size, CMK_ASTNode);
-#ifdef _MSC_VER
- // MSVC assumes that a user defined operator new may return nullptr and inserts
- // a null check before invoking the constructor. This can be avoided using __assume.
- __assume(mem != nullptr);
-#endif
- return mem;
+ return comp->compGetMem(size, CMK_ASTNode);
}
// GenTree constructor
inline void* __cdecl operator new(size_t n, CompAllocator* alloc)
{
- void* mem = alloc->Alloc(n);
-#ifdef _MSC_VER
- // MSVC assumes that a user defined operator new may return nullptr and inserts
- // a null check before invoking the constructor. This can be avoided using __assume.
- __assume(mem != nullptr);
-#endif
- return mem;
+ return alloc->Alloc(n);
}
inline void* __cdecl operator new[](size_t n, CompAllocator* alloc)
{
- void* mem = alloc->Alloc(n);
-#ifdef _MSC_VER
- // MSVC assumes that a user defined operator new may return nullptr and inserts
- // a null check before invoking the constructor. This can be avoided using __assume.
- __assume(mem != nullptr);
-#endif
- return mem;
+ return alloc->Alloc(n);
}
// A CompAllocator wrapper that implements IAllocator and allows zero-length