mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-23 20:15:05 +02:00
Refactoring
This commit is contained in:
parent
1598a72921
commit
8845991c71
1 changed files with 4 additions and 4 deletions
|
@ -78,16 +78,16 @@ void Cyc_check_bounds(void *data, const char *label, int len, int index) {
|
|||
/* These macros are hardcoded here to support functions in this module. */
|
||||
#define closcall1(td,clo,a1) if (type_of(clo) == cons_tag || prim(clo)) { Cyc_apply(td,0, (closure)(a1), clo); } else { ((clo)->fn)(td,1,clo,a1);}
|
||||
/* Return to continuation after checking for stack overflow. */
|
||||
#define return_closcall1(td,clo,a1) \
|
||||
{char top; \
|
||||
#define return_closcall1(td,clo,a1) { \
|
||||
char top; \
|
||||
if (stack_overflow(&top,(((gc_thread_data *)data)->stack_limit))) { \
|
||||
object buf[1]; buf[0] = a1;\
|
||||
GC(td,clo,buf,1); return; \
|
||||
} else {closcall1(td,(closure) (clo),a1); return;}}
|
||||
#define closcall2(td,clo,a1,a2) if (type_of(clo) == cons_tag || prim(clo)) { Cyc_apply(td,1, (closure)(a1), clo,a2); } else { ((clo)->fn)(td,2,clo,a1,a2);}
|
||||
/* Return to continuation after checking for stack overflow. */
|
||||
#define return_closcall2(td,clo,a1,a2) \
|
||||
{char top; \
|
||||
#define return_closcall2(td,clo,a1,a2) { \
|
||||
char top; \
|
||||
if (stack_overflow(&top,(((gc_thread_data *)data)->stack_limit))) { \
|
||||
object buf[2]; buf[0] = a1;buf[1] = a2;\
|
||||
GC(td,clo,buf,2); return; \
|
||||
|
|
Loading…
Add table
Reference in a new issue