aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2003-11-19 17:59:18 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2003-11-19 17:59:18 -0200
commit8bc6c680219f6fe7dd96ea17235484b0ded5fc15 (patch)
treeb14aa28cf768d4c5378f9d1a55526c368bc921f0
parent57b6ed68151c965b48f662828c50264c50e81d73 (diff)
downloadlua-8bc6c680219f6fe7dd96ea17235484b0ded5fc15.tar.gz
lua-8bc6c680219f6fe7dd96ea17235484b0ded5fc15.tar.bz2
lua-8bc6c680219f6fe7dd96ea17235484b0ded5fc15.zip
details
-rw-r--r--lcode.c16
-rw-r--r--ltests.c8
2 files changed, 12 insertions, 12 deletions
diff --git a/lcode.c b/lcode.c
index 1f63a0d0..3dfcd8fb 100644
--- a/lcode.c
+++ b/lcode.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lcode.c,v 1.119 2003/08/27 20:58:52 roberto Exp $ 2** $Id: lcode.c,v 1.119 2003/08/27 21:01:44 roberto Exp roberto $
3** Code generator for Lua 3** Code generator for Lua
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -418,25 +418,25 @@ int luaK_exp2RK (FuncState *fs, expdesc *e) {
418} 418}
419 419
420 420
421void luaK_storevar (FuncState *fs, expdesc *var, expdesc *exp) { 421void luaK_storevar (FuncState *fs, expdesc *var, expdesc *ex) {
422 switch (var->k) { 422 switch (var->k) {
423 case VLOCAL: { 423 case VLOCAL: {
424 freeexp(fs, exp); 424 freeexp(fs, ex);
425 luaK_exp2reg(fs, exp, var->info); 425 luaK_exp2reg(fs, ex, var->info);
426 return; 426 return;
427 } 427 }
428 case VUPVAL: { 428 case VUPVAL: {
429 int e = luaK_exp2anyreg(fs, exp); 429 int e = luaK_exp2anyreg(fs, ex);
430 luaK_codeABC(fs, OP_SETUPVAL, e, var->info, 0); 430 luaK_codeABC(fs, OP_SETUPVAL, e, var->info, 0);
431 break; 431 break;
432 } 432 }
433 case VGLOBAL: { 433 case VGLOBAL: {
434 int e = luaK_exp2anyreg(fs, exp); 434 int e = luaK_exp2anyreg(fs, ex);
435 luaK_codeABx(fs, OP_SETGLOBAL, e, var->info); 435 luaK_codeABx(fs, OP_SETGLOBAL, e, var->info);
436 break; 436 break;
437 } 437 }
438 case VINDEXED: { 438 case VINDEXED: {
439 int e = luaK_exp2RK(fs, exp); 439 int e = luaK_exp2RK(fs, ex);
440 luaK_codeABC(fs, OP_SETTABLE, var->info, var->aux, e); 440 luaK_codeABC(fs, OP_SETTABLE, var->info, var->aux, e);
441 break; 441 break;
442 } 442 }
@@ -445,7 +445,7 @@ void luaK_storevar (FuncState *fs, expdesc *var, expdesc *exp) {
445 break; 445 break;
446 } 446 }
447 } 447 }
448 freeexp(fs, exp); 448 freeexp(fs, ex);
449} 449}
450 450
451 451
diff --git a/ltests.c b/ltests.c
index ead3d86e..b342b169 100644
--- a/ltests.c
+++ b/ltests.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltests.c,v 1.167 2003/10/20 12:25:23 roberto Exp roberto $ 2** $Id: ltests.c,v 1.168 2003/11/05 11:59:14 roberto Exp roberto $
3** Internal Module for Debugging of the Lua Implementation 3** Internal Module for Debugging of the Lua Implementation
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -354,21 +354,21 @@ static int tref (lua_State *L) {
354 luaL_checkany(L, 1); 354 luaL_checkany(L, 1);
355 lua_pushvalue(L, 1); 355 lua_pushvalue(L, 1);
356 lua_pushinteger(L, lua_ref(L, lock)); 356 lua_pushinteger(L, lua_ref(L, lock));
357 assert(lua_gettop(L) == level+1); /* +1 for result */ 357 lua_assert(lua_gettop(L) == level+1); /* +1 for result */
358 return 1; 358 return 1;
359} 359}
360 360
361static int getref (lua_State *L) { 361static int getref (lua_State *L) {
362 int level = lua_gettop(L); 362 int level = lua_gettop(L);
363 lua_getref(L, luaL_checkint(L, 1)); 363 lua_getref(L, luaL_checkint(L, 1));
364 assert(lua_gettop(L) == level+1); 364 lua_assert(lua_gettop(L) == level+1);
365 return 1; 365 return 1;
366} 366}
367 367
368static int unref (lua_State *L) { 368static int unref (lua_State *L) {
369 int level = lua_gettop(L); 369 int level = lua_gettop(L);
370 lua_unref(L, luaL_checkint(L, 1)); 370 lua_unref(L, luaL_checkint(L, 1));
371 assert(lua_gettop(L) == level); 371 lua_assert(lua_gettop(L) == level);
372 return 0; 372 return 0;
373} 373}
374 374