Imported from ../lua-3.2.tar.gz.
[lua.git] / src / luac / luac.h
blob1ae5267bfebac8854d2d57581649f3cb3b5da0f2
1 /*
2 ** $Id: luac.h,v 1.11 1999/07/02 19:34:26 lhf Exp $
3 ** definitions for luac
4 ** See Copyright Notice in lua.h
5 */
7 #include "lauxlib.h"
8 #include "lfunc.h"
9 #include "lmem.h"
10 #include "lobject.h"
11 #include "lopcodes.h"
12 #include "lstring.h"
13 #include "lundump.h"
15 typedef struct
17 char* name; /* name of opcode */
18 int op; /* value of opcode */
19 int class; /* class of opcode (byte variant) */
20 int args; /* types of arguments (operands) */
21 int arg; /* arg #1 */
22 int arg2; /* arg #2 */
23 } Opcode;
25 /* from dump.c */
26 void luaU_dumpchunk(TProtoFunc* Main, FILE* D, int native);
28 /* from opcode.c */
29 int luaU_opcodeinfo(TProtoFunc* tf, Byte* p, Opcode* I, char* xFILE, int xLINE);
30 int luaU_codesize(TProtoFunc* tf);
32 /* from opt.c */
33 void luaU_optchunk(TProtoFunc* Main);
35 /* from print.c */
36 void luaU_printchunk(TProtoFunc* Main);
38 /* from test.c */
39 void luaU_testchunk(TProtoFunc* Main);
40 TObject* luaU_getconstant(TProtoFunc* tf, int i, int at);
42 #define INFO(tf,p,I) luaU_opcodeinfo(tf,p,I,__FILE__,__LINE__)
44 /* fake (but convenient) opcodes */
45 #define NOP 255
46 #define STACK (-1)
47 #define ARGS (-2)
48 #define VARARGS (-3)