summaryrefslogtreecommitdiff
path: root/src/opcode.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/opcode.h')
-rw-r--r--src/opcode.h25
1 files changed, 9 insertions, 16 deletions
diff --git a/src/opcode.h b/src/opcode.h
index e3a6d37c..5e33c2cf 100644
--- a/src/opcode.h
+++ b/src/opcode.h
@@ -1,6 +1,6 @@
/*
** TeCGraf - PUC-Rio
-** $Id: opcode.h,v 3.10 1994/12/20 21:20:36 roberto Exp $
+** $Id: opcode.h,v 3.14 1995/10/25 13:05:51 roberto Exp $
*/
#ifndef opcode_h
@@ -9,10 +9,7 @@
#include "lua.h"
#include "types.h"
#include "tree.h"
-
-#ifndef STACKGAP
-#define STACKGAP 128
-#endif
+#include "func.h"
#ifndef real
#define real float
@@ -20,8 +17,6 @@
#define FIELDS_PER_FLUSH 40
-#define MAX_TEMPS 20
-
typedef enum
{
@@ -73,9 +68,7 @@ typedef enum
CALLFUNC,
RETCODE0,
RETCODE,
- SETFUNCTION,
- SETLINE,
- RESET
+ SETLINE
} OpCode;
#define MULT_RET 255
@@ -89,9 +82,10 @@ typedef union
Cfunction f;
real n;
TaggedString *ts;
- Byte *b;
+ TFunc *tf;
struct Hash *a;
void *u;
+ int i;
} Value;
typedef struct Object
@@ -110,7 +104,6 @@ typedef struct
#define nvalue(o) ((o)->value.n)
#define svalue(o) ((o)->value.ts->str)
#define tsvalue(o) ((o)->value.ts)
-#define bvalue(o) ((o)->value.b)
#define avalue(o) ((o)->value.a)
#define fvalue(o) ((o)->value.f)
#define uvalue(o) ((o)->value.u)
@@ -120,7 +113,6 @@ typedef struct
#define s_tag(i) (tag(&s_object(i)))
#define s_nvalue(i) (nvalue(&s_object(i)))
#define s_svalue(i) (svalue(&s_object(i)))
-#define s_bvalue(i) (bvalue(&s_object(i)))
#define s_avalue(i) (avalue(&s_object(i)))
#define s_fvalue(i) (fvalue(&s_object(i)))
#define s_uvalue(i) (uvalue(&s_object(i)))
@@ -143,7 +135,7 @@ typedef union
typedef union
{
struct {char c1; char c2; char c3; char c4;} m;
- Byte *b;
+ TFunc *tf;
} CodeCode;
#define get_code(code,pc) {code.m.c1 = *pc++; code.m.c2 = *pc++;\
code.m.c3 = *pc++; code.m.c4 = *pc++;}
@@ -155,8 +147,9 @@ char *lua_strdup (char *l);
void lua_setinput (Input fn); /* from "lex.c" module */
char *lua_lasttext (void); /* from "lex.c" module */
int yylex (void); /* from "lex.c" module */
-void lua_parse (Byte **code); /* from "lua.stx" module */
-void lua_travstack (void (*fn)(Object *));
+void lua_parse (TFunc *tf); /* from "lua.stx" module */
+void luaI_codedebugline (int line); /* from "lua.stx" module */
+void lua_travstack (int (*fn)(Object *));
Object *luaI_Address (lua_Object o);
void luaI_pushobject (Object *o);
void luaI_gcFB (Object *o);