mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-25 04:55:04 +02:00
WIP
This commit is contained in:
parent
4ae3269373
commit
8d7bff212a
1 changed files with 7 additions and 5 deletions
12
cyclone.scm
12
cyclone.scm
|
@ -225,6 +225,8 @@
|
||||||
;;
|
;;
|
||||||
;; assumes (scheme base) is available to compiler AND at runtime in the compiled module/program
|
;; assumes (scheme base) is available to compiler AND at runtime in the compiled module/program
|
||||||
;; TODO: probably not good enough since inlines are not in export list
|
;; TODO: probably not good enough since inlines are not in export list
|
||||||
|
;;
|
||||||
|
;; TODO: later on, in cgen, only add inlinables that correspond to exported functions
|
||||||
|
|
||||||
(for-each
|
(for-each
|
||||||
(lambda (import)
|
(lambda (import)
|
||||||
|
@ -239,14 +241,14 @@
|
||||||
((imported? import)
|
((imported? import)
|
||||||
(let ((lib-name (lib:list->import-set import))
|
(let ((lib-name (lib:list->import-set import))
|
||||||
(vars/inlines
|
(vars/inlines
|
||||||
TODO: if this filtering out too many (or all) the candidates??
|
|
||||||
need to test this (filter) out more
|
|
||||||
(filter
|
(filter
|
||||||
(lambda (v/i)
|
(lambda (v/i)
|
||||||
;; Try to avoid name conflicts
|
;; Try to avoid name conflicts by not loading inlines
|
||||||
(not (member (car v/i) globals)))
|
;; that conflict with identifiers in this module.
|
||||||
|
;; More of a band-aid than a true solution, though.
|
||||||
|
(not (member (car v/i) module-globals)))
|
||||||
(eval `( ,inlinable-lambdas-fnc )))))
|
(eval `( ,inlinable-lambdas-fnc )))))
|
||||||
(trace:info `(DEBUG ,import ,vars/inlines))
|
(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)
|
||||||
|
|
Loading…
Add table
Reference in a new issue