diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2012-06-07 15:52:47 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2012-06-07 15:52:47 -0300 |
commit | 43bfb60ac8add40a6099b933bc8454c11471c386 (patch) | |
tree | 3427cf852d7dc0ce9eaf64011fd0b0b6eb1a0395 | |
parent | c510d94549c5cb55c7ebdb04b67ae0fc1bf3f790 (diff) | |
download | lua-43bfb60ac8add40a6099b933bc8454c11471c386.tar.gz lua-43bfb60ac8add40a6099b933bc8454c11471c386.tar.bz2 lua-43bfb60ac8add40a6099b933bc8454c11471c386.zip |
new auxiliary function 'luaI_printinst' (to print a single instruction)
-rw-r--r-- | ltests.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltests.c,v 2.128 2012/05/30 16:40:29 roberto Exp $ | 2 | ** $Id: ltests.c,v 2.129 2012/05/31 20:25:42 roberto Exp $ |
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 | */ |
@@ -520,6 +520,12 @@ void luaI_printcode (Proto *pt, int size) { | |||
520 | } | 520 | } |
521 | printf("-------\n"); | 521 | printf("-------\n"); |
522 | } | 522 | } |
523 | |||
524 | |||
525 | void luaI_printinst (Proto *pt, int pc) { | ||
526 | char buff[100]; | ||
527 | printf("%s\n", buildop(pt, pc, buff)); | ||
528 | } | ||
523 | #endif | 529 | #endif |
524 | 530 | ||
525 | 531 | ||