aboutsummaryrefslogtreecommitdiff
path: root/lopcodes.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2018-02-07 13:18:04 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2018-02-07 13:18:04 -0200
commit318a9a5859826d7af0294664e206236fc8814319 (patch)
tree31a00af286880036e5ef165fbbdaf7df9a04cfc1 /lopcodes.c
parent73d797ce7ea4c547cb97e39633a71a242c7356c8 (diff)
downloadlua-318a9a5859826d7af0294664e206236fc8814319.tar.gz
lua-318a9a5859826d7af0294664e206236fc8814319.tar.bz2
lua-318a9a5859826d7af0294664e206236fc8814319.zip
new opcode 'PREPVARARG'
(avoids test for vararg function in all function calls)
Diffstat (limited to 'lopcodes.c')
-rw-r--r--lopcodes.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lopcodes.c b/lopcodes.c
index a5867d23..cd85f1a9 100644
--- a/lopcodes.c
+++ b/lopcodes.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lopcodes.c,v 1.74 2017/12/18 17:49:31 roberto Exp $ 2** $Id: lopcodes.c,v 1.75 2017/12/22 14:16:46 roberto Exp roberto $
3** Opcodes for Lua virtual machine 3** Opcodes for Lua virtual machine
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -91,6 +91,7 @@ LUAI_DDEF const char *const luaP_opnames[NUM_OPCODES+1] = {
91 "SETLIST", 91 "SETLIST",
92 "CLOSURE", 92 "CLOSURE",
93 "VARARG", 93 "VARARG",
94 "PREPVARARG",
94 "EXTRAARG", 95 "EXTRAARG",
95 NULL 96 NULL
96}; 97};
@@ -171,6 +172,7 @@ LUAI_DDEF const lu_byte luaP_opmodes[NUM_OPCODES] = {
171 ,opmode(0, 1, 0, 0, iABC) /* OP_SETLIST */ 172 ,opmode(0, 1, 0, 0, iABC) /* OP_SETLIST */
172 ,opmode(0, 0, 0, 1, iABx) /* OP_CLOSURE */ 173 ,opmode(0, 0, 0, 1, iABx) /* OP_CLOSURE */
173 ,opmode(1, 0, 0, 1, iABC) /* OP_VARARG */ 174 ,opmode(1, 0, 0, 1, iABC) /* OP_VARARG */
175 ,opmode(0, 0, 0, 1, iABC) /* OP_PREPVARARG */
174 ,opmode(0, 0, 0, 0, iAx) /* OP_EXTRAARG */ 176 ,opmode(0, 0, 0, 0, iAx) /* OP_EXTRAARG */
175}; 177};
176 178