| 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 17779 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 17790 i::OS::MemCopy(&target, &value, sizeof(target)); | 17790 i::OS::MemCopy(&target, &value, sizeof(target)); |
| 17791 return target; | 17791 return target; |
| 17792 } | 17792 } |
| 17793 | 17793 |
| 17794 | 17794 |
| 17795 static double DoubleToDateTime(double input) { | 17795 static double DoubleToDateTime(double input) { |
| 17796 double date_limit = 864e13; | 17796 double date_limit = 864e13; |
| 17797 if (std::isnan(input) || input < -date_limit || input > date_limit) { | 17797 if (std::isnan(input) || input < -date_limit || input > date_limit) { |
| 17798 return i::OS::nan_value(); | 17798 return i::OS::nan_value(); |
| 17799 } | 17799 } |
| 17800 return (input < 0) ? -(floor(-input)) : floor(input); | 17800 return (input < 0) ? -(std::floor(-input)) : std::floor(input); |
| 17801 } | 17801 } |
| 17802 | 17802 |
| 17803 | 17803 |
| 17804 // We don't have a consistent way to write 64-bit constants syntactically, so we | 17804 // We don't have a consistent way to write 64-bit constants syntactically, so we |
| 17805 // split them into two 32-bit constants and combine them programmatically. | 17805 // split them into two 32-bit constants and combine them programmatically. |
| 17806 static double DoubleFromBits(uint32_t high_bits, uint32_t low_bits) { | 17806 static double DoubleFromBits(uint32_t high_bits, uint32_t low_bits) { |
| 17807 return DoubleFromBits((static_cast<uint64_t>(high_bits) << 32) | low_bits); | 17807 return DoubleFromBits((static_cast<uint64_t>(high_bits) << 32) | low_bits); |
| 17808 } | 17808 } |
| 17809 | 17809 |
| 17810 | 17810 |
| (...skipping 3809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 21620 } | 21620 } |
| 21621 for (int i = 0; i < runs; i++) { | 21621 for (int i = 0; i < runs; i++) { |
| 21622 Local<String> expected; | 21622 Local<String> expected; |
| 21623 if (i != 0) { | 21623 if (i != 0) { |
| 21624 CHECK_EQ(v8_str("escape value"), values[i]); | 21624 CHECK_EQ(v8_str("escape value"), values[i]); |
| 21625 } else { | 21625 } else { |
| 21626 CHECK(values[i].IsEmpty()); | 21626 CHECK(values[i].IsEmpty()); |
| 21627 } | 21627 } |
| 21628 } | 21628 } |
| 21629 } | 21629 } |
| OLD | NEW |