| 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 } | 110 } |
| 111 | 111 |
| 112 | 112 |
| 113 int OS::ActivationFrameAlignment() { | 113 int OS::ActivationFrameAlignment() { |
| 114 // With gcc 4.4 the tree vectorization optimizer can generate code | 114 // With gcc 4.4 the tree vectorization optimizer can generate code |
| 115 // that requires 16 byte alignment such as movdqa on x86. | 115 // that requires 16 byte alignment such as movdqa on x86. |
| 116 return 16; | 116 return 16; |
| 117 } | 117 } |
| 118 | 118 |
| 119 | 119 |
| 120 void OS::ReleaseStore(volatile AtomicWord* ptr, AtomicWord value) { | |
| 121 __asm__ __volatile__("" : : : "memory"); | |
| 122 // An x86 store acts as a release barrier. | |
| 123 *ptr = value; | |
| 124 } | |
| 125 | |
| 126 | |
| 127 const char* OS::LocalTimezone(double time) { | 120 const char* OS::LocalTimezone(double time) { |
| 128 if (std::isnan(time)) return ""; | 121 if (std::isnan(time)) return ""; |
| 129 time_t tv = static_cast<time_t>(floor(time/msPerSecond)); | 122 time_t tv = static_cast<time_t>(floor(time/msPerSecond)); |
| 130 struct tm* t = localtime(&tv); | 123 struct tm* t = localtime(&tv); |
| 131 if (NULL == t) return ""; | 124 if (NULL == t) return ""; |
| 132 return t->tm_zone; | 125 return t->tm_zone; |
| 133 } | 126 } |
| 134 | 127 |
| 135 | 128 |
| 136 double OS::LocalTimeOffset() { | 129 double OS::LocalTimeOffset() { |
| (...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 739 limit_mutex = CreateMutex(); | 732 limit_mutex = CreateMutex(); |
| 740 } | 733 } |
| 741 | 734 |
| 742 | 735 |
| 743 void OS::TearDown() { | 736 void OS::TearDown() { |
| 744 delete limit_mutex; | 737 delete limit_mutex; |
| 745 } | 738 } |
| 746 | 739 |
| 747 | 740 |
| 748 } } // namespace v8::internal | 741 } } // namespace v8::internal |
| OLD | NEW |