diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1995-10-04 14:13:02 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1995-10-04 14:13:02 -0300 |
commit | 68f337dfa617732646a4a974eb33b25daf45a1e2 (patch) | |
tree | 81e72eaf0ada8a2246c6cf1af2d96ddaef41d117 /opcode.h | |
parent | f132ac03bcaf0163f1f86b5114c93a753e17f28b (diff) | |
download | lua-68f337dfa617732646a4a974eb33b25daf45a1e2.tar.gz lua-68f337dfa617732646a4a974eb33b25daf45a1e2.tar.bz2 lua-68f337dfa617732646a4a974eb33b25daf45a1e2.zip |
Garbage collection of functions + header structure for functions
Diffstat (limited to 'opcode.h')
-rw-r--r-- | opcode.h | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | ** TeCGraf - PUC-Rio | 2 | ** TeCGraf - PUC-Rio |
3 | ** $Id: opcode.h,v 3.10 1994/12/20 21:20:36 roberto Exp celes $ | 3 | ** $Id: opcode.h,v 3.11 1995/04/11 17:56:30 celes Exp $ |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #ifndef opcode_h | 6 | #ifndef opcode_h |
@@ -9,6 +9,7 @@ | |||
9 | #include "lua.h" | 9 | #include "lua.h" |
10 | #include "types.h" | 10 | #include "types.h" |
11 | #include "tree.h" | 11 | #include "tree.h" |
12 | #include "func.h" | ||
12 | 13 | ||
13 | #ifndef real | 14 | #ifndef real |
14 | #define real float | 15 | #define real float |
@@ -83,7 +84,7 @@ typedef union | |||
83 | Cfunction f; | 84 | Cfunction f; |
84 | real n; | 85 | real n; |
85 | TaggedString *ts; | 86 | TaggedString *ts; |
86 | Byte *b; | 87 | TFunc *tf; |
87 | struct Hash *a; | 88 | struct Hash *a; |
88 | void *u; | 89 | void *u; |
89 | } Value; | 90 | } Value; |
@@ -104,7 +105,6 @@ typedef struct | |||
104 | #define nvalue(o) ((o)->value.n) | 105 | #define nvalue(o) ((o)->value.n) |
105 | #define svalue(o) ((o)->value.ts->str) | 106 | #define svalue(o) ((o)->value.ts->str) |
106 | #define tsvalue(o) ((o)->value.ts) | 107 | #define tsvalue(o) ((o)->value.ts) |
107 | #define bvalue(o) ((o)->value.b) | ||
108 | #define avalue(o) ((o)->value.a) | 108 | #define avalue(o) ((o)->value.a) |
109 | #define fvalue(o) ((o)->value.f) | 109 | #define fvalue(o) ((o)->value.f) |
110 | #define uvalue(o) ((o)->value.u) | 110 | #define uvalue(o) ((o)->value.u) |
@@ -114,7 +114,6 @@ typedef struct | |||
114 | #define s_tag(i) (tag(&s_object(i))) | 114 | #define s_tag(i) (tag(&s_object(i))) |
115 | #define s_nvalue(i) (nvalue(&s_object(i))) | 115 | #define s_nvalue(i) (nvalue(&s_object(i))) |
116 | #define s_svalue(i) (svalue(&s_object(i))) | 116 | #define s_svalue(i) (svalue(&s_object(i))) |
117 | #define s_bvalue(i) (bvalue(&s_object(i))) | ||
118 | #define s_avalue(i) (avalue(&s_object(i))) | 117 | #define s_avalue(i) (avalue(&s_object(i))) |
119 | #define s_fvalue(i) (fvalue(&s_object(i))) | 118 | #define s_fvalue(i) (fvalue(&s_object(i))) |
120 | #define s_uvalue(i) (uvalue(&s_object(i))) | 119 | #define s_uvalue(i) (uvalue(&s_object(i))) |
@@ -137,7 +136,7 @@ typedef union | |||
137 | typedef union | 136 | typedef union |
138 | { | 137 | { |
139 | struct {char c1; char c2; char c3; char c4;} m; | 138 | struct {char c1; char c2; char c3; char c4;} m; |
140 | Byte *b; | 139 | TFunc *tf; |
141 | } CodeCode; | 140 | } CodeCode; |
142 | #define get_code(code,pc) {code.m.c1 = *pc++; code.m.c2 = *pc++;\ | 141 | #define get_code(code,pc) {code.m.c1 = *pc++; code.m.c2 = *pc++;\ |
143 | code.m.c3 = *pc++; code.m.c4 = *pc++;} | 142 | code.m.c3 = *pc++; code.m.c4 = *pc++;} |
@@ -149,7 +148,7 @@ char *lua_strdup (char *l); | |||
149 | void lua_setinput (Input fn); /* from "lex.c" module */ | 148 | void lua_setinput (Input fn); /* from "lex.c" module */ |
150 | char *lua_lasttext (void); /* from "lex.c" module */ | 149 | char *lua_lasttext (void); /* from "lex.c" module */ |
151 | int yylex (void); /* from "lex.c" module */ | 150 | int yylex (void); /* from "lex.c" module */ |
152 | void lua_parse (Byte **code); /* from "lua.stx" module */ | 151 | void lua_parse (TFunc *tf); /* from "lua.stx" module */ |
153 | void lua_travstack (void (*fn)(Object *)); | 152 | void lua_travstack (void (*fn)(Object *)); |
154 | Object *luaI_Address (lua_Object o); | 153 | Object *luaI_Address (lua_Object o); |
155 | void luaI_pushobject (Object *o); | 154 | void luaI_pushobject (Object *o); |