mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-16 17:27:33 +02:00
WIP
This commit is contained in:
parent
1989d32664
commit
c39183500a
1 changed files with 11 additions and 3 deletions
|
@ -964,15 +964,23 @@
|
||||||
;; l_7317_73101 = Cyc_cddr(data, l_7317_73101);
|
;; l_7317_73101 = Cyc_cddr(data, l_7317_73101);
|
||||||
;; a_7318_73102 = c_73374;
|
;; a_7318_73102 = c_73374;
|
||||||
;; continue;
|
;; continue;
|
||||||
|
|
||||||
|
;; TODO: how to handle varargs (maybe we don't)??
|
||||||
|
(for-each
|
||||||
|
(lambda (param arg)
|
||||||
|
(trace:error `(JAE ,param = ,arg)))
|
||||||
|
(cdr (adbf:all-params ast-fnc))
|
||||||
|
(string-split (c:body cargs) #\,))
|
||||||
|
|
||||||
(c-code
|
(c-code
|
||||||
(string-append
|
(string-append
|
||||||
(c:allocs->str (c:allocs cfun) "\n")
|
(c:allocs->str (c:allocs cfun) "\n")
|
||||||
(c:allocs->str (c:allocs cargs) "\n")
|
(c:allocs->str (c:allocs cargs) "\n")
|
||||||
;; TODO: reassign args
|
;; TODO: reassign args
|
||||||
;; TODO: consider passing in a "top" instead of always calling alloca in macro below:
|
;; TODO: consider passing in a "top" instead of always calling alloca in macro below:
|
||||||
"/* TODO: call self */ continue_or_gc" (number->string (c:num-args cargs))
|
"continue_or_gc" (number->string (c:num-args cargs))
|
||||||
"(data,"
|
"(data,"
|
||||||
this-cont
|
(mangle (car (adbf:all-params ast-fnc))) ;; Call back into self after GC
|
||||||
(if (> (c:num-args cargs) 0) "," "")
|
(if (> (c:num-args cargs) 0) "," "")
|
||||||
(c:body cargs)
|
(c:body cargs)
|
||||||
");"
|
");"
|
||||||
|
@ -1378,7 +1386,7 @@
|
||||||
;; Compile a reference to an element of a closure.
|
;; Compile a reference to an element of a closure.
|
||||||
(define (c-compile-closure-element-ref ast-id var idx)
|
(define (c-compile-closure-element-ref ast-id var idx)
|
||||||
(with-fnc ast-id (lambda (fnc)
|
(with-fnc ast-id (lambda (fnc)
|
||||||
(trace:info `(c-compile-closure-element-ref ,ast-id ,var ,idx ,fnc))
|
;(trace:info `(c-compile-closure-element-ref ,ast-id ,var ,idx ,fnc))
|
||||||
(cond
|
(cond
|
||||||
((and *optimize-well-known-lambdas*
|
((and *optimize-well-known-lambdas*
|
||||||
(adbf:well-known fnc)
|
(adbf:well-known fnc)
|
||||||
|
|
Loading…
Add table
Reference in a new issue