summaryrefslogtreecommitdiff
path: root/src/luac/luac.h
diff options
context:
space:
mode:
authorLua Team <team@lua.org>1999-07-08 12:00:00 +0000
committerrepogen <>1999-07-08 12:00:00 +0000
commitafb67002d94ef22c14741910ba83da262a6e9338 (patch)
treeb51ab3502813f590a4b115997f6fe41da43b6586 /src/luac/luac.h
parent377347776f1f3d820f92151f70bec667f96d5e6b (diff)
downloadlua-github-3.2.tar.gz
Lua 3.23.2
Diffstat (limited to 'src/luac/luac.h')
-rw-r--r--src/luac/luac.h43
1 files changed, 29 insertions, 14 deletions
diff --git a/src/luac/luac.h b/src/luac/luac.h
index c3d8d73a..1ae5267b 100644
--- a/src/luac/luac.h
+++ b/src/luac/luac.h
@@ -1,11 +1,12 @@
/*
-** $Id: luac.h,v 1.6 1998/07/12 00:17:37 lhf Exp $
+** $Id: luac.h,v 1.11 1999/07/02 19:34:26 lhf Exp $
** definitions for luac
** See Copyright Notice in lua.h
*/
#include "lauxlib.h"
#include "lfunc.h"
+#include "lmem.h"
#include "lobject.h"
#include "lopcodes.h"
#include "lstring.h"
@@ -13,21 +14,35 @@
typedef struct
{
- char* name;
- int size;
- int op;
- int class;
- int arg;
- int arg2;
+ char* name; /* name of opcode */
+ int op; /* value of opcode */
+ int class; /* class of opcode (byte variant) */
+ int args; /* types of arguments (operands) */
+ int arg; /* arg #1 */
+ int arg2; /* arg #2 */
} Opcode;
-int OpcodeInfo(TProtoFunc* tf, Byte* p, Opcode* I, char* xFILE, int xLINE);
-int CodeSize(TProtoFunc* tf);
+/* from dump.c */
+void luaU_dumpchunk(TProtoFunc* Main, FILE* D, int native);
-#define INFO(tf,p,I) OpcodeInfo(tf,p,I,__FILE__,__LINE__)
-#define fileName(tf) ( (tf->fileName)==NULL ? NULL : tf->fileName->str )
+/* from opcode.c */
+int luaU_opcodeinfo(TProtoFunc* tf, Byte* p, Opcode* I, char* xFILE, int xLINE);
+int luaU_codesize(TProtoFunc* tf);
+/* from opt.c */
+void luaU_optchunk(TProtoFunc* Main);
+
+/* from print.c */
+void luaU_printchunk(TProtoFunc* Main);
+
+/* from test.c */
+void luaU_testchunk(TProtoFunc* Main);
+TObject* luaU_getconstant(TProtoFunc* tf, int i, int at);
+
+#define INFO(tf,p,I) luaU_opcodeinfo(tf,p,I,__FILE__,__LINE__)
+
+/* fake (but convenient) opcodes */
#define NOP 255
-#define STACK -1
-#define ARGS -2
-#define VARARGS -3
+#define STACK (-1)
+#define ARGS (-2)
+#define VARARGS (-3)