From: Paul Khuong Date: Wed, 13 Nov 2013 18:18:29 +0000 (-0500) Subject: Utility predicates for packing: UNBOUNDED-SC-P and UNBOUNDED-TN-P X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=0f3a5f2e8886d18d0b4f6485c38a42be629422ae;p=sbcl.git Utility predicates for packing: UNBOUNDED-SC-P and UNBOUNDED-TN-P Determine if the backing storage base (or the preferred storage class for a TN) is :UNBOUNDED, i.e., on the stack. --- diff --git a/src/compiler/pack.lisp b/src/compiler/pack.lisp index 451f83e..42e6c5e 100644 --- a/src/compiler/pack.lisp +++ b/src/compiler/pack.lisp @@ -1375,6 +1375,15 @@ ;;;; pack interface +;; Misc. utilities +(declaim (inline unbounded-sc-p)) +(defun unbounded-sc-p (sc) + (eq (sb-kind (sc-sb sc)) :unbounded)) + +(defun unbounded-tn-p (tn) + (unbounded-sc-p (tn-sc tn))) +(declaim (notinline unbounded-sc-p)) + ;;; Attempt to pack TN in all possible SCs, first in the SC chosen by ;;; representation selection, then in the alternate SCs in the order ;;; they were specified in the SC definition. If the TN-COST is