| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 |
| 11 // with the distribution. | 11 // with the distribution. |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 | 296 |
| 297 // Support runtime detection of FPU on MIPS CPUs. | 297 // Support runtime detection of FPU on MIPS CPUs. |
| 298 static bool MipsCpuHasFeature(CpuFeature feature); | 298 static bool MipsCpuHasFeature(CpuFeature feature); |
| 299 | 299 |
| 300 // Returns the activation frame alignment constraint or zero if | 300 // Returns the activation frame alignment constraint or zero if |
| 301 // the platform doesn't care. Guaranteed to be a power of two. | 301 // the platform doesn't care. Guaranteed to be a power of two. |
| 302 static int ActivationFrameAlignment(); | 302 static int ActivationFrameAlignment(); |
| 303 | 303 |
| 304 static void ReleaseStore(volatile AtomicWord* ptr, AtomicWord value); | 304 static void ReleaseStore(volatile AtomicWord* ptr, AtomicWord value); |
| 305 | 305 |
| 306 #if defined(V8_TARGET_ARCH_IA32) |
| 307 // Copy memory area to disjoint memory area. |
| 308 static void MemCopy(void* dest, const void* src, size_t size); |
| 309 // Limit below which the extra overhead of the MemCopy function is likely |
| 310 // to outweigh the benefits of faster copying. |
| 311 static const int kMinComplexMemCopy = 64; |
| 312 typedef void (*MemCopyFunction)(void* dest, const void* src, size_t size); |
| 313 |
| 314 #else // V8_TARGET_ARCH_IA32 |
| 315 static void MemCopy(void* dest, const void* src, size_t size) { |
| 316 memcpy(dest, src, size); |
| 317 } |
| 318 static const int kMinComplexMemCopy = 256; |
| 319 #endif // V8_TARGET_ARCH_IA32 |
| 320 |
| 306 private: | 321 private: |
| 307 static const int msPerSecond = 1000; | 322 static const int msPerSecond = 1000; |
| 308 | 323 |
| 309 DISALLOW_IMPLICIT_CONSTRUCTORS(OS); | 324 DISALLOW_IMPLICIT_CONSTRUCTORS(OS); |
| 310 }; | 325 }; |
| 311 | 326 |
| 312 | 327 |
| 313 class VirtualMemory { | 328 class VirtualMemory { |
| 314 public: | 329 public: |
| 315 // Reserves virtual memory with size. | 330 // Reserves virtual memory with size. |
| (...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 668 int samples_taken_; // Counts stack samples taken. | 683 int samples_taken_; // Counts stack samples taken. |
| 669 DISALLOW_IMPLICIT_CONSTRUCTORS(Sampler); | 684 DISALLOW_IMPLICIT_CONSTRUCTORS(Sampler); |
| 670 }; | 685 }; |
| 671 | 686 |
| 672 | 687 |
| 673 #endif // ENABLE_LOGGING_AND_PROFILING | 688 #endif // ENABLE_LOGGING_AND_PROFILING |
| 674 | 689 |
| 675 } } // namespace v8::internal | 690 } } // namespace v8::internal |
| 676 | 691 |
| 677 #endif // V8_PLATFORM_H_ | 692 #endif // V8_PLATFORM_H_ |
| OLD | NEW |