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 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 } | 301 } |
302 } | 302 } |
303 fclose(f); | 303 fclose(f); |
304 | 304 |
305 // Did not find string in the proc file. | 305 // Did not find string in the proc file. |
306 return false; | 306 return false; |
307 } | 307 } |
308 #endif // def __mips__ | 308 #endif // def __mips__ |
309 | 309 |
310 | 310 |
311 int OS::ActivationFrameAlignment() { | |
312 #if V8_TARGET_ARCH_ARM | |
313 // On EABI ARM targets this is required for fp correctness in the | |
314 // runtime system. | |
315 return 8; | |
316 #elif V8_TARGET_ARCH_MIPS | |
317 return 8; | |
318 #endif | |
319 // With gcc 4.4 the tree vectorization optimizer can generate code | |
320 // that requires 16 byte alignment such as movdqa on x86. | |
321 return 16; | |
322 } | |
323 | |
324 | |
325 const char* OS::LocalTimezone(double time) { | 311 const char* OS::LocalTimezone(double time) { |
326 if (std::isnan(time)) return ""; | 312 if (std::isnan(time)) return ""; |
327 time_t tv = static_cast<time_t>(floor(time/msPerSecond)); | 313 time_t tv = static_cast<time_t>(floor(time/msPerSecond)); |
328 struct tm* t = localtime(&tv); | 314 struct tm* t = localtime(&tv); |
329 if (NULL == t) return ""; | 315 if (NULL == t) return ""; |
330 return t->tm_zone; | 316 return t->tm_zone; |
331 } | 317 } |
332 | 318 |
333 | 319 |
334 double OS::LocalTimeOffset() { | 320 double OS::LocalTimeOffset() { |
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
774 limit_mutex = CreateMutex(); | 760 limit_mutex = CreateMutex(); |
775 } | 761 } |
776 | 762 |
777 | 763 |
778 void OS::TearDown() { | 764 void OS::TearDown() { |
779 delete limit_mutex; | 765 delete limit_mutex; |
780 } | 766 } |
781 | 767 |
782 | 768 |
783 } } // namespace v8::internal | 769 } } // namespace v8::internal |
OLD | NEW |