lua/ldebug.h

43 lines
1.1 KiB
C
Raw Normal View History

/*
2001-06-11 18:56:42 +04:00
** $Id: ldebug.h,v 1.13 2001/06/06 17:50:36 roberto Exp roberto $
** Auxiliary functions from Debug Interface module
** See Copyright Notice in lua.h
*/
#ifndef ldebug_h
#define ldebug_h
2000-06-29 00:21:06 +04:00
#include "lstate.h"
#include "luadebug.h"
enum OpMode {iABC, iABc, iAsBc}; /* basic instruction format */
/*
** masks for instruction properties
*/
enum OpModeMask {
2001-06-11 18:56:42 +04:00
OpModeBreg = 2, /* B is a register */
OpModeCreg, /* C is a register/constant */
OpModesetA, /* instruction set register A */
OpModeK, /* Bc is a constant */
OpModeT /* operator is a test */
};
2001-06-07 17:46:29 +04:00
extern const lu_byte luaG_opmodes[];
#define getOpMode(m) ((enum OpMode)(luaG_opmodes[m] & 3))
#define testOpMode(m, b) (luaG_opmodes[m] & (1 << (b)))
2001-02-23 20:17:25 +03:00
void luaG_typeerror (lua_State *L, StkId o, const l_char *op);
void luaG_concaterror (lua_State *L, StkId p1, StkId p2);
void luaG_aritherror (lua_State *L, StkId p1, TObject *p2);
2000-08-08 22:26:05 +04:00
int luaG_getline (int *lineinfo, int pc, int refline, int *refi);
2001-02-07 21:13:49 +03:00
void luaG_ordererror (lua_State *L, const TObject *p1, const TObject *p2);
int luaG_checkcode (const Proto *pt);
#endif