Signed-off-by: Tomek Grabiec <tgrab...@gmail.com> --- vm/reflection.c | 14 ++++++++++---- 1 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/vm/reflection.c b/vm/reflection.c index c84eb49..90e4add 100644 --- a/vm/reflection.c +++ b/vm/reflection.c @@ -9,6 +9,9 @@ #include "jit/args.h" #include "jit/exception.h" +static int marshall_call_arguments(struct vm_method *vmm, unsigned long *args, + struct vm_object *args_array); + static struct vm_class *to_vmclass(struct vm_object *object) { struct vm_class *vmc; @@ -355,7 +358,7 @@ jint native_constructor_get_modifiers_internal(struct vm_object *ctor) struct vm_object * native_constructor_construct_native(struct vm_object *this, - struct vm_object *args, + struct vm_object *args_array, struct vm_object *declaring_class, int slot) { @@ -375,10 +378,13 @@ native_constructor_construct_native(struct vm_object *this, return NULL; } - /* TODO: We support only ()V constructors yet. */ - assert(args == NULL || args->array_length == 0); + unsigned long args[vmm->args_count]; + + args[0] = (unsigned long) result; + if (marshall_call_arguments(vmm, args + 1, args_array)) + return NULL; - vm_call_method(vmm, result); + vm_call_method_a(vmm, args); return result; } -- 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