diff options
Diffstat (limited to 'src/lj_snap.c')
-rw-r--r-- | src/lj_snap.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/lj_snap.c b/src/lj_snap.c index a21894f6..36f81528 100644 --- a/src/lj_snap.c +++ b/src/lj_snap.c | |||
@@ -85,8 +85,13 @@ static MSize snapshot_slots(jit_State *J, SnapEntry *map, BCReg nslots) | |||
85 | IRIns *ir = &J->cur.ir[ref]; | 85 | IRIns *ir = &J->cur.ir[ref]; |
86 | if ((LJ_FR2 || !(sn & (SNAP_CONT|SNAP_FRAME))) && | 86 | if ((LJ_FR2 || !(sn & (SNAP_CONT|SNAP_FRAME))) && |
87 | ir->o == IR_SLOAD && ir->op1 == s && ref > retf) { | 87 | ir->o == IR_SLOAD && ir->op1 == s && ref > retf) { |
88 | /* No need to snapshot unmodified non-inherited slots. */ | 88 | /* |
89 | if (!(ir->op2 & IRSLOAD_INHERIT)) | 89 | ** No need to snapshot unmodified non-inherited slots. |
90 | ** But always snapshot the function below a frame in LJ_FR2 mode. | ||
91 | */ | ||
92 | if (!(ir->op2 & IRSLOAD_INHERIT) && | ||
93 | (!LJ_FR2 || s == 0 || s+1 == nslots || | ||
94 | !(J->slot[s+1] & (TREF_CONT|TREF_FRAME)))) | ||
90 | continue; | 95 | continue; |
91 | /* No need to restore readonly slots and unmodified non-parent slots. */ | 96 | /* No need to restore readonly slots and unmodified non-parent slots. */ |
92 | if (!(LJ_DUALNUM && (ir->op2 & IRSLOAD_CONVERT)) && | 97 | if (!(LJ_DUALNUM && (ir->op2 & IRSLOAD_CONVERT)) && |