From 8845991c71ecc1c3f086ec9da1275a7084a3b6a7 Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Fri, 1 Apr 2016 22:02:13 -0400 Subject: [PATCH] Refactoring --- runtime.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/runtime.c b/runtime.c index 5f62c349..26e58082 100644 --- a/runtime.c +++ b/runtime.c @@ -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; \