mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-01 06:35:42 +00:00
[INFER] Allow uncopies of loop temporaries after backedges, bug 684621.
This commit is contained in:
parent
80de01cc3c
commit
0b4b0ae639
15
js/src/jit-test/tests/jaeger/loops/bug684621.js
Normal file
15
js/src/jit-test/tests/jaeger/loops/bug684621.js
Normal file
@ -0,0 +1,15 @@
|
||||
function runRichards() {
|
||||
queue = new Packet;
|
||||
Packet(queue, ID_DEVICE_A, KIND_DEVICE);
|
||||
new Packet;
|
||||
}
|
||||
var ID_DEVICE_A = 4;
|
||||
var KIND_DEVICE = 0;
|
||||
Packet = function (queue) {
|
||||
this.link = null
|
||||
if (queue == null) return;
|
||||
var peek, next = queue;
|
||||
while ((peek = next.link) != null)
|
||||
ID_HANDLER_B
|
||||
};
|
||||
runRichards()
|
@ -1949,9 +1949,6 @@ FrameState::pushCopyOf(FrameEntry *backing)
|
||||
FrameEntry *
|
||||
FrameState::walkTrackerForUncopy(FrameEntry *original)
|
||||
{
|
||||
/* Temporary entries are immutable and should never be uncopied. */
|
||||
JS_ASSERT(!isTemporary(original));
|
||||
|
||||
uint32 firstCopy = InvalidIndex;
|
||||
FrameEntry *bestFe = NULL;
|
||||
uint32 ncopies = 0;
|
||||
@ -1978,7 +1975,7 @@ FrameState::walkTrackerForUncopy(FrameEntry *original)
|
||||
|
||||
JS_ASSERT(firstCopy != InvalidIndex);
|
||||
JS_ASSERT(bestFe);
|
||||
JS_ASSERT(bestFe > original);
|
||||
JS_ASSERT_IF(!isTemporary(original), bestFe > original);
|
||||
|
||||
/* Mark all extra copies as copies of the new backing index. */
|
||||
bestFe->setCopyOf(NULL);
|
||||
@ -2873,6 +2870,8 @@ FrameState::clearTemporaries()
|
||||
for (FrameEntry *fe = temporaries; fe < temporariesTop; fe++) {
|
||||
if (!fe->isTracked())
|
||||
continue;
|
||||
if (fe->isCopied())
|
||||
uncopy(fe);
|
||||
forgetAllRegs(fe);
|
||||
fe->resetSynced();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user