mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-23 20:15:05 +02:00
WIP
This commit is contained in:
parent
66065bb127
commit
c4c22cfad8
1 changed files with 23 additions and 0 deletions
|
@ -716,6 +716,29 @@
|
|||
(let* ((args (app->args exp))
|
||||
(fun (app->fun exp)))
|
||||
(cond
|
||||
((and (pair? trace)
|
||||
(not (null? (cdr trace)))
|
||||
(adbv:direct-rec-call? (adb:get (cdr trace)))
|
||||
TODO: what to put here? only want this for the direct rec calls...
|
||||
(equal? (car exp) (cdr trace))
|
||||
)
|
||||
(let* ((cgen
|
||||
(c-compile-args
|
||||
args
|
||||
append-preamble
|
||||
""
|
||||
"" ;;this-cont
|
||||
trace
|
||||
cps?)))
|
||||
(c-code
|
||||
(string-append
|
||||
;(c:allocs->str (c:allocs cgen))
|
||||
"\n"
|
||||
(c:body cgen) ;; TODO: re-assign function args, longer-term using temp variables
|
||||
"\n"
|
||||
"goto loop;")))
|
||||
)
|
||||
|
||||
((lambda? fun)
|
||||
(let* ((lid (allocate-lambda (c-compile-lambda fun trace #t))) ;; TODO: pass in free vars? may be needed to track closures
|
||||
;; properly, wait until this comes up in an example
|
||||
|
|
Loading…
Add table
Reference in a new issue