diff options
author | Siddhanathan Shanmugam <siddhanathan@gmail.com> | 2015-09-11 16:10:41 -0500 |
---|---|---|
committer | Austin Seipp <austin@well-typed.com> | 2015-09-11 18:33:32 -0500 |
commit | 7ad4b3c1419fefbb01fd4643f374150abd1d11e2 (patch) | |
tree | 46fed56f87cfd2b32ce5ec2537b04be95cbbda23 /rts | |
parent | 4275028c744ef8ee6bbc26c3a301ef2e3e8708a0 (diff) | |
download | haskell-7ad4b3c1419fefbb01fd4643f374150abd1d11e2.tar.gz |
s/StgArrWords/StgArrBytes/
Rename StgArrWords to StgArrBytes (see Trac #8552)
Reviewed By: austin
Differential Revision: https://phabricator.haskell.org/D1233
GHC Trac Issues: #8552
Diffstat (limited to 'rts')
-rw-r--r-- | rts/Adjustor.c | 6 | ||||
-rw-r--r-- | rts/CheckUnload.c | 2 | ||||
-rw-r--r-- | rts/Disassembler.c | 2 | ||||
-rw-r--r-- | rts/Interpreter.c | 4 | ||||
-rw-r--r-- | rts/PrimOps.cmm | 42 | ||||
-rw-r--r-- | rts/Printer.c | 4 | ||||
-rw-r--r-- | rts/ProfHeap.c | 2 | ||||
-rw-r--r-- | rts/sm/Compact.c | 2 | ||||
-rw-r--r-- | rts/sm/Evac.c | 2 | ||||
-rw-r--r-- | rts/sm/Sanity.c | 2 | ||||
-rw-r--r-- | rts/sm/Scav.c | 2 |
11 files changed, 35 insertions, 35 deletions
diff --git a/rts/Adjustor.c b/rts/Adjustor.c index 83d5a73cf5..ca157661e8 100644 --- a/rts/Adjustor.c +++ b/rts/Adjustor.c @@ -250,15 +250,15 @@ typedef struct _IA64FunDesc { static void * stgAllocStable(size_t size_in_bytes, StgStablePtr *stable) { - StgArrWords* arr; + StgArrBytes* arr; nat data_size_in_words, total_size_in_words; /* round up to a whole number of words */ data_size_in_words = ROUNDUP_BYTES_TO_WDS(size_in_bytes); - total_size_in_words = sizeofW(StgArrWords) + data_size_in_words; + total_size_in_words = sizeofW(StgArrBytes) + data_size_in_words; /* allocate and fill it in */ - arr = (StgArrWords *)allocate(total_size_in_words); + arr = (StgArrBytes *)allocate(total_size_in_words); SET_ARR_HDR(arr, &stg_ARR_WORDS_info, CCCS, size_in_bytes); /* obtain a stable ptr */ diff --git a/rts/CheckUnload.c b/rts/CheckUnload.c index 34f976db4d..7802754445 100644 --- a/rts/CheckUnload.c +++ b/rts/CheckUnload.c @@ -188,7 +188,7 @@ static void searchHeapBlocks (HashTable *addrs, bdescr *bd) case ARR_WORDS: prim = rtsTrue; - size = arr_words_sizeW((StgArrWords*)p); + size = arr_words_sizeW((StgArrBytes*)p); break; case MUT_ARR_PTRS_CLEAN: diff --git a/rts/Disassembler.c b/rts/Disassembler.c index f6e2c93b82..7e3529bb7f 100644 --- a/rts/Disassembler.c +++ b/rts/Disassembler.c @@ -33,7 +33,7 @@ disInstr ( StgBCO *bco, int pc ) StgWord16* instrs = (StgWord16*)(bco->instrs->payload); - StgArrWords* literal_arr = bco->literals; + StgArrBytes* literal_arr = bco->literals; StgWord* literals = (StgWord*)(&literal_arr->payload[0]); StgMutArrPtrs* ptrs_arr = bco->ptrs; diff --git a/rts/Interpreter.c b/rts/Interpreter.c index 8a608ec1ba..573e4991f7 100644 --- a/rts/Interpreter.c +++ b/rts/Interpreter.c @@ -843,7 +843,7 @@ run_BCO: case bci_BRK_FUN: { int arg1_brk_array, arg2_array_index, arg3_freeVars; - StgArrWords *breakPoints; + StgArrBytes *breakPoints; int returning_from_break; // are we resuming execution from a breakpoint? // if yes, then don't break this time around StgClosure *ioAction; // the io action to run at a breakpoint @@ -864,7 +864,7 @@ run_BCO: // and continue executing if (!returning_from_break) { - breakPoints = (StgArrWords *) BCO_PTR(arg1_brk_array); + breakPoints = (StgArrBytes *) BCO_PTR(arg1_brk_array); // stop the current thread if either the // "rts_stop_next_breakpoint" flag is true OR if the diff --git a/rts/PrimOps.cmm b/rts/PrimOps.cmm index 26a67167bc..f44519d4d3 100644 --- a/rts/PrimOps.cmm +++ b/rts/PrimOps.cmm @@ -57,11 +57,11 @@ stg_newByteArrayzh ( W_ n ) MAYBE_GC_N(stg_newByteArrayzh, n); payload_words = ROUNDUP_BYTES_TO_WDS(n); - words = BYTES_TO_WDS(SIZEOF_StgArrWords) + payload_words; + words = BYTES_TO_WDS(SIZEOF_StgArrBytes) + payload_words; ("ptr" p) = ccall allocate(MyCapability() "ptr",words); - TICK_ALLOC_PRIM(SIZEOF_StgArrWords,WDS(payload_words),0); + TICK_ALLOC_PRIM(SIZEOF_StgArrBytes,WDS(payload_words),0); SET_HDR(p, stg_ARR_WORDS_info, CCCS); - StgArrWords_bytes(p) = n; + StgArrBytes_bytes(p) = n; return (p); } @@ -80,7 +80,7 @@ stg_newPinnedByteArrayzh ( W_ n ) payload_words = ROUNDUP_BYTES_TO_WDS(bytes); /* When we actually allocate memory, we need to allow space for the header: */ - bytes = bytes + SIZEOF_StgArrWords; + bytes = bytes + SIZEOF_StgArrBytes; /* And we want to align to BA_ALIGN bytes, so we need to allow space to shift up to BA_ALIGN - 1 bytes: */ bytes = bytes + BA_ALIGN - 1; @@ -88,14 +88,14 @@ stg_newPinnedByteArrayzh ( W_ n ) words = ROUNDUP_BYTES_TO_WDS(bytes); ("ptr" p) = ccall allocatePinned(MyCapability() "ptr", words); - TICK_ALLOC_PRIM(SIZEOF_StgArrWords,WDS(payload_words),0); + TICK_ALLOC_PRIM(SIZEOF_StgArrBytes,WDS(payload_words),0); /* Now we need to move p forward so that the payload is aligned to BA_ALIGN bytes: */ - p = p + ((-p - SIZEOF_StgArrWords) & BA_MASK); + p = p + ((-p - SIZEOF_StgArrBytes) & BA_MASK); SET_HDR(p, stg_ARR_WORDS_info, CCCS); - StgArrWords_bytes(p) = n; + StgArrBytes_bytes(p) = n; return (p); } @@ -118,7 +118,7 @@ stg_newAlignedPinnedByteArrayzh ( W_ n, W_ alignment ) /* When we actually allocate memory, we need to allow space for the header: */ - bytes = bytes + SIZEOF_StgArrWords; + bytes = bytes + SIZEOF_StgArrBytes; /* And we want to align to <alignment> bytes, so we need to allow space to shift up to <alignment - 1> bytes: */ bytes = bytes + alignment - 1; @@ -126,15 +126,15 @@ stg_newAlignedPinnedByteArrayzh ( W_ n, W_ alignment ) words = ROUNDUP_BYTES_TO_WDS(bytes); ("ptr" p) = ccall allocatePinned(MyCapability() "ptr", words); - TICK_ALLOC_PRIM(SIZEOF_StgArrWords,WDS(payload_words),0); + TICK_ALLOC_PRIM(SIZEOF_StgArrBytes,WDS(payload_words),0); /* Now we need to move p forward so that the payload is aligned to <alignment> bytes. Note that we are assuming that <alignment> is a power of 2, which is technically not guaranteed */ - p = p + ((-p - SIZEOF_StgArrWords) & (alignment - 1)); + p = p + ((-p - SIZEOF_StgArrBytes) & (alignment - 1)); SET_HDR(p, stg_ARR_WORDS_info, CCCS); - StgArrWords_bytes(p) = n; + StgArrBytes_bytes(p) = n; return (p); } @@ -143,11 +143,11 @@ stg_shrinkMutableByteArrayzh ( gcptr mba, W_ new_size ) // MutableByteArray# s -> Int# -> State# s -> State# s { ASSERT(new_size >= 0); - ASSERT(new_size <= StgArrWords_bytes(mba)); + ASSERT(new_size <= StgArrBytes_bytes(mba)); - OVERWRITING_CLOSURE_OFS(mba, (BYTES_TO_WDS(SIZEOF_StgArrWords) + + OVERWRITING_CLOSURE_OFS(mba, (BYTES_TO_WDS(SIZEOF_StgArrBytes) + ROUNDUP_BYTES_TO_WDS(new_size))); - StgArrWords_bytes(mba) = new_size; + StgArrBytes_bytes(mba) = new_size; LDV_RECORD_CREATE(mba); return (); @@ -169,9 +169,9 @@ stg_resizzeMutableByteArrayzh ( gcptr mba, W_ new_size ) new_size_wds = ROUNDUP_BYTES_TO_WDS(new_size); if (new_size_wds <= BYTE_ARR_WDS(mba)) { - OVERWRITING_CLOSURE_OFS(mba, (BYTES_TO_WDS(SIZEOF_StgArrWords) + + OVERWRITING_CLOSURE_OFS(mba, (BYTES_TO_WDS(SIZEOF_StgArrBytes) + new_size_wds)); - StgArrWords_bytes(mba) = new_size; + StgArrBytes_bytes(mba) = new_size; LDV_RECORD_CREATE(mba); return (mba); @@ -186,7 +186,7 @@ stg_resizzeMutableByteArrayzh ( gcptr mba, W_ new_size ) // copy over old content prim %memcpy(BYTE_ARR_CTS(new_mba), BYTE_ARR_CTS(mba), - StgArrWords_bytes(mba), SIZEOF_W); + StgArrBytes_bytes(mba), SIZEOF_W); return (new_mba); } @@ -199,7 +199,7 @@ stg_casIntArrayzh( gcptr arr, W_ ind, W_ old, W_ new ) { W_ p, h; - p = arr + SIZEOF_StgArrWords + WDS(ind); + p = arr + SIZEOF_StgArrBytes + WDS(ind); (h) = ccall cas(p, old, new); return(h); @@ -1927,7 +1927,7 @@ stg_newBCOzh ( P_ instrs, i = 0; for: if (i < BYTE_ARR_WDS(bitmap_arr)) { - StgBCO_bitmap(bco,i) = StgArrWords_payload(bitmap_arr,i); + StgBCO_bitmap(bco,i) = StgArrBytes_payload(bitmap_arr,i); i = i + 1; goto for; } @@ -1988,7 +1988,7 @@ stg_unpackClosurezh ( P_ closure ) out: W_ ptrs_arr_sz, ptrs_arr_cards, nptrs_arr_sz; - nptrs_arr_sz = SIZEOF_StgArrWords + WDS(nptrs); + nptrs_arr_sz = SIZEOF_StgArrBytes + WDS(nptrs); ptrs_arr_cards = mutArrPtrsCardWords(ptrs); ptrs_arr_sz = SIZEOF_StgMutArrPtrs + WDS(ptrs) + WDS(ptrs_arr_cards); @@ -2016,7 +2016,7 @@ for: is promoted. */ SET_HDR(nptrs_arr, stg_ARR_WORDS_info, CCCS); - StgArrWords_bytes(nptrs_arr) = WDS(nptrs); + StgArrBytes_bytes(nptrs_arr) = WDS(nptrs); p = 0; for2: if(p < nptrs) { diff --git a/rts/Printer.c b/rts/Printer.c index 2396707aae..637cd9a861 100644 --- a/rts/Printer.c +++ b/rts/Printer.c @@ -297,8 +297,8 @@ printClosure( StgClosure *obj ) { StgWord i; debugBelch("ARR_WORDS(\""); - for (i=0; i<arr_words_words((StgArrWords *)obj); i++) - debugBelch("%" FMT_Word, (W_)((StgArrWords *)obj)->payload[i]); + for (i=0; i<arr_words_words((StgArrBytes *)obj); i++) + debugBelch("%" FMT_Word, (W_)((StgArrBytes *)obj)->payload[i]); debugBelch("\")\n"); break; } diff --git a/rts/ProfHeap.c b/rts/ProfHeap.c index 25112a7e1e..0259a191eb 100644 --- a/rts/ProfHeap.c +++ b/rts/ProfHeap.c @@ -1023,7 +1023,7 @@ heapCensusChain( Census *census, bdescr *bd ) case ARR_WORDS: prim = rtsTrue; - size = arr_words_sizeW((StgArrWords*)p); + size = arr_words_sizeW((StgArrBytes*)p); break; case MUT_ARR_PTRS_CLEAN: diff --git a/rts/sm/Compact.c b/rts/sm/Compact.c index 4ee88da11c..81bf036f83 100644 --- a/rts/sm/Compact.c +++ b/rts/sm/Compact.c @@ -670,7 +670,7 @@ thread_obj (StgInfoTable *info, StgPtr p) return thread_AP((StgAP *)p); case ARR_WORDS: - return p + arr_words_sizeW((StgArrWords *)p); + return p + arr_words_sizeW((StgArrBytes *)p); case MUT_ARR_PTRS_CLEAN: case MUT_ARR_PTRS_DIRTY: diff --git a/rts/sm/Evac.c b/rts/sm/Evac.c index bc8cb9ad13..579e788535 100644 --- a/rts/sm/Evac.c +++ b/rts/sm/Evac.c @@ -684,7 +684,7 @@ loop: case ARR_WORDS: // just copy the block - copy(p,info,q,arr_words_sizeW((StgArrWords *)q),gen_no); + copy(p,info,q,arr_words_sizeW((StgArrBytes *)q),gen_no); return; case MUT_ARR_PTRS_CLEAN: diff --git a/rts/sm/Sanity.c b/rts/sm/Sanity.c index e7a8401145..2541ba15a2 100644 --- a/rts/sm/Sanity.c +++ b/rts/sm/Sanity.c @@ -388,7 +388,7 @@ checkClosure( StgClosure* p ) } case ARR_WORDS: - return arr_words_sizeW((StgArrWords *)p); + return arr_words_sizeW((StgArrBytes *)p); case MUT_ARR_PTRS_CLEAN: case MUT_ARR_PTRS_DIRTY: diff --git a/rts/sm/Scav.c b/rts/sm/Scav.c index dfad0bef58..c441a3d3cc 100644 --- a/rts/sm/Scav.c +++ b/rts/sm/Scav.c @@ -637,7 +637,7 @@ scavenge_block (bdescr *bd) case ARR_WORDS: // nothing to follow - p += arr_words_sizeW((StgArrWords *)p); + p += arr_words_sizeW((StgArrBytes *)p); break; case MUT_ARR_PTRS_CLEAN: |