lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Is there any reason not to expose the numparams and is_vararg information through the debug interface? (I would assume that C functions would be reported as having no parameters and being vararg functions.) The reason I ask is that efforts like the sequence iterators work could potentially do code generation to optimize away use of varargs if that would actually be more efficient. It looks straightforward to wire up following the pattern of the upvalues count. I was wondering whether the fact that it isn't exposed reflected some particular subtlety.

On a broader note, it might be interesting to factor the debug interface into a "safe", fast reflection API and a more intrusive, slower debug API.

Mark