X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fboot.lisp;h=edfc576fbcecc4e48ff4c18fab83e925d65755e6;hb=266509b078969a40bded783057fc15a873c75723;hp=856879fa8b5b4ee6fa8e36715c321adb0fd87d2f;hpb=6f605676eab61eec005692317b149a47115837de;p=jscl.git diff --git a/src/boot.lisp b/src/boot.lisp index 856879f..edfc576 100644 --- a/src/boot.lisp +++ b/src/boot.lisp @@ -24,13 +24,13 @@ (/debug "loading boot.lisp!") -(eval-when-compile +(eval-when (:compile-toplevel) (let ((defmacro-macroexpander '#'(lambda (form) (destructuring-bind (name args &body body) form (let ((whole (gensym))) - `(eval-when-compile + `(eval-when (:compile-toplevel :execute) (%compile-defmacro ',name '#'(lambda (,whole) (destructuring-bind ,args ,whole @@ -38,7 +38,7 @@ (%compile-defmacro 'defmacro defmacro-macroexpander))) (defmacro declaim (&rest decls) - `(eval-when-compile + `(eval-when (:compile-toplevel :execute) ,@(mapcar (lambda (decl) `(!proclaim ',decl)) decls))) (defmacro defconstant (name value &optional docstring) @@ -485,12 +485,14 @@ `(let ((,value ,x)) (cond ,@(mapcar (lambda (c) - (if (eq (car c) t) + (if (find (car c) '(t otherwise)) `(t ,@(rest c)) `((,(ecase (car c) (integer 'integerp) (cons 'consp) (list 'listp) + (vector 'vectorp) + (character 'characterp) (sequence 'sequencep) (symbol 'symbolp) (function 'functionp) @@ -498,7 +500,8 @@ (array 'arrayp) (string 'stringp) (atom 'atom) - (null 'null)) + (null 'null) + (package 'packagep)) ,value) ,@(or (rest c) (list nil)))))