mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-25 13:05:05 +02:00
Cleanup, adjust formatting, remove debug statement
This commit is contained in:
parent
ea2550a882
commit
8be4221c1c
1 changed files with 57 additions and 72 deletions
23
cyclone.scm
23
cyclone.scm
|
@ -232,7 +232,9 @@
|
||||||
(trace:info "---------------- after alpha conversion:")
|
(trace:info "---------------- after alpha conversion:")
|
||||||
(trace:info input-program) ;pretty-print
|
(trace:info input-program) ;pretty-print
|
||||||
|
|
||||||
;; EXPERIMENTAL CODE
|
;; EXPERIMENTAL CODE - Load functions in other modules that are
|
||||||
|
;; able to be inlined (in this context, from CPS).
|
||||||
|
;;
|
||||||
;; TODO: extend this initially by, for each import, invoking that module's inlinable_lambdas function
|
;; TODO: extend this initially by, for each import, invoking that module's inlinable_lambdas function
|
||||||
;; behind an exception handler (in case the compiler does not have that module loaded).
|
;; behind an exception handler (in case the compiler does not have that module loaded).
|
||||||
;;
|
;;
|
||||||
|
@ -265,7 +267,7 @@
|
||||||
;; More of a band-aid than a true solution, though.
|
;; More of a band-aid than a true solution, though.
|
||||||
(not (member (car v/i) module-globals)))
|
(not (member (car v/i) module-globals)))
|
||||||
(eval `( ,inlinable-lambdas-fnc )))))
|
(eval `( ,inlinable-lambdas-fnc )))))
|
||||||
(trace:info `(DEBUG ,import ,vars/inlines ,module-globals))
|
;(trace:info `(DEBUG ,import ,vars/inlines ,module-globals))
|
||||||
;; Register inlines as user-defined primitives
|
;; Register inlines as user-defined primitives
|
||||||
(for-each
|
(for-each
|
||||||
(lambda (v/i)
|
(lambda (v/i)
|
||||||
|
@ -286,23 +288,6 @@
|
||||||
;; if this work is done, would need to consolidate inline reg code above
|
;; if this work is done, would need to consolidate inline reg code above
|
||||||
#f)))))
|
#f)))))
|
||||||
imports)
|
imports)
|
||||||
|
|
||||||
;(for-each
|
|
||||||
; (lambda (psyms)
|
|
||||||
; (let ((var (car psyms)) (inline (cdr psyms)))
|
|
||||||
; (prim:add-udf! var inline)))
|
|
||||||
; (eval '(c_schemebase_inlinable_lambdas)))
|
|
||||||
; ;(assoc 'quotient (c_schemebase_inlinable_lambdas))
|
|
||||||
; ; (set! globals (append (lib:idb:ids imported-vars) module-globals))
|
|
||||||
;
|
|
||||||
; ;; total hack to update export list
|
|
||||||
; (set! imported-vars
|
|
||||||
; (append
|
|
||||||
; imported-vars
|
|
||||||
; (map
|
|
||||||
; (lambda (psyms)
|
|
||||||
; (list (cdr psyms) 'scheme 'base))
|
|
||||||
; (eval '(c_schemebase_inlinable_lambdas)))))
|
|
||||||
;; END
|
;; END
|
||||||
|
|
||||||
;; Convert some function calls to primitives, if possible
|
;; Convert some function calls to primitives, if possible
|
||||||
|
|
Loading…
Add table
Reference in a new issue