fix YAP to use _longjmp when available. longjmp is just too expensive on OSX machines.

This commit is contained in:
Vitor Santos Costa
2010-10-26 22:03:36 +01:00
parent b16a0d53b0
commit ab8911708b
11 changed files with 172 additions and 107 deletions

View File

@@ -122,7 +122,7 @@ AllocCMem (UInt size, struct intermediates *cip)
if (!p) {
Yap_Error_Size = size;
save_machine_regs();
longjmp(cip->CompilerBotch, OUT_OF_HEAP_BOTCH);
_longjmp(cip->CompilerBotch, OUT_OF_HEAP_BOTCH);
}
Yap_CMemFirstBlock = p;
Yap_CMemFirstBlockSz = blksz;
@@ -132,7 +132,7 @@ AllocCMem (UInt size, struct intermediates *cip)
if (!p) {
Yap_Error_Size = size;
save_machine_regs();
longjmp(cip->CompilerBotch, OUT_OF_HEAP_BOTCH);
_longjmp(cip->CompilerBotch, OUT_OF_HEAP_BOTCH);
}
}
p->u.next = cip->blks;
@@ -152,7 +152,7 @@ AllocCMem (UInt size, struct intermediates *cip)
if (ASP <= CellPtr (cip->freep) + 256) {
Yap_Error_Size = 256+((char *)cip->freep - (char *)H);
save_machine_regs();
longjmp(cip->CompilerBotch, OUT_OF_STACK_BOTCH);
_longjmp(cip->CompilerBotch, OUT_OF_STACK_BOTCH);
}
return (p);
#endif