From fcc46467fa92c8e9951e63baf2c3e1b22bf20a1f Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 23 Sep 2009 17:33:05 -0300 Subject: limit of constants per function changed to 2^26 using extra arguments to opcodes LOADK, GETGLOBAL, and SETGLOBAL --- ldebug.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'ldebug.c') diff --git a/ldebug.c b/ldebug.c index 58039611..8e63a4f9 100644 --- a/ldebug.c +++ b/ldebug.c @@ -1,5 +1,5 @@ /* -** $Id: ldebug.c,v 2.52 2009/06/10 16:57:53 roberto Exp roberto $ +** $Id: ldebug.c,v 2.53 2009/08/07 16:17:41 roberto Exp roberto $ ** Debug Interface ** See Copyright Notice in lua.h */ @@ -299,7 +299,9 @@ static const char *getobjname (lua_State *L, CallInfo *ci, int reg, switch (op) { case OP_GETGLOBAL: { if (reg == a) { - int g = GETARG_Bx(i); /* global index */ + int g = GETARG_Bx(i); + if (g != 0) g--; + else g = GETARG_Ax(p->code[++pc]); lua_assert(ttisstring(&p->k[g])); *name = svalue(&p->k[g]); what = "global"; -- cgit v1.2.3-55-g6feb