Chromium Code Reviews| 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 66 // Convert the current time to a 64-bit integer first, before converting it | 66 // Convert the current time to a 64-bit integer first, before converting it |
| 67 // to an unsigned. Going directly can cause an overflow and the seed to be | 67 // to an unsigned. Going directly can cause an overflow and the seed to be |
| 68 // set to all ones. The seed will be identical for different instances that | 68 // set to all ones. The seed will be identical for different instances that |
| 69 // call this setup code within the same millisecond. | 69 // call this setup code within the same millisecond. |
| 70 uint64_t seed = static_cast<uint64_t>(TimeCurrentMillis()); | 70 uint64_t seed = static_cast<uint64_t>(TimeCurrentMillis()); |
| 71 srandom(static_cast<unsigned int>(seed)); | 71 srandom(static_cast<unsigned int>(seed)); |
| 72 limit_mutex = CreateMutex(); | 72 limit_mutex = CreateMutex(); |
| 73 } | 73 } |
| 74 | 74 |
| 75 | 75 |
| 76 void MathSetup(); // Defined in platform-posix.cc. | |
|
danno
2012/03/29 12:32:42
I really don't like having this external declarati
Philippe
2012/03/29 13:06:53
Done. Indeed. platform-posix.h might also serve la
| |
| 77 | |
| 78 void OS::PostSetUp() { | |
| 79 // Math functions depend on CPU features therefore they are initialized after | |
| 80 // CPU. | |
| 81 MathSetup(); | |
| 82 } | |
| 83 | |
| 76 uint64_t OS::CpuFeaturesImpliedByPlatform() { | 84 uint64_t OS::CpuFeaturesImpliedByPlatform() { |
| 77 return 0; // Nothing special about Cygwin. | 85 return 0; // Nothing special about Cygwin. |
| 78 } | 86 } |
| 79 | 87 |
| 80 | 88 |
| 81 int OS::ActivationFrameAlignment() { | 89 int OS::ActivationFrameAlignment() { |
| 82 // With gcc 4.4 the tree vectorization optimizer can generate code | 90 // With gcc 4.4 the tree vectorization optimizer can generate code |
| 83 // that requires 16 byte alignment such as movdqa on x86. | 91 // that requires 16 byte alignment such as movdqa on x86. |
| 84 return 16; | 92 return 16; |
| 85 } | 93 } |
| (...skipping 675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 761 | 769 |
| 762 | 770 |
| 763 void Sampler::Stop() { | 771 void Sampler::Stop() { |
| 764 ASSERT(IsActive()); | 772 ASSERT(IsActive()); |
| 765 SamplerThread::RemoveActiveSampler(this); | 773 SamplerThread::RemoveActiveSampler(this); |
| 766 SetActive(false); | 774 SetActive(false); |
| 767 } | 775 } |
| 768 | 776 |
| 769 | 777 |
| 770 } } // namespace v8::internal | 778 } } // namespace v8::internal |
| OLD | NEW |