[INFER] Don't mark temporaries as copies of other entries when storing their copies to a variable, bug 659438.

This commit is contained in:
Brian Hackett 2011-05-25 08:34:34 -07:00
parent 049a9089a0
commit 522292569c
2 changed files with 9 additions and 1 deletions

View File

@ -0,0 +1,8 @@
var o1 = {x: {}};
function f() {
var o = o1;
for(var i=0; i<10; i++) {
o1 = o.x;
}
}
f();

View File

@ -2235,7 +2235,7 @@ FrameState::storeTop(FrameEntry *target)
backing = top->copyOf();
JS_ASSERT(backing->trackerIndex() < top->trackerIndex());
if (backing < target) {
if (backing < target || isTemporary(backing)) {
/* local.idx < backing.idx means local cannot be a copy yet */
if (target->trackerIndex() < backing->trackerIndex())
swapInTracker(backing, target);