Update of /project/movitz/cvsroot/movitz/losp/muerte In directory clnet:/tmp/cvs-serv2859
Modified Files: basic-functions.lisp Log Message: Have macros in the run-time.
--- /project/movitz/cvsroot/movitz/losp/muerte/basic-functions.lisp 2008/03/07 23:38:19 1.23 +++ /project/movitz/cvsroot/movitz/losp/muerte/basic-functions.lisp 2008/03/15 20:57:14 1.24 @@ -10,7 +10,7 @@ ;;;; Author: Frode Vatvedt Fjeld frodef@acm.org ;;;; Created at: Tue Sep 4 18:41:57 2001 ;;;; -;;;; $Id: basic-functions.lisp,v 1.23 2008/03/07 23:38:19 ffjeld Exp $ +;;;; $Id: basic-functions.lisp,v 1.24 2008/03/15 20:57:14 ffjeld Exp $ ;;;; ;;;;------------------------------------------------------------------
@@ -75,16 +75,22 @@ (return list)) (setf list (cdr list))))
-(defmacro numargs () - `(with-inline-assembly (:returns :ecx) - (:movzxb :cl :ecx) - (:shll ,movitz::+movitz-fixnum-shift+ :ecx))) - -(defmacro call-function-from-lexical (lexical) - `(with-inline-assembly (:returns :multiple-values) - (:compile-form (:result-mode :esi) ,lexical) - (:xorb :cl :cl) - (:call (:esi ,(movitz::slot-offset 'movitz::movitz-funobj 'movitz::code-vector))))) +(defun verify-macroexpand-call (key name) + "Used by macro-expander functions to separate bona fide macro-expansions +from regular function-calls." + (when (eq key name) + (error 'undefined-function-call + :name name + :arguments :unknown))) + +(defun call-macroexpander (form env expander) + "Call a macro-expander for a bona fide macro-expansion." + (with-inline-assembly (:returns :multiple-values) + (:compile-form (:result-mode :edx) 'verify-macroexpand-call) + (:load-lexical (:lexical-binding expander) :esi) + (:load-lexical (:lexical-binding form) :eax) + (:load-lexical (:lexical-binding env) :ebx) + (:call (:esi (:offset movitz-funobj code-vector%2op)))))
(defun funcall%0ops (function) (with-inline-assembly (:returns :multiple-values)