mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-28 22:45:07 +02:00
77 lines
2.2 KiB
Scheme
77 lines
2.2 KiB
Scheme
(define-library (scheme cyclone cgen)
|
|
(import (scheme base)
|
|
(scheme char)
|
|
(scheme write)
|
|
(scheme cyclone transforms)
|
|
(scheme cyclone util)
|
|
(scheme cyclone libraries)
|
|
)
|
|
(export
|
|
mta:code-gen
|
|
autogen
|
|
autogen:defprimitives
|
|
autogen:primitive-procedures
|
|
emit
|
|
emit*
|
|
emits
|
|
emits*
|
|
emit-newline
|
|
string-join
|
|
;(cstr:escape-chars str)
|
|
;*c-main-function*
|
|
;*c-call-max-args* 128)
|
|
;*c-call-arity* (make-vector (+ 1 *c-call-max-args*) #f))
|
|
;(set-c-call-arity! arity)
|
|
;(emit-c-arity-macros arity)
|
|
;(c-macro-return-funcall num-args)
|
|
;(c-macro-return-check num-args)
|
|
;(c-macro-funcall num-args)
|
|
;(c-macro-n-prefix n prefix)
|
|
;(c-macro-array-assign n prefix assign)
|
|
;(c-code/vars str cvars)
|
|
;(c-code str) (c-code/vars str (list)))
|
|
;(c:tuple/args cp num-args)
|
|
;(c:body c-pair) (car c-pair))
|
|
;(c:allocs c-pair) (cadr c-pair))
|
|
;(c:num-args c-tuple) (caddr c-tuple))
|
|
;(c:allocs->str c-allocs . prefix)
|
|
;(c:allocs->str2 c-allocs prefix suffix)
|
|
;(c:append cp1 cp2)
|
|
;(c:append/prefix prefix cp1 cp2)
|
|
;(c:serialize cp prefix)
|
|
;(c-compile-program exp)
|
|
;(c-compile-exp exp append-preamble cont)
|
|
;(c-compile-quote qexp)
|
|
;(c-compile-scalars args)
|
|
;(c-compile-vector exp)
|
|
;(c-compile-const exp)
|
|
;(->cstr str)
|
|
;(prim->c-func p)
|
|
;(prim/c-var-assign p)
|
|
;(prim/cvar? exp)
|
|
;(prim:arg-count? exp)
|
|
;(prim:allocates-object? exp)
|
|
;(c-compile-prim p cont)
|
|
;(c-compile-ref exp)
|
|
;(c-compile-args args append-preamble prefix cont)
|
|
;(c-compile-app exp append-preamble cont)
|
|
;(c-compile-if exp append-preamble cont)
|
|
;*globals* '())
|
|
;*global-syms* '())
|
|
;(global-lambda? global) (cadr global))
|
|
;(global-not-lambda? global) (not (cadr global)))
|
|
;(add-global var-sym lambda? code)
|
|
;(c-compile-global exp append-preamble cont)
|
|
;*symbols* '())
|
|
;*reserved-symbols* '(Cyc_procedure))
|
|
;(allocate-symbol sym)
|
|
;num-lambdas 0)
|
|
;lambdas '())
|
|
;(allocate-lambda lam)
|
|
;(get-lambda id)
|
|
;(lambda->env exp)
|
|
;(c-compile-closure exp append-preamble cont)
|
|
;(c-compile-formals formals type)
|
|
;(c-compile-lambda exp)
|
|
)
|
|
(include "../../cgen.scm"))
|