diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-02-14 14:51:08 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-02-14 14:51:08 -0200 |
commit | 3afe85b2ce9ffdc8eca819ddc1c05414701606fd (patch) | |
tree | 4433002ba359cfb376c61c69c93af9de13e29331 /lobject.h | |
parent | 52aad0ab5937d4df6fe07aedbf9987f2f792698c (diff) | |
download | lua-3afe85b2ce9ffdc8eca819ddc1c05414701606fd.tar.gz lua-3afe85b2ce9ffdc8eca819ddc1c05414701606fd.tar.bz2 lua-3afe85b2ce9ffdc8eca819ddc1c05414701606fd.zip |
new version for INSTRUCTION formats
Diffstat (limited to 'lobject.h')
-rw-r--r-- | lobject.h | 16 |
1 files changed, 11 insertions, 5 deletions
@@ -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 | |||
40 | typedef LUA_NUM_TYPE real; | 39 | typedef LUA_NUM_TYPE real; |
41 | 40 | ||
42 | #define Byte lua_Byte /* some systems have Byte as a predefined type */ | 41 | |
43 | typedef 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 | */ | ||
46 | typedef 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 | ||