diff options
Diffstat (limited to 'deps/v8/src/platform.h')
-rw-r--r-- | deps/v8/src/platform.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/deps/v8/src/platform.h b/deps/v8/src/platform.h index a32fbbc028..6f75ca83d5 100644 --- a/deps/v8/src/platform.h +++ b/deps/v8/src/platform.h @@ -107,7 +107,11 @@ namespace internal { // Use AtomicWord for a machine-sized pointer. It is assumed that // reads and writes of naturally aligned values of this type are atomic. +#if defined(__OpenBSD__) && defined(__i386__) +typedef Atomic32 AtomicWord; +#else typedef intptr_t AtomicWord; +#endif class Semaphore; class Mutex; @@ -115,12 +119,16 @@ class Mutex; double ceiling(double x); double modulo(double x, double y); -// Custom implementation of sin, cos, tan and log. +// Custom implementation of math functions. double fast_sin(double input); double fast_cos(double input); double fast_tan(double input); double fast_log(double input); +double fast_exp(double input); double fast_sqrt(double input); +// The custom exp implementation needs 16KB of lookup data; initialize it +// on demand. +void lazily_initialize_fast_exp(); // Forward declarations. class Socket; @@ -304,6 +312,9 @@ class OS { // Returns the double constant NAN static double nan_value(); + // Support runtime detection of Cpu implementer + static CpuImplementer GetCpuImplementer(); + // Support runtime detection of VFP3 on ARM CPUs. static bool ArmCpuHasFeature(CpuFeature feature); @@ -425,6 +436,11 @@ class VirtualMemory { // and the same size it was reserved with. static bool ReleaseRegion(void* base, size_t size); + // Returns true if OS performs lazy commits, i.e. the memory allocation call + // defers actual physical memory allocation till the first memory access. + // Otherwise returns false. + static bool HasLazyCommits(); + private: void* address_; // Start address of the virtual memory. size_t size_; // Size of the virtual memory. |