;;; Allocate an indirect value cell. Maybe do some clever stack
;;; allocation someday.
-;;;
-;;; FIXME: DO-MAKE-VALUE-CELL is a bad name, since it doesn't make
-;;; clear what's the distinction between it and the MAKE-VALUE-CELL
-;;; VOP, and since the DO- further connotes iteration, which has
-;;; nothing to do with this. Clearer, more systematic names, anyone?
(defevent make-value-cell-event "Allocate heap value cell for lexical var.")
-(defun do-make-value-cell (node block value res)
+(defun emit-make-value-cell (node block value res)
(event make-value-cell-event node)
(vop make-value-cell node block value res))
\f
(let ((src (lvar-tn node block arg))
(dest (leaf-info var)))
(if (lambda-var-indirect var)
- (do-make-value-cell node block src dest)
+ (emit-make-value-cell node block src dest)
(emit-move node block src dest)))))
(lambda-vars fun) (basic-combination-args node))
(values))
((lambda-var-indirect var)
(let ((temp
(make-normal-tn *backend-t-primitive-type*)))
- (do-make-value-cell node block actual temp)
+ (emit-make-value-cell node block actual temp)
(temps temp)))
((member actual (locs))
(let ((temp (make-normal-tn (tn-primitive-type loc))))
;;; stuff to check in PONDER-FULL-CALL
;;;
-;;; There are some things which are intended always to be optimized
-;;; away by DEFTRANSFORMs and such, and so never compiled into full
-;;; calls. This has been a source of bugs so many times that it seems
-;;; worth listing some of them here so that we can check the list
-;;; whenever we compile a full call.
-;;;
-;;; FIXME: It might be better to represent this property by setting a
-;;; flag in DEFKNOWN, instead of representing it by membership in this
-;;; list.
-(defvar *always-optimized-away*
- '(;; This should always be DEFTRANSFORMed away, but wasn't in a bug
- ;; reported to cmucl-imp 2000-06-20.
- %instance-ref
- ;; These should always turn into VOPs, but wasn't in a bug which
- ;; appeared when LTN-POLICY stuff was being tweaked in
- ;; sbcl-0.6.9.16. in sbcl-0.6.0
- data-vector-set
- data-vector-ref))
-
-;;; more stuff to check in PONDER-FULL-CALL
-;;;
;;; These came in handy when troubleshooting cold boot after making
;;; major changes in the package structure: various transforms and
;;; VOPs and stuff got attached to the wrong symbol, so that
;; functions are actually optimized away. Thus, we skip the check
;; in that case.
(unless *failure-p*
- (when (memq fname *always-optimized-away*)
- (/show (policy node speed) (policy node safety))
- (/show (policy node compilation-speed))
- (bug "full call to ~S" fname)))
+ ;; check to see if we know anything about the function
+ (let ((info (info :function :info fname)))
+ ;; if we know something, check to see if the full call was valid
+ (when (and info (ir1-attributep (fun-info-attributes info)
+ always-translatable))
+ (/show (policy node speed) (policy node safety))
+ (/show (policy node compilation-speed))
+ (bug "full call to ~S" fname))))
(when (consp fname)
(aver (legal-fun-name-p fname))
(let ((pass (standard-arg-location n))
(home (leaf-info arg)))
(if (lambda-var-indirect arg)
- (do-make-value-cell node block pass home)
+ (emit-make-value-cell node block pass home)
(emit-move node block pass home))))
(incf n))))
(when (leaf-refs var)
(let ((dest (leaf-info var)))
(if (lambda-var-indirect var)
- (do-make-value-cell node block src dest)
+ (emit-make-value-cell node block src dest)
(emit-move node block src dest)))))
(lvar-tns node block lvar
(mapcar (lambda (x)
(ecase kind
((:block :tagbody)
(if (nlx-info-safe-p info)
- (do-make-value-cell node block res (ir2-nlx-info-home 2info))
+ (emit-make-value-cell node block res (ir2-nlx-info-home 2info))
(emit-move node block res (ir2-nlx-info-home 2info))))
(:unwind-protect
(vop set-unwind-protect node block block-tn))