| 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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 140 } | 140 } | 
| 141 | 141 | 
| 142 | 142 | 
| 143 double ceiling(double x) { | 143 double ceiling(double x) { | 
| 144   return ceil(x); | 144   return ceil(x); | 
| 145 } | 145 } | 
| 146 | 146 | 
| 147 | 147 | 
| 148 static Mutex* limit_mutex = NULL; | 148 static Mutex* limit_mutex = NULL; | 
| 149 | 149 | 
| 150 #if defined(V8_TARGET_ARCH_IA32) | 150 #if V8_TARGET_ARCH_IA32 | 
| 151 static void MemMoveWrapper(void* dest, const void* src, size_t size) { | 151 static void MemMoveWrapper(void* dest, const void* src, size_t size) { | 
| 152   memmove(dest, src, size); | 152   memmove(dest, src, size); | 
| 153 } | 153 } | 
| 154 | 154 | 
| 155 // Initialize to library version so we can call this at any time during startup. | 155 // Initialize to library version so we can call this at any time during startup. | 
| 156 static OS::MemMoveFunction memmove_function = &MemMoveWrapper; | 156 static OS::MemMoveFunction memmove_function = &MemMoveWrapper; | 
| 157 | 157 | 
| 158 // Defined in codegen-ia32.cc. | 158 // Defined in codegen-ia32.cc. | 
| 159 OS::MemMoveFunction CreateMemMoveFunction(); | 159 OS::MemMoveFunction CreateMemMoveFunction(); | 
| 160 | 160 | 
| (...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 573   // Return the standard or DST time zone name based on whether daylight | 573   // Return the standard or DST time zone name based on whether daylight | 
| 574   // saving is in effect at the given time. | 574   // saving is in effect at the given time. | 
| 575   return InDST() ? dst_tz_name_ : std_tz_name_; | 575   return InDST() ? dst_tz_name_ : std_tz_name_; | 
| 576 } | 576 } | 
| 577 | 577 | 
| 578 | 578 | 
| 579 void OS::PostSetUp() { | 579 void OS::PostSetUp() { | 
| 580   // Math functions depend on CPU features therefore they are initialized after | 580   // Math functions depend on CPU features therefore they are initialized after | 
| 581   // CPU. | 581   // CPU. | 
| 582   MathSetup(); | 582   MathSetup(); | 
| 583 #if defined(V8_TARGET_ARCH_IA32) | 583 #if V8_TARGET_ARCH_IA32 | 
| 584   OS::MemMoveFunction generated_memmove = CreateMemMoveFunction(); | 584   OS::MemMoveFunction generated_memmove = CreateMemMoveFunction(); | 
| 585   if (generated_memmove != NULL) { | 585   if (generated_memmove != NULL) { | 
| 586     memmove_function = generated_memmove; | 586     memmove_function = generated_memmove; | 
| 587   } | 587   } | 
| 588 #endif | 588 #endif | 
| 589 } | 589 } | 
| 590 | 590 | 
| 591 | 591 | 
| 592 // Returns the accumulated user time for thread. | 592 // Returns the accumulated user time for thread. | 
| 593 int OS::GetUserTime(uint32_t* secs,  uint32_t* usecs) { | 593 int OS::GetUserTime(uint32_t* secs,  uint32_t* usecs) { | 
| (...skipping 1387 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1981   limit_mutex = CreateMutex(); | 1981   limit_mutex = CreateMutex(); | 
| 1982 } | 1982 } | 
| 1983 | 1983 | 
| 1984 | 1984 | 
| 1985 void OS::TearDown() { | 1985 void OS::TearDown() { | 
| 1986   delete limit_mutex; | 1986   delete limit_mutex; | 
| 1987 } | 1987 } | 
| 1988 | 1988 | 
| 1989 | 1989 | 
| 1990 } }  // namespace v8::internal | 1990 } }  // namespace v8::internal | 
| OLD | NEW | 
|---|