diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2008-04-02 14:38:54 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2008-04-02 14:38:54 -0300 |
commit | a4d3080fe3d07af9d2d3124b8f49eadda7c21b44 (patch) | |
tree | e90941e2268f10ac4f7234f13efdbf85f5277e99 /lvm.c | |
parent | 5627d51e0576887c4133f5b77b1dfb67334b3115 (diff) | |
download | lua-a4d3080fe3d07af9d2d3124b8f49eadda7c21b44.tar.gz lua-a4d3080fe3d07af9d2d3124b8f49eadda7c21b44.tar.bz2 lua-a4d3080fe3d07af9d2d3124b8f49eadda7c21b44.zip |
SETLIST extra argument now is an "instruction" (OP_EXTRAARG)
Diffstat (limited to 'lvm.c')
-rw-r--r-- | lvm.c | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lvm.c,v 2.72 2007/06/19 19:48:15 roberto Exp roberto $ | 2 | ** $Id: lvm.c,v 2.73 2007/09/10 17:59:32 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 | */ |
@@ -704,7 +704,10 @@ void luaV_execute (lua_State *L, int nexeccalls) { | |||
704 | int last; | 704 | int last; |
705 | Table *h; | 705 | Table *h; |
706 | if (n == 0) n = cast_int(L->top - ra) - 1; | 706 | if (n == 0) n = cast_int(L->top - ra) - 1; |
707 | if (c == 0) c = cast_int(*L->savedpc++); | 707 | if (c == 0) { |
708 | lua_assert(GET_OPCODE(*L->savedpc) == OP_EXTRAARG); | ||
709 | c = GETARG_Ax(*L->savedpc++); | ||
710 | } | ||
708 | runtime_check(L, ttistable(ra)); | 711 | runtime_check(L, ttistable(ra)); |
709 | h = hvalue(ra); | 712 | h = hvalue(ra); |
710 | last = ((c-1)*LFIELDS_PER_FLUSH) + n; | 713 | last = ((c-1)*LFIELDS_PER_FLUSH) + n; |
@@ -764,6 +767,10 @@ void luaV_execute (lua_State *L, int nexeccalls) { | |||
764 | } | 767 | } |
765 | continue; | 768 | continue; |
766 | } | 769 | } |
770 | case OP_EXTRAARG: { | ||
771 | luaG_runerror(L, "bad opcode"); | ||
772 | return; | ||
773 | } | ||
767 | } | 774 | } |
768 | } | 775 | } |
769 | } | 776 | } |