[armedbear-cvs] r11755 - trunk/abcl/src/org/armedbear/lisp
Erik Huelsmann
ehuelsmann at common-lisp.net
Sun Apr 12 13:47:05 UTC 2009
Author: ehuelsmann
Date: Sun Apr 12 09:47:04 2009
New Revision: 11755
Log:
Implement MACROEXPAND-ALL and COMPILER-LET as internal symbols to
the SYSTEM package for people to experiment with.
Modified:
trunk/abcl/src/org/armedbear/lisp/precompiler.lisp
Modified: trunk/abcl/src/org/armedbear/lisp/precompiler.lisp
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/precompiler.lisp (original)
+++ trunk/abcl/src/org/armedbear/lisp/precompiler.lisp Sun Apr 12 09:47:04 2009
@@ -1018,6 +1018,19 @@
(in-package #:system)
+(defun macroexpand-all (form &optional env)
+ (let ((*compile-file-environment* env))
+ (precompile-form form nil)))
+
+(defmacro compiler-let (bindings &body forms &environment env)
+ (let ((bindings (mapcar #'(lambda (binding)
+ (if (atom binding) (list binding) binding))
+ bindings)))
+ (progv (mapcar #'car bindings)
+ (mapcar #'(lambda (binding)
+ (eval (cadr binding))) bindings)
+ (macroexpand-all `(progn , at forms) env))))
+
(defun precompile (name &optional definition)
(unless definition
(setq definition (or (and (symbolp name) (macro-function name))
More information about the armedbear-cvs
mailing list