OLD | NEW |
---|---|
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
207 assertEquals(-min_int_in_array[0], | 207 assertEquals(-min_int_in_array[0], |
208 Math.floor((min_int_in_array[0] | 0) / -1)); | 208 Math.floor((min_int_in_array[0] | 0) / -1)); |
209 } | 209 } |
210 | 210 |
211 test_div_deopt_minus_zero(); | 211 test_div_deopt_minus_zero(); |
212 test_div_deopt_overflow(); | 212 test_div_deopt_overflow(); |
213 %OptimizeFunctionOnNextCall(test_div_deopt_minus_zero); | 213 %OptimizeFunctionOnNextCall(test_div_deopt_minus_zero); |
214 %OptimizeFunctionOnNextCall(test_div_deopt_overflow); | 214 %OptimizeFunctionOnNextCall(test_div_deopt_overflow); |
215 test_div_deopt_minus_zero(); | 215 test_div_deopt_minus_zero(); |
216 test_div_deopt_overflow(); | 216 test_div_deopt_overflow(); |
217 | |
Yang
2012/06/20 12:19:42
Please create a new test file called math-floor-of
Zheng Liu
2012/06/20 13:54:15
Done.
| |
218 if (false) { | |
219 function test_div_no_deopt_minus_zero() { | |
220 var zero_in_array = [0]; | |
221 assertTrue(0 === (Math.floor((zero_in_array[0] | 0) / -1) | 0)); | |
222 } | |
223 | |
224 test_div_no_deopt_minus_zero(); | |
225 %OptimizeFunctionOnNextCall(test_div_no_deopt_minus_zero); | |
226 test_div_no_deopt_minus_zero(); | |
227 assertTrue(2 != %GetOptimizationStatus(test_div_no_deopt_minus_zero)); | |
228 } | |
OLD | NEW |