0.8.1.7:
[sbcl.git] / src / compiler / generic / vm-ir2tran.lisp
index 361c54f..5cbeb85 100644 (file)
@@ -24,6 +24,8 @@
         name offset lowtag)
     (move-continuation-result node block (list value-tn) (node-cont node))))
 
+;;; FIXME: Isn't there a name for this which looks less like a typo?
+;;; (The name IR2-CONVERT-SETTER is used for something else, just above.)
 (defoptimizer ir2-convert-setfer ((value object) node block name offset lowtag)
   (let ((value-tn (continuation-tn node block value)))
     (vop set-slot node block (continuation-tn node block object) value-tn
             type lowtag result))
     (do-inits node block name result lowtag inits args)
     (move-continuation-result node block locs cont)))
+
+;;; :SET-TRANS (in objdef.lisp DEFINE-PRIMITIVE-OBJECT) doesn't quite
+;;; cut it for symbols, where under certain compilation options
+;;; (e.g. #!+SB-THREAD) we have to do something complicated, rather
+;;; than simply set the slot.  So we build the IR2 converting function
+;;; by hand.  -- CSR, 2003-05-08
+(let ((fun-info (fun-info-or-lose '%set-symbol-value)))
+  (setf (fun-info-ir2-convert fun-info)
+       (lambda (node block)
+         (let ((args (basic-combination-args node)))
+           (destructuring-bind (symbol value) args
+             (let ((value-tn (continuation-tn node block value)))
+               (vop set node block
+                    (continuation-tn node block symbol) value-tn)
+               (move-continuation-result
+                node block (list value-tn) (node-cont node))))))))