diff options
| -rw-r--r-- | ldebug.c | 4 | ||||
| -rw-r--r-- | lfunc.c | 20 | ||||
| -rw-r--r-- | lgc.c | 10 | ||||
| -rw-r--r-- | lobject.h | 14 | ||||
| -rw-r--r-- | lopcodes.h | 18 | ||||
| -rw-r--r-- | lparser.c | 58 | ||||
| -rw-r--r-- | lvm.c | 34 |
7 files changed, 79 insertions, 79 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ldebug.c,v 1.5 2000/01/19 12:00:45 roberto Exp roberto $ | 2 | ** $Id: ldebug.c,v 1.6 2000/01/25 13:57:18 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 | */ |
| @@ -94,7 +94,7 @@ static const char *luaG_getname (lua_State *L, const char **name, StkId top) { | |||
| 94 | if (ttype(f) == LUA_T_LCLMARK) | 94 | if (ttype(f) == LUA_T_LCLMARK) |
| 95 | f = protovalue(f); | 95 | f = protovalue(f); |
| 96 | LUA_ASSERT(L, ttype(f) == LUA_T_LMARK, "must be a Lua function"); | 96 | LUA_ASSERT(L, ttype(f) == LUA_T_LMARK, "must be a Lua function"); |
| 97 | *name = tfvalue(f)->strcnst[i]->str; | 97 | *name = tfvalue(f)->kstr[i]->str; |
| 98 | return luaO_typename(f+2); | 98 | return luaO_typename(f+2); |
| 99 | } | 99 | } |
| 100 | } | 100 | } |
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lfunc.c,v 1.16 1999/12/27 17:33:22 roberto Exp roberto $ | 2 | ** $Id: lfunc.c,v 1.17 2000/01/25 13:57:18 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 | */ |
| @@ -34,12 +34,12 @@ TProtoFunc *luaF_newproto (lua_State *L) { | |||
| 34 | f->code = NULL; | 34 | f->code = NULL; |
| 35 | f->lineDefined = 0; | 35 | f->lineDefined = 0; |
| 36 | f->source = NULL; | 36 | f->source = NULL; |
| 37 | f->strcnst = NULL; | 37 | f->kstr = NULL; |
| 38 | f->nstrcnst = 0; | 38 | f->nkstr = 0; |
| 39 | f->numcnst = NULL; | 39 | f->knum = NULL; |
| 40 | f->nnumcnst = 0; | 40 | f->nknum = 0; |
| 41 | f->protocnst = NULL; | 41 | f->kproto = NULL; |
| 42 | f->nprotocnst = 0; | 42 | f->nkproto = 0; |
| 43 | f->locvars = NULL; | 43 | f->locvars = NULL; |
| 44 | f->next = L->rootproto; | 44 | f->next = L->rootproto; |
| 45 | L->rootproto = f; | 45 | L->rootproto = f; |
| @@ -53,9 +53,9 @@ void luaF_freeproto (lua_State *L, TProtoFunc *f) { | |||
| 53 | L->nblocks -= gcsizeproto(L, f); | 53 | L->nblocks -= gcsizeproto(L, f); |
| 54 | luaM_free(L, f->code); | 54 | luaM_free(L, f->code); |
| 55 | luaM_free(L, f->locvars); | 55 | luaM_free(L, f->locvars); |
| 56 | luaM_free(L, f->strcnst); | 56 | luaM_free(L, f->kstr); |
| 57 | luaM_free(L, f->numcnst); | 57 | luaM_free(L, f->knum); |
| 58 | luaM_free(L, f->protocnst); | 58 | luaM_free(L, f->kproto); |
| 59 | luaM_free(L, f); | 59 | luaM_free(L, f); |
| 60 | } | 60 | } |
| 61 | 61 | ||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lgc.c,v 1.39 1999/12/27 17:33:22 roberto Exp roberto $ | 2 | ** $Id: lgc.c,v 1.40 2000/01/25 13:57:18 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 | */ |
| @@ -33,10 +33,10 @@ static void protomark (lua_State *L, TProtoFunc *f) { | |||
| 33 | int i; | 33 | int i; |
| 34 | f->marked = 1; | 34 | f->marked = 1; |
| 35 | strmark(L, f->source); | 35 | strmark(L, f->source); |
| 36 | for (i=f->nstrcnst-1; i>=0; i--) | 36 | for (i=f->nkstr-1; i>=0; i--) |
| 37 | strmark(L, f->strcnst[i]); | 37 | strmark(L, f->kstr[i]); |
| 38 | for (i=f->nprotocnst-1; i>=0; i--) | 38 | for (i=f->nkproto-1; i>=0; i--) |
| 39 | protomark(L, f->protocnst[i]); | 39 | protomark(L, f->kproto[i]); |
| 40 | } | 40 | } |
| 41 | } | 41 | } |
| 42 | 42 | ||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lobject.h,v 1.43 1999/12/29 16:31:15 roberto Exp roberto $ | 2 | ** $Id: lobject.h,v 1.44 2000/01/25 13:57:18 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 | */ |
| @@ -154,12 +154,12 @@ typedef struct TaggedString { | |||
| 154 | typedef struct TProtoFunc { | 154 | typedef struct TProtoFunc { |
| 155 | struct TProtoFunc *next; | 155 | struct TProtoFunc *next; |
| 156 | int marked; | 156 | int marked; |
| 157 | struct TaggedString **strcnst; | 157 | struct TaggedString **kstr; /* strings used by the function */ |
| 158 | int nstrcnst; | 158 | int nkstr; /* size of `kstr' */ |
| 159 | real *numcnst; | 159 | real *knum; /* real numbers used by the function */ |
| 160 | int nnumcnst; | 160 | int nknum; /* size of `knum' */ |
| 161 | struct TProtoFunc **protocnst; | 161 | struct TProtoFunc **kproto; /* functions defined inside the function */ |
| 162 | int nprotocnst; | 162 | int nkproto; /* size of `kproto' */ |
| 163 | Byte *code; /* ends with opcode ENDCODE */ | 163 | Byte *code; /* ends with opcode ENDCODE */ |
| 164 | int lineDefined; | 164 | int lineDefined; |
| 165 | TaggedString *source; | 165 | TaggedString *source; |
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lopcodes.h,v 1.36 1999/12/29 16:31:15 roberto Exp roberto $ | 2 | ** $Id: lopcodes.h,v 1.37 2000/01/25 13:57:18 roberto Exp roberto $ |
| 3 | ** Opcodes for Lua virtual machine | 3 | ** Opcodes for Lua virtual machine |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -27,16 +27,16 @@ TAILCALL,/* b c v_c-v_1 f (return) f(v1,...,v_c) */ | |||
| 27 | PUSHNIL,/* b - nil_0-nil_b */ | 27 | PUSHNIL,/* b - nil_0-nil_b */ |
| 28 | POP,/* b a_b-a_1 - */ | 28 | POP,/* b a_b-a_1 - */ |
| 29 | 29 | ||
| 30 | PUSHNUMBERW,/* w - (float)w */ | 30 | PUSHINTW,/* w - (float)w */ |
| 31 | PUSHNUMBER,/* b - (float)b */ | 31 | PUSHINT,/* b - (float)b */ |
| 32 | 32 | ||
| 33 | PUSHNUMBERNEGW,/* w - (float)-w */ | 33 | PUSHINTNEGW,/* w - (float)-w */ |
| 34 | PUSHNUMBERNEG,/* b - (float)-b */ | 34 | PUSHINTNEG,/* b - (float)-b */ |
| 35 | 35 | ||
| 36 | PUSHSTRCNSTW,/* w - STRCNST[w] */ | 36 | PUSHSTRINGW,/* w - KSTR[w] */ |
| 37 | PUSHSTRCNST,/* b - STRCNST[b] */ | 37 | PUSHSTRING,/* b - KSTR[b] */ |
| 38 | PUSHNUMCNSTW,/* w - NUMCNST[w] */ | 38 | PUSHNUMBERW,/* w - KNUM[w] */ |
| 39 | PUSHNUMCNST,/* b - NUMCNST[b] */ | 39 | PUSHNUMBER,/* b - KNUM[b] */ |
| 40 | 40 | ||
| 41 | PUSHUPVALUE,/* b - Closure[b] */ | 41 | PUSHUPVALUE,/* b - Closure[b] */ |
| 42 | 42 | ||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lparser.c,v 1.55 2000/01/25 13:57:18 roberto Exp roberto $ | 2 | ** $Id: lparser.c,v 1.56 2000/01/25 18:44:21 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 | */ |
| @@ -150,7 +150,7 @@ static void deltastack (LexState *ls, int delta) { | |||
| 150 | fs->stacksize += delta; | 150 | fs->stacksize += delta; |
| 151 | if (fs->stacksize > fs->maxstacksize) { | 151 | if (fs->stacksize > fs->maxstacksize) { |
| 152 | if (fs->stacksize > MAX_BYTE) | 152 | if (fs->stacksize > MAX_BYTE) |
| 153 | luaY_error(ls, "function/expression too complex"); | 153 | luaY_error(ls, "function or expression too complex"); |
| 154 | fs->maxstacksize = fs->stacksize; | 154 | fs->maxstacksize = fs->stacksize; |
| 155 | } | 155 | } |
| 156 | } | 156 | } |
| @@ -214,24 +214,24 @@ static void code_opcode (LexState *ls, OpCode op, int delta) { | |||
| 214 | } | 214 | } |
| 215 | 215 | ||
| 216 | 216 | ||
| 217 | static void code_strcnst (LexState *ls, int c) { | 217 | static void code_kstr (LexState *ls, int c) { |
| 218 | code_oparg(ls, PUSHSTRCNST, c, 1); | 218 | code_oparg(ls, PUSHSTRING, c, 1); |
| 219 | } | 219 | } |
| 220 | 220 | ||
| 221 | 221 | ||
| 222 | static void assertglobal (LexState *ls, int index) { | 222 | static void assertglobal (LexState *ls, int index) { |
| 223 | luaS_assertglobal(ls->L, ls->fs->f->strcnst[index]); | 223 | luaS_assertglobal(ls->L, ls->fs->f->kstr[index]); |
| 224 | } | 224 | } |
| 225 | 225 | ||
| 226 | 226 | ||
| 227 | static int string_constant (LexState *ls, FuncState *fs, TaggedString *s) { | 227 | static int string_constant (LexState *ls, FuncState *fs, TaggedString *s) { |
| 228 | TProtoFunc *f = fs->f; | 228 | TProtoFunc *f = fs->f; |
| 229 | int c = s->constindex; | 229 | int c = s->constindex; |
| 230 | if (c >= f->nstrcnst || f->strcnst[c] != s) { | 230 | if (c >= f->nkstr || f->kstr[c] != s) { |
| 231 | luaM_growvector(ls->L, f->strcnst, f->nstrcnst, 1, | 231 | luaM_growvector(ls->L, f->kstr, f->nkstr, 1, |
| 232 | TaggedString *, constantEM, MAX_ARG); | 232 | TaggedString *, constantEM, MAX_ARG); |
| 233 | c = f->nstrcnst++; | 233 | c = f->nkstr++; |
| 234 | f->strcnst[c] = s; | 234 | f->kstr[c] = s; |
| 235 | s->constindex = c; /* hint for next time */ | 235 | s->constindex = c; /* hint for next time */ |
| 236 | } | 236 | } |
| 237 | return c; | 237 | return c; |
| @@ -239,7 +239,7 @@ static int string_constant (LexState *ls, FuncState *fs, TaggedString *s) { | |||
| 239 | 239 | ||
| 240 | 240 | ||
| 241 | static void code_string (LexState *ls, TaggedString *s) { | 241 | static void code_string (LexState *ls, TaggedString *s) { |
| 242 | code_strcnst(ls, string_constant(ls, ls->fs, s)); | 242 | code_kstr(ls, string_constant(ls, ls->fs, s)); |
| 243 | } | 243 | } |
| 244 | 244 | ||
| 245 | 245 | ||
| @@ -247,15 +247,15 @@ static void code_string (LexState *ls, TaggedString *s) { | |||
| 247 | static int real_constant (LexState *ls, real r) { | 247 | static int real_constant (LexState *ls, real r) { |
| 248 | /* check whether `r' has appeared within the last LIM entries */ | 248 | /* check whether `r' has appeared within the last LIM entries */ |
| 249 | TProtoFunc *f = ls->fs->f; | 249 | TProtoFunc *f = ls->fs->f; |
| 250 | int c = f->nnumcnst; | 250 | int c = f->nknum; |
| 251 | int lim = c < LIM ? 0 : c-LIM; | 251 | int lim = c < LIM ? 0 : c-LIM; |
| 252 | while (--c >= lim) | 252 | while (--c >= lim) |
| 253 | if (f->numcnst[c] == r) return c; | 253 | if (f->knum[c] == r) return c; |
| 254 | /* not found; create a new entry */ | 254 | /* not found; create a new entry */ |
| 255 | luaM_growvector(ls->L, f->numcnst, f->nnumcnst, 1, | 255 | luaM_growvector(ls->L, f->knum, f->nknum, 1, |
| 256 | real, constantEM, MAX_ARG); | 256 | real, constantEM, MAX_ARG); |
| 257 | c = f->nnumcnst++; | 257 | c = f->nknum++; |
| 258 | f->numcnst[c] = r; | 258 | f->knum[c] = r; |
| 259 | return c; | 259 | return c; |
| 260 | } | 260 | } |
| 261 | 261 | ||
| @@ -264,10 +264,10 @@ static void code_number (LexState *ls, real f) { | |||
| 264 | real af = (f<0) ? -f : f; | 264 | real af = (f<0) ? -f : f; |
| 265 | if (0 <= af && af <= (real)MAX_WORD && (int)af == af) { | 265 | if (0 <= af && af <= (real)MAX_WORD && (int)af == af) { |
| 266 | /* abs(f) has a short integer value */ | 266 | /* abs(f) has a short integer value */ |
| 267 | code_oparg(ls, (f<0) ? PUSHNUMBERNEG : PUSHNUMBER, (int)af, 1); | 267 | code_oparg(ls, (f<0) ? PUSHINTNEG : PUSHINT, (int)af, 1); |
| 268 | } | 268 | } |
| 269 | else | 269 | else |
| 270 | code_oparg(ls, PUSHNUMCNST, real_constant(ls, f), 1); | 270 | code_oparg(ls, PUSHNUMBER, real_constant(ls, f), 1); |
| 271 | } | 271 | } |
| 272 | 272 | ||
| 273 | 273 | ||
| @@ -469,7 +469,7 @@ static void code_args (LexState *ls, int nparams, int dots) { | |||
| 469 | static void unloaddot (LexState *ls, vardesc *v) { | 469 | static void unloaddot (LexState *ls, vardesc *v) { |
| 470 | /* dotted variables <a.x> must be stored as regular indexed vars <a["x"]> */ | 470 | /* dotted variables <a.x> must be stored as regular indexed vars <a["x"]> */ |
| 471 | if (v->k == VDOT) { | 471 | if (v->k == VDOT) { |
| 472 | code_strcnst(ls, v->info); | 472 | code_kstr(ls, v->info); |
| 473 | v->k = VINDEXED; | 473 | v->k = VINDEXED; |
| 474 | } | 474 | } |
| 475 | } | 475 | } |
| @@ -551,13 +551,13 @@ static void func_onstack (LexState *ls, FuncState *func) { | |||
| 551 | FuncState *fs = ls->fs; | 551 | FuncState *fs = ls->fs; |
| 552 | TProtoFunc *f = fs->f; | 552 | TProtoFunc *f = fs->f; |
| 553 | int i; | 553 | int i; |
| 554 | luaM_growvector(ls->L, f->protocnst, f->nprotocnst, 1, | 554 | luaM_growvector(ls->L, f->kproto, f->nkproto, 1, |
| 555 | TProtoFunc *, constantEM, MAX_ARG); | 555 | TProtoFunc *, constantEM, MAX_ARG); |
| 556 | f->protocnst[f->nprotocnst] = func->f; | 556 | f->kproto[f->nkproto] = func->f; |
| 557 | for (i=0; i<func->nupvalues; i++) | 557 | for (i=0; i<func->nupvalues; i++) |
| 558 | lua_pushvar(ls, &func->upvalues[i]); | 558 | lua_pushvar(ls, &func->upvalues[i]); |
| 559 | deltastack(ls, 1); /* CLOSURE puts one extra element (before poping) */ | 559 | deltastack(ls, 1); /* CLOSURE puts one extra element (before popping) */ |
| 560 | code_oparg(ls, CLOSURE, f->nprotocnst++, -func->nupvalues); | 560 | code_oparg(ls, CLOSURE, f->nkproto++, -func->nupvalues); |
| 561 | code_byte(ls, (Byte)func->nupvalues); | 561 | code_byte(ls, (Byte)func->nupvalues); |
| 562 | } | 562 | } |
| 563 | 563 | ||
| @@ -592,9 +592,9 @@ static void close_func (LexState *ls) { | |||
| 592 | code_opcode(ls, ENDCODE, 0); | 592 | code_opcode(ls, ENDCODE, 0); |
| 593 | f->code[0] = (Byte)fs->maxstacksize; | 593 | f->code[0] = (Byte)fs->maxstacksize; |
| 594 | luaM_reallocvector(ls->L, f->code, fs->pc, Byte); | 594 | luaM_reallocvector(ls->L, f->code, fs->pc, Byte); |
| 595 | luaM_reallocvector(ls->L, f->strcnst, f->nstrcnst, TaggedString *); | 595 | luaM_reallocvector(ls->L, f->kstr, f->nkstr, TaggedString *); |
| 596 | luaM_reallocvector(ls->L, f->numcnst, f->nnumcnst, real); | 596 | luaM_reallocvector(ls->L, f->knum, f->nknum, real); |
| 597 | luaM_reallocvector(ls->L, f->protocnst, f->nprotocnst, TProtoFunc *); | 597 | luaM_reallocvector(ls->L, f->kproto, f->nkproto, TProtoFunc *); |
| 598 | if (fs->nvars != -1) { /* debug information? */ | 598 | if (fs->nvars != -1) { /* debug information? */ |
| 599 | luaI_registerlocalvar(ls, NULL, -1); /* flag end of vector */ | 599 | luaI_registerlocalvar(ls, NULL, -1); /* flag end of vector */ |
| 600 | luaM_reallocvector(ls->L, f->locvars, fs->nvars, LocVar); | 600 | luaM_reallocvector(ls->L, f->locvars, fs->nvars, LocVar); |
| @@ -661,7 +661,7 @@ static int checkname (LexState *ls) { | |||
| 661 | 661 | ||
| 662 | static TaggedString *str_checkname (LexState *ls) { | 662 | static TaggedString *str_checkname (LexState *ls) { |
| 663 | int i = checkname(ls); /* this call may realloc `f->consts' */ | 663 | int i = checkname(ls); /* this call may realloc `f->consts' */ |
| 664 | return ls->fs->f->strcnst[i]; | 664 | return ls->fs->f->kstr[i]; |
| 665 | } | 665 | } |
| 666 | 666 | ||
| 667 | 667 | ||
| @@ -853,7 +853,7 @@ static void recfield (LexState *ls) { | |||
| 853 | /* recfield -> (NAME | '['exp1']') = exp1 */ | 853 | /* recfield -> (NAME | '['exp1']') = exp1 */ |
| 854 | switch (ls->token) { | 854 | switch (ls->token) { |
| 855 | case NAME: | 855 | case NAME: |
| 856 | code_strcnst(ls, checkname(ls)); | 856 | code_kstr(ls, checkname(ls)); |
| 857 | break; | 857 | break; |
| 858 | 858 | ||
| 859 | case '[': | 859 | case '[': |
| @@ -917,7 +917,7 @@ static void constructor_part (LexState *ls, constdesc *cd) { | |||
| 917 | if (ls->token == '=') { | 917 | if (ls->token == '=') { |
| 918 | switch (v.k) { | 918 | switch (v.k) { |
| 919 | case VGLOBAL: | 919 | case VGLOBAL: |
| 920 | code_strcnst(ls, v.info); | 920 | code_kstr(ls, v.info); |
| 921 | break; | 921 | break; |
| 922 | case VLOCAL: | 922 | case VLOCAL: |
| 923 | code_string(ls, ls->fs->localvar[v.info]); | 923 | code_string(ls, ls->fs->localvar[v.info]); |
| @@ -1291,7 +1291,7 @@ static int funcname (LexState *ls, vardesc *v) { | |||
| 1291 | needself = (ls->token == ':'); | 1291 | needself = (ls->token == ':'); |
| 1292 | next(ls); | 1292 | next(ls); |
| 1293 | lua_pushvar(ls, v); | 1293 | lua_pushvar(ls, v); |
| 1294 | code_strcnst(ls, checkname(ls)); | 1294 | code_kstr(ls, checkname(ls)); |
| 1295 | v->k = VINDEXED; | 1295 | v->k = VINDEXED; |
| 1296 | } | 1296 | } |
| 1297 | return needself; | 1297 | return needself; |
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lvm.c,v 1.82 2000/01/24 20:14:07 roberto Exp roberto $ | 2 | ** $Id: lvm.c,v 1.83 2000/01/25 13:57:18 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 | */ |
| @@ -314,7 +314,7 @@ StkId luaV_execute (lua_State *L, const Closure *cl, const TProtoFunc *tf, | |||
| 314 | StkId base) { | 314 | StkId base) { |
| 315 | register StkId top; /* keep top local, for performance */ | 315 | register StkId top; /* keep top local, for performance */ |
| 316 | register const Byte *pc = tf->code; | 316 | register const Byte *pc = tf->code; |
| 317 | TaggedString **strcnst = tf->strcnst; | 317 | TaggedString **kstr = tf->kstr; |
| 318 | if (L->callhook) | 318 | if (L->callhook) |
| 319 | luaD_callHook(L, base-1, L->callhook, "call"); | 319 | luaD_callHook(L, base-1, L->callhook, "call"); |
| 320 | luaD_checkstack(L, (*pc++)+EXTRA_STACK); | 320 | luaD_checkstack(L, (*pc++)+EXTRA_STACK); |
| @@ -358,31 +358,31 @@ StkId luaV_execute (lua_State *L, const Closure *cl, const TProtoFunc *tf, | |||
| 358 | top -= aux; | 358 | top -= aux; |
| 359 | break; | 359 | break; |
| 360 | 360 | ||
| 361 | case PUSHNUMBERW: aux += highbyte(L, *pc++); | 361 | case PUSHINTW: aux += highbyte(L, *pc++); |
| 362 | case PUSHNUMBER: aux += *pc++; | 362 | case PUSHINT: aux += *pc++; |
| 363 | ttype(top) = LUA_T_NUMBER; | 363 | ttype(top) = LUA_T_NUMBER; |
| 364 | nvalue(top) = aux; | 364 | nvalue(top) = aux; |
| 365 | top++; | 365 | top++; |
| 366 | break; | 366 | break; |
| 367 | 367 | ||
| 368 | case PUSHNUMBERNEGW: aux += highbyte(L, *pc++); | 368 | case PUSHINTNEGW: aux += highbyte(L, *pc++); |
| 369 | case PUSHNUMBERNEG: aux += *pc++; | 369 | case PUSHINTNEG: aux += *pc++; |
| 370 | ttype(top) = LUA_T_NUMBER; | 370 | ttype(top) = LUA_T_NUMBER; |
| 371 | nvalue(top) = -aux; | 371 | nvalue(top) = -aux; |
| 372 | top++; | 372 | top++; |
| 373 | break; | 373 | break; |
| 374 | 374 | ||
| 375 | case PUSHSTRCNSTW: aux += highbyte(L, *pc++); | 375 | case PUSHSTRINGW: aux += highbyte(L, *pc++); |
| 376 | case PUSHSTRCNST: aux += *pc++; | 376 | case PUSHSTRING: aux += *pc++; |
| 377 | ttype(top) = LUA_T_STRING; | 377 | ttype(top) = LUA_T_STRING; |
| 378 | tsvalue(top) = strcnst[aux]; | 378 | tsvalue(top) = kstr[aux]; |
| 379 | top++; | 379 | top++; |
| 380 | break; | 380 | break; |
| 381 | 381 | ||
| 382 | case PUSHNUMCNSTW: aux += highbyte(L, *pc++); | 382 | case PUSHNUMBERW: aux += highbyte(L, *pc++); |
| 383 | case PUSHNUMCNST: aux += *pc++; | 383 | case PUSHNUMBER: aux += *pc++; |
| 384 | ttype(top) = LUA_T_NUMBER; | 384 | ttype(top) = LUA_T_NUMBER; |
| 385 | nvalue(top) = tf->numcnst[aux]; | 385 | nvalue(top) = tf->knum[aux]; |
| 386 | top++; | 386 | top++; |
| 387 | break; | 387 | break; |
| 388 | 388 | ||
| @@ -396,7 +396,7 @@ StkId luaV_execute (lua_State *L, const Closure *cl, const TProtoFunc *tf, | |||
| 396 | 396 | ||
| 397 | case GETGLOBALW: aux += highbyte(L, *pc++); | 397 | case GETGLOBALW: aux += highbyte(L, *pc++); |
| 398 | case GETGLOBAL: aux += *pc++; | 398 | case GETGLOBAL: aux += *pc++; |
| 399 | luaV_getglobal(L, strcnst[aux]->u.s.gv, top); | 399 | luaV_getglobal(L, kstr[aux]->u.s.gv, top); |
| 400 | top++; | 400 | top++; |
| 401 | break; | 401 | break; |
| 402 | 402 | ||
| @@ -408,7 +408,7 @@ StkId luaV_execute (lua_State *L, const Closure *cl, const TProtoFunc *tf, | |||
| 408 | case GETDOTTEDW: aux += highbyte(L, *pc++); | 408 | case GETDOTTEDW: aux += highbyte(L, *pc++); |
| 409 | case GETDOTTED: aux += *pc++; | 409 | case GETDOTTED: aux += *pc++; |
| 410 | ttype(top) = LUA_T_STRING; | 410 | ttype(top) = LUA_T_STRING; |
| 411 | tsvalue(top++) = strcnst[aux]; | 411 | tsvalue(top++) = kstr[aux]; |
| 412 | luaV_gettable(L, top); | 412 | luaV_gettable(L, top); |
| 413 | top--; | 413 | top--; |
| 414 | break; | 414 | break; |
| @@ -418,7 +418,7 @@ StkId luaV_execute (lua_State *L, const Closure *cl, const TProtoFunc *tf, | |||
| 418 | TObject receiver; | 418 | TObject receiver; |
| 419 | receiver = *(top-1); | 419 | receiver = *(top-1); |
| 420 | ttype(top) = LUA_T_STRING; | 420 | ttype(top) = LUA_T_STRING; |
| 421 | tsvalue(top++) = strcnst[aux]; | 421 | tsvalue(top++) = kstr[aux]; |
| 422 | luaV_gettable(L, top); | 422 | luaV_gettable(L, top); |
| 423 | *(top-1) = receiver; | 423 | *(top-1) = receiver; |
| 424 | break; | 424 | break; |
| @@ -439,7 +439,7 @@ StkId luaV_execute (lua_State *L, const Closure *cl, const TProtoFunc *tf, | |||
| 439 | 439 | ||
| 440 | case SETGLOBALW: aux += highbyte(L, *pc++); | 440 | case SETGLOBALW: aux += highbyte(L, *pc++); |
| 441 | case SETGLOBAL: aux += *pc++; | 441 | case SETGLOBAL: aux += *pc++; |
| 442 | luaV_setglobal(L, strcnst[aux]->u.s.gv, top); | 442 | luaV_setglobal(L, kstr[aux]->u.s.gv, top); |
| 443 | top--; | 443 | top--; |
| 444 | break; | 444 | break; |
| 445 | 445 | ||
| @@ -632,7 +632,7 @@ StkId luaV_execute (lua_State *L, const Closure *cl, const TProtoFunc *tf, | |||
| 632 | case CLOSUREW: aux += highbyte(L, *pc++); | 632 | case CLOSUREW: aux += highbyte(L, *pc++); |
| 633 | case CLOSURE: aux += *pc++; | 633 | case CLOSURE: aux += *pc++; |
| 634 | ttype(top) = LUA_T_LPROTO; | 634 | ttype(top) = LUA_T_LPROTO; |
| 635 | tfvalue(top) = tf->protocnst[aux]; | 635 | tfvalue(top) = tf->kproto[aux]; |
| 636 | L->top = ++top; | 636 | L->top = ++top; |
| 637 | aux = *pc++; /* number of upvalues */ | 637 | aux = *pc++; /* number of upvalues */ |
| 638 | luaV_closure(L, aux); | 638 | luaV_closure(L, aux); |
