diff options
| author | Mike Pall <mike> | 2011-03-19 17:30:15 +0100 |
|---|---|---|
| committer | Mike Pall <mike> | 2011-03-19 17:30:15 +0100 |
| commit | a1c887e3b960f99e293817ac0cbfda57a4ae42c5 (patch) | |
| tree | e448538c7715fb65fa862e9c0a40d3202b3fa9cd /src | |
| parent | 642ae06916ecb36fb3f8ea5902de38a612cba356 (diff) | |
| download | luajit-a1c887e3b960f99e293817ac0cbfda57a4ae42c5.tar.gz luajit-a1c887e3b960f99e293817ac0cbfda57a4ae42c5.tar.bz2 luajit-a1c887e3b960f99e293817ac0cbfda57a4ae42c5.zip | |
Fix data-flow analysis for BC_ITERC.
Diffstat (limited to 'src')
| -rw-r--r-- | src/lj_snap.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lj_snap.c b/src/lj_snap.c index 70628a0e..c044923a 100644 --- a/src/lj_snap.c +++ b/src/lj_snap.c | |||
| @@ -217,7 +217,8 @@ static BCReg snap_usedef(jit_State *J, uint8_t *udf, | |||
| 217 | if (op >= BC_CALLM && op <= BC_VARG) { | 217 | if (op >= BC_CALLM && op <= BC_VARG) { |
| 218 | BCReg top = (op == BC_CALLM || op == BC_CALLMT || bc_c(ins) == 0) ? | 218 | BCReg top = (op == BC_CALLM || op == BC_CALLMT || bc_c(ins) == 0) ? |
| 219 | maxslot : (bc_a(ins) + bc_c(ins)); | 219 | maxslot : (bc_a(ins) + bc_c(ins)); |
| 220 | for (s = bc_a(ins); s < top; s++) USE_SLOT(s); | 220 | s = bc_a(ins) - ((op == BC_ITERC || op == BC_ITERN) ? 3 : 0); |
| 221 | for (; s < top; s++) USE_SLOT(s); | ||
| 221 | for (; s < maxslot; s++) DEF_SLOT(s); | 222 | for (; s < maxslot; s++) DEF_SLOT(s); |
| 222 | if (op == BC_CALLT || op == BC_CALLMT) { | 223 | if (op == BC_CALLT || op == BC_CALLMT) { |
| 223 | for (s = 0; s < bc_a(ins); s++) DEF_SLOT(s); | 224 | for (s = 0; s < bc_a(ins); s++) DEF_SLOT(s); |
