diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-04-19 10:41:37 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-04-19 10:41:37 -0300 |
commit | c4409f69aba65f3b6d4921a5bd4f734fb85b91f9 (patch) | |
tree | c8a6505f788465c4c96188ee31c440fd414e9a3d | |
parent | 89a9c3628122dccf5297460646038d4def1a098c (diff) | |
download | lua-c4409f69aba65f3b6d4921a5bd4f734fb85b91f9.tar.gz lua-c4409f69aba65f3b6d4921a5bd4f734fb85b91f9.tar.bz2 lua-c4409f69aba65f3b6d4921a5bd4f734fb85b91f9.zip |
details
-rw-r--r-- | lcode.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lcode.c,v 1.26 2000/04/14 17:47:24 roberto Exp roberto $ | 2 | ** $Id: lcode.c,v 1.27 2000/04/17 14:05:34 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 | */ |
@@ -38,7 +38,7 @@ static Instruction previous_instruction (FuncState *fs) { | |||
38 | 38 | ||
39 | 39 | ||
40 | int luaK_jump (FuncState *fs) { | 40 | int luaK_jump (FuncState *fs) { |
41 | int j = luaK_code1(fs, OP_JMP, NO_JUMP); | 41 | int j = luaK_code0(fs, OP_JMP); |
42 | if (j == fs->lasttarget) { /* possible jumps to this jump? */ | 42 | if (j == fs->lasttarget) { /* possible jumps to this jump? */ |
43 | luaK_concat(fs, &j, fs->jlt); /* keep them on hold */ | 43 | luaK_concat(fs, &j, fs->jlt); /* keep them on hold */ |
44 | fs->jlt = NO_JUMP; | 44 | fs->jlt = NO_JUMP; |
@@ -328,7 +328,7 @@ void luaK_tostack (LexState *ls, expdesc *v, int onlyone) { | |||
328 | int p_1 = NO_JUMP; /* position of an eventual PUSHINT */ | 328 | int p_1 = NO_JUMP; /* position of an eventual PUSHINT */ |
329 | if (ISJUMP(previous) || need_value(fs, v->u.l.f, OP_JMPONF) || | 329 | if (ISJUMP(previous) || need_value(fs, v->u.l.f, OP_JMPONF) || |
330 | need_value(fs, v->u.l.t, OP_JMPONT)) { | 330 | need_value(fs, v->u.l.t, OP_JMPONT)) { |
331 | /* expression need values */ | 331 | /* expression needs values */ |
332 | if (ISJUMP(previous)) | 332 | if (ISJUMP(previous)) |
333 | luaK_concat(fs, &v->u.l.t, fs->pc-1); /* put `previous' in t. list */ | 333 | luaK_concat(fs, &v->u.l.t, fs->pc-1); /* put `previous' in t. list */ |
334 | else { | 334 | else { |