summaryrefslogtreecommitdiff
path: root/lvm.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2011-04-19 13:22:13 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2011-04-19 13:22:13 -0300
commit4758113043b6c362a0fdce77715c711332d909dc (patch)
treedeea8a795161332bb1579f201f8a7eb5e4b102b9 /lvm.c
parenta4e644add264b6bac3171a03aa6febcf61e89ae6 (diff)
downloadlua-4758113043b6c362a0fdce77715c711332d909dc.tar.gz
lua-4758113043b6c362a0fdce77715c711332d909dc.tar.bz2
lua-4758113043b6c362a0fdce77715c711332d909dc.zip
change in opcode OP_LOADNIL: B is used as a counter instead of a
register. (Avoids an assignment to R(B), not present in any other instruction.)
Diffstat (limited to 'lvm.c')
-rw-r--r--lvm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lvm.c b/lvm.c
index 7356a398..decd2219 100644
--- a/lvm.c
+++ b/lvm.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lvm.c,v 2.134 2011/04/07 18:14:12 roberto Exp roberto $ 2** $Id: lvm.c,v 2.135 2011/04/18 19:48:53 roberto Exp roberto $
3** Lua virtual machine 3** Lua virtual machine
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -541,10 +541,10 @@ void luaV_execute (lua_State *L) {
541 if (GETARG_C(i)) ci->u.l.savedpc++; /* skip next instruction (if C) */ 541 if (GETARG_C(i)) ci->u.l.savedpc++; /* skip next instruction (if C) */
542 ) 542 )
543 vmcase(OP_LOADNIL, 543 vmcase(OP_LOADNIL,
544 TValue *rb = RB(i); 544 int b = GETARG_B(i);
545 do { 545 do {
546 setnilvalue(rb--); 546 setnilvalue(ra++);
547 } while (rb >= ra); 547 } while (b--);
548 ) 548 )
549 vmcase(OP_GETUPVAL, 549 vmcase(OP_GETUPVAL,
550 int b = GETARG_B(i); 550 int b = GETARG_B(i);