Fixed branch traces being erroneously marked as dependent trees (bug 464979, r=gal).

This commit is contained in:
David Anderson 2008-11-16 21:58:35 -08:00
parent 637ce7666a
commit a653ef6015
2 changed files with 10 additions and 1 deletions

View File

@ -2328,7 +2328,7 @@ TraceRecorder::closeLoop(Fragmento* fragmento, bool& demote, unsigned *demotes)
exit->target = peer;
debug_only_v(printf("Joining type-unstable trace to target fragment %p.\n", peer);)
stable = true;
((TreeInfo*)peer->vmprivate)->dependentTrees.addUnique(fragment);
((TreeInfo*)peer->vmprivate)->dependentTrees.addUnique(fragment->root);
}
compile(fragmento);

View File

@ -1884,6 +1884,15 @@ function testTrueShiftTrue() {
testTrueShiftTrue.expected = "2,2,2,2,2";
test(testTrueShiftTrue);
// Test no assert or crash
function testBug465261() {
for (let z = 0; z < 2; ++z) { for each (let x in [0, true, (void 0), 0, (void
0)]) { if(x){} } };
return true;
}
testBug465261.expected = true;
test(testBug465261);
// BEGIN MANDELBROT STUFF
// XXXbz I would dearly like to wrap it up into a function to avoid polluting
// the global scope, but the function ends up heavyweight, and then we lose on