aboutsummaryrefslogtreecommitdiff
path: root/src/lj_snap.c
diff options
context:
space:
mode:
authorMike Pall <mike>2010-04-25 03:32:29 +0200
committerMike Pall <mike>2010-04-25 03:32:29 +0200
commit721b73fecbbeda5b5cb76628511c5b3fac41eb4d (patch)
treece72efaa313ab16eda652e4d277413c31a8d2af3 /src/lj_snap.c
parent3a32bbc7cb5c2287e8d4e24e362281c165f50976 (diff)
downloadluajit-721b73fecbbeda5b5cb76628511c5b3fac41eb4d.tar.gz
luajit-721b73fecbbeda5b5cb76628511c5b3fac41eb4d.tar.bz2
luajit-721b73fecbbeda5b5cb76628511c5b3fac41eb4d.zip
Turn traces into true GC objects (GCtrace).
Diffstat (limited to 'src/lj_snap.c')
-rw-r--r--src/lj_snap.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lj_snap.c b/src/lj_snap.c
index 33ac50f5..96badaaa 100644
--- a/src/lj_snap.c
+++ b/src/lj_snap.c
@@ -168,7 +168,7 @@ void lj_snap_shrink(jit_State *J)
168** There are very few renames (often none), so the filter has 168** There are very few renames (often none), so the filter has
169** very few bits set. This makes it suitable for negative filtering. 169** very few bits set. This makes it suitable for negative filtering.
170*/ 170*/
171static BloomFilter snap_renamefilter(Trace *T, SnapNo lim) 171static BloomFilter snap_renamefilter(GCtrace *T, SnapNo lim)
172{ 172{
173 BloomFilter rfilt = 0; 173 BloomFilter rfilt = 0;
174 IRIns *ir; 174 IRIns *ir;
@@ -179,7 +179,7 @@ static BloomFilter snap_renamefilter(Trace *T, SnapNo lim)
179} 179}
180 180
181/* Process matching renames to find the original RegSP. */ 181/* Process matching renames to find the original RegSP. */
182static RegSP snap_renameref(Trace *T, SnapNo lim, IRRef ref, RegSP rs) 182static RegSP snap_renameref(GCtrace *T, SnapNo lim, IRRef ref, RegSP rs)
183{ 183{
184 IRIns *ir; 184 IRIns *ir;
185 for (ir = &T->ir[T->nins-1]; ir->o == IR_RENAME; ir--) 185 for (ir = &T->ir[T->nins-1]; ir->o == IR_RENAME; ir--)
@@ -191,7 +191,7 @@ static RegSP snap_renameref(Trace *T, SnapNo lim, IRRef ref, RegSP rs)
191/* Convert a snapshot into a linear slot -> RegSP map. 191/* Convert a snapshot into a linear slot -> RegSP map.
192** Note: unused slots are not initialized! 192** Note: unused slots are not initialized!
193*/ 193*/
194void lj_snap_regspmap(uint16_t *rsmap, Trace *T, SnapNo snapno) 194void lj_snap_regspmap(uint16_t *rsmap, GCtrace *T, SnapNo snapno)
195{ 195{
196 SnapShot *snap = &T->snap[snapno]; 196 SnapShot *snap = &T->snap[snapno];
197 MSize n, nent = snap->nent; 197 MSize n, nent = snap->nent;
@@ -215,7 +215,7 @@ const BCIns *lj_snap_restore(jit_State *J, void *exptr)
215{ 215{
216 ExitState *ex = (ExitState *)exptr; 216 ExitState *ex = (ExitState *)exptr;
217 SnapNo snapno = J->exitno; /* For now, snapno == exitno. */ 217 SnapNo snapno = J->exitno; /* For now, snapno == exitno. */
218 Trace *T = J->trace[J->parent]; 218 GCtrace *T = traceref(J, J->parent);
219 SnapShot *snap = &T->snap[snapno]; 219 SnapShot *snap = &T->snap[snapno];
220 MSize n, nent = snap->nent; 220 MSize n, nent = snap->nent;
221 SnapEntry *map = &T->snapmap[snap->mapofs]; 221 SnapEntry *map = &T->snapmap[snap->mapofs];