lua-users home
lua-l archive

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

Does it make sense for LuaJIT to recognize certain special cases for varargs in actual traces -- e.g., 0 arguments and 1 argument? I'm thinking this would be a useful compromise for generic code.

For example, the following function would probably optimize well in practice if not in the general case:

	function broadcast( array, msg, ... )
		for i = 1, #array do
			local obj = array[ i ]
			pcall( obj[ msg ], obj, ... )