Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 5 additions & 12 deletions lib/Common/DataStructures/SparseBitVector.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@
//-------------------------------------------------------------------------------------------------------
#pragma once

#if defined(_M_ARM64) || defined(_M_X64)
typedef BVUnit32 SparseBVUnit;
#else
typedef BVUnit64 SparseBVUnit;
#endif

#define FOREACH_BITSET_IN_SPARSEBV(index, bv) \
{ \
Expand Down Expand Up @@ -64,15 +60,8 @@ typedef BVUnit64 SparseBVUnit;
struct BVSparseNode
{
BVIndex startIndex;
#if defined(_M_ARM64) || defined(_M_X64)
//64-bit: the order is changed to make sure it fits in 16 bytes
SparseBVUnit data;
BVSparseNode * next;
#else //_M_IX86 and _M_ARM32
BVSparseNode * next;
SparseBVUnit data;
#endif


BVSparseNode(BVIndex beginIndex, BVSparseNode * nextNode);

Expand All @@ -91,7 +80,11 @@ struct BVSparseNode
#endif
};

CompileAssert(sizeof(BVSparseNode) == 16); // Performance assert, BVSparseNode is heavily used in the backend, do perf measurement before changing this.
#if defined(_M_X64)
CompileAssert(sizeof(BVSparseNode) == 24); // Performance assert, BVSparseNode is heavily used in the backend, do perf measurement before changing this.
#else
CompileAssert(sizeof(BVSparseNode) == 16);
#endif

template <class TAllocator>
class BVSparse
Expand Down
1 change: 0 additions & 1 deletion lib/Common/Memory/ArenaAllocator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@ ArenaAllocatorBase<TFreeListPolicy, ObjectAlignmentBitShiftArg, RequireObjectAli
RealAllocInlined(size_t nbytes)
{
Assert(nbytes != 0);
Assert((nbytes & (ObjectAlignment - 1)) == 0);

#ifdef ARENA_MEMORY_VERIFY
if (Js::Configuration::Global.flags.ArenaUseHeapAlloc)
Expand Down
1 change: 0 additions & 1 deletion lib/Common/Memory/ArenaAllocator.h
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,6 @@ class JitArenaAllocator : public ArenaAllocator
// Fast path
if (sizeof(BVSparseNode) == requestedBytes)
{
AssertMsg(Math::Align(requestedBytes, ArenaAllocatorBase::ObjectAlignment) == requestedBytes, "Assert for Perf, T should always be aligned");
// Fast path for BVSparseNode allocation
if (bvFreeList)
{
Expand Down