- Timestamp:
- May 19, 2009, 5:36:05 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
release/1.3/source/compiler/nx2.lisp
r11386 r12086 174 174 (not-set-in-formlist (car subforms)) 175 175 (not-set-in-formlist (cadr subforms)))))))))) 176 177 (defun nx2-node-gpr-p (reg) 178 (and reg 179 (eql (hard-regspec-class reg) hard-reg-class-gpr) 180 (eql (get-regspec-mode reg) hard-reg-class-gpr-mode-node))) 181 182 ;;; ENTRIES is a list of recorded-symbol entries, built by pushing 183 ;;; info for each variable referenced by the function AFUNC as it 184 ;;; comes into scope. (Inherited variables "come into scope" before 185 ;;; anything else, then required arguments, etc.) Supplied-p variables 186 ;;; may come into scope before "real" arglist entries do, which confuses 187 ;;; functions that try to construct a function's arglist from the symbol 188 ;;; map. I -think- that confusion only exists when supplied-p variables 189 ;;; are involved, so this returns its first argument unless they are; 190 ;;; otherwise, it ensures that all toplevel arglist symbols are followed 191 ;;; only by any inherited variables, and that the arglist symbols are 192 ;;; in the correct (reversed) order 193 (defun nx2-recorded-symbols-in-arglist-order (entries afunc) 194 (let* ((alambda (afunc-acode afunc))) 195 (when (and (acode-p alambda) 196 (eq (acode-operator alambda) (%nx1-operator lambda-list))) 197 (destructuring-bind (req opt rest keys &rest ignore) (cdr alambda) 198 (declare (ignore ignore)) 199 (when (or (dolist (sp (caddr opt)) 200 (when sp (return t))) 201 (dolist (sp (caddr keys)) 202 (when sp (return t)))) 203 (let* ((new ())) 204 (flet ((info-for-var (var) 205 (assoc var entries :test #'eq))) 206 (flet ((add-new-info (var) 207 (let* ((info (info-for-var var))) 208 (when info 209 (push info new))))) 210 (setq entries (nreverse entries)) 211 (dolist (var (afunc-inherited-vars afunc)) 212 (add-new-info var)) 213 (dolist (r req) 214 (add-new-info r)) 215 (dolist (o (car opt)) 216 (add-new-info o)) 217 (when (consp rest) 218 (setq rest (car rest))) 219 (when rest 220 (add-new-info rest)) 221 (dolist (k (cadr keys)) 222 (add-new-info k)) 223 (dolist (e entries) 224 (unless (member e new :test #'eq) 225 (push e new))) 226 (setq entries new))))))) 227 entries)) 228
Note: See TracChangeset
for help on using the changeset viewer.