mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-25 04:55:04 +02:00
WIP
This commit is contained in:
parent
28e70a71e6
commit
80f717452e
1 changed files with 14 additions and 0 deletions
|
@ -22,6 +22,7 @@
|
||||||
(scheme cyclone primitives)
|
(scheme cyclone primitives)
|
||||||
(scheme cyclone pretty-print)
|
(scheme cyclone pretty-print)
|
||||||
(scheme cyclone util)
|
(scheme cyclone util)
|
||||||
|
; (srfi 69)
|
||||||
)
|
)
|
||||||
(export
|
(export
|
||||||
*defined-macros*
|
*defined-macros*
|
||||||
|
@ -1293,6 +1294,12 @@
|
||||||
(difference fv (built-in-syms)))
|
(difference fv (built-in-syms)))
|
||||||
(list))))))
|
(list))))))
|
||||||
|
|
||||||
|
;;
|
||||||
|
;; Helpers to syntax check primitive calls
|
||||||
|
;;
|
||||||
|
;(define *prim-args-table*
|
||||||
|
; (alist->hash-table *primitives-num-args*))
|
||||||
|
|
||||||
;; CPS conversion
|
;; CPS conversion
|
||||||
;;
|
;;
|
||||||
;; This is a port of code from the 90-minute Scheme->C Compiler by Marc Feeley
|
;; This is a port of code from the 90-minute Scheme->C Compiler by Marc Feeley
|
||||||
|
@ -1340,6 +1347,13 @@
|
||||||
cont-ast)))))
|
cont-ast)))))
|
||||||
|
|
||||||
((prim-call? ast)
|
((prim-call? ast)
|
||||||
|
;(prim:check-arg-count
|
||||||
|
; (car ast)
|
||||||
|
; (- (length ast) 1)
|
||||||
|
; (hash-table-ref/default
|
||||||
|
; *prim-args-table*
|
||||||
|
; (car ast)
|
||||||
|
; #f))
|
||||||
(cps-list (cdr ast) ; args to primitive function
|
(cps-list (cdr ast) ; args to primitive function
|
||||||
(lambda (args)
|
(lambda (args)
|
||||||
(list cont-ast
|
(list cont-ast
|
||||||
|
|
Loading…
Add table
Reference in a new issue