From 021c2d16629a00103948405549f0d70fd5ec9ad9 Mon Sep 17 00:00:00 2001 From: Nikodemus Siivola Date: Sat, 26 Jan 2013 23:14:02 +0200 Subject: [PATCH] better debug name for secondary GF dispatch functions Fixes lp#503081 --- src/pcl/methods.lisp | 2 +- tests/debug.impure.lisp | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/pcl/methods.lisp b/src/pcl/methods.lisp index c1e5fc4..efbd482 100644 --- a/src/pcl/methods.lisp +++ b/src/pcl/methods.lisp @@ -1414,7 +1414,7 @@ (make-dfun-lambda-list nargs applyp) (make-fast-method-call-lambda-list nargs applyp)))) (multiple-value-bind (cfunction constants) - (get-fun1 `(lambda + (get-fun1 `(named-lambda (gf-dispatch ,name) ,arglist ,@(unless function-p `((declare (ignore .pv. .next-method-call.)))) diff --git a/tests/debug.impure.lisp b/tests/debug.impure.lisp index e64e664..7f6d1bc 100644 --- a/tests/debug.impure.lisp +++ b/tests/debug.impure.lisp @@ -751,4 +751,17 @@ (unless (zerop (length problems)) (error problems))))) +(defgeneric gf-dispatch-test/gf (x y) + (:method (x y) + (+ x y))) +(defun gf-dispatch-test/f (z) + (gf-dispatch-test/gf z)) + +(with-test (:name :gf-dispatch-backtrace) + ;; Fill the cache + (gf-dispatch-test/gf 1 1) + ;; Wrong argument count + (assert (verify-backtrace (lambda () (gf-dispatch-test/f 42)) + '(((sb-pcl::gf-dispatch gf-dispatch-test/gf) 42))))) + (write-line "/debug.impure.lisp done") -- 1.7.10.4