Fixed CASE_EXITs being limited to about 4 entries (bug 533521, r=gal).

This commit is contained in:
David Anderson 2009-12-11 12:10:36 -08:00
parent 6164bfbacb
commit d12dfe06f1

View File

@ -5910,7 +5910,10 @@ AttemptToExtendTree(JSContext* cx, VMSideExit* anchor, VMSideExit* exitedFrom, j
"trying to attach another branch to the tree (hits = %d)\n", c->hits());
int32_t& hits = c->hits();
if (outer || (hits++ >= HOTEXIT && hits <= HOTEXIT+MAXEXIT)) {
int32_t maxHits = HOTEXIT + MAXEXIT;
if (anchor->exitType == CASE_EXIT)
maxHits *= anchor->switchInfo->count;
if (outer || (hits++ >= HOTEXIT && hits <= maxHits)) {
/* start tracing secondary trace from this point */
unsigned stackSlots;
unsigned ngslots;