mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-16 01:07:34 +02:00
Removed obsolete macro generation
This commit is contained in:
parent
78fe64cb56
commit
96b5037449
1 changed files with 0 additions and 34 deletions
34
cgen.scm
34
cgen.scm
|
@ -100,7 +100,6 @@
|
|||
(define (emit-c-macros)
|
||||
(c-macro-declare-globals)
|
||||
(c-macro-GC-globals)
|
||||
(emit (c-macro-after-longjmp))
|
||||
(emit-c-arity-macros 0))
|
||||
|
||||
(define (emit-c-arity-macros arity)
|
||||
|
@ -110,39 +109,6 @@
|
|||
(emit (c-macro-return-check arity))
|
||||
(emit-c-arity-macros (+ arity 1))))
|
||||
|
||||
(define (c-macro-after-longjmp)
|
||||
(letrec (
|
||||
(append-args
|
||||
(lambda (n)
|
||||
(if (> n 0)
|
||||
(string-append
|
||||
(append-args (- n 1))
|
||||
",gc_ans[" (number->string (- n 1)) "]")
|
||||
"")))
|
||||
(append-next-clause
|
||||
(lambda (i)
|
||||
(cond
|
||||
((= i 0)
|
||||
(string-append
|
||||
" if (gc_num_ans == 0) { \\\n"
|
||||
" funcall0((closure) gc_cont); \\\n"
|
||||
(append-next-clause (+ i 1))))
|
||||
((<= i *c-call-arity*)
|
||||
(let ((this-clause
|
||||
(string-append
|
||||
" } else if (gc_num_ans == " (number->string i)") { \\\n"
|
||||
" funcall" (number->string i) "((closure) gc_cont" (append-args i) "); \\\n")))
|
||||
(string-append
|
||||
this-clause
|
||||
(append-next-clause (+ i 1)))))
|
||||
(else
|
||||
" } else { \\\n"
|
||||
" printf(\"Unsupported number of args from GC %d\\n\", gc_num_ans); \\\n"
|
||||
" } \n")))))
|
||||
(string-append
|
||||
"#define AFTER_LONGJMP \\\n"
|
||||
(append-next-clause 0))))
|
||||
|
||||
(define (c-macro-return-funcall num-args)
|
||||
(let ((args (c-macro-n-prefix num-args ",a"))
|
||||
(n (number->string num-args))
|
||||
|
|
Loading…
Add table
Reference in a new issue