This commit is contained in:
Justin Ethier 2017-04-28 17:43:57 +00:00
parent 4ae3269373
commit 8d7bff212a

View file

@ -225,6 +225,8 @@
;;
;; 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: later on, in cgen, only add inlinables that correspond to exported functions
(for-each
(lambda (import)
@ -239,14 +241,14 @@
((imported? import)
(let ((lib-name (lib:list->import-set import))
(vars/inlines
TODO: if this filtering out too many (or all) the candidates??
need to test this (filter) out more
(filter
(lambda (v/i)
;; Try to avoid name conflicts
(not (member (car v/i) globals)))
;; Try to avoid name conflicts by not loading inlines
;; 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 )))))
(trace:info `(DEBUG ,import ,vars/inlines))
(trace:info `(DEBUG ,import ,vars/inlines ,module-globals))
;; Register inlines as user-defined primitives
(for-each
(lambda (v/i)