14 static V8_INLINE void InitializeNativeHandle(pthread_mutex_t* mutex) {
18 pthread_mutexattr_t attr;
19 result = pthread_mutexattr_init(&attr);
21 result = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ERRORCHECK);
23 result = pthread_mutex_init(mutex, &attr);
25 result = pthread_mutexattr_destroy(&attr);
28 result = pthread_mutex_init(mutex,
NULL);
35 static V8_INLINE void InitializeRecursiveNativeHandle(pthread_mutex_t* mutex) {
36 pthread_mutexattr_t attr;
37 int result = pthread_mutexattr_init(&attr);
39 result = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
41 result = pthread_mutex_init(mutex, &attr);
43 result = pthread_mutexattr_destroy(&attr);
49 static V8_INLINE void DestroyNativeHandle(pthread_mutex_t* mutex) {
50 int result = pthread_mutex_destroy(mutex);
56 static V8_INLINE void LockNativeHandle(pthread_mutex_t* mutex) {
57 int result = pthread_mutex_lock(mutex);
63 static V8_INLINE void UnlockNativeHandle(pthread_mutex_t* mutex) {
64 int result = pthread_mutex_unlock(mutex);
70 static V8_INLINE bool TryLockNativeHandle(pthread_mutex_t* mutex) {
71 int result = pthread_mutex_trylock(mutex);
72 if (result == EBUSY) {
81 static V8_INLINE void InitializeNativeHandle(PCRITICAL_SECTION
cs) {
82 InitializeCriticalSection(
cs);
86 static V8_INLINE void InitializeRecursiveNativeHandle(PCRITICAL_SECTION
cs) {
87 InitializeCriticalSection(
cs);
91 static V8_INLINE void DestroyNativeHandle(PCRITICAL_SECTION
cs) {
92 DeleteCriticalSection(
cs);
96 static V8_INLINE void LockNativeHandle(PCRITICAL_SECTION
cs) {
97 EnterCriticalSection(
cs);
101 static V8_INLINE void UnlockNativeHandle(PCRITICAL_SECTION
cs) {
102 LeaveCriticalSection(
cs);
106 static V8_INLINE bool TryLockNativeHandle(PCRITICAL_SECTION
cs) {
107 return TryEnterCriticalSection(
cs);
114 InitializeNativeHandle(&native_handle_);
122 DestroyNativeHandle(&native_handle_);
128 LockNativeHandle(&native_handle_);
129 AssertUnheldAndMark();
133 void Mutex::Unlock() {
134 AssertHeldAndUnmark();
135 UnlockNativeHandle(&native_handle_);
139 bool Mutex::TryLock() {
140 if (!TryLockNativeHandle(&native_handle_)) {
143 AssertUnheldAndMark();
148 RecursiveMutex::RecursiveMutex() {
149 InitializeRecursiveNativeHandle(&native_handle_);
156 RecursiveMutex::~RecursiveMutex() {
157 DestroyNativeHandle(&native_handle_);
162 void RecursiveMutex::Lock() {
163 LockNativeHandle(&native_handle_);
171 void RecursiveMutex::Unlock() {
176 UnlockNativeHandle(&native_handle_);
180 bool RecursiveMutex::TryLock() {
181 if (!TryLockNativeHandle(&native_handle_)) {
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be NULL
#define DCHECK_LE(v1, v2)
#define DCHECK_LT(v1, v2)
#define DCHECK_EQ(v1, v2)
Debugger support for the V8 JavaScript engine.