lua-users home
lua-l archive

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


> > That optimization is useful for you only if both following conditions are
> > met:
> > 1) You did not access vararg using 3 dots (...) inside your main chunks.
> > 2) Your main chunks are invoked with non-empty argument list (although
> > those arguments are not used inside!).
> >
> > Now, you can say for sure whether unused-vararg-elimination is useful for
> > you or not.

I guess we can have an intermediate behavior: unlike regular functions,
main chunks are not explicitly marked as varargs (as they do not have
parameter lists). So, we could make main chunks vararg only if they use
varargs. Other functions would behave "as expected": those marked as
vararg (with '...' in the parameter list) are always vararg.

-- Roberto