diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2011-07-27 15:07:37 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2011-07-27 15:07:37 -0300 |
commit | 5ab6d36d99a30cadeff18a9467ac88c114973554 (patch) | |
tree | 65a8efc49c78339fa9cb260d04b4b0e00f0b589b | |
parent | 43c873895f5c78ca1b678e91709f36ce2023432d (diff) | |
download | lua-5ab6d36d99a30cadeff18a9467ac88c114973554.tar.gz lua-5ab6d36d99a30cadeff18a9467ac88c114973554.tar.bz2 lua-5ab6d36d99a30cadeff18a9467ac88c114973554.zip |
no more field 'L' in 'FuncState'
-rw-r--r-- | lcode.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lcode.c,v 2.56 2011/05/31 18:27:56 roberto Exp roberto $ | 2 | ** $Id: lcode.c,v 2.57 2011/07/15 12:50:29 roberto Exp roberto $ |
3 | ** Code generator for Lua | 3 | ** Code generator for Lua |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -213,11 +213,11 @@ static int luaK_code (FuncState *fs, Instruction i) { | |||
213 | Proto *f = fs->f; | 213 | Proto *f = fs->f; |
214 | dischargejpc(fs); /* `pc' will change */ | 214 | dischargejpc(fs); /* `pc' will change */ |
215 | /* put new instruction in code array */ | 215 | /* put new instruction in code array */ |
216 | luaM_growvector(fs->L, f->code, fs->pc, f->sizecode, Instruction, | 216 | luaM_growvector(fs->ls->L, f->code, fs->pc, f->sizecode, Instruction, |
217 | MAX_INT, "opcodes"); | 217 | MAX_INT, "opcodes"); |
218 | f->code[fs->pc] = i; | 218 | f->code[fs->pc] = i; |
219 | /* save corresponding line information */ | 219 | /* save corresponding line information */ |
220 | luaM_growvector(fs->L, f->lineinfo, fs->pc, f->sizelineinfo, int, | 220 | luaM_growvector(fs->ls->L, f->lineinfo, fs->pc, f->sizelineinfo, int, |
221 | MAX_INT, "opcodes"); | 221 | MAX_INT, "opcodes"); |
222 | f->lineinfo[fs->pc] = fs->ls->lastline; | 222 | f->lineinfo[fs->pc] = fs->ls->lastline; |
223 | return fs->pc++; | 223 | return fs->pc++; |
@@ -289,7 +289,7 @@ static void freeexp (FuncState *fs, expdesc *e) { | |||
289 | 289 | ||
290 | 290 | ||
291 | static int addk (FuncState *fs, TValue *key, TValue *v) { | 291 | static int addk (FuncState *fs, TValue *key, TValue *v) { |
292 | lua_State *L = fs->L; | 292 | lua_State *L = fs->ls->L; |
293 | TValue *idx = luaH_set(L, fs->h, key); | 293 | TValue *idx = luaH_set(L, fs->h, key); |
294 | Proto *f = fs->f; | 294 | Proto *f = fs->f; |
295 | int k, oldsize; | 295 | int k, oldsize; |
@@ -316,14 +316,14 @@ static int addk (FuncState *fs, TValue *key, TValue *v) { | |||
316 | 316 | ||
317 | int luaK_stringK (FuncState *fs, TString *s) { | 317 | int luaK_stringK (FuncState *fs, TString *s) { |
318 | TValue o; | 318 | TValue o; |
319 | setsvalue(fs->L, &o, s); | 319 | setsvalue(fs->ls->L, &o, s); |
320 | return addk(fs, &o, &o); | 320 | return addk(fs, &o, &o); |
321 | } | 321 | } |
322 | 322 | ||
323 | 323 | ||
324 | int luaK_numberK (FuncState *fs, lua_Number r) { | 324 | int luaK_numberK (FuncState *fs, lua_Number r) { |
325 | int n; | 325 | int n; |
326 | lua_State *L = fs->L; | 326 | lua_State *L = fs->ls->L; |
327 | TValue o; | 327 | TValue o; |
328 | setnvalue(&o, r); | 328 | setnvalue(&o, r); |
329 | if (r == 0 || luai_numisnan(NULL, r)) { /* handle -0 and NaN */ | 329 | if (r == 0 || luai_numisnan(NULL, r)) { /* handle -0 and NaN */ |
@@ -350,7 +350,7 @@ static int nilK (FuncState *fs) { | |||
350 | TValue k, v; | 350 | TValue k, v; |
351 | setnilvalue(&v); | 351 | setnilvalue(&v); |
352 | /* cannot use nil as key; instead use table itself to represent nil */ | 352 | /* cannot use nil as key; instead use table itself to represent nil */ |
353 | sethvalue(fs->L, &k, fs->h); | 353 | sethvalue(fs->ls->L, &k, fs->h); |
354 | return addk(fs, &k, &v); | 354 | return addk(fs, &k, &v); |
355 | } | 355 | } |
356 | 356 | ||