diff options
author | Ben Gamari <bgamari.foss@gmail.com> | 2017-04-23 10:00:19 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2017-04-23 11:05:48 -0400 |
commit | 1d66f1051933ca3dedbf04da9ce38687dbfd8f05 (patch) | |
tree | ee1fa823055f89de6fdc8775eb1e229b01c20af3 /rts/sm | |
parent | f13eebcc9b1407e5aeaf010536fcb5e469dbfe71 (diff) | |
download | haskell-1d66f1051933ca3dedbf04da9ce38687dbfd8f05.tar.gz |
rts: Fix "ASSERT ("s
Reviewers: austin, erikd, simonmar
Reviewed By: erikd
Subscribers: rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D3486
Diffstat (limited to 'rts/sm')
-rw-r--r-- | rts/sm/CNF.c | 22 | ||||
-rw-r--r-- | rts/sm/CNF.h | 4 | ||||
-rw-r--r-- | rts/sm/Sanity.c | 10 |
3 files changed, 18 insertions, 18 deletions
diff --git a/rts/sm/CNF.c b/rts/sm/CNF.c index ed9460e678..b81fd2b55b 100644 --- a/rts/sm/CNF.c +++ b/rts/sm/CNF.c @@ -203,8 +203,8 @@ compactAllocateBlockInternal(Capability *cap, block = allocGroup(n_blocks); switch (operation) { case ALLOCATE_NEW: - ASSERT (first == NULL); - ASSERT (g == g0); + ASSERT(first == NULL); + ASSERT(g == g0); dbl_link_onto(block, &g0->compact_objects); g->n_compact_blocks += block->blocks; g->n_new_large_words += aligned_size / sizeof(StgWord); @@ -214,8 +214,8 @@ compactAllocateBlockInternal(Capability *cap, dbl_link_onto(block, &g0->compact_blocks_in_import); /* fallthrough */ case ALLOCATE_IMPORT_APPEND: - ASSERT (first == NULL); - ASSERT (g == g0); + ASSERT(first == NULL); + ASSERT(g == g0); g->n_compact_blocks_in_import += block->blocks; g->n_new_large_words += aligned_size / sizeof(StgWord); break; @@ -307,7 +307,7 @@ countCompactBlocks(bdescr *outer) block = (StgCompactNFDataBlock*)(outer->start); do { inner = Bdescr((P_)block); - ASSERT (inner->flags & BF_COMPACT); + ASSERT(inner->flags & BF_COMPACT); count += inner->blocks; block = block->next; @@ -335,7 +335,7 @@ countAllocdCompactBlocks(bdescr *outer) block = (StgCompactNFDataBlock*)(outer->start); do { inner = Bdescr((P_)block); - ASSERT (inner->flags & BF_COMPACT); + ASSERT(inner->flags & BF_COMPACT); count += inner->blocks; // See BlockAlloc.c:countAllocdBlocks() @@ -407,13 +407,13 @@ compactAppendBlock (Capability *cap, block->owner = str; block->next = NULL; - ASSERT (str->last->next == NULL); + ASSERT(str->last->next == NULL); str->last->next = block; str->last = block; bd = Bdescr((P_)block); bd->free = (StgPtr)((W_)block + sizeof(StgCompactNFDataBlock)); - ASSERT (bd->free == (StgPtr)block + sizeofW(StgCompactNFDataBlock)); + ASSERT(bd->free == (StgPtr)block + sizeofW(StgCompactNFDataBlock)); str->totalW += bd->blocks * BLOCK_SIZE_W; @@ -920,7 +920,7 @@ fixup_block(StgCompactNFDataBlock *block, StgWord *fixup_table, uint32_t count) bd = Bdescr((P_)block); p = bd->start + sizeofW(StgCompactNFDataBlock); while (p < bd->free) { - ASSERT (LOOKS_LIKE_CLOSURE_PTR(p)); + ASSERT(LOOKS_LIKE_CLOSURE_PTR(p)); info = get_itbl((StgClosure*)p); switch (info->type) { @@ -1163,8 +1163,8 @@ compactFixupPointers(StgCompactNFData *str, total_blocks = str->totalW / BLOCK_SIZE_W; ACQUIRE_SM_LOCK; - ASSERT (bd->gen == g0); - ASSERT (g0->n_compact_blocks_in_import >= total_blocks); + ASSERT(bd->gen == g0); + ASSERT(g0->n_compact_blocks_in_import >= total_blocks); g0->n_compact_blocks_in_import -= total_blocks; g0->n_compact_blocks += total_blocks; dbl_link_remove(bd, &g0->compact_blocks_in_import); diff --git a/rts/sm/CNF.h b/rts/sm/CNF.h index a01c153213..c4655dc92d 100644 --- a/rts/sm/CNF.h +++ b/rts/sm/CNF.h @@ -48,14 +48,14 @@ INLINE_HEADER StgCompactNFDataBlock *objectGetCompactBlock (StgClosure *closure) object_block = Bdescr((StgPtr)closure); - ASSERT ((object_block->flags & BF_COMPACT) != 0); + ASSERT((object_block->flags & BF_COMPACT) != 0); if (object_block->blocks == 0) head_block = object_block->link; else head_block = object_block; - ASSERT ((head_block->flags & BF_COMPACT) != 0); + ASSERT((head_block->flags & BF_COMPACT) != 0); return (StgCompactNFDataBlock*)(head_block->start); } diff --git a/rts/sm/Sanity.c b/rts/sm/Sanity.c index 625b12ed17..2b91540ec5 100644 --- a/rts/sm/Sanity.c +++ b/rts/sm/Sanity.c @@ -484,22 +484,22 @@ checkCompactObjects(bdescr *bd) StgCompactNFData *str; StgWord totalW; - ASSERT (bd->flags & BF_COMPACT); + ASSERT(bd->flags & BF_COMPACT); block = (StgCompactNFDataBlock*)bd->start; str = block->owner; - ASSERT ((W_)str == (W_)block + sizeof(StgCompactNFDataBlock)); + ASSERT((W_)str == (W_)block + sizeof(StgCompactNFDataBlock)); totalW = 0; for ( ; block ; block = block->next) { last = block; - ASSERT (block->owner == str); + ASSERT(block->owner == str); totalW += Bdescr((P_)block)->blocks * BLOCK_SIZE_W; } - ASSERT (str->totalW == totalW); - ASSERT (str->last == last); + ASSERT(str->totalW == totalW); + ASSERT(str->last == last); } } |