diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2019-08-29 12:52:37 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2019-08-29 12:52:37 -0300 |
| commit | 72a094bda7d71050a91a88474d67d39aa2bc1c46 (patch) | |
| tree | b14358bae6d5e0ba4a4d2c2bf515d82d8cf25b40 /ltm.c | |
| parent | 46b84580d6d7890f4ba813f312e52514fffc38a7 (diff) | |
| download | lua-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.c | 2 |
1 files changed, 0 insertions, 2 deletions
| @@ -147,7 +147,6 @@ static int callbinTM (lua_State *L, const TValue *p1, const TValue *p2, | |||
| 147 | 147 | ||
| 148 | void luaT_trybinTM (lua_State *L, const TValue *p1, const TValue *p2, | 148 | void 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 | ||
| 192 | int luaT_callorderTM (lua_State *L, const TValue *p1, const TValue *p2, | 191 | int 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) |
