Skip to content
Snippets Groups Projects
Commit 72adccb1 authored by gerd's avatar gerd
Browse files

Add (SETF WEAK-POINTER-VALUE). From Paul Foley on cmucl-imp,

	2003-06-17.

	* src/compiler/generic/objdef.lisp (weak-pointer): Add
	setters for value and broken.
	* src/code/weak.lisp (setf weak-pointer-value)
	(c::%set-weak-pointer-value, c::%set-weak-pointer-value):
	New functions.
parent 8be94915
No related branches found
No related tags found
No related merge requests found
......@@ -5,11 +5,11 @@
;;; Carnegie Mellon University, and has been placed in the public domain.
;;;
(ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/weak.lisp,v 1.5 1999/03/17 19:30:14 pw Exp $")
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/weak.lisp,v 1.6 2003/06/18 14:29:24 gerd Rel $")
;;;
;;; **********************************************************************
;;;
;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/weak.lisp,v 1.5 1999/03/17 19:30:14 pw Exp $
;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/weak.lisp,v 1.6 2003/06/18 14:29:24 gerd Rel $
;;;
;;; Weak Pointer Support.
;;;
......@@ -40,6 +40,13 @@
(broken (c::%weak-pointer-broken weak-pointer)))
(values value (not broken))))
(declaim (inline (setf weak-pointer-value)))
(defun (setf weak-pointer-value) (object weak-pointer)
"Updates WEAK-POINTER to point to a new object."
(declare (type weak-pointer weak-pointer))
(c::%set-weak-pointer-broken weak-pointer nil)
(c::%set-weak-pointer-value weak-pointer object))
;;; For the interpreter..
(defun c::%weak-pointer-value (w)
......@@ -50,3 +57,10 @@
(declare (type weak-pointer w))
(c::%weak-pointer-broken w))
(defun c::%set-weak-pointer-value (w v)
(declare (type weak-pointer w))
(c::%set-weak-pointer-value w v))
(defun c::%set-weak-pointer-broken (w v)
(declare (type weak-pointer w) (type boolean v))
(c::%set-weak-pointer-broken w v))
......@@ -5,7 +5,7 @@
;;; Carnegie Mellon University, and has been placed in the public domain.
;;;
(ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/generic/objdef.lisp,v 1.48 2003/06/18 09:23:10 gerd Exp $")
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/generic/objdef.lisp,v 1.49 2003/06/18 14:29:23 gerd Exp $")
;;;
;;; **********************************************************************
;;;
......@@ -379,9 +379,11 @@
:header weak-pointer-type
:alloc-trans make-weak-pointer)
(value :ref-trans c::%weak-pointer-value :ref-known (flushable)
:set-trans c::%set-weak-pointer-value :set-known (unsafe)
:init :arg)
(broken :type (member t nil)
:ref-trans c::%weak-pointer-broken :ref-known (flushable)
:set-trans c::%set-weak-pointer-broken :set-known (unsafe)
:init :null)
(next :c-type #-alpha "struct weak_pointer *" #+alpha "u32"))
......
......@@ -56,7 +56,9 @@ New in this release:
- UNIX:UNIX-LSEEK working with files > 2G on BSDs.
- Type declarations on local bindings of special variables no
longer being ignored.
- DISASSEMBLE disassembling closure/funcallable instance functions.
- DISASSEMBLE disassembling closure/funcallable instance
functions.
- (SETF EXT:WEAK-POINTER-VALUE) has been added.
* Numerous ANSI compliance fixes:
- Many bugs in CMUCL's type system detected by Paul Dietz'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment