89
91
(t (type-filter (cadar return-types)))))
90
92
(t (type-filter (car return-types)))))
92
(defun add-function-proclamation (fname decl &aux
93
arg-types return-types)
94
(cond ((and (symbolp fname)
95
(listp decl) (listp (cdr decl)))
96
(cond ((or (null decl)(eq (car decl) '*)) (setq arg-types '*)
97
(rem-sysprop fname 'PROCLAIMED-ARG-TYPES))
98
(t (setq arg-types (function-arg-types (car decl)))
99
(put-sysprop fname 'PROCLAIMED-ARG-TYPES arg-types)))
100
(cond ((or (null (cdr decl))(eq (second decl) '*))
101
(setq return-types '*))
102
(t (setq return-types (function-return-type (cdr decl)))))
103
(put-sysprop fname 'PROCLAIMED-RETURN-TYPE return-types)
104
(cond((eql return-types '*))
105
(t(setq return-types (cdr decl))))
106
;;; A non-local function may have local entry only if it returns
108
(if (and (not (endp return-types))
109
(endp (cdr return-types))
110
(not (and (consp (car return-types))
111
(eq (caar return-types) 'VALUES)
112
(or (endp (cdar return-types))
113
(not (endp (cddar return-types)))))))
114
(put-sysprop fname 'PROCLAIMED-FUNCTION t)
115
(rem-sysprop fname 'PROCLAIMED-FUNCTION)))
116
(t (warn "The function procl ~s ~s is not valid." fname decl))))
94
(defun add-function-proclamation (fname decl)
101
(setf arg-types (pop l)))
102
(t (warn "The function proclamation ~s ~s is not valid."
105
((and (consp l) (null (rest l)))
106
(setf return-types (function-return-type l)))
107
(t (warn "The function proclamation ~s ~s is not valid."
109
(if (eq arg-types '*)
110
(rem-sysprop fname 'PROCLAIMED-ARG-TYPES)
111
(put-sysprop fname 'PROCLAIMED-ARG-TYPES arg-types))
112
(if (eq return-types '*)
113
(rem-sysprop fname 'PROCLAIMED-RETURN-TYPE)
114
(put-sysprop fname 'PROCLAIMED-RETURN-TYPE return-types)))
115
(warn "The function proclamation ~s ~s is not valid." fname decl)))
118
117
(defun add-function-declaration (fname arg-types return-types)
119
118
(if (si::valid-function-name-p fname)
163
162
;;; Proclamation and declaration handling.
165
164
(defun inline-possible (fname)
166
(not (or ; (compiler-push-events)
165
(not (or ; (compiler-<push-events)
166
;(>= *debug* 2) Breaks compilation of STACK-PUSH-VALUES
167
167
(member fname *notinline* :test #'same-fname-p)
168
168
(and (symbolp fname) (get-sysprop fname 'CMP-NOTINLINE)))))
186
186
(not (<= 0 (second x) 3)))
187
187
(warn "The OPTIMIZE proclamation ~s is illegal." x)
189
(DEBUG (setq *debug* (second x)))
190
190
(SAFETY (setq *safety* (second x)))
191
191
(SPACE (setq *space* (second x)))
192
192
(SPEED (setq *speed* (second x)))
346
346
(values body ss ts is others doc all-declarations)
349
(defun default-optimization (optimization)
356
(defun search-optimization-quality (declarations what)
357
(dolist (i (reverse declarations)
358
(default-optimization what))
359
(when (and (consp i) (eq (first i) 'optimize))
362
(when (eq (first j) what) (return (second j))))
349
366
(defun c1add-declarations (decls &aux (dl nil))
350
367
(dolist (decl decls dl)
359
376
(not (<= 0 (second x) 3)))
360
377
(cmpwarn "The OPTIMIZE proclamation ~s is illegal." x)
379
(DEBUG (setq *debug* (second x)))
363
380
(SAFETY (setq *safety* (second x)))
364
381
(SPACE (setq *space* (second x)))
365
382
((SPEED COMPILATION-SPEED))