diff options
Diffstat (limited to 'lvm.c')
-rw-r--r-- | lvm.c | 27 |
1 files changed, 9 insertions, 18 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lvm.c,v 1.84 2000/01/28 16:53:00 roberto Exp roberto $ | 2 | ** $Id: lvm.c,v 1.85 2000/02/08 16:39:42 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 | */ |
@@ -642,27 +642,18 @@ StkId luaV_execute (lua_State *L, const Closure *cl, const TProtoFunc *tf, | |||
642 | 642 | ||
643 | case SETLINEW: aux += highbyte(L, *pc++); | 643 | case SETLINEW: aux += highbyte(L, *pc++); |
644 | case SETLINE: aux += *pc++; | 644 | case SETLINE: aux += *pc++; |
645 | if ((base-2)->ttype != LUA_T_LINE) { | 645 | if ((base-1)->ttype != LUA_T_LINE) { |
646 | /* open space for LINE and NAME values */ | 646 | /* open space for LINE value */ |
647 | int i = top-base; | 647 | int i = top-base; |
648 | while (i--) base[i+2] = base[i]; | 648 | while (i--) base[i+1] = base[i]; |
649 | base += 2; | 649 | base++; |
650 | top += 2; | 650 | top++; |
651 | (base-1)->ttype = LUA_T_NIL; /* initial value for NAME */ | 651 | (base-1)->ttype = LUA_T_LINE; |
652 | (base-2)->ttype = LUA_T_LINE; | ||
653 | } | 652 | } |
654 | (base-2)->value.i = aux; | 653 | (base-1)->value.i = aux; |
655 | if (L->linehook) { | 654 | if (L->linehook) { |
656 | L->top = top; | 655 | L->top = top; |
657 | luaD_lineHook(L, base-3, aux); | 656 | luaD_lineHook(L, base-2, aux); |
658 | } | ||
659 | break; | ||
660 | |||
661 | case SETNAMEW: aux += highbyte(L, *pc++); | ||
662 | case SETNAME: aux += *pc++; | ||
663 | if ((base-2)->ttype == LUA_T_LINE) { /* function has debug info? */ | ||
664 | (base-1)->ttype = (lua_Type)(-(*pc++)); | ||
665 | (base-1)->value.i = aux; | ||
666 | } | 657 | } |
667 | break; | 658 | break; |
668 | 659 | ||