aboutsummaryrefslogtreecommitdiff
path: root/ldebug.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2011-04-07 15:14:12 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2011-04-07 15:14:12 -0300
commit427ee519db76b7a0747b5fc1d5dcf97092b5c0bf (patch)
tree9c4000cbd08211ddc5de55db60dde2c8ba1dd16e /ldebug.c
parenta958b711f511e4f533d27cc6c27196e87b8cf346 (diff)
downloadlua-427ee519db76b7a0747b5fc1d5dcf97092b5c0bf.tar.gz
lua-427ee519db76b7a0747b5fc1d5dcf97092b5c0bf.tar.bz2
lua-427ee519db76b7a0747b5fc1d5dcf97092b5c0bf.zip
new instruction OP_LOADKX (to replace OP_LOADK with extra argument)
Diffstat (limited to 'ldebug.c')
-rw-r--r--ldebug.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/ldebug.c b/ldebug.c
index d473de7c..dd086452 100644
--- a/ldebug.c
+++ b/ldebug.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ldebug.c,v 2.75 2010/11/30 17:17:51 roberto Exp roberto $ 2** $Id: ldebug.c,v 2.76 2011/01/26 16:30:02 roberto Exp roberto $
3** Debug Interface 3** Debug Interface
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -342,10 +342,11 @@ static const char *getobjname (lua_State *L, CallInfo *ci, int reg,
342 } 342 }
343 break; 343 break;
344 } 344 }
345 case OP_LOADK: { 345 case OP_LOADK:
346 case OP_LOADKX: {
346 if (reg == a) { 347 if (reg == a) {
347 int b = GETARG_Bx(i); 348 int b = (op == OP_LOADK) ? GETARG_Bx(i)
348 b = (b > 0) ? b - 1 : GETARG_Ax(p->code[pc + 1]); 349 : GETARG_Ax(p->code[pc + 1]);
349 if (ttisstring(&p->k[b])) { 350 if (ttisstring(&p->k[b])) {
350 what = "constant"; 351 what = "constant";
351 *name = svalue(&p->k[b]); 352 *name = svalue(&p->k[b]);