V8 Project
v8::internal::JSFunctionResultCache Class Reference

#include <objects.h>

+ Inheritance diagram for v8::internal::JSFunctionResultCache:
+ Collaboration diagram for v8::internal::JSFunctionResultCache:

Public Member Functions

void MakeZeroSize ()
 
void Clear ()
 
int size ()
 
void set_size (int size)
 
int finger_index ()
 
void set_finger_index (int finger_index)
 
- Public Member Functions inherited from v8::internal::FixedArray
Objectget (int index)
 
void set (int index, Object *value)
 
bool is_the_hole (int index)
 
void set (int index, Smi *value)
 
void set (int index, Object *value, WriteBarrierMode mode)
 
void set_undefined (int index)
 
void set_null (int index)
 
void set_the_hole (int index)
 
Object ** GetFirstElementAddress ()
 
bool ContainsOnlySmisOrHoles ()
 
Object ** data_start ()
 
void FillWithHoles (int from, int to)
 
void Shrink (int length)
 
void CopyTo (int pos, FixedArray *dest, int dest_pos, int len)
 
Object ** RawFieldOfElementAt (int index)
 
void SwapPairs (FixedArray *numbers, int i, int j)
 
void SortPairs (FixedArray *numbers, uint32_t len)
 
- Public Member Functions inherited from v8::internal::FixedArrayBase
int length () const
 
void set_length (int value)
 
int synchronized_length () const
 
void synchronized_set_length (int value)
 
- Public Member Functions inherited from v8::internal::HeapObject
Mapmap () const
 
void set_map (Map *value)
 
void set_map_no_write_barrier (Map *value)
 
Mapsynchronized_map ()
 
MapWord synchronized_map_word () const
 
void synchronized_set_map (Map *value)
 
void synchronized_set_map_no_write_barrier (Map *value)
 
void synchronized_set_map_word (MapWord map_word)
 
MapWord map_word () const
 
void set_map_word (MapWord map_word)
 
HeapGetHeap () const
 
IsolateGetIsolate () const
 
Address address ()
 
void Iterate (ObjectVisitor *v)
 
void IterateBody (InstanceType type, int object_size, ObjectVisitor *v)
 
int Size ()
 
bool MayContainRawValues ()
 
int SizeFromMap (Map *map)
 
WriteBarrierMode GetWriteBarrierMode (const DisallowHeapAllocation &promise)
 
void HeapObjectShortPrint (OStream &os)
 
 STATIC_ASSERT (kMapOffset==Internals::kHeapObjectMapOffset)
 
- Public Member Functions inherited from v8::internal::Object
bool IsObject () const
 
 INLINE (bool IsFixedArrayBase() const)
 
 INLINE (bool IsExternal() const)
 
 INLINE (bool IsAccessorInfo() const)
 
 INLINE (bool IsStruct() const)
 
 INLINE (bool IsSpecObject()) const
 
 INLINE (bool IsSpecFunction()) const
 
 INLINE (bool IsTemplateInfo()) const
 
 INLINE (bool IsNameDictionary() const)
 
 INLINE (bool IsSeededNumberDictionary() const)
 
 INLINE (bool IsUnseededNumberDictionary() const)
 
 INLINE (bool IsOrderedHashSet() const)
 
 INLINE (bool IsOrderedHashMap() const)
 
bool IsCallable () const
 
 INLINE (bool IsUndefined() const)
 
 INLINE (bool IsNull() const)
 
 INLINE (bool IsTheHole() const)
 
 INLINE (bool IsException() const)
 
 INLINE (bool IsUninitialized() const)
 
 INLINE (bool IsTrue() const)
 
 INLINE (bool IsFalse() const)
 
 INLINE (bool IsArgumentsMarker() const)
 
 INLINE (bool IsFiller() const)
 
double Number ()
 
 INLINE (bool IsNaN() const)
 
 INLINE (bool IsMinusZero() const)
 
bool ToInt32 (int32_t *value)
 
bool ToUint32 (uint32_t *value)
 
Representation OptimalRepresentation ()
 
bool FitsRepresentation (Representation representation)
 
Handle< HeapTypeOptimalType (Isolate *isolate, Representation representation)
 
bool HasValidElements ()
 
bool HasSpecificClassOf (String *name)
 
bool BooleanValue ()
 
ObjectGetHash ()
 
bool SameValue (Object *other)
 
bool SameValueZero (Object *other)
 
bool ToArrayIndex (uint32_t *index)
 
bool IsStringObjectWithCharacterAt (uint32_t index)
 
void VerifyApiCallResultType ()
 
void ShortPrint (FILE *out=stdout)
 
void ShortPrint (StringStream *accumulator)
 

Static Public Attributes

static const int kFactoryIndex = 0
 
static const int kFingerIndex = kFactoryIndex + 1
 
static const int kCacheSizeIndex = kFingerIndex + 1
 
static const int kDummyIndex = kCacheSizeIndex + 1
 
static const int kEntriesIndex = kDummyIndex + 1
 
static const int kEntrySize = 2
 
static const int kFactoryOffset = kHeaderSize
 
static const int kFingerOffset = kFactoryOffset + kPointerSize
 
static const int kCacheSizeOffset = kFingerOffset + kPointerSize
 
- Static Public Attributes inherited from v8::internal::FixedArray
static const int kMaxSize = 128 * MB * kPointerSize
 
static const int kMaxLength = (kMaxSize - kHeaderSize) / kPointerSize
 
- Static Public Attributes inherited from v8::internal::FixedArrayBase
static const int kLengthOffset = HeapObject::kHeaderSize
 
static const int kHeaderSize = kLengthOffset + kPointerSize
 
- Static Public Attributes inherited from v8::internal::HeapObject
static const int kMapOffset = Object::kHeaderSize
 
static const int kHeaderSize = kMapOffset + kPointerSize
 
- Static Public Attributes inherited from v8::internal::Object
static const int kHeaderSize = 0
 

Additional Inherited Members

- Public Types inherited from v8::internal::Object
enum  StoreFromKeyed { MAY_BE_STORE_FROM_KEYED , CERTAINLY_NOT_STORE_FROM_KEYED }
 
enum  StorePropertyMode { NORMAL_PROPERTY , SUPER_PROPERTY }
 
- Static Public Member Functions inherited from v8::internal::FixedArray
static Handle< Objectget (Handle< FixedArray > array, int index)
 
static Handle< FixedArrayCopySize (Handle< FixedArray > array, int new_length, PretenureFlag pretenure=NOT_TENURED)
 
static MUST_USE_RESULT MaybeHandle< FixedArrayAddKeysFromArrayLike (Handle< FixedArray > content, Handle< JSObject > array)
 
static MUST_USE_RESULT MaybeHandle< FixedArrayUnionOfKeys (Handle< FixedArray > first, Handle< FixedArray > second)
 
static int SizeFor (int length)
 
static int OffsetOfElementAt (int index)
 
- Static Public Member Functions inherited from v8::internal::HeapObject
static HeapObjectFromAddress (Address address)
 
static Object ** RawField (HeapObject *obj, int offset)
 
static void UpdateMapCodeCache (Handle< HeapObject > object, Handle< Name > name, Handle< Code > code)
 
- Static Public Member Functions inherited from v8::internal::Object
static Handle< ObjectNewStorageFor (Isolate *isolate, Handle< Object > object, Representation representation)
 
static Handle< ObjectWrapForRead (Isolate *isolate, Handle< Object > object, Representation representation)
 
static MaybeHandle< JSReceiverToObject (Isolate *isolate, Handle< Object > object)
 
static MaybeHandle< JSReceiverToObject (Isolate *isolate, Handle< Object > object, Handle< Context > context)
 
static MUST_USE_RESULT MaybeHandle< SmiToSmi (Isolate *isolate, Handle< Object > object)
 
static MUST_USE_RESULT MaybeHandle< ObjectGetProperty (LookupIterator *it)
 
static MUST_USE_RESULT MaybeHandle< ObjectSetProperty (Handle< Object > object, Handle< Name > key, Handle< Object > value, StrictMode strict_mode, StoreFromKeyed store_mode=MAY_BE_STORE_FROM_KEYED)
 
static MUST_USE_RESULT MaybeHandle< ObjectSetProperty (LookupIterator *it, Handle< Object > value, StrictMode strict_mode, StoreFromKeyed store_mode, StorePropertyMode data_store_mode=NORMAL_PROPERTY)
 
static MUST_USE_RESULT MaybeHandle< ObjectWriteToReadOnlyProperty (LookupIterator *it, Handle< Object > value, StrictMode strict_mode)
 
static Handle< ObjectSetDataProperty (LookupIterator *it, Handle< Object > value)
 
static MUST_USE_RESULT MaybeHandle< ObjectAddDataProperty (LookupIterator *it, Handle< Object > value, PropertyAttributes attributes, StrictMode strict_mode, StoreFromKeyed store_mode)
 
static MUST_USE_RESULT MaybeHandle< ObjectGetPropertyOrElement (Handle< Object > object, Handle< Name > key)
 
static MUST_USE_RESULT MaybeHandle< ObjectGetProperty (Isolate *isolate, Handle< Object > object, const char *key)
 
static MUST_USE_RESULT MaybeHandle< ObjectGetProperty (Handle< Object > object, Handle< Name > key)
 
static MUST_USE_RESULT MaybeHandle< ObjectGetPropertyWithAccessor (Handle< Object > receiver, Handle< Name > name, Handle< JSObject > holder, Handle< Object > structure)
 
static MUST_USE_RESULT MaybeHandle< ObjectSetPropertyWithAccessor (Handle< Object > receiver, Handle< Name > name, Handle< Object > value, Handle< JSObject > holder, Handle< Object > structure, StrictMode strict_mode)
 
static MUST_USE_RESULT MaybeHandle< ObjectGetPropertyWithDefinedGetter (Handle< Object > receiver, Handle< JSReceiver > getter)
 
static MUST_USE_RESULT MaybeHandle< ObjectSetPropertyWithDefinedSetter (Handle< Object > receiver, Handle< JSReceiver > setter, Handle< Object > value)
 
static MUST_USE_RESULT MaybeHandle< ObjectGetElement (Isolate *isolate, Handle< Object > object, uint32_t index)
 
static MUST_USE_RESULT MaybeHandle< ObjectGetElementWithReceiver (Isolate *isolate, Handle< Object > object, Handle< Object > receiver, uint32_t index)
 
static Handle< SmiGetOrCreateHash (Isolate *isolate, Handle< Object > object)
 
- Protected Member Functions inherited from v8::internal::HeapObject
void IteratePointers (ObjectVisitor *v, int start, int end)
 
void IteratePointer (ObjectVisitor *v, int offset)
 
void IterateNextCodeLink (ObjectVisitor *v, int offset)
 
- Static Protected Member Functions inherited from v8::internal::FixedArray
static void NoWriteBarrierSet (FixedArray *array, int index, Object *value)
 
static void NoIncrementalWriteBarrierSet (FixedArray *array, int index, Object *value)
 

Detailed Description

Definition at line 4067 of file objects.h.

Member Function Documentation

◆ Clear()

void v8::internal::JSFunctionResultCache::Clear ( )
inline

Definition at line 3740 of file objects-inl.h.

3740  {
3741  int cache_size = size();
3742  Object** entries_start = RawFieldOfElementAt(kEntriesIndex);
3743  MemsetPointer(entries_start,
3744  GetHeap()->the_hole_value(),
3745  cache_size - kEntriesIndex);
3746  MakeZeroSize();
3747 }
Object ** RawFieldOfElementAt(int index)
Definition: objects.h:2458
Heap * GetHeap() const
Definition: objects-inl.h:1379
void MemsetPointer(T **dest, U *value, int counter)
Definition: utils.h:1183
kSerializedDataOffset Object
Definition: objects-inl.h:5322

References v8::internal::HeapObject::GetHeap(), kEntriesIndex, MakeZeroSize(), v8::internal::MemsetPointer(), v8::internal::FixedArray::RawFieldOfElementAt(), and size().

+ Here is the call graph for this function:

◆ finger_index()

int v8::internal::JSFunctionResultCache::finger_index ( )
inline

Definition at line 3760 of file objects-inl.h.

3760  {
3761  return Smi::cast(get(kFingerIndex))->value();
3762 }
Object * get(int index)
Definition: objects-inl.h:2165

References v8::internal::FixedArray::get(), and kFingerIndex.

Referenced by set_finger_index().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MakeZeroSize()

void v8::internal::JSFunctionResultCache::MakeZeroSize ( )
inline

Definition at line 3734 of file objects-inl.h.

3734  {
3737 }
void set_finger_index(int finger_index)
Definition: objects-inl.h:3765

References kEntriesIndex, set_finger_index(), and set_size().

Referenced by Clear(), and v8::internal::CreateCache().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ set_finger_index()

void v8::internal::JSFunctionResultCache::set_finger_index ( int  finger_index)
inline

Definition at line 3765 of file objects-inl.h.

3765  {
3767 }
void set(int index, Object *value)
Definition: objects-inl.h:2190
static Smi * FromInt(int value)
Definition: objects-inl.h:1321

References finger_index(), v8::internal::Smi::FromInt(), kFingerIndex, and v8::internal::FixedArray::set().

Referenced by MakeZeroSize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ set_size()

void v8::internal::JSFunctionResultCache::set_size ( int  size)
inline

Definition at line 3755 of file objects-inl.h.

3755  {
3757 }
static const int kCacheSizeIndex
Definition: objects.h:4071

References v8::internal::Smi::FromInt(), kCacheSizeIndex, v8::internal::FixedArray::set(), and size().

Referenced by MakeZeroSize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ size()

int v8::internal::JSFunctionResultCache::size ( )
inline

Definition at line 3750 of file objects-inl.h.

3750  {
3751  return Smi::cast(get(kCacheSizeIndex))->value();
3752 }

References v8::internal::FixedArray::get(), and kCacheSizeIndex.

Referenced by Clear(), and set_size().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ kCacheSizeIndex

const int v8::internal::JSFunctionResultCache::kCacheSizeIndex = kFingerIndex + 1
static

Definition at line 4071 of file objects.h.

Referenced by set_size(), and size().

◆ kCacheSizeOffset

const int v8::internal::JSFunctionResultCache::kCacheSizeOffset = kFingerOffset + kPointerSize
static

Definition at line 4079 of file objects.h.

◆ kDummyIndex

const int v8::internal::JSFunctionResultCache::kDummyIndex = kCacheSizeIndex + 1
static

Definition at line 4072 of file objects.h.

◆ kEntriesIndex

const int v8::internal::JSFunctionResultCache::kEntriesIndex = kDummyIndex + 1
static

Definition at line 4073 of file objects.h.

Referenced by Clear(), MakeZeroSize(), and v8::internal::RUNTIME_FUNCTION().

◆ kEntrySize

const int v8::internal::JSFunctionResultCache::kEntrySize = 2
static

Definition at line 4075 of file objects.h.

Referenced by v8::internal::RUNTIME_FUNCTION().

◆ kFactoryIndex

const int v8::internal::JSFunctionResultCache::kFactoryIndex = 0
static

Definition at line 4069 of file objects.h.

Referenced by v8::internal::RUNTIME_FUNCTION().

◆ kFactoryOffset

const int v8::internal::JSFunctionResultCache::kFactoryOffset = kHeaderSize
static

Definition at line 4077 of file objects.h.

◆ kFingerIndex

const int v8::internal::JSFunctionResultCache::kFingerIndex = kFactoryIndex + 1
static

Definition at line 4070 of file objects.h.

Referenced by finger_index(), and set_finger_index().

◆ kFingerOffset

const int v8::internal::JSFunctionResultCache::kFingerOffset = kFactoryOffset + kPointerSize
static

Definition at line 4078 of file objects.h.


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