Skip to content
Snippets Groups Projects
Commit 8b415534 authored by ram's avatar ram
Browse files

Fixed CHECK-FREE-FUNCTION to not blow away :DECLARED types when we

see a definition, and some other minor tweaks.
parent f202857f
No related branches found
No related tags found
No related merge requests found
......@@ -52,9 +52,7 @@
;;; Check-Free-Function -- Interface
;;;
;;; If the entry is a functional, then we update the global environment
;;; according to the new definition, checking for inconsistency. If the entry
;;; is an unknown global function, then we add the uses into the function's
;;; approximate type.
;;; according to the new definition, checking for inconsistency.
;;;
(proclaim '(function check-free-function (t leaf) void))
(defun check-free-function (name leaf)
......@@ -64,19 +62,15 @@
(dtype (leaf-type leaf))
(*compiler-error-context* (lambda-bind (main-entry leaf))))
(note-name-defined name :function)
(when (function-type-p dtype)
(ecase where
(:assumed
(let ((approx-type (info function assumed-type name)))
(when approx-type
(valid-approximate-type approx-type dtype))))
((:declared :defined)
))
(setf (info function type name) dtype)
(clear-info function assumed-type name))
(setf (info function kind name) :function)
(setf (info function where-from name) :defined)))
(ecase where
(:assumed
(let ((approx-type (info function assumed-type name)))
(when (and approx-type (function-type-p dtype))
(valid-approximate-type approx-type dtype))
(setf (info function type name) dtype)
(setf (info function assumed-type name) nil))
(setf (info function where-from name) :defined))
(:declared); No check for now, just keep declared type.
(:defined
(setf (info function type name) dtype)))))
(global-var)))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment