vararg back to '...' (but with another implementation)

new implementation should have zero overhead for non-vararg functions
This commit is contained in:
Roberto Ierusalimschy
2018-02-09 13:16:06 -02:00
parent 4e0de3a43c
commit b1379936cf
11 changed files with 136 additions and 113 deletions

View File

@@ -1,5 +1,5 @@
/*
** $Id: lopcodes.c,v 1.75 2017/12/22 14:16:46 roberto Exp roberto $
** $Id: lopcodes.c,v 1.76 2018/02/07 15:18:04 roberto Exp roberto $
** Opcodes for Lua virtual machine
** See Copyright Notice in lua.h
*/
@@ -80,6 +80,7 @@ LUAI_DDEF const char *const luaP_opnames[NUM_OPCODES+1] = {
"CALL",
"TAILCALL",
"RETURN",
"RETVARARG",
"RETURN0",
"RETURN1",
"FORLOOP1",
@@ -161,6 +162,7 @@ LUAI_DDEF const lu_byte luaP_opmodes[NUM_OPCODES] = {
,opmode(1, 1, 0, 1, iABC) /* OP_CALL */
,opmode(1, 1, 0, 1, iABC) /* OP_TAILCALL */
,opmode(0, 1, 0, 0, iABC) /* OP_RETURN */
,opmode(0, 1, 0, 0, iABC) /* OP_RETVARARG */
,opmode(0, 0, 0, 0, iABC) /* OP_RETURN0 */
,opmode(0, 0, 0, 0, iABC) /* OP_RETURN1 */
,opmode(0, 0, 0, 1, iABx) /* OP_FORLOOP1 */