mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
[INFER] Fix constant double RHS in >>>, bug 617433.
This commit is contained in:
parent
218d38d4e2
commit
cc2da1d24f
12
js/src/jit-test/tests/jaeger/bug617433.js
Normal file
12
js/src/jit-test/tests/jaeger/bug617433.js
Normal file
@ -0,0 +1,12 @@
|
||||
// don't crash
|
||||
|
||||
function foo(x) {
|
||||
(x >>> 3.14);
|
||||
(x >>> true);
|
||||
(x >>> (0/0));
|
||||
(x >>> 100);
|
||||
(x >>> -10);
|
||||
(x >>> (1/0));
|
||||
(x >>> (void 0));
|
||||
}
|
||||
foo(10);
|
@ -279,6 +279,10 @@ mjit::Compiler::jsop_bitop(JSOp op)
|
||||
return;
|
||||
}
|
||||
|
||||
/* Convert a double RHS to integer if it's constant for the test below. */
|
||||
if (rhs->isConstant() && rhs->getValue().isDouble())
|
||||
rhs->convertConstantDoubleToInt32(cx);
|
||||
|
||||
/* We only want to handle integers here. */
|
||||
if ((lhs->isNotType(JSVAL_TYPE_INT32) && lhs->isNotType(JSVAL_TYPE_DOUBLE)) ||
|
||||
(rhs->isNotType(JSVAL_TYPE_INT32) && rhs->isNotType(JSVAL_TYPE_DOUBLE)) ||
|
||||
|
Loading…
Reference in New Issue
Block a user