1
;; Warn of some slow calls.
4
;; slow if the result type is type T
5
(dolist (v '(+ * / mod - float 1- 1+))
6
(setf (get v 'slow-test)
7
#'(lambda (name x) (or (null x) (eql (cadar x) t)))))
9
;; slow if the first arg is type T
10
(dolist (v '(aref si::aset < <= > >=))
11
(setf (get v 'slow-test)
12
#'(lambda (name x) (or (null x) (eql (caar x) t)))))
15
(setf (get v 'slow-test)
16
#'(lambda (name x) (null x))))
19
;; turn the compiler expressions back into something vaguely
23
(cond ((equal tem 'var)
24
(var-name (car (third x))))
25
((eq tem 'call-global)
27
(mapcar 'lispify (fourth x))))
28
((eq tem 'fixnum-value)
34
(eval-when (load eval)
35
(trace (get-inline-info :entry nil
38
(and (not (equal (car values) nil))
39
(let ((s (get (car si::arglist) 'slow-test)))
40
(and s (funcall s (car si::arglist) (car values))))
42
(cmpwarn "Slow code: ~a: "
43
(cons (car si::arglist)
44
(mapcar 'lispify (second si::arglist))))
45
(format t " ~a --> ~a~%"
46
(mapcar #'(lambda (form) (info-type (cadr form)))
b'\\ No newline at end of file'