diff options
Diffstat (limited to 'ldebug.h')
| -rw-r--r-- | ldebug.h | 27 |
1 files changed, 24 insertions, 3 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ldebug.h,v 1.10 2001/02/12 19:54:50 roberto Exp roberto $ | 2 | ** $Id: ldebug.h,v 1.11 2001/02/23 17:17:25 roberto Exp roberto $ |
| 3 | ** Auxiliary functions from Debug Interface module | 3 | ** Auxiliary functions from Debug Interface module |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -12,11 +12,32 @@ | |||
| 12 | #include "luadebug.h" | 12 | #include "luadebug.h" |
| 13 | 13 | ||
| 14 | 14 | ||
| 15 | enum OpMode {iABC, iABc, iAsBc}; /* basic instruction format */ | ||
| 16 | |||
| 17 | /* | ||
| 18 | ** masks for instruction properties | ||
| 19 | */ | ||
| 20 | enum OpModeMask { | ||
| 21 | OpModeAreg = 2, /* A is a register */ | ||
| 22 | OpModeBreg, /* B is a register */ | ||
| 23 | OpModeCreg, /* C is a register/constant */ | ||
| 24 | OpModesetA, /* instruction set register A */ | ||
| 25 | OpModeK, /* Bc is a constant */ | ||
| 26 | OpModeT /* operator is a test */ | ||
| 27 | }; | ||
| 28 | |||
| 29 | extern const unsigned char luaG_opmodes[]; | ||
| 30 | |||
| 31 | #define getOpMode(m) ((enum OpMode)(luaG_opmodes[m] & 3)) | ||
| 32 | #define testOpMode(m, b) (luaG_opmodes[m] & (1 << (b))) | ||
| 33 | |||
| 34 | |||
| 15 | void luaG_typeerror (lua_State *L, StkId o, const l_char *op); | 35 | void luaG_typeerror (lua_State *L, StkId o, const l_char *op); |
| 16 | void luaG_binerror (lua_State *L, StkId p1, int t, const l_char *op); | 36 | void luaG_concaterror (lua_State *L, StkId p1, StkId p2); |
| 37 | void luaG_aritherror (lua_State *L, StkId p1, TObject *p2); | ||
| 17 | int luaG_getline (int *lineinfo, int pc, int refline, int *refi); | 38 | int luaG_getline (int *lineinfo, int pc, int refline, int *refi); |
| 18 | void luaG_ordererror (lua_State *L, const TObject *p1, const TObject *p2); | 39 | void luaG_ordererror (lua_State *L, const TObject *p1, const TObject *p2); |
| 19 | int luaG_checkcode (lua_State *L, const Proto *pt); | 40 | int luaG_checkcode (const Proto *pt); |
| 20 | 41 | ||
| 21 | 42 | ||
| 22 | #endif | 43 | #endif |
