diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-04-24 17:07:46 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-04-24 17:07:46 -0300 |
commit | 9b38a696d5ccd6dd98685a74e8762a69e8722840 (patch) | |
tree | 3d9d09465dd7977ef0692091635913aab2fd90a9 /lparser.c | |
parent | 383e8b9e778d2bed9dc4347f441803e2c4f99d09 (diff) | |
download | lua-9b38a696d5ccd6dd98685a74e8762a69e8722840.tar.gz lua-9b38a696d5ccd6dd98685a74e8762a69e8722840.tar.bz2 lua-9b38a696d5ccd6dd98685a74e8762a69e8722840.zip |
avoid names that differ only in capitalization
Diffstat (limited to 'lparser.c')
-rw-r--r-- | lparser.c | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lparser.c,v 1.176 2002/04/10 19:14:45 roberto Exp roberto $ | 2 | ** $Id: lparser.c,v 1.177 2002/04/22 14:38:52 roberto Exp roberto $ |
3 | ** Lua Parser | 3 | ** Lua Parser |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -354,9 +354,9 @@ static void pushclosure (LexState *ls, FuncState *func, expdesc *v) { | |||
354 | Proto *f = fs->f; | 354 | Proto *f = fs->f; |
355 | int i; | 355 | int i; |
356 | luaM_growvector(ls->L, f->p, fs->np, f->sizep, Proto *, | 356 | luaM_growvector(ls->L, f->p, fs->np, f->sizep, Proto *, |
357 | MAXARG_Bc, "constant table overflow"); | 357 | MAXARG_Bx, "constant table overflow"); |
358 | f->p[fs->np++] = func->f; | 358 | f->p[fs->np++] = func->f; |
359 | init_exp(v, VRELOCABLE, luaK_codeABc(fs, OP_CLOSURE, 0, fs->np-1)); | 359 | init_exp(v, VRELOCABLE, luaK_codeABx(fs, OP_CLOSURE, 0, fs->np-1)); |
360 | for (i=0; i<func->f->nupvalues; i++) { | 360 | for (i=0; i<func->f->nupvalues; i++) { |
361 | luaK_exp2nextreg(fs, &func->upvalues[i]); | 361 | luaK_exp2nextreg(fs, &func->upvalues[i]); |
362 | fs->freereg--; /* CLOSURE will use these values */ | 362 | fs->freereg--; /* CLOSURE will use these values */ |
@@ -563,7 +563,7 @@ static void closelistfield (FuncState *fs, struct ConsControl *cc) { | |||
563 | luaK_exp2nextreg(fs, &cc->v); | 563 | luaK_exp2nextreg(fs, &cc->v); |
564 | cc->v.k = VVOID; | 564 | cc->v.k = VVOID; |
565 | if (cc->tostore == LFIELDS_PER_FLUSH) { | 565 | if (cc->tostore == LFIELDS_PER_FLUSH) { |
566 | luaK_codeABc(fs, OP_SETLIST, cc->t->info, cc->na-1); /* flush */ | 566 | luaK_codeABx(fs, OP_SETLIST, cc->t->info, cc->na-1); /* flush */ |
567 | cc->tostore = 0; /* no more items pending */ | 567 | cc->tostore = 0; /* no more items pending */ |
568 | fs->freereg = cc->t->info + 1; /* free registers */ | 568 | fs->freereg = cc->t->info + 1; /* free registers */ |
569 | } | 569 | } |
@@ -574,12 +574,12 @@ static void lastlistfield (FuncState *fs, struct ConsControl *cc) { | |||
574 | if (cc->tostore == 0) return; | 574 | if (cc->tostore == 0) return; |
575 | if (cc->v.k == VCALL) { | 575 | if (cc->v.k == VCALL) { |
576 | luaK_setcallreturns(fs, &cc->v, LUA_MULTRET); | 576 | luaK_setcallreturns(fs, &cc->v, LUA_MULTRET); |
577 | luaK_codeABc(fs, OP_SETLISTO, cc->t->info, cc->na-1); | 577 | luaK_codeABx(fs, OP_SETLISTO, cc->t->info, cc->na-1); |
578 | } | 578 | } |
579 | else { | 579 | else { |
580 | if (cc->v.k != VVOID) | 580 | if (cc->v.k != VVOID) |
581 | luaK_exp2nextreg(fs, &cc->v); | 581 | luaK_exp2nextreg(fs, &cc->v); |
582 | luaK_codeABc(fs, OP_SETLIST, cc->t->info, cc->na-1); | 582 | luaK_codeABx(fs, OP_SETLIST, cc->t->info, cc->na-1); |
583 | } | 583 | } |
584 | fs->freereg = cc->t->info + 1; /* free registers */ | 584 | fs->freereg = cc->t->info + 1; /* free registers */ |
585 | } | 585 | } |
@@ -587,7 +587,7 @@ static void lastlistfield (FuncState *fs, struct ConsControl *cc) { | |||
587 | 587 | ||
588 | static void listfield (LexState *ls, struct ConsControl *cc) { | 588 | static void listfield (LexState *ls, struct ConsControl *cc) { |
589 | expr(ls, &cc->v); | 589 | expr(ls, &cc->v); |
590 | luaX_checklimit(ls, cc->na, MAXARG_Bc, "items in a constructor"); | 590 | luaX_checklimit(ls, cc->na, MAXARG_Bx, "items in a constructor"); |
591 | cc->na++; | 591 | cc->na++; |
592 | cc->tostore++; | 592 | cc->tostore++; |
593 | } | 593 | } |
@@ -1014,7 +1014,7 @@ static void fornum (LexState *ls, TString *varname, int line) { | |||
1014 | if (optional(ls, ',')) | 1014 | if (optional(ls, ',')) |
1015 | exp1(ls); /* optional step */ | 1015 | exp1(ls); /* optional step */ |
1016 | else { /* default step = 1 */ | 1016 | else { /* default step = 1 */ |
1017 | luaK_codeABc(fs, OP_LOADK, fs->freereg, luaK_numberK(fs, 1)); | 1017 | luaK_codeABx(fs, OP_LOADK, fs->freereg, luaK_numberK(fs, 1)); |
1018 | luaK_reserveregs(fs, 1); | 1018 | luaK_reserveregs(fs, 1); |
1019 | } | 1019 | } |
1020 | adjustlocalvars(ls, 3); /* scope for control variables */ | 1020 | adjustlocalvars(ls, 3); /* scope for control variables */ |
@@ -1024,7 +1024,7 @@ static void fornum (LexState *ls, TString *varname, int line) { | |||
1024 | check(ls, TK_DO); | 1024 | check(ls, TK_DO); |
1025 | block(ls); | 1025 | block(ls); |
1026 | luaK_patchtohere(fs, prep-1); | 1026 | luaK_patchtohere(fs, prep-1); |
1027 | endfor = luaK_codeAsBc(fs, OP_FORLOOP, base, NO_JUMP); | 1027 | endfor = luaK_codeAsBx(fs, OP_FORLOOP, base, NO_JUMP); |
1028 | luaK_patchlist(fs, endfor, prep); | 1028 | luaK_patchlist(fs, endfor, prep); |
1029 | fs->f->lineinfo[endfor] = line; /* pretend that `OP_FOR' starts the loop */ | 1029 | fs->f->lineinfo[endfor] = line; /* pretend that `OP_FOR' starts the loop */ |
1030 | } | 1030 | } |