summaryrefslogtreecommitdiffstats
path: root/js/src
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-10-04 22:04:26 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-10-04 22:04:26 +0200
commitca7ecd37c94e268972697a37eec4e46771c6e6f2 (patch)
tree36117519d03700e11895b78192a2e4da1ed02439 /js/src
parente42166a5bacbd034538b0df9616eefad5c90e26e (diff)
downloadUXP-ca7ecd37c94e268972697a37eec4e46771c6e6f2.tar
UXP-ca7ecd37c94e268972697a37eec4e46771c6e6f2.tar.gz
UXP-ca7ecd37c94e268972697a37eec4e46771c6e6f2.tar.lz
UXP-ca7ecd37c94e268972697a37eec4e46771c6e6f2.tar.xz
UXP-ca7ecd37c94e268972697a37eec4e46771c6e6f2.zip
Bug 1493900.
DiD fix.
Diffstat (limited to 'js/src')
-rw-r--r--js/src/jit/BacktrackingAllocator.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/js/src/jit/BacktrackingAllocator.cpp b/js/src/jit/BacktrackingAllocator.cpp
index 73aceeccb..741ed1592 100644
--- a/js/src/jit/BacktrackingAllocator.cpp
+++ b/js/src/jit/BacktrackingAllocator.cpp
@@ -1843,10 +1843,19 @@ BacktrackingAllocator::resolveControlFlow()
LiveRange* from = vreg(input).rangeFor(exitOf(predecessor), /* preferRegister = */ true);
MOZ_ASSERT(from);
- if (!alloc().ensureBallast())
- return false;
- if (!moveAtExit(predecessor, from, to, def->type()))
+ if (!alloc().ensureBallast()) {
return false;
+ }
+ if (mSuccessor->numPredecessors() > 1) {
+ MOZ_ASSERT(predecessor->mir()->numSuccessors() == 1);
+ if (!moveAtExit(predecessor, from, to, def->type())) {
+ return false;
+ }
+ } else {
+ if (!moveAtEntry(successor, from, to, def->type())) {
+ return false;
+ }
+ }
}
}
}