Signed-off-by: Tomek Grabiec <tgrab...@gmail.com>
---
 include/vm/call.h |   24 ++++++++++++++++++++++++
 1 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/include/vm/call.h b/include/vm/call.h
index 872579b..eed2b0e 100644
--- a/include/vm/call.h
+++ b/include/vm/call.h
@@ -32,6 +32,21 @@ unsigned long vm_call_method_a(struct vm_method *method, 
unsigned long *args);
                return result;                                          \
        }
 
+#define DECLARE_VM_CALL_METHOD_THIS(type)                              \
+       static inline j ## type                                         \
+       vm_call_method_this_ ## type(struct vm_method *method,          \
+                                    struct vm_object *this, ...)       \
+       {                                                               \
+               j ## type result;                                       \
+               va_list args;                                           \
+                                                                       \
+               va_start(args, this);                                   \
+               result = (j ## type)vm_call_method_this_v(method, this, args); \
+               va_end(args);                                           \
+                                                                       \
+               return result;                                          \
+       }
+
 static inline void vm_call_method(struct vm_method *method, ...)
 {
        va_list args;
@@ -50,6 +65,15 @@ DECLARE_VM_CALL_METHOD(short);
 DECLARE_VM_CALL_METHOD(object);
 DECLARE_VM_CALL_METHOD(int);
 
+DECLARE_VM_CALL_METHOD_THIS(byte);
+DECLARE_VM_CALL_METHOD_THIS(boolean);
+DECLARE_VM_CALL_METHOD_THIS(double);
+DECLARE_VM_CALL_METHOD_THIS(float);
+DECLARE_VM_CALL_METHOD_THIS(long);
+DECLARE_VM_CALL_METHOD_THIS(short);
+DECLARE_VM_CALL_METHOD_THIS(object);
+DECLARE_VM_CALL_METHOD_THIS(int);
+
 extern unsigned long native_call(struct vm_method *method,
                                 const void *target,
                                 unsigned long *args);
-- 
1.6.0.6


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Jatovm-devel mailing list
Jatovm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jatovm-devel

Reply via email to