| 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 | 93 |
| 94 #endif // _MSC_VER | 94 #endif // _MSC_VER |
| 95 | 95 |
| 96 #ifndef __CYGWIN__ | 96 #ifndef __CYGWIN__ |
| 97 // Random is missing on both Visual Studio and MinGW. | 97 // Random is missing on both Visual Studio and MinGW. |
| 98 int random(); | 98 int random(); |
| 99 #endif | 99 #endif |
| 100 | 100 |
| 101 #endif // WIN32 | 101 #endif // WIN32 |
| 102 | 102 |
| 103 #include "atomicops.h" | |
| 104 #include "lazy-instance.h" | 103 #include "lazy-instance.h" |
| 105 #include "platform-tls.h" | 104 #include "platform-tls.h" |
| 106 #include "utils.h" | 105 #include "utils.h" |
| 107 #include "v8globals.h" | 106 #include "v8globals.h" |
| 108 | 107 |
| 109 namespace v8 { | 108 namespace v8 { |
| 110 namespace internal { | 109 namespace internal { |
| 111 | 110 |
| 112 class Semaphore; | 111 class Semaphore; |
| 113 class Mutex; | 112 class Mutex; |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 // EABI is used. | 322 // EABI is used. |
| 324 static bool ArmUsingHardFloat(); | 323 static bool ArmUsingHardFloat(); |
| 325 | 324 |
| 326 // Support runtime detection of FPU on MIPS CPUs. | 325 // Support runtime detection of FPU on MIPS CPUs. |
| 327 static bool MipsCpuHasFeature(CpuFeature feature); | 326 static bool MipsCpuHasFeature(CpuFeature feature); |
| 328 | 327 |
| 329 // Returns the activation frame alignment constraint or zero if | 328 // Returns the activation frame alignment constraint or zero if |
| 330 // the platform doesn't care. Guaranteed to be a power of two. | 329 // the platform doesn't care. Guaranteed to be a power of two. |
| 331 static int ActivationFrameAlignment(); | 330 static int ActivationFrameAlignment(); |
| 332 | 331 |
| 333 static void ReleaseStore(volatile AtomicWord* ptr, AtomicWord value); | |
| 334 | |
| 335 #if defined(V8_TARGET_ARCH_IA32) | 332 #if defined(V8_TARGET_ARCH_IA32) |
| 336 // Limit below which the extra overhead of the MemCopy function is likely | 333 // Limit below which the extra overhead of the MemCopy function is likely |
| 337 // to outweigh the benefits of faster copying. | 334 // to outweigh the benefits of faster copying. |
| 338 static const int kMinComplexMemCopy = 64; | 335 static const int kMinComplexMemCopy = 64; |
| 339 | 336 |
| 340 // Copy memory area. No restrictions. | 337 // Copy memory area. No restrictions. |
| 341 static void MemMove(void* dest, const void* src, size_t size); | 338 static void MemMove(void* dest, const void* src, size_t size); |
| 342 typedef void (*MemMoveFunction)(void* dest, const void* src, size_t size); | 339 typedef void (*MemMoveFunction)(void* dest, const void* src, size_t size); |
| 343 | 340 |
| 344 // Keep the distinction of "move" vs. "copy" for the benefit of other | 341 // Keep the distinction of "move" vs. "copy" for the benefit of other |
| (...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 729 static uint16_t HToN(uint16_t value); | 726 static uint16_t HToN(uint16_t value); |
| 730 static uint16_t NToH(uint16_t value); | 727 static uint16_t NToH(uint16_t value); |
| 731 static uint32_t HToN(uint32_t value); | 728 static uint32_t HToN(uint32_t value); |
| 732 static uint32_t NToH(uint32_t value); | 729 static uint32_t NToH(uint32_t value); |
| 733 }; | 730 }; |
| 734 | 731 |
| 735 | 732 |
| 736 } } // namespace v8::internal | 733 } } // namespace v8::internal |
| 737 | 734 |
| 738 #endif // V8_PLATFORM_H_ | 735 #endif // V8_PLATFORM_H_ |
| OLD | NEW |