Skip to content
Snippets Groups Projects
Commit 747fd9ad authored by rtoy's avatar rtoy
Browse files

Fix bug in profile-all not being able to profile all symbols because

ensure-profile-fwrapper was not able to create profile fwrappers for 4
or more args.

This is a hack; I don't know why the original version doesn't work.
parent 74c3f536
No related branches found
No related tags found
No related merge requests found
......@@ -5,7 +5,7 @@
;;; Carnegie Mellon University, and has been placed in the public domain.
;;;
(ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/profile.lisp,v 1.38 2004/05/04 14:29:13 rtoy Exp $")
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/profile.lisp,v 1.39 2004/09/28 16:43:26 rtoy Exp $")
;;;
;;; **********************************************************************
;;;
......@@ -339,6 +339,7 @@ this, the functions are listed. If NIL, then always list the functions.")
(def-profile-fwrapper 2)
(def-profile-fwrapper 3))
#+(or)
(defun ensure-profile-fwrapper (nreq optionals-p)
"Ensure that a profile fwrapper for functions with NREQ required
arguments and optional arguments according to OPTIONALS-P exists.
......@@ -350,6 +351,21 @@ this, the functions are listed. If NIL, then always list the functions.")
(compile name)))
name))
(defun ensure-profile-fwrapper (nreq optionals-p)
"Ensure that a profile fwrapper for functions with NREQ required
arguments and optional arguments according to OPTIONALS-P exists.
Return the name of that fwrapper."
(let ((name (make-profile-fwrapper-name nreq optionals-p)))
(unless (fboundp name)
(without-package-locks
;; I (rtoy) do not know why the above version does not work,
;; but this seems to work better.
(destructuring-bind (def name args &body body)
(macroexpand-1 (make-profile-fwrapper nreq optionals-p))
(declare (ignore def))
(compile name `(lambda ,args ,@body)))))
name))
(defun find-profile-fwrapper (name)
"Return the profile FWRAPPER object on function NAME, if any."
(find-fwrapper name :type 'profile))
......
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