Commit a6ff11c8 authored by Marius Gerbershagen's avatar Marius Gerbershagen

cmp: prevent inlining of stale function definitions

    If a function which was previously proclaimed inline by the
    native compiler was redefined by the bytecodes compiler, the
    native compiler would still continue to inline the old
    definition (see also commit 892e2101).
parent 846abed0
......@@ -89,7 +89,17 @@ VARIABLE doc and can be retrieved by (DOCUMENTATION 'SYMBOL 'VARIABLE)."
(si::register-global ',var)))
',var))
(defparameter *defun-inline-hook* nil)
(defparameter *defun-inline-hook*
#'(lambda (fname form env)
;; To prevent inlining of stale function definitions by the native
;; compiler after a new definition has been established by the
;; bytecodes compiler, we save function definitions in the global
;; environment when the function has been proclaimed inline.
(declare (ignore env))
(let ((proclaimed (si:get-sysprop fname 'inline)))
(when proclaimed
`(eval-when (:compile-toplevel :load-toplevel :execute)
(si:put-sysprop ',fname 'inline ',form))))))
(defmacro defun (&whole whole name vl &body body &environment env &aux doc-string)
;; Documentation in help.lsp
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment