OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Flags: --allow-natives-syntax | 5 // Flags: --allow-natives-syntax |
| 6 // Flags: --noalways-opt |
6 | 7 |
7 function assertDoubleBits(hi, lo, x) { | 8 function assertDoubleBits(hi, lo, x) { |
8 hi = hi | 0; | 9 hi = hi | 0; |
9 lo = lo | 0; | 10 lo = lo | 0; |
10 assertEquals(x, %_ConstructDouble(hi, lo)); | 11 assertEquals(x, %_ConstructDouble(hi, lo)); |
11 assertEquals(hi, %_DoubleHi(x)); | 12 assertEquals(hi, %_DoubleHi(x)); |
12 assertEquals(lo, %_DoubleLo(x)); | 13 assertEquals(lo, %_DoubleLo(x)); |
13 assertEquals(x, %_ConstructDouble(%_DoubleHi(x), %_DoubleLo(x))); | 14 assertEquals(x, %_ConstructDouble(%_DoubleHi(x), %_DoubleLo(x))); |
14 } | 15 } |
15 | 16 |
(...skipping 11 matching lines...) Expand all Loading... |
27 for (var i = 0; i < tests.length; i += 3) { | 28 for (var i = 0; i < tests.length; i += 3) { |
28 assertDoubleBits(tests[i], tests[i + 1], tests[i + 2]); | 29 assertDoubleBits(tests[i], tests[i + 1], tests[i + 2]); |
29 } | 30 } |
30 | 31 |
31 %OptimizeFunctionOnNextCall(assertDoubleBits); | 32 %OptimizeFunctionOnNextCall(assertDoubleBits); |
32 | 33 |
33 for (var i = 0; i < tests.length; i += 3) { | 34 for (var i = 0; i < tests.length; i += 3) { |
34 assertDoubleBits(tests[i], tests[i + 1], tests[i + 2]); | 35 assertDoubleBits(tests[i], tests[i + 1], tests[i + 2]); |
35 assertOptimized(assertDoubleBits); | 36 assertOptimized(assertDoubleBits); |
36 } | 37 } |
OLD | NEW |