X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fir2tran.lisp;h=026dd5f461be97e214d339959b371e9e2ca6b619;hb=5fca28334e00c7e1ad159924ac2db4a3e1c9e354;hp=275d2dca4c2886cee30e86027f5a84b67620e91e;hpb=d30da16eea1fe05d17d337c5f392f12736199dc0;p=sbcl.git diff --git a/src/compiler/ir2tran.lisp b/src/compiler/ir2tran.lisp index 275d2dc..026dd5f 100644 --- a/src/compiler/ir2tran.lisp +++ b/src/compiler/ir2tran.lisp @@ -31,16 +31,14 @@ ;;; If there is any CHECK-xxx template for TYPE, then return it, ;;; otherwise return NIL. -;;; The second value is T if the template needs TYPE to be passed (defun type-check-template (type) (declare (type ctype type)) (multiple-value-bind (check-ptype exact) (primitive-type type) (if exact (primitive-type-check check-ptype) - (multiple-value-bind (name type-needed) - (hairy-type-check-template-name type) + (let ((name (hairy-type-check-template-name type))) (if name - (values (template-or-lose name) type-needed) + (template-or-lose name) nil))))) ;;; Emit code in BLOCK to check that VALUE is of the specified TYPE, @@ -51,10 +49,7 @@ (defun emit-type-check (node block value result type) (declare (type tn value result) (type node node) (type ir2-block block) (type ctype type)) - (multiple-value-bind (template type-needed) (type-check-template type) - (if type-needed - (emit-load-template node block template value result (list type)) - (emit-move-template node block template value result))) + (emit-move-template node block (type-check-template type) value result) (values)) ;;; Allocate an indirect value cell.