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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 #include "vm-state-inl.h" | 59 #include "vm-state-inl.h" |
60 | 60 |
61 | 61 |
62 namespace v8 { | 62 namespace v8 { |
63 namespace internal { | 63 namespace internal { |
64 | 64 |
65 | 65 |
66 static Mutex* limit_mutex = NULL; | 66 static Mutex* limit_mutex = NULL; |
67 | 67 |
68 | 68 |
69 int OS::ActivationFrameAlignment() { | |
70 // 16 byte alignment on FreeBSD | |
71 return 16; | |
72 } | |
73 | |
74 | |
75 const char* OS::LocalTimezone(double time) { | 69 const char* OS::LocalTimezone(double time) { |
76 if (std::isnan(time)) return ""; | 70 if (std::isnan(time)) return ""; |
77 time_t tv = static_cast<time_t>(floor(time/msPerSecond)); | 71 time_t tv = static_cast<time_t>(floor(time/msPerSecond)); |
78 struct tm* t = localtime(&tv); | 72 struct tm* t = localtime(&tv); |
79 if (NULL == t) return ""; | 73 if (NULL == t) return ""; |
80 return t->tm_zone; | 74 return t->tm_zone; |
81 } | 75 } |
82 | 76 |
83 | 77 |
84 double OS::LocalTimeOffset() { | 78 double OS::LocalTimeOffset() { |
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
445 limit_mutex = CreateMutex(); | 439 limit_mutex = CreateMutex(); |
446 } | 440 } |
447 | 441 |
448 | 442 |
449 void OS::TearDown() { | 443 void OS::TearDown() { |
450 delete limit_mutex; | 444 delete limit_mutex; |
451 } | 445 } |
452 | 446 |
453 | 447 |
454 } } // namespace v8::internal | 448 } } // namespace v8::internal |
OLD | NEW |