Hello Friends,
I am at a point where I need to understand how does the native jvm
function "do_execute_java_method_vararg", gets hold of the method
args. Thank you all, for reading through my post and please, if you
have any ideas that could help me learn this, please post them. I
would be very thankful.
The signature of the function 'do_execute_java_method_vararg" looks
like this:
long do_execute_java_method_vararg (ExecEnv * ee, void * obj,char *
method_name, char * method_signature,struct methodblock * mb, bool_t
isStaticCall,va_list args,long * otherBits, bool_t shortFloats)
As I understand that, the "args" in the signature should contain the
actual arguments that a method specified in the methodblock (mb,
above) takes.
So, how is this list traversed? So, if this is being traversed in the
way of a typical va_list, like:
va_start(args,ee->current_frame->optop); // Is the second parameter
correct here?
for(int i = 1 ; i < methodblockPtr->args_size; i++ )
{
if(shortFloats != 0)
{
longArg = va_arg( args,long );
//do something with this longArg
}
else
{
doubleArg = va_arg( args,double );
//do something with doubleArg
}
}//end for loop
va_end( args );
My question to you all, is that in "va_start", are the parameters that
I am assuming, Correct? I am very hopeful from you all, that I would
get help here, definitely. Thank you so much in advance.
Regards.
Chris Uppal - 04 Mar 2004 16:55 GMT
> [...snipped...]
Nobody has replied to this. I suspect it's because nobody really understands
what you are asking. If you are asking about va_list and how to use varargs
functions in 'C' then ask again and we can probably tell you (but you'd
probably get better information by asking on comp.lang.c). If you are asking
something about the specific use of varargs in some JVM implementation, then
maybe someone can help with that too, but you'll have to tell us *which* JVM
implementation, and -- since it seems to be about the internal
implementation -- there may not be anyone who reads this group who knows
anything about that specific JVM.
-- chris