diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-06-28 11:57:17 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-06-28 11:57:17 -0300 |
commit | 770954510fd04912b2d84db0bd68dac62eaa5c5a (patch) | |
tree | 87344ef83c11905af034e969b224103edff97796 | |
parent | b346834a09c086affce6308c7917a8f6af310d11 (diff) | |
download | lua-770954510fd04912b2d84db0bd68dac62eaa5c5a.tar.gz lua-770954510fd04912b2d84db0bd68dac62eaa5c5a.tar.bz2 lua-770954510fd04912b2d84db0bd68dac62eaa5c5a.zip |
rename of `kproto' to `p'
-rw-r--r-- | ldebug.c | 6 | ||||
-rw-r--r-- | lfunc.c | 8 | ||||
-rw-r--r-- | lgc.c | 6 | ||||
-rw-r--r-- | lobject.h | 6 | ||||
-rw-r--r-- | lparser.c | 14 | ||||
-rw-r--r-- | lparser.h | 4 | ||||
-rw-r--r-- | lvm.c | 4 |
7 files changed, 24 insertions, 24 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ldebug.c,v 1.83 2001/06/15 20:36:57 roberto Exp roberto $ | 2 | ** $Id: ldebug.c,v 1.84 2001/06/26 13:20:45 roberto Exp roberto $ |
3 | ** Debug Interface | 3 | ** Debug Interface |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -450,8 +450,8 @@ static Instruction luaG_symbexec (const Proto *pt, int lastpc, int reg) { | |||
450 | break; | 450 | break; |
451 | } | 451 | } |
452 | case OP_CLOSURE: { | 452 | case OP_CLOSURE: { |
453 | check(b < pt->sizekproto); | 453 | check(b < pt->sizep); |
454 | checkreg(pt, a + pt->kproto[b]->nupvalues - 1); | 454 | checkreg(pt, a + pt->p[b]->nupvalues - 1); |
455 | break; | 455 | break; |
456 | } | 456 | } |
457 | default: break; | 457 | default: break; |
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lfunc.c,v 1.43 2001/03/26 14:31:49 roberto Exp roberto $ | 2 | ** $Id: lfunc.c,v 1.44 2001/06/05 18:17:01 roberto Exp roberto $ |
3 | ** Auxiliary functions to manipulate prototypes and closures | 3 | ** Auxiliary functions to manipulate prototypes and closures |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -32,8 +32,8 @@ Proto *luaF_newproto (lua_State *L) { | |||
32 | Proto *f = luaM_new(L, Proto); | 32 | Proto *f = luaM_new(L, Proto); |
33 | f->k = NULL; | 33 | f->k = NULL; |
34 | f->sizek = 0; | 34 | f->sizek = 0; |
35 | f->kproto = NULL; | 35 | f->p = NULL; |
36 | f->sizekproto = 0; | 36 | f->sizep = 0; |
37 | f->code = NULL; | 37 | f->code = NULL; |
38 | f->sizecode = 0; | 38 | f->sizecode = 0; |
39 | f->nupvalues = 0; | 39 | f->nupvalues = 0; |
@@ -57,7 +57,7 @@ void luaF_freeproto (lua_State *L, Proto *f) { | |||
57 | luaM_freearray(L, f->code, f->sizecode, Instruction); | 57 | luaM_freearray(L, f->code, f->sizecode, Instruction); |
58 | luaM_freearray(L, f->locvars, f->sizelocvars, struct LocVar); | 58 | luaM_freearray(L, f->locvars, f->sizelocvars, struct LocVar); |
59 | luaM_freearray(L, f->k, f->sizek, TObject); | 59 | luaM_freearray(L, f->k, f->sizek, TObject); |
60 | luaM_freearray(L, f->kproto, f->sizekproto, Proto *); | 60 | luaM_freearray(L, f->p, f->sizep, Proto *); |
61 | luaM_freearray(L, f->lineinfo, f->sizelineinfo, int); | 61 | luaM_freearray(L, f->lineinfo, f->sizelineinfo, int); |
62 | luaM_freelem(L, f, Proto); | 62 | luaM_freelem(L, f, Proto); |
63 | } | 63 | } |
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lgc.c,v 1.107 2001/06/21 16:41:34 roberto Exp roberto $ | 2 | ** $Id: lgc.c,v 1.108 2001/06/26 13:20:45 roberto Exp roberto $ |
3 | ** Garbage Collector | 3 | ** Garbage Collector |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -40,8 +40,8 @@ static void protomark (Proto *f) { | |||
40 | if (ttype(f->k+i) == LUA_TSTRING) | 40 | if (ttype(f->k+i) == LUA_TSTRING) |
41 | strmark(tsvalue(f->k+i)); | 41 | strmark(tsvalue(f->k+i)); |
42 | } | 42 | } |
43 | for (i=0; i<f->sizekproto; i++) | 43 | for (i=0; i<f->sizep; i++) |
44 | protomark(f->kproto[i]); | 44 | protomark(f->p[i]); |
45 | for (i=0; i<f->sizelocvars; i++) /* mark local-variable names */ | 45 | for (i=0; i<f->sizelocvars; i++) /* mark local-variable names */ |
46 | strmark(f->locvars[i].varname); | 46 | strmark(f->locvars[i].varname); |
47 | } | 47 | } |
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lobject.h,v 1.107 2001/06/26 13:20:45 roberto Exp roberto $ | 2 | ** $Id: lobject.h,v 1.108 2001/06/28 14:48:44 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 | */ |
@@ -124,8 +124,8 @@ typedef union Udata { | |||
124 | typedef struct Proto { | 124 | typedef struct Proto { |
125 | TObject *k; /* constants used by the function */ | 125 | TObject *k; /* constants used by the function */ |
126 | int sizek; /* size of `k' */ | 126 | int sizek; /* size of `k' */ |
127 | struct Proto **kproto; /* functions defined inside the function */ | 127 | struct Proto **p; /* functions defined inside the function */ |
128 | int sizekproto; /* size of `kproto' */ | 128 | int sizep; /* size of `p' */ |
129 | Instruction *code; | 129 | Instruction *code; |
130 | int sizecode; | 130 | int sizecode; |
131 | short nupvalues; | 131 | short nupvalues; |
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lparser.c,v 1.149 2001/06/12 14:36:48 roberto Exp roberto $ | 2 | ** $Id: lparser.c,v 1.150 2001/06/20 21:07:57 roberto Exp roberto $ |
3 | ** LL(1) Parser and code generator for Lua | 3 | ** LL(1) Parser and code generator for Lua |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -296,13 +296,13 @@ static void pushclosure (LexState *ls, FuncState *func, expdesc *v) { | |||
296 | int reg = fs->freereg; | 296 | int reg = fs->freereg; |
297 | for (i=0; i<func->f->nupvalues; i++) | 297 | for (i=0; i<func->f->nupvalues; i++) |
298 | luaK_exp2nextreg(fs, &func->upvalues[i]); | 298 | luaK_exp2nextreg(fs, &func->upvalues[i]); |
299 | luaM_growvector(ls->L, f->kproto, fs->nkproto, f->sizekproto, Proto *, | 299 | luaM_growvector(ls->L, f->p, fs->np, f->sizep, Proto *, |
300 | MAXARG_Bc, l_s("constant table overflow")); | 300 | MAXARG_Bc, l_s("constant table overflow")); |
301 | f->kproto[fs->nkproto++] = func->f; | 301 | f->p[fs->np++] = func->f; |
302 | fs->freereg = reg; /* CLOSURE will consume those values */ | 302 | fs->freereg = reg; /* CLOSURE will consume those values */ |
303 | init_exp(v, VNONRELOC, reg); | 303 | init_exp(v, VNONRELOC, reg); |
304 | luaK_reserveregs(fs, 1); | 304 | luaK_reserveregs(fs, 1); |
305 | luaK_codeABc(fs, OP_CLOSURE, v->u.i.info, fs->nkproto-1); | 305 | luaK_codeABc(fs, OP_CLOSURE, v->u.i.info, fs->np-1); |
306 | } | 306 | } |
307 | 307 | ||
308 | 308 | ||
@@ -318,7 +318,7 @@ static void open_func (LexState *ls, FuncState *fs) { | |||
318 | fs->jlt = NO_JUMP; | 318 | fs->jlt = NO_JUMP; |
319 | fs->freereg = 0; | 319 | fs->freereg = 0; |
320 | fs->nk = 0; | 320 | fs->nk = 0; |
321 | fs->nkproto = 0; | 321 | fs->np = 0; |
322 | fs->nlineinfo = 0; | 322 | fs->nlineinfo = 0; |
323 | fs->nlocvars = 0; | 323 | fs->nlocvars = 0; |
324 | fs->nactloc = 0; | 324 | fs->nactloc = 0; |
@@ -343,8 +343,8 @@ static void close_func (LexState *ls) { | |||
343 | f->sizecode = fs->pc; | 343 | f->sizecode = fs->pc; |
344 | luaM_reallocvector(L, f->k, f->sizek, fs->nk, TObject); | 344 | luaM_reallocvector(L, f->k, f->sizek, fs->nk, TObject); |
345 | f->sizek = fs->nk; | 345 | f->sizek = fs->nk; |
346 | luaM_reallocvector(L, f->kproto, f->sizekproto, fs->nkproto, Proto *); | 346 | luaM_reallocvector(L, f->p, f->sizep, fs->np, Proto *); |
347 | f->sizekproto = fs->nkproto; | 347 | f->sizep = fs->np; |
348 | luaM_reallocvector(L, f->locvars, f->sizelocvars, fs->nlocvars, LocVar); | 348 | luaM_reallocvector(L, f->locvars, f->sizelocvars, fs->nlocvars, LocVar); |
349 | f->sizelocvars = fs->nlocvars; | 349 | f->sizelocvars = fs->nlocvars; |
350 | luaM_reallocvector(L, f->lineinfo, f->sizelineinfo, fs->nlineinfo+1, int); | 350 | luaM_reallocvector(L, f->lineinfo, f->sizelineinfo, fs->nlineinfo+1, int); |
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lparser.h,v 1.30 2001/02/20 18:28:11 roberto Exp roberto $ | 2 | ** $Id: lparser.h,v 1.31 2001/06/05 18:17:01 roberto Exp roberto $ |
3 | ** LL(1) Parser and code generator for Lua | 3 | ** LL(1) Parser and code generator for Lua |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -53,7 +53,7 @@ typedef struct FuncState { | |||
53 | int jlt; /* list of jumps to `lasttarget' */ | 53 | int jlt; /* list of jumps to `lasttarget' */ |
54 | int freereg; /* first free register */ | 54 | int freereg; /* first free register */ |
55 | int nk; /* number of elements in `k' */ | 55 | int nk; /* number of elements in `k' */ |
56 | int nkproto; /* number of elements in `kproto' */ | 56 | int np; /* number of elements in `p' */ |
57 | int nlineinfo; /* number of elements in `lineinfo' */ | 57 | int nlineinfo; /* number of elements in `lineinfo' */ |
58 | int nlocvars; /* number of elements in `locvars' */ | 58 | int nlocvars; /* number of elements in `locvars' */ |
59 | int nactloc; /* number of active local variables */ | 59 | int nactloc; /* number of active local variables */ |
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lvm.c,v 1.188 2001/06/26 13:20:45 roberto Exp roberto $ | 2 | ** $Id: lvm.c,v 1.189 2001/06/28 14:48:44 roberto Exp roberto $ |
3 | ** Lua virtual machine | 3 | ** Lua virtual machine |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -644,7 +644,7 @@ StkId luaV_execute (lua_State *L, const Closure *cl, StkId base) { | |||
644 | break; | 644 | break; |
645 | } | 645 | } |
646 | case OP_CLOSURE: { | 646 | case OP_CLOSURE: { |
647 | Proto *p = tf->kproto[GETARG_Bc(i)]; | 647 | Proto *p = tf->p[GETARG_Bc(i)]; |
648 | int nup = p->nupvalues; | 648 | int nup = p->nupvalues; |
649 | luaV_checkGC(L, ra+nup); | 649 | luaV_checkGC(L, ra+nup); |
650 | L->top = ra+nup; | 650 | L->top = ra+nup; |