X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fpack.lisp;h=0e93c72bb82185bab06bb7c92577e743dff4e80b;hb=8171400aa1d9ad318401a4d9c4c07f5f3b374556;hp=16ea3abe57348da8c4cafbeecbbe6335f5537317;hpb=d306e2d23b38487488eb93881dad836e439e0c77;p=sbcl.git diff --git a/src/compiler/pack.lisp b/src/compiler/pack.lisp index 16ea3ab..0e93c72 100644 --- a/src/compiler/pack.lisp +++ b/src/compiler/pack.lisp @@ -1396,6 +1396,7 @@ ;;; of allocating a new stack location. (defun pack-tn (tn restricted optimize &key (allow-unbounded-sc t)) (declare (type tn tn)) + (aver (not (tn-offset tn))) (let* ((original (original-tn tn)) (fsc (tn-sc tn)) (alternates (unless restricted (sc-alternate-scs fsc))) @@ -1408,7 +1409,7 @@ ((null sc) (failed-to-pack-error tn restricted)) (unless (or allow-unbounded-sc - (neq (sb-kind (sc-sb sc)) :unbounded)) + (not (unbounded-sc-p sc))) (return nil)) (when (eq sc specified-save-sc) (unless (tn-offset save) @@ -1419,10 +1420,11 @@ (when (or restricted (not (and (minusp (tn-cost tn)) (sc-save-p sc)))) (let ((loc (or (find-ok-target-offset original sc) - (select-location original sc) + (select-location original sc :optimize optimize) (and restricted - (select-location original sc :use-reserved-locs t)) - (when (eq (sb-kind (sc-sb sc)) :unbounded) + (select-location original sc :use-reserved-locs t + :optimize optimize)) + (when (unbounded-sc-p sc) (grow-sc sc) (or (select-location original sc) (error "failed to pack after growing SC?"))))))