ref: 3b5631980dcd375b0fb4af7f11e9131f904e6de5
parent: cf5c51767b9553275f53de47828a36db4ab5001b
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Wed Dec 25 01:09:57 EST 2024
compute_maxstack: add missing case for boxl
--- a/maxstack.inc
+++ b/maxstack.inc
@@ -2,14 +2,12 @@
compute_maxstack(uint8_t *code, size_t len)
{
uint8_t *ip = code+4, *end = code+len;
- uint8_t op;
uint32_t i, n, sp = 0, maxsp = 0;
while(ip < end){
if((int32_t)sp > (int32_t)maxsp)
maxsp = sp;
- op = *ip++;
- switch(op){
+ switch(*ip++){
case OP_LOADA: case OP_LOADI8: case OP_LOADV: case OP_LOADG:
ip++; // fallthrough
case OP_LOADA0: case OP_LOADA1:
@@ -50,7 +48,7 @@
case OP_LOADVL: case OP_LOADGL: case OP_LOADAL:
sp++; // fallthrough
- case OP_SETGL: case OP_SETAL: case OP_LARGC:
+ case OP_SETGL: case OP_SETAL: case OP_LARGC: case OP_BOXL:
SWAP_INT32(ip);
ip += 4;
break;