comparison: js/src/jit-test/tests/asm.js/testRangeAnalysis.js
js/src/jit-test/tests/asm.js/testRangeAnalysis.js
- branch
- TOR_BUG_9701
- changeset 15
- b8a032363ba2
equal
deleted
inserted
replaced
|
1 // Bug 894781 |
|
2 function m(stdlib) |
|
3 { |
|
4 "use asm"; |
|
5 var abs = stdlib.Math.abs; |
|
6 function f(d) |
|
7 { |
|
8 d = +d; |
|
9 return (~~(5.0 - +abs(d)))|0; |
|
10 } |
|
11 return f; |
|
12 } |
|
13 var f = m(this); |
|
14 assertEq(f(0.2), 4); |
|
15 assertEq(f(NaN), 0); |