| OLD | NEW |
| 1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 var smi = 43; | 120 var smi = 43; |
| 121 var power_of_two = 64; | 121 var power_of_two = 64; |
| 122 var min_normal = Number.MIN_VALUE * Math.pow(2, 52); | 122 var min_normal = Number.MIN_VALUE * Math.pow(2, 52); |
| 123 var max_denormal = Number.MIN_VALUE * (Math.pow(2, 52) - 1); | 123 var max_denormal = Number.MIN_VALUE * (Math.pow(2, 52) - 1); |
| 124 | 124 |
| 125 // All combinations of NaN, Infinity, normal, denormal and zero. | 125 // All combinations of NaN, Infinity, normal, denormal and zero. |
| 126 var example_numbers = [ | 126 var example_numbers = [ |
| 127 NaN, | 127 NaN, |
| 128 0, | 128 0, |
| 129 | 129 |
| 130 // TODO(all): due to a bug in fmod(), modulos involving denormals | 130 // Due to a bug in fmod(), modulos involving denormals |
| 131 // return the wrong result for glibc <= 2.16. Restore these cases when | 131 // return the wrong result for glibc <= 2.16. |
| 132 // development machines have been upgraded. | |
| 133 // Details: http://sourceware.org/bugzilla/show_bug.cgi?id=14048 | 132 // Details: http://sourceware.org/bugzilla/show_bug.cgi?id=14048 |
| 134 | 133 |
| 135 // Number.MIN_VALUE, | 134 Number.MIN_VALUE, |
| 136 // 3 * Number.MIN_VALUE, | 135 3 * Number.MIN_VALUE, |
| 137 // max_denormal, | 136 max_denormal, |
| 138 | 137 |
| 139 min_normal, | 138 min_normal, |
| 140 repeating_decimal, | 139 repeating_decimal, |
| 141 finite_decimal, | 140 finite_decimal, |
| 142 smi, | 141 smi, |
| 143 power_of_two, | 142 power_of_two, |
| 144 small_non_smi, | 143 small_non_smi, |
| 145 large_non_smi, | 144 large_non_smi, |
| 146 Number.MAX_VALUE, | 145 Number.MAX_VALUE, |
| 147 Infinity | 146 Infinity |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 assertEquals(-results_powers_of_two[i][28], -left_operands[i] % -(2 << 28)); | 301 assertEquals(-results_powers_of_two[i][28], -left_operands[i] % -(2 << 28)); |
| 303 assertEquals(-results_powers_of_two[i][29], -left_operands[i] % (2 << 29)); | 302 assertEquals(-results_powers_of_two[i][29], -left_operands[i] % (2 << 29)); |
| 304 assertEquals(-results_powers_of_two[i][30], -left_operands[i] % -(2 << 30)); | 303 assertEquals(-results_powers_of_two[i][30], -left_operands[i] % -(2 << 30)); |
| 305 } | 304 } |
| 306 | 305 |
| 307 } | 306 } |
| 308 | 307 |
| 309 lithium_integer_mod(); | 308 lithium_integer_mod(); |
| 310 %OptimizeFunctionOnNextCall(lithium_integer_mod) | 309 %OptimizeFunctionOnNextCall(lithium_integer_mod) |
| 311 lithium_integer_mod(); | 310 lithium_integer_mod(); |
| OLD | NEW |