зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1001222 - Implicitly use operands to JSOP_POS. (r=jandem)
This commit is contained in:
Родитель
d6253b9c6e
Коммит
a785d72b17
|
@ -0,0 +1,5 @@
|
|||
function f(x, y) {
|
||||
return +(x ? x : y), y >>> 0
|
||||
}
|
||||
f(0, -0)
|
||||
f(0, 2147483649)
|
|
@ -3884,7 +3884,10 @@ bool
|
|||
IonBuilder::jsop_pos()
|
||||
{
|
||||
if (IsNumberType(current->peek(-1)->type())) {
|
||||
// Already int32 or double.
|
||||
// Already int32 or double. Set the operand as implicitly used so it
|
||||
// doesn't get optimized out if it has no other uses, as we could bail
|
||||
// out.
|
||||
current->peek(-1)->setImplicitlyUsedUnchecked();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче