X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fvmdef.lisp;h=adf60b63b1525580f6399c0f8cec97b032fce099;hb=74cf7a4d01664fbf72a662ba093ad67ca243b524;hp=eef1e3027258684b569a4133867ddcb967a8fa61;hpb=d604a358d8e5eb5587989e0a4f1d31dbe6ac5ffe;p=sbcl.git diff --git a/src/compiler/vmdef.lisp b/src/compiler/vmdef.lisp index eef1e30..adf60b6 100644 --- a/src/compiler/vmdef.lisp +++ b/src/compiler/vmdef.lisp @@ -97,7 +97,7 @@ ;;;; generation of emit functions (eval-when (:compile-toplevel :load-toplevel :execute) - ;; We need the EVAL-WHEN because %EMIT-GENERIC-VOP (below) + ;; We need the EVAL-WHEN because EMIT-VOP (below) ;; uses #.MAX-VOP-TN-REFS, not just MAX-VOP-TN-REFS. ;; -- AL 20010218 ;; @@ -114,10 +114,16 @@ (def!constant sc-bits (integer-length (1- sc-number-limit))) -(defun emit-generic-vop (node block template args results &optional info) - (%emit-generic-vop node block template args results info)) - -(defun %emit-generic-vop (node block template args results info) +;;; Emit a VOP for TEMPLATE. Arguments: +;;; NODE Node for source context. +;;; BLOCK IR2-BLOCK that we place the VOP in. +;;; TEMPLATE: VOP template +;;; ARGS Head of argument TN-REF list. +;;; RESULT Head of result TN-REF list. +;;; INFO If INFO-ARG-COUNT is non-zero, then a list of the magic arguments. +;;; +;;; Return the emitted vop +(defun emit-vop (node block template args results &optional info) (let* ((vop (make-vop block node template args results)) (num-args (vop-info-num-args template)) (last-arg (1- num-args)) @@ -186,7 +192,7 @@ (target-if-desirable (aref refs (ldb (byte 8 8) target)) (aref refs (ldb (byte 8 0) target))))))) - (values vop vop)) + vop) (fill *vop-tn-refs* nil)))) ;;;; function translation stuff @@ -219,7 +225,7 @@ (let* ((args (convert (template-arg-types template) (template-more-args-type template))) (result-restr (template-result-types template)) - (results (if (eq result-restr :conditional) + (results (if (template-conditional-p template) '(boolean) (convert result-restr (cond ((template-more-results-type template)) @@ -229,3 +235,10 @@ ,(if (= (length results) 1) (first results) `(values ,@results)))))) + +#!-sb-fluid (declaim (inline template-conditional-p)) +(defun template-conditional-p (template) + (declare (type template template)) + (let ((rtypes (template-result-types template))) + (or (eq rtypes :conditional) + (eq (car rtypes) :conditional))))