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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 } // namespace std | 77 } // namespace std |
78 #endif // signbit | 78 #endif // signbit |
79 | 79 |
80 namespace v8 { | 80 namespace v8 { |
81 namespace internal { | 81 namespace internal { |
82 | 82 |
83 | 83 |
84 static Mutex* limit_mutex = NULL; | 84 static Mutex* limit_mutex = NULL; |
85 | 85 |
86 | 86 |
87 int OS::ActivationFrameAlignment() { | |
88 // GCC generates code that requires 16 byte alignment such as movdqa. | |
89 return Max(STACK_ALIGN, 16); | |
90 } | |
91 | |
92 | |
93 const char* OS::LocalTimezone(double time) { | 87 const char* OS::LocalTimezone(double time) { |
94 if (std::isnan(time)) return ""; | 88 if (std::isnan(time)) return ""; |
95 time_t tv = static_cast<time_t>(floor(time/msPerSecond)); | 89 time_t tv = static_cast<time_t>(floor(time/msPerSecond)); |
96 struct tm* t = localtime(&tv); | 90 struct tm* t = localtime(&tv); |
97 if (NULL == t) return ""; | 91 if (NULL == t) return ""; |
98 return tzname[0]; // The location of the timezone string on Solaris. | 92 return tzname[0]; // The location of the timezone string on Solaris. |
99 } | 93 } |
100 | 94 |
101 | 95 |
102 double OS::LocalTimeOffset() { | 96 double OS::LocalTimeOffset() { |
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
488 limit_mutex = CreateMutex(); | 482 limit_mutex = CreateMutex(); |
489 } | 483 } |
490 | 484 |
491 | 485 |
492 void OS::TearDown() { | 486 void OS::TearDown() { |
493 delete limit_mutex; | 487 delete limit_mutex; |
494 } | 488 } |
495 | 489 |
496 | 490 |
497 } } // namespace v8::internal | 491 } } // namespace v8::internal |
OLD | NEW |