mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-14 00:07:36 +02:00
WIP
This commit is contained in:
parent
b5248cb965
commit
cb97cfbac7
1 changed files with 11 additions and 3 deletions
|
@ -1223,8 +1223,16 @@
|
|||
;;
|
||||
;; Compile a reference to an element of a closure.
|
||||
(define (c-compile-closure-element-ref ast-id var idx)
|
||||
(with-fnc ast-id (lambda (fnc)
|
||||
(trace:info `(c-compile-closure-element-ref ,ast-id ,var ,idx ,fnc))
|
||||
(cond
|
||||
((and (adbf:well-known fnc)
|
||||
(pair? (adbf:all-params fnc))
|
||||
(equal? (adbf:closure-size fnc) 1))
|
||||
(mangle (car (adbf:all-params fnc))))
|
||||
(else
|
||||
(string-append
|
||||
"((closureN)" (mangle var) ")->elements[" idx "]"))
|
||||
"((closureN)" (mangle var) ")->elements[" idx "]"))))))
|
||||
|
||||
|
||||
;; c-compile-closure : closure-exp (string -> void) -> string
|
||||
|
@ -1319,7 +1327,7 @@
|
|||
)))))
|
||||
;(trace:info (list 'JAE-DEBUG trace macro?))
|
||||
(cond
|
||||
(#f ;;TODO: use-obj-instead-of-closure?
|
||||
(use-obj-instead-of-closure?
|
||||
(create-object))
|
||||
(else
|
||||
(c-code/vars
|
||||
|
|
Loading…
Add table
Reference in a new issue