aboutsummaryrefslogtreecommitdiff
path: root/ltm.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2019-08-27 13:59:39 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2019-08-27 13:59:39 -0300
commitdf13f259487459f3a28d31d76c890aa6c2d061e0 (patch)
treef354a0746530369d4dd70113c9752d019fbd200b /ltm.h
parent643188d6e58dfd3270d689230867289347260b74 (diff)
downloadlua-df13f259487459f3a28d31d76c890aa6c2d061e0.tar.gz
lua-df13f259487459f3a28d31d76c890aa6c2d061e0.tar.bz2
lua-df13f259487459f3a28d31d76c890aa6c2d061e0.zip
First version of OP_MMBIN opcodes
In arithmetic/bitwise operators, the call to metamethods is made in a separate opcode following the main one. (The main opcode skips this next one when the operation succeeds.) This change reduces slightly the size of the binary and the complexity of the arithmetic/bitwise opcodes. It also simplfies the treatment of errors and yeld/resume in these operations, as there are much fewer cases to consider. (Only OP_MMBIN/OP_MMBINI/OP_MMBINK, instead of all variants of all arithmetic/bitwise operators.)
Diffstat (limited to 'ltm.h')
-rw-r--r--ltm.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/ltm.h b/ltm.h
index 51dfe793..9621e68e 100644
--- a/ltm.h
+++ b/ltm.h
@@ -77,7 +77,7 @@ LUAI_FUNC void luaT_trybinTM (lua_State *L, const TValue *p1, const TValue *p2,
77 StkId res, TMS event); 77 StkId res, TMS event);
78LUAI_FUNC void luaT_tryconcatTM (lua_State *L); 78LUAI_FUNC void luaT_tryconcatTM (lua_State *L);
79LUAI_FUNC void luaT_trybinassocTM (lua_State *L, const TValue *p1, 79LUAI_FUNC void luaT_trybinassocTM (lua_State *L, const TValue *p1,
80 const TValue *p2, StkId res, int inv, TMS event); 80 const TValue *p2, int inv, StkId res, TMS event);
81LUAI_FUNC void luaT_trybiniTM (lua_State *L, const TValue *p1, lua_Integer i2, 81LUAI_FUNC void luaT_trybiniTM (lua_State *L, const TValue *p1, lua_Integer i2,
82 int inv, StkId res, TMS event); 82 int inv, StkId res, TMS event);
83LUAI_FUNC int luaT_callorderTM (lua_State *L, const TValue *p1, 83LUAI_FUNC int luaT_callorderTM (lua_State *L, const TValue *p1,