From 2a4afb97c8a3f64dccad86fa848855616ea2c254 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Thu, 28 Jun 2001 16:58:57 -0300 Subject: new module lopcodes.c for tables describing opcodes --- ldebug.c | 51 +-------------------------------------------------- ldebug.h | 21 +-------------------- lopcodes.h | 29 ++++++++++++++++++++++++++++- ltests.c | 47 ++--------------------------------------------- ltests.h | 4 +++- 5 files changed, 35 insertions(+), 117 deletions(-) diff --git a/ldebug.c b/ldebug.c index 473d63f5..3e73d374 100644 --- a/ldebug.c +++ b/ldebug.c @@ -1,5 +1,5 @@ /* -** $Id: ldebug.c,v 1.84 2001/06/26 13:20:45 roberto Exp roberto $ +** $Id: ldebug.c,v 1.85 2001/06/28 14:57:17 roberto Exp roberto $ ** Debug Interface ** See Copyright Notice in lua.h */ @@ -563,52 +563,3 @@ void luaG_ordererror (lua_State *L, const TObject *p1, const TObject *p2) { luaO_verror(L, l_s("attempt to compare %.10s with %.10s"), t1, t2); } - - -#define opmode(t,a,b,c,sa,k,m) (((t)<code[pc]; OpCode o = GET_OPCODE(i); - const l_char *name = instrname[o]; + const l_char *name = luaP_opnames[o]; sprintf(buff, l_s("%4d - "), pc); switch (getOpMode(o)) { case iABC: diff --git a/ltests.h b/ltests.h index 6cbb9810..3fc03cc1 100644 --- a/ltests.h +++ b/ltests.h @@ -1,5 +1,5 @@ /* -** $Id: ltests.h,v 1.5 2001/02/12 15:42:44 roberto Exp roberto $ +** $Id: ltests.h,v 1.6 2001/03/02 17:27:50 roberto Exp roberto $ ** Internal Header for Debugging of the Lua Implementation ** See Copyright Notice in lua.h */ @@ -13,6 +13,8 @@ #define LUA_DEBUG +#define LUA_OPNAMES + #undef NDEBUG #include #define lua_assert(c) assert(c) -- cgit v1.2.3-55-g6feb