V8 Project
v8::internal::PerThreadAssertScope< kType, kAllow > Class Template Reference

#include <assert-scope.h>

+ Collaboration diagram for v8::internal::PerThreadAssertScope< kType, kAllow >:

Public Member Functions

 PerThreadAssertScope ()
 
 ~PerThreadAssertScope ()
 

Static Public Member Functions

static bool IsAllowed ()
 

Private Member Functions

 DISALLOW_COPY_AND_ASSIGN (PerThreadAssertScope)
 

Private Attributes

PerThreadAssertData * data_
 
bool old_state_
 

Detailed Description

template<PerThreadAssertType kType, bool kAllow>
class v8::internal::PerThreadAssertScope< kType, kAllow >

Definition at line 39 of file assert-scope.h.

Constructor & Destructor Documentation

◆ PerThreadAssertScope()

template<PerThreadAssertType kType, bool kAllow>
v8::internal::PerThreadAssertScope< kType, kAllow >::PerThreadAssertScope

Definition at line 71 of file assert-scope.cc.

72  : data_(PerThreadAssertData::GetCurrent()) {
73  if (data_ == NULL) {
74  data_ = new PerThreadAssertData();
75  PerThreadAssertData::SetCurrent(data_);
76  }
77  data_->IncrementLevel();
78  old_state_ = data_->Get(kType);
79  data_->Set(kType, kAllow);
80 }
PerThreadAssertData * data_
Definition: assert-scope.h:47
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

References v8::internal::PerThreadAssertScope< kType, kAllow >::data_, NULL, and v8::internal::PerThreadAssertScope< kType, kAllow >::old_state_.

◆ ~PerThreadAssertScope()

template<PerThreadAssertType kType, bool kAllow>
v8::internal::PerThreadAssertScope< kType, kAllow >::~PerThreadAssertScope

Definition at line 84 of file assert-scope.cc.

84  {
86  data_->Set(kType, old_state_);
87  if (data_->DecrementLevel()) {
88  PerThreadAssertData::SetCurrent(NULL);
89  delete data_;
90  }
91 }
#define DCHECK_NOT_NULL(p)
Definition: logging.h:213

References DCHECK_NOT_NULL, and NULL.

Member Function Documentation

◆ DISALLOW_COPY_AND_ASSIGN()

template<PerThreadAssertType kType, bool kAllow>
v8::internal::PerThreadAssertScope< kType, kAllow >::DISALLOW_COPY_AND_ASSIGN ( PerThreadAssertScope< kType, kAllow >  )
private

◆ IsAllowed()

template<PerThreadAssertType kType, bool kAllow>
bool v8::internal::PerThreadAssertScope< kType, kAllow >::IsAllowed
static

Definition at line 96 of file assert-scope.cc.

96  {
97  PerThreadAssertData* data = PerThreadAssertData::GetCurrent();
98  return data == NULL || data->Get(kType);
99 }

References NULL.

Member Data Documentation

◆ data_

template<PerThreadAssertType kType, bool kAllow>
PerThreadAssertData* v8::internal::PerThreadAssertScope< kType, kAllow >::data_
private

◆ old_state_

template<PerThreadAssertType kType, bool kAllow>
bool v8::internal::PerThreadAssertScope< kType, kAllow >::old_state_
private

The documentation for this class was generated from the following files: