Don't dispatch virtual methods for builtin classes (reduces overhead).
src/clos.lisp
Thu Feb 18 20:57:00 CET 2010 Tobias Rautenkranz <tobias@rautenkranz.ch>
* Don't dispatch virtual methods for builtin classes (reduces overhead).
--- old-smoke/src/clos.lisp 2014-10-30 08:06:44.000000000 +0100
+++ new-smoke/src/clos.lisp 2014-10-30 08:06:44.000000000 +0100
@@ -347,9 +347,7 @@
;; The Lisp OBJECT can be gc'ed but we might still receive a
;; QObject destructed event when the C++ instance is deleted in
;; the finalizer. Thus OBJECT might be NIL.
- (when (and object (typep (class-of object) 'cxx:class))
- ;; Do not allow overwriting methods of classes the users has
- ;; not derived from (like in C++), to reduce overhead.
+ (unless (null object)
(let* ((method (make-smoke-method
:smoke (gethash (pointer-address
(smoke-get-smoke binding))