ldebug.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. ** $Id: ldebug.h,v 1.11 2001/02/23 17:17:25 roberto Exp roberto $
  3. ** Auxiliary functions from Debug Interface module
  4. ** See Copyright Notice in lua.h
  5. */
  6. #ifndef ldebug_h
  7. #define ldebug_h
  8. #include "lstate.h"
  9. #include "luadebug.h"
  10. enum OpMode {iABC, iABc, iAsBc}; /* basic instruction format */
  11. /*
  12. ** masks for instruction properties
  13. */
  14. enum OpModeMask {
  15. OpModeAreg = 2, /* A is a register */
  16. OpModeBreg, /* B is a register */
  17. OpModeCreg, /* C is a register/constant */
  18. OpModesetA, /* instruction set register A */
  19. OpModeK, /* Bc is a constant */
  20. OpModeT /* operator is a test */
  21. };
  22. extern const unsigned char luaG_opmodes[];
  23. #define getOpMode(m) ((enum OpMode)(luaG_opmodes[m] & 3))
  24. #define testOpMode(m, b) (luaG_opmodes[m] & (1 << (b)))
  25. void luaG_typeerror (lua_State *L, StkId o, const l_char *op);
  26. void luaG_concaterror (lua_State *L, StkId p1, StkId p2);
  27. void luaG_aritherror (lua_State *L, StkId p1, TObject *p2);
  28. int luaG_getline (int *lineinfo, int pc, int refline, int *refi);
  29. void luaG_ordererror (lua_State *L, const TObject *p1, const TObject *p2);
  30. int luaG_checkcode (const Proto *pt);
  31. #endif