[webkit-dev] Function & Property Names
Nyx
mcheva at cs.mcgill.ca
Mon May 3 21:21:50 PDT 2010
Is there any way to get the number of parameters a function has declared from
a JSFunction object?
I'm asking because I want to get the argument values a function is receiving
in an op_call (in the interpreter). I copied this snipper of code for the
case where a host function is called:
Register* thisRegister = callFrame->registers() -
RegisterFile::CallFrameHeaderSize - argCount;
ArgList args(thisRegister + 1, argCount - 1);
The problem is that argCount is the number of arguments passed, and so, if
the function takes 5 arguments and 3 are passed, I'm not getting the first
2, only the last 3, two of which show up as "undefined". Hence I believe I
would need the number of arguments the function declares takes to properly
compute the register offset.
--
View this message in context: http://old.nabble.com/Function---Property-Names-tp28394250p28442878.html
Sent from the Webkit mailing list archive at Nabble.com.
More information about the webkit-dev
mailing list