;;; assumed that the call is legal and has only constants in the
;;; keyword positions.
(defun assert-call-type (call type)
- (declare (type combination call) (type function-type type))
- (derive-node-type call (function-type-returns type))
+ (declare (type combination call) (type fun-type type))
+ (derive-node-type call (fun-type-returns type))
(let ((args (combination-args call)))
- (dolist (req (function-type-required type))
+ (dolist (req (fun-type-required type))
(when (null args) (return-from assert-call-type))
(let ((arg (pop args)))
(assert-continuation-type arg req)))
- (dolist (opt (function-type-optional type))
+ (dolist (opt (fun-type-optional type))
(when (null args) (return-from assert-call-type))
(let ((arg (pop args)))
(assert-continuation-type arg opt)))
- (let ((rest (function-type-rest type)))
+ (let ((rest (fun-type-rest type)))
(when rest
(dolist (arg args)
(assert-continuation-type arg rest))))
- (dolist (key (function-type-keywords type))
+ (dolist (key (fun-type-keywords type))
(let ((name (key-info-name key)))
(do ((arg args (cddr arg)))
((null arg))
#!+sb-show
(when *show-transforms-p*
(let* ((cont (basic-combination-fun node))
- (fname (continuation-function-name cont t)))
+ (fname (continuation-fun-name cont t)))
(/show "trying transform" x (transform-function x) "for" fname)))
(unless (ir1-transform node x)
#!+sb-show
(declare (type combination call))
(let* ((ref (continuation-use (basic-combination-fun call)))
(leaf (when (ref-p ref) (ref-leaf ref)))
- (inlinep (if (and (defined-function-p leaf)
- (not (byte-compiling)))
+ (inlinep (if (defined-function-p leaf)
(defined-function-inlinep leaf)
:no-chance)))
(cond
;;; and that checking is done by local call analysis.
(defun validate-call-type (call type ir1-p)
(declare (type combination call) (type ctype type))
- (cond ((not (function-type-p type))
+ (cond ((not (fun-type-p type))
(aver (multiple-value-bind (val win)
(csubtypep type (specifier-type 'function))
(or val (not win))))
;;; replace it, otherwise add a new one.
(defun record-optimization-failure (node transform args)
(declare (type combination node) (type transform transform)
- (type (or function-type list) args))
+ (type (or fun-type list) args))
(let* ((table (component-failed-optimizations *component-being-compiled*))
(found (assoc transform (gethash node table))))
(if found
(declare (type combination node) (type transform transform))
(let* ((type (transform-type transform))
(fun (transform-function transform))
- (constrained (function-type-p type))
+ (constrained (fun-type-p type))
(table (component-failed-optimizations *component-being-compiled*))
(flame (if (transform-important transform)
(policy node (>= speed inhibit-warnings))
(policy node (> speed inhibit-warnings))))
(*compiler-error-context* node))
(cond ((not (member (transform-when transform)
- (if *byte-compiling*
- '(:byte :both)
- '(:native :both))))
+ '(:native :both)))
;; FIXME: Make sure that there's a transform for
;; (MEMBER SYMBOL ..) into MEMQ.
;; FIXME: Note that when/if I make SHARE operation to shared
;; '(:BOTH) tail sublists.
(let ((when (transform-when transform)))
(not (or (eq when :both)
- (eq when (if *byte-compiling* :byte :native)))))
+ (eq when :native))))
t)
((or (not constrained)
(valid-function-use node type :strict-result t))
(defun propagate-to-refs (leaf type)
(declare (type leaf leaf) (type ctype type))
(let ((var-type (leaf-type leaf)))
- (unless (function-type-p var-type)
+ (unless (fun-type-p var-type)
(let ((int (type-approx-intersection2 var-type type)))
(when (type/= int var-type)
(setf (leaf-type leaf) int)
leaf var))
t)))))
((and (null (rest (leaf-refs var)))
- (not *byte-compiling*)
(substitute-single-use-continuation arg var)))
(t
(propagate-to-refs var (continuation-type arg))))))
(when fun-changed
(setf (continuation-reoptimize fun) nil)
(let ((type (continuation-type fun)))
- (when (function-type-p type)
- (derive-node-type node (function-type-returns type))))
+ (when (fun-type-p type)
+ (derive-node-type node (fun-type-returns type))))
(maybe-terminate-block node nil)
(let ((use (continuation-use fun)))
(when (and (ref-p use) (functional-p (ref-leaf use)))
(when (eq (basic-combination-kind node) :local)
(maybe-let-convert (ref-leaf use))))))
(unless (or (eq (basic-combination-kind node) :local)
- (eq (continuation-function-name fun) '%throw))
+ (eq (continuation-fun-name fun) '%throw))
(ir1-optimize-mv-call node))
(dolist (arg args)
(setf (continuation-reoptimize arg) nil))))
(return-from ir1-optimize-mv-call))
(multiple-value-bind (min max)
- (function-type-nargs (continuation-type fun))
+ (fun-type-nargs (continuation-type fun))
(let ((total-nvals
(multiple-value-bind (types nvals)
(values-types (continuation-derived-type (first args)))
(let* ((arg (first (basic-combination-args call)))
(use (continuation-use arg)))
(when (and (combination-p use)
- (eq (continuation-function-name (combination-fun use))
+ (eq (continuation-fun-name (combination-fun use))
'values))
(let* ((fun (combination-lambda call))
(vars (lambda-vars fun))
(defoptimizer (values-list optimizer) ((list) node)
(let ((use (continuation-use list)))
(when (and (combination-p use)
- (eq (continuation-function-name (combination-fun use))
+ (eq (continuation-fun-name (combination-fun use))
'list))
(change-ref-leaf (continuation-use (combination-fun node))
(find-free-function 'values "in a strange place"))