diff options
Diffstat (limited to 'lcode.c')
| -rw-r--r-- | lcode.c | 10 |
1 files changed, 5 insertions, 5 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lcode.c,v 2.13 2005/05/20 15:53:42 roberto Exp roberto $ | 2 | ** $Id: lcode.c,v 2.14 2005/06/07 18:53:45 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 | */ |
| @@ -535,6 +535,8 @@ void luaK_goiftrue (FuncState *fs, expdesc *e) { | |||
| 535 | } | 535 | } |
| 536 | } | 536 | } |
| 537 | luaK_concat(fs, &e->f, pc); /* insert last jump in `f' list */ | 537 | luaK_concat(fs, &e->f, pc); /* insert last jump in `f' list */ |
| 538 | luaK_patchtohere(fs, e->t); | ||
| 539 | e->t = NO_JUMP; | ||
| 538 | } | 540 | } |
| 539 | 541 | ||
| 540 | 542 | ||
| @@ -560,6 +562,8 @@ void luaK_goiffalse (FuncState *fs, expdesc *e) { | |||
| 560 | } | 562 | } |
| 561 | } | 563 | } |
| 562 | luaK_concat(fs, &e->t, pc); /* insert last jump in `t' list */ | 564 | luaK_concat(fs, &e->t, pc); /* insert last jump in `t' list */ |
| 565 | luaK_patchtohere(fs, e->f); | ||
| 566 | e->f = NO_JUMP; | ||
| 563 | } | 567 | } |
| 564 | 568 | ||
| 565 | 569 | ||
| @@ -636,14 +640,10 @@ void luaK_infix (FuncState *fs, BinOpr op, expdesc *v) { | |||
| 636 | switch (op) { | 640 | switch (op) { |
| 637 | case OPR_AND: { | 641 | case OPR_AND: { |
| 638 | luaK_goiftrue(fs, v); | 642 | luaK_goiftrue(fs, v); |
| 639 | luaK_patchtohere(fs, v->t); | ||
| 640 | v->t = NO_JUMP; | ||
| 641 | break; | 643 | break; |
| 642 | } | 644 | } |
| 643 | case OPR_OR: { | 645 | case OPR_OR: { |
| 644 | luaK_goiffalse(fs, v); | 646 | luaK_goiffalse(fs, v); |
| 645 | luaK_patchtohere(fs, v->f); | ||
| 646 | v->f = NO_JUMP; | ||
| 647 | break; | 647 | break; |
| 648 | } | 648 | } |
| 649 | case OPR_CONCAT: { | 649 | case OPR_CONCAT: { |
