| 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 #include "vm-state-inl.h" | 57 #include "vm-state-inl.h" |
| 58 | 58 |
| 59 | 59 |
| 60 namespace v8 { | 60 namespace v8 { |
| 61 namespace internal { | 61 namespace internal { |
| 62 | 62 |
| 63 | 63 |
| 64 static Mutex* limit_mutex = NULL; | 64 static Mutex* limit_mutex = NULL; |
| 65 | 65 |
| 66 | 66 |
| 67 int OS::ActivationFrameAlignment() { | |
| 68 // With gcc 4.4 the tree vectorization optimizer can generate code | |
| 69 // that requires 16 byte alignment such as movdqa on x86. | |
| 70 return 16; | |
| 71 } | |
| 72 | |
| 73 | |
| 74 const char* OS::LocalTimezone(double time) { | 67 const char* OS::LocalTimezone(double time) { |
| 75 if (std::isnan(time)) return ""; | 68 if (std::isnan(time)) return ""; |
| 76 time_t tv = static_cast<time_t>(floor(time/msPerSecond)); | 69 time_t tv = static_cast<time_t>(floor(time/msPerSecond)); |
| 77 struct tm* t = localtime(&tv); | 70 struct tm* t = localtime(&tv); |
| 78 if (NULL == t) return ""; | 71 if (NULL == t) return ""; |
| 79 return t->tm_zone; | 72 return t->tm_zone; |
| 80 } | 73 } |
| 81 | 74 |
| 82 | 75 |
| 83 double OS::LocalTimeOffset() { | 76 double OS::LocalTimeOffset() { |
| (...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 512 limit_mutex = CreateMutex(); | 505 limit_mutex = CreateMutex(); |
| 513 } | 506 } |
| 514 | 507 |
| 515 | 508 |
| 516 void OS::TearDown() { | 509 void OS::TearDown() { |
| 517 delete limit_mutex; | 510 delete limit_mutex; |
| 518 } | 511 } |
| 519 | 512 |
| 520 | 513 |
| 521 } } // namespace v8::internal | 514 } } // namespace v8::internal |
| OLD | NEW |