Update ip in recycled branch fragments (487531, r=graydon).

This commit is contained in:
Andreas Gal 2009-04-13 13:24:17 -07:00
parent 8a77235201
commit c2ca04a58a

View File

@ -3618,6 +3618,13 @@ js_AttemptToExtendTree(JSContext* cx, VMSideExit* anchor, VMSideExit* exitedFrom
c->root = f;
}
/*
* If we are recycling a fragment, it might have a different ip so reset it here. This
* can happen when attaching a branch to a NESTED_EXIT, which might extend along separate paths
* (i.e. after the loop edge, and after a return statement).
*/
c->ip = cx->fp->regs->pc;
debug_only_v(printf("trying to attach another branch to the tree (hits = %d)\n", c->hits());)
int32_t& hits = c->hits();