V8 Project
v8::internal::MaybeHandle< T > Class Template Reference

#include <handles.h>

+ Inheritance diagram for v8::internal::MaybeHandle< T >:
+ Collaboration diagram for v8::internal::MaybeHandle< T >:

Public Member Functions

 INLINE (MaybeHandle())
 
template<class S >
 MaybeHandle (Handle< S > handle)
 
template<class S >
 MaybeHandle (MaybeHandle< S > maybe_handle)
 
 INLINE (void Assert() const)
 
 INLINE (void Check() const)
 
 INLINE (Handle< T > ToHandleChecked()) const
 
template<class S >
 INLINE (bool ToHandle(Handle< S > *out))
 
bool is_null () const
 

Protected Attributes

T ** location_
 

Friends

template<class S >
class MaybeHandle
 

Detailed Description

template<typename T>
class v8::internal::MaybeHandle< T >

Definition at line 19 of file handles.h.

Constructor & Destructor Documentation

◆ MaybeHandle() [1/2]

template<typename T >
template<class S >
v8::internal::MaybeHandle< T >::MaybeHandle ( Handle< S handle)
inline

Definition at line 25 of file handles.h.

25  {
26 #ifdef DEBUG
27  T* a = NULL;
28  S* b = NULL;
29  a = b; // Fake assignment to enforce type checks.
30  USE(a);
31 #endif
32  this->location_ = reinterpret_cast<T**>(handle.location());
33  }
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
void USE(T)
Definition: macros.h:322
Handle< T > handle(T *t, Isolate *isolate)
Definition: handles.h:146
#define T(name, string, precedence)
Definition: token.cc:25

References v8::internal::MaybeHandle< T >::location_, NULL, v8::internal::S, T, and USE().

+ Here is the call graph for this function:

◆ MaybeHandle() [2/2]

template<typename T >
template<class S >
v8::internal::MaybeHandle< T >::MaybeHandle ( MaybeHandle< S maybe_handle)
inline

Definition at line 37 of file handles.h.

37  {
38 #ifdef DEBUG
39  T* a = NULL;
40  S* b = NULL;
41  a = b; // Fake assignment to enforce type checks.
42  USE(a);
43 #endif
44  location_ = reinterpret_cast<T**>(maybe_handle.location_);
45  }

References v8::internal::MaybeHandle< T >::location_, NULL, v8::internal::S, T, and USE().

+ Here is the call graph for this function:

Member Function Documentation

◆ INLINE() [1/5]

template<typename T >
template<class S >
v8::internal::MaybeHandle< T >::INLINE ( bool   ToHandleHandle< S > *out)
inline

Definition at line 56 of file handles.h.

56  {
57  if (location_ == NULL) {
58  *out = Handle<T>::null();
59  return false;
60  } else {
61  *out = Handle<T>(location_);
62  return true;
63  }
64  }
static Handle< T > null()
Definition: handles.h:123

References v8::internal::MaybeHandle< T >::location_, NULL, and v8::internal::Handle< T >::null().

+ Here is the call graph for this function:

◆ INLINE() [2/5]

template<typename T >
v8::internal::MaybeHandle< T >::INLINE ( Handle< T >   ToHandleChecked()) const
inline

Definition at line 50 of file handles.h.

50  {
51  Check();
52  return Handle<T>(location_);
53  }

References v8::internal::MaybeHandle< T >::location_.

◆ INLINE() [3/5]

template<typename T >
v8::internal::MaybeHandle< T >::INLINE ( MaybeHandle< T >()  )
inline

Definition at line 21 of file handles.h.

21 : location_(NULL) { }

◆ INLINE() [4/5]

template<typename T >
v8::internal::MaybeHandle< T >::INLINE ( void Assert() const  )
inline

Definition at line 47 of file handles.h.

47 { DCHECK(location_ != NULL); }
#define DCHECK(condition)
Definition: logging.h:205

References DCHECK, v8::internal::MaybeHandle< T >::location_, and NULL.

◆ INLINE() [5/5]

template<typename T >
v8::internal::MaybeHandle< T >::INLINE ( void Check() const  )
inline

Definition at line 48 of file handles.h.

48 { CHECK(location_ != NULL); }
#define CHECK(condition)
Definition: logging.h:36

References CHECK, v8::internal::MaybeHandle< T >::location_, and NULL.

◆ is_null()

Friends And Related Function Documentation

◆ MaybeHandle

template<typename T >
template<class S >
friend class MaybeHandle
friend

Definition at line 73 of file handles.h.

Member Data Documentation

◆ location_


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