mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1132290 - IonMonkey: Remove indirect truncation of MLoadTypedArrayElementStatic, r=nbp
This commit is contained in:
parent
a7692466c4
commit
1e632bf60c
10
js/src/jit-test/tests/ion/bug1132290.js
Normal file
10
js/src/jit-test/tests/ion/bug1132290.js
Normal file
@ -0,0 +1,10 @@
|
||||
|
||||
f = function() {
|
||||
v = Uint8Array()
|
||||
function f(x) {
|
||||
return x + v[0] | 0
|
||||
}
|
||||
return f
|
||||
}()
|
||||
assertEq(f(0), 0)
|
||||
assertEq(f(1), 0)
|
@ -2517,7 +2517,10 @@ MToDouble::truncate()
|
||||
bool
|
||||
MLoadTypedArrayElementStatic::needTruncation(TruncateKind kind)
|
||||
{
|
||||
if (kind >= IndirectTruncate)
|
||||
// IndirectTruncate not possible, since it returns 'undefined'
|
||||
// upon out of bounds read. Doing arithmetic on 'undefined' gives wrong
|
||||
// results. So only set infallible if explicitly truncated.
|
||||
if (kind == Truncate)
|
||||
setInfallible();
|
||||
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user