aboutsummaryrefslogtreecommitdiff
path: root/lobject.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-02-14 14:51:08 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-02-14 14:51:08 -0200
commit3afe85b2ce9ffdc8eca819ddc1c05414701606fd (patch)
tree4433002ba359cfb376c61c69c93af9de13e29331 /lobject.h
parent52aad0ab5937d4df6fe07aedbf9987f2f792698c (diff)
downloadlua-3afe85b2ce9ffdc8eca819ddc1c05414701606fd.tar.gz
lua-3afe85b2ce9ffdc8eca819ddc1c05414701606fd.tar.bz2
lua-3afe85b2ce9ffdc8eca819ddc1c05414701606fd.zip
new version for INSTRUCTION formats
Diffstat (limited to 'lobject.h')
-rw-r--r--lobject.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/lobject.h b/lobject.h
index a325d235..0236aac8 100644
--- a/lobject.h
+++ b/lobject.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lobject.h,v 1.45 2000/01/28 16:53:00 roberto Exp roberto $ 2** $Id: lobject.h,v 1.46 2000/02/11 16:52:54 roberto Exp roberto $
3** Type definitions for Lua objects 3** Type definitions for Lua objects
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -36,11 +36,14 @@
36#define LUA_NUM_TYPE double 36#define LUA_NUM_TYPE double
37#endif 37#endif
38 38
39
40typedef LUA_NUM_TYPE real; 39typedef LUA_NUM_TYPE real;
41 40
42#define Byte lua_Byte /* some systems have Byte as a predefined type */ 41
43typedef unsigned char Byte; /* unsigned 8 bits */ 42/*
43** type for virtual-machine instructions
44** must be an unsigned with 4 bytes (see details in lopcodes.h)
45*/
46typedef unsigned long Instruction;
44 47
45 48
46#define MAX_INT (INT_MAX-2) /* maximum value of an int (-2 for safety) */ 49#define MAX_INT (INT_MAX-2) /* maximum value of an int (-2 for safety) */
@@ -157,9 +160,12 @@ typedef struct TProtoFunc {
157 int nknum; /* size of `knum' */ 160 int nknum; /* size of `knum' */
158 struct TProtoFunc **kproto; /* functions defined inside the function */ 161 struct TProtoFunc **kproto; /* functions defined inside the function */
159 int nkproto; /* size of `kproto' */ 162 int nkproto; /* size of `kproto' */
160 Byte *code; /* ends with opcode ENDCODE */ 163 Instruction *code; /* ends with opcode ENDCODE */
161 int lineDefined; 164 int lineDefined;
162 TaggedString *source; 165 TaggedString *source;
166 short numparams;
167 short is_vararg;
168 short maxstacksize;
163 struct LocVar *locvars; /* ends with line = -1 */ 169 struct LocVar *locvars; /* ends with line = -1 */
164} TProtoFunc; 170} TProtoFunc;
165 171