diff options
author | Mike Pall <mike> | 2010-02-08 05:26:52 +0100 |
---|---|---|
committer | Mike Pall <mike> | 2010-02-08 05:26:52 +0100 |
commit | 60b5af44222fff87a7184365a7f49654032d4cbf (patch) | |
tree | 9c108bc330f16ef8914c3bea84b5170000788932 /src/lj_lex.h | |
parent | 1307f49137f328b0880c736644755428d84be0ba (diff) | |
download | luajit-60b5af44222fff87a7184365a7f49654032d4cbf.tar.gz luajit-60b5af44222fff87a7184365a7f49654032d4cbf.tar.bz2 luajit-60b5af44222fff87a7184365a7f49654032d4cbf.zip |
Redesign of prototype generation, part 1: varinfo and uvname.
Use a growable, per-chunk variable stack.
Collect varinfo/uvname for prototype at the end.
Diffstat (limited to 'src/lj_lex.h')
-rw-r--r-- | src/lj_lex.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lj_lex.h b/src/lj_lex.h index cc5d5a9f..ee183b40 100644 --- a/src/lj_lex.h +++ b/src/lj_lex.h | |||
@@ -50,10 +50,14 @@ typedef struct LexState { | |||
50 | BCLine lastline; /* Line of last token. */ | 50 | BCLine lastline; /* Line of last token. */ |
51 | GCstr *chunkname; /* Current chunk name (interned string). */ | 51 | GCstr *chunkname; /* Current chunk name (interned string). */ |
52 | const char *chunkarg; /* Chunk name argument. */ | 52 | const char *chunkarg; /* Chunk name argument. */ |
53 | VarInfo *vstack; /* Stack for names and extents of local variables. */ | ||
54 | MSize sizevstack; /* Size of variable stack. */ | ||
55 | MSize vtop; /* Top of variable stack. */ | ||
53 | uint32_t level; /* Syntactical nesting level. */ | 56 | uint32_t level; /* Syntactical nesting level. */ |
54 | } LexState; | 57 | } LexState; |
55 | 58 | ||
56 | LJ_FUNC void lj_lex_start(lua_State *L, LexState *ls); | 59 | LJ_FUNC void lj_lex_setup(lua_State *L, LexState *ls); |
60 | LJ_FUNC void lj_lex_cleanup(lua_State *L, LexState *ls); | ||
57 | LJ_FUNC void lj_lex_next(LexState *ls); | 61 | LJ_FUNC void lj_lex_next(LexState *ls); |
58 | LJ_FUNC LexToken lj_lex_lookahead(LexState *ls); | 62 | LJ_FUNC LexToken lj_lex_lookahead(LexState *ls); |
59 | LJ_FUNC const char *lj_lex_token2str(LexState *ls, LexToken token); | 63 | LJ_FUNC const char *lj_lex_token2str(LexState *ls, LexToken token); |