aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 @@
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;
diff --git a/lfunc.c b/lfunc.c
index 9be4e738..141d04a1 100644
--- a/lfunc.c
+++ b/lfunc.c
@@ -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}
diff --git a/lgc.c b/lgc.c
index 112d02ac..b0efaed3 100644
--- a/lgc.c
+++ b/lgc.c
@@ -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 }
diff --git a/lobject.h b/lobject.h
index b0af0e5f..9a19ea8e 100644
--- a/lobject.h
+++ b/lobject.h
@@ -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 {
124typedef struct Proto { 124typedef 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;
diff --git a/lparser.c b/lparser.c
index 28f0c4b8..a71aa003 100644
--- a/lparser.c
+++ b/lparser.c
@@ -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);
diff --git a/lparser.h b/lparser.h
index b55270c1..63bac8f3 100644
--- a/lparser.h
+++ b/lparser.h
@@ -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 */
diff --git a/lvm.c b/lvm.c
index 774beeee..da8876dd 100644
--- a/lvm.c
+++ b/lvm.c
@@ -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;