- ((extra &rest args) node block name words type lowtag inits)
- (let* ((cont (node-cont node))
- (locs (continuation-result-tns cont
- (list *backend-t-primitive-type*)))
- (result (first locs)))
- (if (constant-continuation-p extra)
- (let ((words (+ (continuation-value extra) words)))
- (do-fixed-alloc node block name words type lowtag result))
- (vop var-alloc node block (continuation-tn node block extra) name words
- type lowtag result))
- (do-inits node block name result lowtag inits args)
- (move-continuation-result node block locs cont)))
+ ((extra &rest args) node block name words type lowtag inits)
+ (let* ((lvar (node-lvar node))
+ (locs (lvar-result-tns lvar (list *backend-t-primitive-type*)))
+ (result (first locs)))
+ (if (constant-lvar-p extra)
+ (let ((words (+ (lvar-value extra) words)))
+ (emit-fixed-alloc node block name words type lowtag result lvar))
+ (vop var-alloc node block (lvar-tn node block extra) name words
+ type lowtag result))
+ (emit-inits node block name result lowtag inits args)
+ (move-lvar-result node block locs lvar)))
+
+;;; :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 (lvar-tn node block value)))
+ (vop set node block
+ (lvar-tn node block symbol) value-tn)
+ (move-lvar-result
+ node block (list value-tn) (node-lvar node))))))))