diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2004-10-04 16:04:34 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2004-10-04 16:04:34 -0300 |
commit | f7e9465a0c851d6440331317a77aafe89a32eba8 (patch) | |
tree | 196430cb4f0095b54f0dc061bc743e16d154d414 | |
parent | 5ee87acd6b920a6a122277cd817aea4cfd618671 (diff) | |
download | lua-f7e9465a0c851d6440331317a77aafe89a32eba8.tar.gz lua-f7e9465a0c851d6440331317a77aafe89a32eba8.tar.bz2 lua-f7e9465a0c851d6440331317a77aafe89a32eba8.zip |
new format for SETLIST opcode
-rw-r--r-- | ldebug.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ldebug.c,v 2.7 2004/06/29 18:49:02 roberto Exp roberto $ | 2 | ** $Id: ldebug.c,v 2.8 2004/09/01 13:47:31 roberto Exp $ |
3 | ** Debug Interface | 3 | ** Debug Interface |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -261,11 +261,11 @@ int luaG_checkopenop (Instruction i) { | |||
261 | switch (GET_OPCODE(i)) { | 261 | switch (GET_OPCODE(i)) { |
262 | case OP_CALL: | 262 | case OP_CALL: |
263 | case OP_TAILCALL: | 263 | case OP_TAILCALL: |
264 | case OP_RETURN: { | 264 | case OP_RETURN: |
265 | case OP_SETLIST: { | ||
265 | check(GETARG_B(i) == 0); | 266 | check(GETARG_B(i) == 0); |
266 | return 1; | 267 | return 1; |
267 | } | 268 | } |
268 | case OP_SETLISTO: return 1; | ||
269 | default: return 0; /* invalid instruction after an open call */ | 269 | default: return 0; /* invalid instruction after an open call */ |
270 | } | 270 | } |
271 | } | 271 | } |
@@ -392,7 +392,8 @@ static Instruction luaG_symbexec (const Proto *pt, int lastpc, int reg) { | |||
392 | break; | 392 | break; |
393 | } | 393 | } |
394 | case OP_SETLIST: { | 394 | case OP_SETLIST: { |
395 | checkreg(pt, a + (b&(LFIELDS_PER_FLUSH-1)) + 1); | 395 | if (b > 0) checkreg(pt, a + b); |
396 | if (c == 0) pc++; | ||
396 | break; | 397 | break; |
397 | } | 398 | } |
398 | case OP_CLOSURE: { | 399 | case OP_CLOSURE: { |