summaryrefslogtreecommitdiff
path: root/src/lj_debug.h
diff options
context:
space:
mode:
authorMike Pall <mike>2011-06-09 01:27:37 +0200
committerMike Pall <mike>2011-06-09 01:27:37 +0200
commit8c32b38ca3d522d6c90249495231a331aafca7e2 (patch)
tree0dad822398bef90be8caec0945d6c32a790d7ec9 /src/lj_debug.h
parent585cf05dbd54564d2d3387cef09b3ac2d5e52afd (diff)
downloadluajit-8c32b38ca3d522d6c90249495231a331aafca7e2.tar.gz
luajit-8c32b38ca3d522d6c90249495231a331aafca7e2.tar.bz2
luajit-8c32b38ca3d522d6c90249495231a331aafca7e2.zip
Flatten and compress in-memory debug info (saves ~70%).
Diffstat (limited to 'src/lj_debug.h')
-rw-r--r--src/lj_debug.h22
1 files changed, 20 insertions, 2 deletions
diff --git a/src/lj_debug.h b/src/lj_debug.h
index 5a1ddbec..f82fdfed 100644
--- a/src/lj_debug.h
+++ b/src/lj_debug.h
@@ -10,14 +10,32 @@
10 10
11LJ_FUNC cTValue *lj_debug_frame(lua_State *L, int level, int *size); 11LJ_FUNC cTValue *lj_debug_frame(lua_State *L, int level, int *size);
12LJ_FUNC BCLine LJ_FASTCALL lj_debug_line(GCproto *pt, BCPos pc); 12LJ_FUNC BCLine LJ_FASTCALL lj_debug_line(GCproto *pt, BCPos pc);
13LJ_FUNC const char *lj_debug_uvname(cTValue *o, uint32_t idx, TValue **tvp); 13LJ_FUNC const char *lj_debug_uvname(GCproto *pt, uint32_t idx);
14LJ_FUNC const char *lj_debug_uvnamev(cTValue *o, uint32_t idx, TValue **tvp);
14LJ_FUNC const char *lj_debug_slotname(GCproto *pt, const BCIns *pc, 15LJ_FUNC const char *lj_debug_slotname(GCproto *pt, const BCIns *pc,
15 BCReg slot, const char **name); 16 BCReg slot, const char **name);
16LJ_FUNC const char *lj_debug_funcname(lua_State *L, TValue *frame, 17LJ_FUNC const char *lj_debug_funcname(lua_State *L, TValue *frame,
17 const char **name); 18 const char **name);
18LJ_FUNC void lj_debug_shortname(char *out, const char *src); 19LJ_FUNC void lj_debug_shortname(char *out, GCstr *str);
19LJ_FUNC void lj_debug_addloc(lua_State *L, const char *msg, 20LJ_FUNC void lj_debug_addloc(lua_State *L, const char *msg,
20 cTValue *frame, cTValue *nextframe); 21 cTValue *frame, cTValue *nextframe);
21LJ_FUNC void lj_debug_pushloc(lua_State *L, GCproto *pt, BCPos pc); 22LJ_FUNC void lj_debug_pushloc(lua_State *L, GCproto *pt, BCPos pc);
22 23
24/* Fixed internal variable names. */
25#define VARNAMEDEF(_) \
26 _(FOR_IDX, "(for index)") \
27 _(FOR_STOP, "(for limit)") \
28 _(FOR_STEP, "(for step)") \
29 _(FOR_GEN, "(for generator)") \
30 _(FOR_STATE, "(for state)") \
31 _(FOR_CTL, "(for control)")
32
33enum {
34 VARNAME_END,
35#define VARNAMEENUM(name, str) VARNAME_##name,
36 VARNAMEDEF(VARNAMEENUM)
37#undef VARNAMEENUM
38 VARNAME__MAX
39};
40
23#endif 41#endif