X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fgtn.lisp;h=af808d28f2c605a7567c60a4b99c144b59d52616;hb=37b1ed8e9b6faa84832b8251998b5d0eb1f6b307;hp=ca2c23f65b782e93935ae42fc278ac8901002cda;hpb=13c523a303571a8978d66a22ba910fea1b46b291;p=sbcl.git diff --git a/src/compiler/gtn.lisp b/src/compiler/gtn.lisp index ca2c23f..af808d2 100644 --- a/src/compiler/gtn.lisp +++ b/src/compiler/gtn.lisp @@ -40,8 +40,15 @@ (declare (type clambda fun)) (dolist (var (lambda-vars fun)) (when (leaf-refs var) - (let* ((type (if (lambda-var-indirect var) - *backend-t-primitive-type* + (let* (ptype-info + (type (if (lambda-var-indirect var) + (if (lambda-var-explicit-value-cell var) + *backend-t-primitive-type* + (or (first + (setf ptype-info + (primitive-type-indirect-cell-type + (primitive-type (leaf-type var))))) + *backend-t-primitive-type*)) (primitive-type (leaf-type var)))) (res (make-normal-tn type)) (node (lambda-bind fun)) @@ -54,8 +61,9 @@ ;; Force closed-over indirect LAMBDA-VARs without explicit ;; VALUE-CELLs to the stack, and make sure that they are ;; live over the dynamic contour of the physenv. - (setf (tn-sc res) (svref *backend-sc-numbers* - sb!vm:control-stack-sc-number)) + (setf (tn-sc res) (if ptype-info + (second ptype-info) + (sc-or-lose 'sb!vm::control-stack))) (physenv-live-tn res (lambda-physenv fun))) (debug-variable-p