ldebug.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. ** $Id: ldebug.h,v 1.13 2001/06/06 17:50:36 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. OpModeBreg = 2, /* B is a register */
  16. OpModeCreg, /* C is a register/constant */
  17. OpModesetA, /* instruction set register A */
  18. OpModeK, /* Bc is a constant */
  19. OpModeT /* operator is a test */
  20. };
  21. extern const lu_byte luaG_opmodes[];
  22. #define getOpMode(m) ((enum OpMode)(luaG_opmodes[m] & 3))
  23. #define testOpMode(m, b) (luaG_opmodes[m] & (1 << (b)))
  24. void luaG_typeerror (lua_State *L, StkId o, const l_char *op);
  25. void luaG_concaterror (lua_State *L, StkId p1, StkId p2);
  26. void luaG_aritherror (lua_State *L, StkId p1, TObject *p2);
  27. int luaG_getline (int *lineinfo, int pc, int refline, int *refi);
  28. void luaG_ordererror (lua_State *L, const TObject *p1, const TObject *p2);
  29. int luaG_checkcode (const Proto *pt);
  30. #endif