From 0f3a5f2e8886d18d0b4f6485c38a42be629422ae Mon Sep 17 00:00:00 2001 From: Paul Khuong Date: Wed, 13 Nov 2013 13:18:29 -0500 Subject: [PATCH] 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. --- src/compiler/pack.lisp | 9 +++++++++ 1 file changed, 9 insertions(+) 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 -- 1.7.10.4