X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=jscl.lisp;h=e5b658274a21a6c2b54219d893bf9139100f064a;hb=ba8e96ec1d0ab80c668fda471f2acb6ef55c5e61;hp=03654ed0538337d9b4fa818b6b130f6fc87224ae;hpb=f6103bee62f1597449b51f6e4480ada375b279d3;p=jscl.git diff --git a/jscl.lisp b/jscl.lisp index 03654ed..e5b6582 100644 --- a/jscl.lisp +++ b/jscl.lisp @@ -26,14 +26,20 @@ '(("boot" :target) ("compat" :host) ("utils" :both) + ("numbers" :target) + ("char" :target) ("list" :target) + ("array" :target) ("string" :target) + ("sequence" :target) ("print" :target) ("package" :target) - ("ffi" :target) + ("misc" :target) + ("ffi" :both) ("read" :both) ("defstruct" :both) ("lambda-list" :both) + ("backquote" :both) ("compiler" :both) ("toplevel" :target))) @@ -43,24 +49,6 @@ (make-pathname :type type :directory directory :defaults defaults) (make-pathname :directory directory :defaults defaults))) -;;; BOOTSTRAP MAGIC: We record the macro definitions as lists during -;;; the bootstrap. Once everything is compiled, we want to dump the -;;; whole global environment to the output file to reproduce it in the -;;; run-time. However, the environment must contain expander functions -;;; rather than lists. We do not know how to dump function objects -;;; itself, so we mark the list definitions with this object and the -;;; compiler will be called when this object has to be dumped. -;;; Backquote/unquote does a similar magic, but this use is exclusive. -;;; -;;; Indeed, perhaps to compile the object other macros need to be -;;; evaluated. For this reason we define a valid macro-function for -;;; this symbol. -(defvar *magic-unquote-marker* (gensym "MAGIC-UNQUOTE")) -(setf (macro-function *magic-unquote-marker*) - (lambda (form env) - (declare (ignore env)) - (second form))) - ;;; Compile jscl into the host (with-compilation-unit () (dolist (input *source*) @@ -118,7 +106,8 @@ (defun bootstrap () - (let ((*package* (find-package "JSCL"))) + (let ((*features* (cons :jscl *features*)) + (*package* (find-package "JSCL"))) (setq *environment* (make-lexenv)) (setq *literal-table* nil) (setq *variable-counter* 0