diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1999-12-29 14:31:15 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1999-12-29 14:31:15 -0200 |
commit | 298d0abff7f292fa4bfbdb40979f41bc8f80f9c2 (patch) | |
tree | 457d98c07a17f99a6fee012d49d5191c4c4bf665 /lobject.h | |
parent | 4fbe775154ff281bf9c04cf92d68824a82593402 (diff) | |
download | lua-298d0abff7f292fa4bfbdb40979f41bc8f80f9c2.tar.gz lua-298d0abff7f292fa4bfbdb40979f41bc8f80f9c2.tar.bz2 lua-298d0abff7f292fa4bfbdb40979f41bc8f80f9c2.zip |
first version of extra debug information (NAME)
Diffstat (limited to 'lobject.h')
-rw-r--r-- | lobject.h | 29 |
1 files changed, 19 insertions, 10 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lobject.h,v 1.41 1999/12/23 18:19:57 roberto Exp roberto $ | 2 | ** $Id: lobject.h,v 1.42 1999/12/27 17:33:22 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 | */ |
@@ -72,16 +72,25 @@ typedef enum { | |||
72 | LUA_T_LPROTO = -4, /* fixed tag for Lua functions */ | 72 | LUA_T_LPROTO = -4, /* fixed tag for Lua functions */ |
73 | LUA_T_CPROTO = -5, /* fixed tag for C functions */ | 73 | LUA_T_CPROTO = -5, /* fixed tag for C functions */ |
74 | LUA_T_NIL = -6, /* last "pre-defined" tag */ | 74 | LUA_T_NIL = -6, /* last "pre-defined" tag */ |
75 | |||
75 | LUA_T_LCLOSURE = -7, /* Lua closure */ | 76 | LUA_T_LCLOSURE = -7, /* Lua closure */ |
76 | LUA_T_CCLOSURE = -8, /* C closure */ | 77 | LUA_T_CCLOSURE = -8, /* C closure */ |
78 | |||
77 | LUA_T_LCLMARK = -9 ,/* mark for Lua closures */ | 79 | LUA_T_LCLMARK = -9 ,/* mark for Lua closures */ |
78 | LUA_T_CCLMARK = -10,/* mark for C closures */ | 80 | LUA_T_CCLMARK = -10,/* mark for C closures */ |
79 | LUA_T_LMARK = -11, /* mark for Lua prototypes */ | 81 | LUA_T_LMARK = -11, /* mark for Lua prototypes */ |
80 | LUA_T_CMARK = -12, /* mark for C prototypes */ | 82 | LUA_T_CMARK = -12, /* mark for C prototypes */ |
81 | LUA_T_LINE = -13 | 83 | |
84 | LUA_T_LINE = -13, | ||
85 | LUA_T_NGLOBAL = -14, | ||
86 | LUA_T_NLOCAL = -15, | ||
87 | LUA_T_NDOT = -16 | ||
82 | } lua_Type; | 88 | } lua_Type; |
83 | 89 | ||
84 | #define NUM_TAGS 7 | 90 | #define NUM_TAGS 7 /* tags for values visible from Lua */ |
91 | |||
92 | |||
93 | #define LAST_REGULAR_TAG LUA_T_CCLOSURE /* after that, are all marks */ | ||
85 | 94 | ||
86 | /* | 95 | /* |
87 | ** chech whether `t' is a mark; ttypes are negative numbers, so the | 96 | ** chech whether `t' is a mark; ttypes are negative numbers, so the |
@@ -91,13 +100,13 @@ typedef enum { | |||
91 | 100 | ||
92 | 101 | ||
93 | typedef union { | 102 | typedef union { |
94 | lua_CFunction f; /* LUA_T_CPROTO, LUA_T_CMARK */ | 103 | lua_CFunction f; /* LUA_T_CPROTO, LUA_T_CMARK */ |
95 | real n; /* LUA_T_NUMBER */ | 104 | real n; /* LUA_T_NUMBER */ |
96 | struct TaggedString *ts; /* LUA_T_STRING, LUA_T_USERDATA */ | 105 | struct TaggedString *ts; /* LUA_T_STRING, LUA_T_USERDATA */ |
97 | struct TProtoFunc *tf; /* LUA_T_LPROTO, LUA_T_LMARK */ | 106 | struct TProtoFunc *tf; /* LUA_T_LPROTO, LUA_T_LMARK */ |
98 | struct Closure *cl; /* LUA_T_[CL]CLOSURE, LUA_T_[CL]CLMARK */ | 107 | struct Closure *cl; /* LUA_T_[CL]CLOSURE, LUA_T_[CL]CLMARK */ |
99 | struct Hash *a; /* LUA_T_ARRAY */ | 108 | struct Hash *a; /* LUA_T_ARRAY */ |
100 | int i; /* LUA_T_LINE */ | 109 | int i; /* LUA_T_LINE */ |
101 | } Value; | 110 | } Value; |
102 | 111 | ||
103 | 112 | ||