| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 "http://code.google.com/p/v8/issues/detail?id=2140" | 103 "http://code.google.com/p/v8/issues/detail?id=2140" |
| 104 | 104 |
| 105 #endif | 105 #endif |
| 106 #endif | 106 #endif |
| 107 #undef GCC_VERSION | 107 #undef GCC_VERSION |
| 108 } | 108 } |
| 109 | 109 |
| 110 #endif // __arm__ | 110 #endif // __arm__ |
| 111 | 111 |
| 112 | 112 |
| 113 const char* OS::LocalTimezone(double time) { | 113 const char* OS::LocalTimezone(double time, TimezoneCache* cache) { |
| 114 if (std::isnan(time)) return ""; | 114 if (std::isnan(time)) return ""; |
| 115 time_t tv = static_cast<time_t>(std::floor(time/msPerSecond)); | 115 time_t tv = static_cast<time_t>(std::floor(time/msPerSecond)); |
| 116 struct tm* t = localtime(&tv); | 116 struct tm* t = localtime(&tv); |
| 117 if (NULL == t) return ""; | 117 if (NULL == t) return ""; |
| 118 return t->tm_zone; | 118 return t->tm_zone; |
| 119 } | 119 } |
| 120 | 120 |
| 121 | 121 |
| 122 double OS::LocalTimeOffset() { | 122 double OS::LocalTimeOffset(TimezoneCache* cache) { |
| 123 time_t tv = time(NULL); | 123 time_t tv = time(NULL); |
| 124 struct tm* t = localtime(&tv); | 124 struct tm* t = localtime(&tv); |
| 125 // tm_gmtoff includes any daylight savings offset, so subtract it. | 125 // tm_gmtoff includes any daylight savings offset, so subtract it. |
| 126 return static_cast<double>(t->tm_gmtoff * msPerSecond - | 126 return static_cast<double>(t->tm_gmtoff * msPerSecond - |
| 127 (t->tm_isdst > 0 ? 3600 * msPerSecond : 0)); | 127 (t->tm_isdst > 0 ? 3600 * msPerSecond : 0)); |
| 128 } | 128 } |
| 129 | 129 |
| 130 | 130 |
| 131 void* OS::Allocate(const size_t requested, | 131 void* OS::Allocate(const size_t requested, |
| 132 size_t* allocated, | 132 size_t* allocated, |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 392 bool VirtualMemory::ReleaseRegion(void* base, size_t size) { | 392 bool VirtualMemory::ReleaseRegion(void* base, size_t size) { |
| 393 return munmap(base, size) == 0; | 393 return munmap(base, size) == 0; |
| 394 } | 394 } |
| 395 | 395 |
| 396 | 396 |
| 397 bool VirtualMemory::HasLazyCommits() { | 397 bool VirtualMemory::HasLazyCommits() { |
| 398 return false; | 398 return false; |
| 399 } | 399 } |
| 400 | 400 |
| 401 } } // namespace v8::internal | 401 } } // namespace v8::internal |
| OLD | NEW |