summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2001-06-28 11:57:17 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2001-06-28 11:57:17 -0300
commit770954510fd04912b2d84db0bd68dac62eaa5c5a (patch)
tree87344ef83c11905af034e969b224103edff97796
parentb346834a09c086affce6308c7917a8f6af310d11 (diff)
downloadlua-github-770954510fd04912b2d84db0bd68dac62eaa5c5a.tar.gz
rename of `kproto' to `p'
-rw-r--r--ldebug.c6
-rw-r--r--lfunc.c8
-rw-r--r--lgc.c6
-rw-r--r--lobject.h6
-rw-r--r--lparser.c14
-rw-r--r--lparser.h4
-rw-r--r--lvm.c4
7 files changed, 24 insertions, 24 deletions
diff --git a/ldebug.c b/ldebug.c
index f07e6dc3..473d63f5 100644
--- a/ldebug.c
+++ b/ldebug.c
@@ -1,5 +1,5 @@
/*
-** $Id: ldebug.c,v 1.83 2001/06/15 20:36:57 roberto Exp roberto $
+** $Id: ldebug.c,v 1.84 2001/06/26 13:20:45 roberto Exp roberto $
** Debug Interface
** See Copyright Notice in lua.h
*/
@@ -450,8 +450,8 @@ static Instruction luaG_symbexec (const Proto *pt, int lastpc, int reg) {
break;
}
case OP_CLOSURE: {
- check(b < pt->sizekproto);
- checkreg(pt, a + pt->kproto[b]->nupvalues - 1);
+ check(b < pt->sizep);
+ checkreg(pt, a + pt->p[b]->nupvalues - 1);
break;
}
default: break;
diff --git a/lfunc.c b/lfunc.c
index 9be4e738..141d04a1 100644
--- a/lfunc.c
+++ b/lfunc.c
@@ -1,5 +1,5 @@
/*
-** $Id: lfunc.c,v 1.43 2001/03/26 14:31:49 roberto Exp roberto $
+** $Id: lfunc.c,v 1.44 2001/06/05 18:17:01 roberto Exp roberto $
** Auxiliary functions to manipulate prototypes and closures
** See Copyright Notice in lua.h
*/
@@ -32,8 +32,8 @@ Proto *luaF_newproto (lua_State *L) {
Proto *f = luaM_new(L, Proto);
f->k = NULL;
f->sizek = 0;
- f->kproto = NULL;
- f->sizekproto = 0;
+ f->p = NULL;
+ f->sizep = 0;
f->code = NULL;
f->sizecode = 0;
f->nupvalues = 0;
@@ -57,7 +57,7 @@ void luaF_freeproto (lua_State *L, Proto *f) {
luaM_freearray(L, f->code, f->sizecode, Instruction);
luaM_freearray(L, f->locvars, f->sizelocvars, struct LocVar);
luaM_freearray(L, f->k, f->sizek, TObject);
- luaM_freearray(L, f->kproto, f->sizekproto, Proto *);
+ luaM_freearray(L, f->p, f->sizep, Proto *);
luaM_freearray(L, f->lineinfo, f->sizelineinfo, int);
luaM_freelem(L, f, Proto);
}
diff --git a/lgc.c b/lgc.c
index 112d02ac..b0efaed3 100644
--- a/lgc.c
+++ b/lgc.c
@@ -1,5 +1,5 @@
/*
-** $Id: lgc.c,v 1.107 2001/06/21 16:41:34 roberto Exp roberto $
+** $Id: lgc.c,v 1.108 2001/06/26 13:20:45 roberto Exp roberto $
** Garbage Collector
** See Copyright Notice in lua.h
*/
@@ -40,8 +40,8 @@ static void protomark (Proto *f) {
if (ttype(f->k+i) == LUA_TSTRING)
strmark(tsvalue(f->k+i));
}
- for (i=0; i<f->sizekproto; i++)
- protomark(f->kproto[i]);
+ for (i=0; i<f->sizep; i++)
+ protomark(f->p[i]);
for (i=0; i<f->sizelocvars; i++) /* mark local-variable names */
strmark(f->locvars[i].varname);
}
diff --git a/lobject.h b/lobject.h
index b0af0e5f..9a19ea8e 100644
--- a/lobject.h
+++ b/lobject.h
@@ -1,5 +1,5 @@
/*
-** $Id: lobject.h,v 1.107 2001/06/26 13:20:45 roberto Exp roberto $
+** $Id: lobject.h,v 1.108 2001/06/28 14:48:44 roberto Exp roberto $
** Type definitions for Lua objects
** See Copyright Notice in lua.h
*/
@@ -124,8 +124,8 @@ typedef union Udata {
typedef struct Proto {
TObject *k; /* constants used by the function */
int sizek; /* size of `k' */
- struct Proto **kproto; /* functions defined inside the function */
- int sizekproto; /* size of `kproto' */
+ struct Proto **p; /* functions defined inside the function */
+ int sizep; /* size of `p' */
Instruction *code;
int sizecode;
short nupvalues;
diff --git a/lparser.c b/lparser.c
index 28f0c4b8..a71aa003 100644
--- a/lparser.c
+++ b/lparser.c
@@ -1,5 +1,5 @@
/*
-** $Id: lparser.c,v 1.149 2001/06/12 14:36:48 roberto Exp roberto $
+** $Id: lparser.c,v 1.150 2001/06/20 21:07:57 roberto Exp roberto $
** LL(1) Parser and code generator for Lua
** See Copyright Notice in lua.h
*/
@@ -296,13 +296,13 @@ static void pushclosure (LexState *ls, FuncState *func, expdesc *v) {
int reg = fs->freereg;
for (i=0; i<func->f->nupvalues; i++)
luaK_exp2nextreg(fs, &func->upvalues[i]);
- luaM_growvector(ls->L, f->kproto, fs->nkproto, f->sizekproto, Proto *,
+ luaM_growvector(ls->L, f->p, fs->np, f->sizep, Proto *,
MAXARG_Bc, l_s("constant table overflow"));
- f->kproto[fs->nkproto++] = func->f;
+ f->p[fs->np++] = func->f;
fs->freereg = reg; /* CLOSURE will consume those values */
init_exp(v, VNONRELOC, reg);
luaK_reserveregs(fs, 1);
- luaK_codeABc(fs, OP_CLOSURE, v->u.i.info, fs->nkproto-1);
+ luaK_codeABc(fs, OP_CLOSURE, v->u.i.info, fs->np-1);
}
@@ -318,7 +318,7 @@ static void open_func (LexState *ls, FuncState *fs) {
fs->jlt = NO_JUMP;
fs->freereg = 0;
fs->nk = 0;
- fs->nkproto = 0;
+ fs->np = 0;
fs->nlineinfo = 0;
fs->nlocvars = 0;
fs->nactloc = 0;
@@ -343,8 +343,8 @@ static void close_func (LexState *ls) {
f->sizecode = fs->pc;
luaM_reallocvector(L, f->k, f->sizek, fs->nk, TObject);
f->sizek = fs->nk;
- luaM_reallocvector(L, f->kproto, f->sizekproto, fs->nkproto, Proto *);
- f->sizekproto = fs->nkproto;
+ luaM_reallocvector(L, f->p, f->sizep, fs->np, Proto *);
+ f->sizep = fs->np;
luaM_reallocvector(L, f->locvars, f->sizelocvars, fs->nlocvars, LocVar);
f->sizelocvars = fs->nlocvars;
luaM_reallocvector(L, f->lineinfo, f->sizelineinfo, fs->nlineinfo+1, int);
diff --git a/lparser.h b/lparser.h
index b55270c1..63bac8f3 100644
--- a/lparser.h
+++ b/lparser.h
@@ -1,5 +1,5 @@
/*
-** $Id: lparser.h,v 1.30 2001/02/20 18:28:11 roberto Exp roberto $
+** $Id: lparser.h,v 1.31 2001/06/05 18:17:01 roberto Exp roberto $
** LL(1) Parser and code generator for Lua
** See Copyright Notice in lua.h
*/
@@ -53,7 +53,7 @@ typedef struct FuncState {
int jlt; /* list of jumps to `lasttarget' */
int freereg; /* first free register */
int nk; /* number of elements in `k' */
- int nkproto; /* number of elements in `kproto' */
+ int np; /* number of elements in `p' */
int nlineinfo; /* number of elements in `lineinfo' */
int nlocvars; /* number of elements in `locvars' */
int nactloc; /* number of active local variables */
diff --git a/lvm.c b/lvm.c
index 774beeee..da8876dd 100644
--- a/lvm.c
+++ b/lvm.c
@@ -1,5 +1,5 @@
/*
-** $Id: lvm.c,v 1.188 2001/06/26 13:20:45 roberto Exp roberto $
+** $Id: lvm.c,v 1.189 2001/06/28 14:48:44 roberto Exp roberto $
** Lua virtual machine
** See Copyright Notice in lua.h
*/
@@ -644,7 +644,7 @@ StkId luaV_execute (lua_State *L, const Closure *cl, StkId base) {
break;
}
case OP_CLOSURE: {
- Proto *p = tf->kproto[GETARG_Bc(i)];
+ Proto *p = tf->p[GETARG_Bc(i)];
int nup = p->nupvalues;
luaV_checkGC(L, ra+nup);
L->top = ra+nup;