diff options
| author | Lua Team <team@lua.org> | 1995-11-28 12:00:00 +0000 |
|---|---|---|
| committer | repogen <> | 1995-11-28 12:00:00 +0000 |
| commit | 71754d2f6423fb9b6e87658e58bafc5470d53f65 (patch) | |
| tree | c704e97b80e52a52d3152738941bb4c8ca676b97 /src/opcode.h | |
| parent | a8b6ba0954edb9e0e669e1f451b9a8f145ce5166 (diff) | |
| download | lua-github-2.2.tar.gz | |
Lua 2.22.2
Diffstat (limited to 'src/opcode.h')
| -rw-r--r-- | src/opcode.h | 25 |
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); |
