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...) Expand 10 before | Expand all | Expand 10 after 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 | |
546 // Seed the random number generator. | 542 // Seed the random number generator. |
547 // Convert the current time to a 64-bit integer first, before converting it | 543 // Convert the current time to a 64-bit integer first, before converting it |
548 // to an unsigned. Going directly can cause an overflow and the seed to be | 544 // to an unsigned. Going directly can cause an overflow and the seed to be |
549 // set to all ones. The seed will be identical for different instances that | 545 // set to all ones. The seed will be identical for different instances that |
550 // call this setup code within the same millisecond. | 546 // call this setup code within the same millisecond. |
551 uint64_t seed = static_cast<uint64_t>(TimeCurrentMillis()); | 547 uint64_t seed = static_cast<uint64_t>(TimeCurrentMillis()); |
552 srand(static_cast<unsigned int>(seed)); | 548 srand(static_cast<unsigned int>(seed)); |
553 limit_mutex = CreateMutex(); | 549 limit_mutex = CreateMutex(); |
554 } | 550 } |
555 | 551 |
(...skipping 1521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2077 | 2073 |
2078 | 2074 |
2079 void Sampler::Stop() { | 2075 void Sampler::Stop() { |
2080 ASSERT(IsActive()); | 2076 ASSERT(IsActive()); |
2081 SamplerThread::RemoveActiveSampler(this); | 2077 SamplerThread::RemoveActiveSampler(this); |
2082 SetActive(false); | 2078 SetActive(false); |
2083 } | 2079 } |
2084 | 2080 |
2085 | 2081 |
2086 } } // namespace v8::internal | 2082 } } // namespace v8::internal |
OLD | NEW |