[movitz-cvs] CVS update: movitz/losp/muerte/symbols.lisp

Frode Vatvedt Fjeld ffjeld at common-lisp.net
Fri Apr 16 23:36:40 UTC 2004


Update of /project/movitz/cvsroot/movitz/losp/muerte
In directory common-lisp.net:/tmp/cvs-serv9968

Modified Files:
	symbols.lisp 
Log Message:
Added (setf %symbol-global-value).

Date: Fri Apr 16 19:36:40 2004
Author: ffjeld

Index: movitz/losp/muerte/symbols.lisp
diff -u movitz/losp/muerte/symbols.lisp:1.10 movitz/losp/muerte/symbols.lisp:1.11
--- movitz/losp/muerte/symbols.lisp:1.10	Fri Apr 16 15:24:20 2004
+++ movitz/losp/muerte/symbols.lisp	Fri Apr 16 19:36:40 2004
@@ -10,7 +10,7 @@
 ;;;; Author:        Frode Vatvedt Fjeld <frodef at acm.org>
 ;;;; Created at:    Tue Sep  4 23:55:41 2001
 ;;;;                
-;;;; $Id: symbols.lisp,v 1.10 2004/04/16 19:24:20 ffjeld Exp $
+;;;; $Id: symbols.lisp,v 1.11 2004/04/16 23:36:40 ffjeld Exp $
 ;;;;                
 ;;;;------------------------------------------------------------------
 
@@ -61,6 +61,13 @@
 
 (defun %symbol-global-value (symbol)
   (%symbol-global-value symbol))
+
+(define-compiler-macro (setf %symbol-global-value) (value symbol)
+  `(setf (memref ,symbol ,(bt:slot-offset 'movitz:movitz-symbol 'movitz::value) 0 :lisp)
+     ,value))
+
+(defun (setf %symbol-global-value) (value symbol)
+  (setf (%symbol-global-value symbol) value))
 
 (defun symbol-function (symbol)
   (let ((function-value





More information about the Movitz-cvs mailing list