X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Frepresent.lisp;h=f8151f2411d4ae96c091d0f2dc61ed63b4449f83;hb=77c80b85dc9ae9bde0692d4193187bfca507b936;hp=3f049b36f5210bcaa5a06a82d4e0325cc3ea8d48;hpb=416152f084604094445a758ff399871132dff2bd;p=sbcl.git diff --git a/src/compiler/represent.lisp b/src/compiler/represent.lisp index 3f049b3..f8151f2 100644 --- a/src/compiler/represent.lisp +++ b/src/compiler/represent.lisp @@ -175,7 +175,7 @@ (defun bad-move-arg-error (val pass) (declare (type tn val pass)) - (error "no :MOVE-ARGUMENT VOP defined to move ~S (SC ~S) to ~ + (error "no :MOVE-ARG VOP defined to move ~S (SC ~S) to ~ ~S (SC ~S)" val (sc-name (tn-sc val)) pass (sc-name (tn-sc pass)))) @@ -186,11 +186,11 @@ ;;;; load time. ;;; FIXME: should probably be conditional on #!+SB-SHOW -(defun check-move-function-consistency () +(defun check-move-fun-consistency () (dotimes (i sc-number-limit) (let ((sc (svref *backend-sc-numbers* i))) (when sc - (let ((moves (sc-move-functions sc))) + (let ((moves (sc-move-funs sc))) (dolist (const (sc-constant-scs sc)) (unless (svref moves (sc-number const)) (warn "no move function defined to load SC ~S from constant ~ @@ -202,7 +202,7 @@ (warn "no move function defined to load SC ~S from alternate ~ SC ~S" (sc-name sc) (sc-name alt))) - (unless (svref (sc-move-functions alt) i) + (unless (svref (sc-move-funs alt) i) (warn "no move function defined to save SC ~S to alternate ~ SC ~S" (sc-name sc) (sc-name alt))))))))) @@ -227,6 +227,7 @@ (defun add-representation-costs (refs scs costs ops-slot costs-slot more-costs-slot write-p) + (declare (type function ops-slot costs-slot more-costs-slot)) (do ((ref refs (tn-ref-next ref))) ((null ref)) (flet ((add-costs (cost) @@ -317,13 +318,13 @@ (vop-block (tn-ref-vop ref))))) (tails (lambda-tail-set lambda))) (flet ((frob (fun) - (setf (ir2-environment-number-stack-p - (environment-info - (lambda-environment fun))) + (setf (ir2-physenv-number-stack-p + (physenv-info + (lambda-physenv fun))) t))) (frob lambda) (when tails - (dolist (fun (tail-set-functions tails)) + (dolist (fun (tail-set-funs tails)) (frob fun)))))) (values)) @@ -336,7 +337,7 @@ (let* ((actual (if (eq (tn-kind tn) :alias) (tn-save-tn tn) tn)) (reads (tn-reads tn)) (leaf (tn-leaf actual))) - (cond ((lambda-var-p leaf) (leaf-name leaf)) + (cond ((lambda-var-p leaf) (leaf-source-name leaf)) ((and (not arg-p) reads (return-p (vop-node (tn-ref-vop reads)))) "") @@ -346,7 +347,7 @@ ;;; If policy indicates, give an efficiency note for doing the ;;; coercion VOP, where OP is the operand we are coercing for and ;;; DEST-TN is the distinct destination in a move. -(defun do-coerce-efficiency-note (vop op dest-tn) +(defun maybe-emit-coerce-efficiency-note (vop op dest-tn) (declare (type vop-info vop) (type tn-ref op) (type (or tn null) dest-tn)) (let* ((note (or (template-note vop) (template-name vop))) (cost (template-cost vop)) @@ -370,19 +371,19 @@ (vop-results op-vop))) (error "couldn't find op? bug!"))))) (compiler-note - "doing ~A (cost ~D)~:[~2*~; ~:[to~;from~] ~S~], for:~%~6T~ + "doing ~A (cost ~W)~:[~2*~; ~:[to~;from~] ~S~], for:~%~6T~ the ~:R ~:[result~;argument~] of ~A" note cost name arg-p name pos arg-p op-note))) (t - (compiler-note "doing ~A (cost ~D)~@[ from ~S~]~@[ to ~S~]" + (compiler-note "doing ~A (cost ~W)~@[ from ~S~]~@[ to ~S~]" note cost (get-operand-name op-tn t) (get-operand-name dest-tn nil))))) (values)) ;;; Find a move VOP to move from the operand OP-TN to some other ;;; representation corresponding to OTHER-SC and OTHER-PTYPE. SLOT is -;;; the SC slot that we grab from (move or move-argument). WRITE-P +;;; the SC slot that we grab from (move or move-arg). WRITE-P ;;; indicates that OP is a VOP result, so OP is the move result and ;;; other is the arg, otherwise OP is the arg and other is the result. ;;; @@ -453,7 +454,7 @@ (when res (when (>= (vop-info-cost res) *efficiency-note-cost-threshold*) - (do-coerce-efficiency-note res op dest-tn)) + (maybe-emit-coerce-efficiency-note res op dest-tn)) (let ((temp (make-representation-tn ptype scn))) (change-tn-ref-tn op temp) (cond @@ -599,7 +600,7 @@ (res (when (>= (vop-info-cost res) *efficiency-note-cost-threshold*) - (do-coerce-efficiency-note res args y)) + (maybe-emit-coerce-efficiency-note res args y)) (emit-move-template node block res x y vop) (delete-vop vop)) (t