diff --git a/mstreams.c b/mstreams.c index 16b5d7d1..07877d59 100644 --- a/mstreams.c +++ b/mstreams.c @@ -14,12 +14,7 @@ /* These macros are hardcoded here to support functions in this module. */ #define closcall1(td, clo, buf) \ -if (obj_is_not_closure(clo)) { \ - Cyc_apply(td, clo, 1, buf ); \ -} else { \ - ((clo)->fn)(td, clo, 1, buf); \ -;\ -} + ((clo)->fn)(td, clo, 1, buf); #define return_closcall1(td, clo,a1) { \ char top; \ object buf[1]; buf[0] = a1;\ diff --git a/runtime.c b/runtime.c index 2f66a18a..ab941a0c 100644 --- a/runtime.c +++ b/runtime.c @@ -129,12 +129,7 @@ void hrt_log_delta(const char *label, long long tstamp) /* These macros are hardcoded here to support functions in this module. */ #define closcall1(td, clo, buf) \ -if (obj_is_not_closure(clo)) { \ - Cyc_apply(td, clo, 1, buf ); \ -} else { \ - ((clo)->fn)(td, clo, 1, buf); \ -;\ -} + ((clo)->fn)(td, clo, 1, buf); #define return_closcall1(td, clo,a1) { \ char top; \ object buf[1]; buf[0] = a1;\ @@ -158,12 +153,7 @@ if (obj_is_not_closure(clo)) { \ } \ } #define closcall2(td, clo, buf) \ -if (obj_is_not_closure(clo)) { \ - Cyc_apply(td, clo, 2, buf ); \ -} else { \ - ((clo)->fn)(td, clo, 2, buf); \ -;\ -} + ((clo)->fn)(td, clo, 2, buf); #define return_closcall2(td, clo,a1,a2) { \ char top; \ object buf[2]; buf[0] = a1;buf[1] = a2;\ @@ -5916,12 +5906,12 @@ void Cyc_start_trampoline(gc_thread_data * thd) printf("Done with GC\n"); #endif - if (obj_is_not_closure(thd->gc_cont)) { - Cyc_apply_from_buf(thd, thd->gc_num_args, thd->gc_cont, thd->gc_args); - } else { + //if (obj_is_not_closure(thd->gc_cont)) { + // Cyc_apply_from_buf(thd, thd->gc_num_args, thd->gc_cont, thd->gc_args); + //} else { closure clo = thd->gc_cont; (clo->fn)(thd, clo, thd->gc_num_args, thd->gc_args); - } + //} fprintf(stderr, "Internal error: should never have reached this line\n"); exit(1); diff --git a/scheme/cyclone/cgen.sld b/scheme/cyclone/cgen.sld index fac30607..3389f18f 100644 --- a/scheme/cyclone/cgen.sld +++ b/scheme/cyclone/cgen.sld @@ -242,12 +242,13 @@ (wrap (lambda (s) (if (> num-args 0) s "")))) (string-append "#define closcall" n "(td, clo, buf) \\\n" - (wrap (string-append "if (obj_is_not_closure(clo)) { \\\n" - " Cyc_apply(td, clo, " n ", buf ); \\\n" - "}")) - (wrap " else { \\\n") + ;(wrap (string-append "if (obj_is_not_closure(clo)) { \\\n" + ; " Cyc_apply(td, clo, " n ", buf ); \\\n" + ; "}")) + ;(wrap " else { \\\n") " ((clo)->fn)(td, clo, " n ", buf); \\\n" - (wrap ";\\\n}")))) + ;(wrap ";\\\n}") + ))) (define (c-macro-n-prefix n prefix) (if (> n 0)