From 4758113043b6c362a0fdce77715c711332d909dc Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Tue, 19 Apr 2011 13:22:13 -0300 Subject: 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.) --- lvm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lvm.c') diff --git a/lvm.c b/lvm.c index 7356a398..decd2219 100644 --- a/lvm.c +++ b/lvm.c @@ -1,5 +1,5 @@ /* -** $Id: lvm.c,v 2.134 2011/04/07 18:14:12 roberto Exp roberto $ +** $Id: lvm.c,v 2.135 2011/04/18 19:48:53 roberto Exp roberto $ ** Lua virtual machine ** See Copyright Notice in lua.h */ @@ -541,10 +541,10 @@ void luaV_execute (lua_State *L) { if (GETARG_C(i)) ci->u.l.savedpc++; /* skip next instruction (if C) */ ) vmcase(OP_LOADNIL, - TValue *rb = RB(i); + int b = GETARG_B(i); do { - setnilvalue(rb--); - } while (rb >= ra); + setnilvalue(ra++); + } while (b--); ) vmcase(OP_GETUPVAL, int b = GETARG_B(i); -- cgit v1.2.3-55-g6feb