Speedup overload resolution and some other stuff for faster C++ method calling.
src/smoke.lisp
Wed Jul 8 22:41:19 CEST 2009 Tobias Rautenkranz <tobias@rautenkranz.ch>
* Speedup overload resolution and some other stuff for faster C++ method calling.
--- old-smoke/src/smoke.lisp 2014-10-30 08:13:08.000000000 +0100
+++ new-smoke/src/smoke.lisp 2014-10-30 08:13:08.000000000 +0100
@@ -30,7 +30,7 @@
(declaim (inline call-s-method))
(defun call-s-method (method object-pointer stack-pointer)
(foreign-funcall-pointer
- (foreign-slot-value (pointer (get-class method))
+ (foreign-slot-value (smoke-class-pointer (get-class method))
'smoke-class
'class-function)
()
@@ -43,13 +43,13 @@
(defun s-call (method object-pointer &optional (args nil))
(with-stack (stack args (arguments method) )
- (call-s-method method object-pointer (pointer stack))
- (type-to-lisp (pointer stack) (return-type method))))
+ (call-s-method method object-pointer (call-stack-pointer stack))
+ (type-to-lisp (call-stack-pointer stack) (return-type method))))
(defun pointer-call (method object-pointer &optional (args nil))
(with-stack (stack args (arguments method) )
- (call-s-method method object-pointer (pointer stack))
- (foreign-slot-value (pointer stack) 'smoke-stack-item 'class)))
+ (call-s-method method object-pointer (call-stack-pointer stack))
+ (foreign-slot-value (call-stack-pointer stack) 'smoke-stack-item 'class)))
(defun smoke-call (class pointer method-name &optional (args nil))
@@ -73,8 +73,8 @@
;;
(assert (enum-p method))
(with-stack (stack nil nil)
- (call-s-method method (null-pointer) (pointer stack))
- (foreign-slot-value (pointer stack) 'smoke-stack-item 'long)))
+ (call-s-method method (null-pointer) (call-stack-pointer stack))
+ (foreign-slot-value (call-stack-pointer stack) 'smoke-stack-item 'long)))
(defun delete-pointer (pointer class)
"Destructs the object at POINTER of type CLASS.
@@ -104,7 +104,7 @@
'voidp)
(smoke-module-binding (smoke (class-of object))))
(foreign-funcall-pointer
- (foreign-slot-value (pointer (class-of object))
+ (foreign-slot-value (smoke-class-pointer (class-of object))
'smoke-class
'class-function)
()