change LOCALS macros.

This commit is contained in:
Joao
2011-05-04 10:11:41 +01:00
parent 18ce4dd78b
commit dc3c54c164
47 changed files with 1448 additions and 1448 deletions

View File

@@ -112,9 +112,9 @@ AllocCMem (UInt size, struct intermediates *cip)
blksz = CMEM_BLK_SIZE;
if (!cip->blks) {
CACHE_REGS
if (Yap_CMemFirstBlock) {
p = Yap_CMemFirstBlock;
blksz = Yap_CMemFirstBlockSz;
if (LOCAL_CMemFirstBlock) {
p = LOCAL_CMemFirstBlock;
blksz = LOCAL_CMemFirstBlockSz;
p->u.next = NULL;
} else {
if (blksz < FIRST_CMEM_BLK_SIZE)
@@ -125,8 +125,8 @@ AllocCMem (UInt size, struct intermediates *cip)
save_machine_regs();
siglongjmp(cip->CompilerBotch, OUT_OF_HEAP_BOTCH);
}
Yap_CMemFirstBlock = p;
Yap_CMemFirstBlockSz = blksz;
LOCAL_CMemFirstBlock = p;
LOCAL_CMemFirstBlockSz = blksz;
}
} else {
p = (struct mem_blk *)Yap_AllocCodeSpace(blksz);
@@ -169,13 +169,13 @@ Yap_ReleaseCMem (struct intermediates *cip)
struct mem_blk *p = cip->blks;
while (p) {
struct mem_blk *nextp = p->u.next;
if (p != Yap_CMemFirstBlock)
if (p != LOCAL_CMemFirstBlock)
Yap_FreeCodeSpace((ADDR)p);
p = nextp;
}
cip->blks = NULL;
if (cip->label_offset &&
cip->label_offset != Yap_LabelFirstArray) {
cip->label_offset != LOCAL_LabelFirstArray) {
Yap_FreeCodeSpace((ADDR)cip->label_offset);
}
#endif