Skip to content

Commit 2c46a94

Browse files
committed
Cleans up and makes static arrayblockmerger implementation
Uses consistent naming (_np) for native pointer equivalents of Lisp addresses
1 parent 93b3a70 commit 2c46a94

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

inc/gcfinaldefs.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ void printarrayblock(LispPTR base);
55
LispPTR releasingvmempage(LispPTR ptr);
66
LispPTR checkarrayblock(LispPTR base, LispPTR free, LispPTR onfreelist);
77
LispPTR makefreearrayblock(LispPTR block, DLword length);
8-
LispPTR arrayblockmerger(LispPTR base, LispPTR nbase);
98
LispPTR mergebackward(LispPTR base);
109
LispPTR mergeforward(LispPTR base);
1110
LispPTR reclaimarrayblock(LispPTR ptr);

src/gcfinal.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
#include "gccodedefs.h" // for reclaimcodeblock
5252
#include "gcdata.h" // for DELREF, REC_GCLOOKUP
5353
#include "gchtfinddefs.h" // for htfind, rec_htfind
54-
#include "gcfinaldefs.h" // for arrayblockmerger, checkarrayblock
54+
#include "gcfinaldefs.h" // for checkarrayblock
5555
#include "lispemul.h" // for LispPTR, NIL, T, POINTERMASK, DLword, ATOM_T
5656
#include "llstkdefs.h" // for decusecount68k
5757
#include "lspglob.h" // for FreeBlockBuckets_word, ArrayMerging_word
@@ -374,13 +374,13 @@ LispPTR makefreearrayblock(LispPTR block, DLword length) {
374374
/* */
375375
/* */
376376
/************************************************************************/
377-
LispPTR arrayblockmerger(LispPTR base, LispPTR nbase) {
377+
static LispPTR arrayblockmerger(LispPTR base, LispPTR nbase) {
378378
DLword arlens, narlens, secondbite, minblocksize, shaveback;
379-
struct arrayblock *bbase, *bnbase;
380-
bbase = (struct arrayblock *)NativeAligned4FromLAddr(base);
381-
bnbase = (struct arrayblock *)NativeAligned4FromLAddr(nbase);
382-
arlens = bbase->arlen;
383-
narlens = bnbase->arlen;
379+
struct arrayblock *base_np, *nbase_np;
380+
base_np = (struct arrayblock *)NativeAligned4FromLAddr(base);
381+
nbase_np = (struct arrayblock *)NativeAligned4FromLAddr(nbase);
382+
arlens = base_np->arlen;
383+
narlens = nbase_np->arlen;
384384
secondbite = MAXARRAYBLOCKSIZE - arlens;
385385
/* There are three cases for merging the blocks
386386
* (1) the total size of the two blocks is less than max:

0 commit comments

Comments
 (0)