aboutsummaryrefslogtreecommitdiff
path: root/ltm.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2019-08-29 12:52:37 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2019-08-29 12:52:37 -0300
commit72a094bda7d71050a91a88474d67d39aa2bc1c46 (patch)
treeb14358bae6d5e0ba4a4d2c2bf515d82d8cf25b40 /ltm.c
parent46b84580d6d7890f4ba813f312e52514fffc38a7 (diff)
downloadlua-72a094bda7d71050a91a88474d67d39aa2bc1c46.tar.gz
lua-72a094bda7d71050a91a88474d67d39aa2bc1c46.tar.bz2
lua-72a094bda7d71050a91a88474d67d39aa2bc1c46.zip
Undo change in the handling of 'L->top' (commit b80077b8f3)
With MMBIN instructions, there are fewer opcodes that need to update 'L->top', so that change does not seem to pay for the increased complexity.
Diffstat (limited to 'ltm.c')
-rw-r--r--ltm.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/ltm.c b/ltm.c
index 991e62c1..1e32d86a 100644
--- a/ltm.c
+++ b/ltm.c
@@ -147,7 +147,6 @@ static int callbinTM (lua_State *L, const TValue *p1, const TValue *p2,
147 147
148void luaT_trybinTM (lua_State *L, const TValue *p1, const TValue *p2, 148void luaT_trybinTM (lua_State *L, const TValue *p1, const TValue *p2,
149 StkId res, TMS event) { 149 StkId res, TMS event) {
150 L->top = L->ci->top;
151 if (!callbinTM(L, p1, p2, res, event)) { 150 if (!callbinTM(L, p1, p2, res, event)) {
152 switch (event) { 151 switch (event) {
153 case TM_BAND: case TM_BOR: case TM_BXOR: 152 case TM_BAND: case TM_BOR: case TM_BXOR:
@@ -191,7 +190,6 @@ void luaT_trybiniTM (lua_State *L, const TValue *p1, lua_Integer i2,
191 190
192int luaT_callorderTM (lua_State *L, const TValue *p1, const TValue *p2, 191int luaT_callorderTM (lua_State *L, const TValue *p1, const TValue *p2,
193 TMS event) { 192 TMS event) {
194 L->top = L->ci->top;
195 if (callbinTM(L, p1, p2, L->top, event)) /* try original event */ 193 if (callbinTM(L, p1, p2, L->top, event)) /* try original event */
196 return !l_isfalse(s2v(L->top)); 194 return !l_isfalse(s2v(L->top));
197#if defined(LUA_COMPAT_LT_LE) 195#if defined(LUA_COMPAT_LT_LE)