[movitz-cvs] CVS update: movitz/special-operators.lisp
Frode Vatvedt Fjeld
ffjeld at common-lisp.net
Sat Jul 17 01:49:23 UTC 2004
Update of /project/movitz/cvsroot/movitz
In directory common-lisp.net:/tmp/cvs-serv2318
Modified Files:
special-operators.lisp
Log Message:
Added assembly-macro :offset.
Date: Fri Jul 16 18:49:23 2004
Author: ffjeld
Index: movitz/special-operators.lisp
diff -u movitz/special-operators.lisp:1.28 movitz/special-operators.lisp:1.29
--- movitz/special-operators.lisp:1.28 Thu Jul 15 14:06:28 2004
+++ movitz/special-operators.lisp Fri Jul 16 18:49:23 2004
@@ -8,7 +8,7 @@
;;;; Author: Frode Vatvedt Fjeld <frodef at acm.org>
;;;; Created at: Fri Nov 24 16:22:59 2000
;;;;
-;;;; $Id: special-operators.lisp,v 1.28 2004/07/15 21:06:28 ffjeld Exp $
+;;;; $Id: special-operators.lisp,v 1.29 2004/07/17 01:49:23 ffjeld Exp $
;;;;
;;;;------------------------------------------------------------------
@@ -521,6 +521,16 @@
(setq side-effects t))
(setf modifies (modifies-union modifies sub-modifies))
sub-code))))
+ (setf (assembly-macro-expander :offset amenv)
+ #'(lambda (expr)
+ (destructuring-bind (type slot &optional (extra 0))
+ (cdr expr)
+ (let ((mtype (find-symbol (symbol-name type) :movitz))
+ (mslot (find-symbol (symbol-name slot) :movitz)))
+ (assert mtype (mtype) "Type not a Movitz symbol: ~A" type)
+ (assert mslot (mslot) "Slot not a Movitz symbol: ~A" slot)
+ (list (+ (slot-offset mtype mslot)
+ (eval extra)))))))
(setf (assembly-macro-expander :returns-mode amenv)
#'(lambda (expr)
(assert (= 1 (length expr)))
More information about the Movitz-cvs
mailing list