master: Reduce type checks in invoke-fast-method-call
stassats via Sbcl-commits <[email protected]> Mon, 11 May 2026 12:39:18 +0000
| Newsgroups | gmane.lisp.steel-bank.cvs |
|---|---|
| Message-ID | <[email protected]> |
The branch "master" has been updated in SBCL:
via e0efcd56dd6b02cd106849993e582938f723d49b (commit)
from c7921a02d8b8ff95914108b2395069bdc7f299aa (commit)
- Log -----------------------------------------------------------------
commit e0efcd56dd6b02cd106849993e582938f723d49b
Author: Stas Boukarev <[email protected]>
Date: Mon May 11 15:37:09 2026 +0300
Reduce type checks in invoke-fast-method-call
---
src/pcl/boot.lisp | 4 ++--
src/pcl/dfun.lisp | 30 +++++++++++++++---------------
2 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/src/pcl/boot.lisp b/src/pcl/boot.lisp
index c4c5c1f57..3b920ad0a 100644
--- a/src/pcl/boot.lisp
+++ b/src/pcl/boot.lisp
@@ -1458,10 +1458,10 @@ bootstrapping.
`(progn
(trace-emf-call ,emf ,restp (list ,@required-args rest-arg))
,(if more-arg
- `(invoke-fast-method-call/more ,emf
+ `(invoke-fast-method-call/more (truly-the fast-method-call ,emf)
,@more-arg
,@required-args)
- `(invoke-fast-method-call ,emf
+ `(invoke-fast-method-call (truly-the fast-method-call ,emf)
,restp
,@required-args
,@rest-arg))))
diff --git a/src/pcl/dfun.lisp b/src/pcl/dfun.lisp
index 8e4aa79ca..b0c5bd9be 100644
--- a/src/pcl/dfun.lisp
+++ b/src/pcl/dfun.lisp
@@ -1062,7 +1062,7 @@ Except see also BREAK-VICIOUS-METACIRCLE. -- CSR, 2003-05-28
(if (and classes (equal classes (cdr (assq gf *cache-miss-values-stack*))))
(break-vicious-metacircle gf classes arg-info)
(let ((*cache-miss-values-stack*
- (acons gf classes *cache-miss-values-stack*))
+ (acons gf classes *cache-miss-values-stack*))
(cam-std-p (or (null arg-info)
(gf-info-c-a-m-emf-std-p arg-info))))
(multiple-value-bind (methods all-applicable-and-sorted-p)
@@ -1070,20 +1070,20 @@ Except see also BREAK-VICIOUS-METACIRCLE. -- CSR, 2003-05-28
(compute-applicable-methods-using-types gf types)
(compute-applicable-methods-using-classes gf classes))
- (let* ((for-accessor-p (eq state 'accessor))
- (for-cache-p (or (eq state 'caching) (eq state 'accessor)))
- (emf (if (or cam-std-p all-applicable-and-sorted-p)
- (let ((generator
- (get-secondary-dispatch-function1
- gf methods types nil (and for-cache-p wrappers)
- all-applicable-and-sorted-p)))
- (make-callable generator nil (and for-cache-p wrappers)))
- (default-secondary-dispatch-function gf))))
- (multiple-value-bind (index accessor-type)
- (and for-accessor-p all-applicable-and-sorted-p methods
- (accessor-values gf arg-info classes methods))
- (values (if (integerp index) index emf)
- methods accessor-type index)))))))
+ (let* ((for-accessor-p (eq state 'accessor))
+ (for-cache-p (or (eq state 'caching) (eq state 'accessor)))
+ (emf (if (or cam-std-p all-applicable-and-sorted-p)
+ (let ((generator
+ (get-secondary-dispatch-function1
+ gf methods types nil (and for-cache-p wrappers)
+ all-applicable-and-sorted-p)))
+ (make-callable generator nil (and for-cache-p wrappers)))
+ (default-secondary-dispatch-function gf))))
+ (multiple-value-bind (index accessor-type)
+ (and for-accessor-p all-applicable-and-sorted-p methods
+ (accessor-values gf arg-info classes methods))
+ (values (if (integerp index) index emf)
+ methods accessor-type index)))))))
;;; Try to break a vicious circle while computing a cache miss.
;;; GF is the generic function, CLASSES are the classes of actual
-----------------------------------------------------------------------
hooks/post-receive
--
SBCL