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 521 matching lines...) Loading... |
532 // Returns a string identifying the current timezone for the | 532 // Returns a string identifying the current timezone for the |
533 // timestamp taking into account daylight saving. | 533 // timestamp taking into account daylight saving. |
534 char* Time::LocalTimezone() { | 534 char* Time::LocalTimezone() { |
535 // Return the standard or DST time zone name based on whether daylight | 535 // Return the standard or DST time zone name based on whether daylight |
536 // saving is in effect at the given time. | 536 // saving is in effect at the given time. |
537 return InDST() ? dst_tz_name_ : std_tz_name_; | 537 return InDST() ? dst_tz_name_ : std_tz_name_; |
538 } | 538 } |
539 | 539 |
540 | 540 |
541 void OS::SetUp() { | 541 void OS::SetUp() { |
| 542 #ifdef __MINGW32__ |
| 543 // Set x87 FPU precision to 64-bit to be consistent with MSVC. |
| 544 _controlfp(_PC_53, _MCW_PC); |
| 545 #endif |
542 // Seed the random number generator. | 546 // Seed the random number generator. |
543 // Convert the current time to a 64-bit integer first, before converting it | 547 // Convert the current time to a 64-bit integer first, before converting it |
544 // to an unsigned. Going directly can cause an overflow and the seed to be | 548 // to an unsigned. Going directly can cause an overflow and the seed to be |
545 // set to all ones. The seed will be identical for different instances that | 549 // set to all ones. The seed will be identical for different instances that |
546 // call this setup code within the same millisecond. | 550 // call this setup code within the same millisecond. |
547 uint64_t seed = static_cast<uint64_t>(TimeCurrentMillis()); | 551 uint64_t seed = static_cast<uint64_t>(TimeCurrentMillis()); |
548 srand(static_cast<unsigned int>(seed)); | 552 srand(static_cast<unsigned int>(seed)); |
549 limit_mutex = CreateMutex(); | 553 limit_mutex = CreateMutex(); |
550 } | 554 } |
551 | 555 |
(...skipping 1521 matching lines...) Loading... |
2073 | 2077 |
2074 | 2078 |
2075 void Sampler::Stop() { | 2079 void Sampler::Stop() { |
2076 ASSERT(IsActive()); | 2080 ASSERT(IsActive()); |
2077 SamplerThread::RemoveActiveSampler(this); | 2081 SamplerThread::RemoveActiveSampler(this); |
2078 SetActive(false); | 2082 SetActive(false); |
2079 } | 2083 } |
2080 | 2084 |
2081 | 2085 |
2082 } } // namespace v8::internal | 2086 } } // namespace v8::internal |
OLD | NEW |