diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2019-07-26 14:59:39 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2019-07-26 14:59:39 -0300 |
commit | b80077b8f3e27a94c6afa895b41a9f8b52c42e61 (patch) | |
tree | 8a7c21ee0acfed553ef1d92bdfd7b1f728f35a91 /lopcodes.c | |
parent | e70f275f32a5339a86be6f8b9d08c20cb874b205 (diff) | |
download | lua-b80077b8f3e27a94c6afa895b41a9f8b52c42e61.tar.gz lua-b80077b8f3e27a94c6afa895b41a9f8b52c42e61.tar.bz2 lua-b80077b8f3e27a94c6afa895b41a9f8b52c42e61.zip |
Change in the handling of 'L->top' when calling metamethods
Instead of updating 'L->top' in every place that may call a
metamethod, the metamethod functions themselves (luaT_trybinTM and
luaT_callorderTM) correct the top. (When calling metamethods from
the C API, however, the callers must preserve 'L->top'.)
Diffstat (limited to 'lopcodes.c')
-rw-r--r-- | lopcodes.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -101,7 +101,7 @@ LUAI_DDEF const lu_byte luaP_opmodes[NUM_OPCODES] = { | |||
101 | ,opmode(0, 1, 0, 0, iABC) /* OP_SETLIST */ | 101 | ,opmode(0, 1, 0, 0, iABC) /* OP_SETLIST */ |
102 | ,opmode(0, 0, 0, 1, iABx) /* OP_CLOSURE */ | 102 | ,opmode(0, 0, 0, 1, iABx) /* OP_CLOSURE */ |
103 | ,opmode(1, 0, 0, 1, iABC) /* OP_VARARG */ | 103 | ,opmode(1, 0, 0, 1, iABC) /* OP_VARARG */ |
104 | ,opmode(0, 0, 0, 1, iABC) /* OP_VARARGPREP */ | 104 | ,opmode(0, 1, 0, 1, iABC) /* OP_VARARGPREP */ |
105 | ,opmode(0, 0, 0, 0, iAx) /* OP_EXTRAARG */ | 105 | ,opmode(0, 0, 0, 0, iAx) /* OP_EXTRAARG */ |
106 | }; | 106 | }; |
107 | 107 | ||