aboutsummaryrefslogtreecommitdiff
path: root/lvm.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2020-10-06 15:50:24 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2020-10-12 12:29:09 -0300
commit5aa36e894f5a0348dfd19bd9cdcdd27ce8aa5f05 (patch)
treeda97440202c35ef78d3ad9e440cba959835d88d9 /lvm.c
parent9ecd446141f572252a57cb33d2bba6aa00d96a55 (diff)
downloadlua-5aa36e894f5a0348dfd19bd9cdcdd27ce8aa5f05.tar.gz
lua-5aa36e894f5a0348dfd19bd9cdcdd27ce8aa5f05.tar.bz2
lua-5aa36e894f5a0348dfd19bd9cdcdd27ce8aa5f05.zip
No more field 'lua_State.stacksize'
The stack size is derived from 'stack_last', when needed. Moreover, the handling of stack sizes is more consistent, always excluding the extra space except when allocating/deallocating the array.
Diffstat (limited to '')
-rw-r--r--lvm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lvm.c b/lvm.c
index 51b22d81..72d3e695 100644
--- a/lvm.c
+++ b/lvm.c
@@ -1151,7 +1151,7 @@ void luaV_execute (lua_State *L, CallInfo *ci) {
1151 StkId ra; /* instruction's A register */ 1151 StkId ra; /* instruction's A register */
1152 vmfetch(); 1152 vmfetch();
1153 lua_assert(base == ci->func + 1); 1153 lua_assert(base == ci->func + 1);
1154 lua_assert(base <= L->top && L->top < L->stack + L->stacksize); 1154 lua_assert(base <= L->top && L->top < L->stack_last);
1155 /* invalidate top for instructions not expecting it */ 1155 /* invalidate top for instructions not expecting it */
1156 lua_assert(isIT(i) || (cast_void(L->top = base), 1)); 1156 lua_assert(isIT(i) || (cast_void(L->top = base), 1));
1157 vmdispatch (GET_OPCODE(i)) { 1157 vmdispatch (GET_OPCODE(i)) {