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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 #include "vm-state-inl.h" | 48 #include "vm-state-inl.h" |
49 #include "win32-headers.h" | 49 #include "win32-headers.h" |
50 | 50 |
51 namespace v8 { | 51 namespace v8 { |
52 namespace internal { | 52 namespace internal { |
53 | 53 |
54 | 54 |
55 static Mutex* limit_mutex = NULL; | 55 static Mutex* limit_mutex = NULL; |
56 | 56 |
57 | 57 |
58 int OS::ActivationFrameAlignment() { | |
59 // With gcc 4.4 the tree vectorization optimizer can generate code | |
60 // that requires 16 byte alignment such as movdqa on x86. | |
61 return 16; | |
62 } | |
63 | |
64 | |
65 const char* OS::LocalTimezone(double time) { | 58 const char* OS::LocalTimezone(double time) { |
66 if (std::isnan(time)) return ""; | 59 if (std::isnan(time)) return ""; |
67 time_t tv = static_cast<time_t>(floor(time/msPerSecond)); | 60 time_t tv = static_cast<time_t>(floor(time/msPerSecond)); |
68 struct tm* t = localtime(&tv); | 61 struct tm* t = localtime(&tv); |
69 if (NULL == t) return ""; | 62 if (NULL == t) return ""; |
70 return tzname[0]; // The location of the timezone string on Cygwin. | 63 return tzname[0]; // The location of the timezone string on Cygwin. |
71 } | 64 } |
72 | 65 |
73 | 66 |
74 double OS::LocalTimeOffset() { | 67 double OS::LocalTimeOffset() { |
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
481 limit_mutex = CreateMutex(); | 474 limit_mutex = CreateMutex(); |
482 } | 475 } |
483 | 476 |
484 | 477 |
485 void OS::TearDown() { | 478 void OS::TearDown() { |
486 delete limit_mutex; | 479 delete limit_mutex; |
487 } | 480 } |
488 | 481 |
489 | 482 |
490 } } // namespace v8::internal | 483 } } // namespace v8::internal |
OLD | NEW |