X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fgeneric%2Fvm-ir2tran.lisp;h=5cbeb85e3aab8bcef52c7effddd385acfa15076a;hb=174feb792c8082846666e1218c58d5b0ab3b85b0;hp=361c54fe50c2ec1de094fc67b2d4179e538a2184;hpb=772659782631839f87fe059a45ecb28b933e298b;p=sbcl.git diff --git a/src/compiler/generic/vm-ir2tran.lisp b/src/compiler/generic/vm-ir2tran.lisp index 361c54f..5cbeb85 100644 --- a/src/compiler/generic/vm-ir2tran.lisp +++ b/src/compiler/generic/vm-ir2tran.lisp @@ -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 @@ -79,3 +81,19 @@ 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))))))))