aboutsummaryrefslogtreecommitdiff
path: root/ldebug.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2001-06-05 15:17:01 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2001-06-05 15:17:01 -0300
commit762d059a13d83eb367238a6115bbb4f5f13fcb49 (patch)
treef35fdf0675b791865d0d4800522b172903b34803 /ldebug.h
parent572a69b6afbd368beab8844bc876b0f9690b5253 (diff)
downloadlua-762d059a13d83eb367238a6115bbb4f5f13fcb49.tar.gz
lua-762d059a13d83eb367238a6115bbb4f5f13fcb49.tar.bz2
lua-762d059a13d83eb367238a6115bbb4f5f13fcb49.zip
new implementation for the Virtual Machine
Diffstat (limited to 'ldebug.h')
-rw-r--r--ldebug.h27
1 files changed, 24 insertions, 3 deletions
diff --git a/ldebug.h b/ldebug.h
index 9bdc7c03..7dd7ed23 100644
--- a/ldebug.h
+++ b/ldebug.h
@@ -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
15enum OpMode {iABC, iABc, iAsBc}; /* basic instruction format */
16
17/*
18** masks for instruction properties
19*/
20enum 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
29extern 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
15void luaG_typeerror (lua_State *L, StkId o, const l_char *op); 35void luaG_typeerror (lua_State *L, StkId o, const l_char *op);
16void luaG_binerror (lua_State *L, StkId p1, int t, const l_char *op); 36void luaG_concaterror (lua_State *L, StkId p1, StkId p2);
37void luaG_aritherror (lua_State *L, StkId p1, TObject *p2);
17int luaG_getline (int *lineinfo, int pc, int refline, int *refi); 38int luaG_getline (int *lineinfo, int pc, int refline, int *refi);
18void luaG_ordererror (lua_State *L, const TObject *p1, const TObject *p2); 39void luaG_ordererror (lua_State *L, const TObject *p1, const TObject *p2);
19int luaG_checkcode (lua_State *L, const Proto *pt); 40int luaG_checkcode (const Proto *pt);
20 41
21 42
22#endif 43#endif