V8 Project
v8::internal::Oddball Class Reference

#include <objects.h>

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

Public Types

typedef FixedBodyDescriptor< kToStringOffset, kToNumberOffset+kPointerSize, kSizeBodyDescriptor
 
- 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 }
 

Public Member Functions

byte kind () const
 
void set_kind (byte kind)
 
 STATIC_ASSERT (kKindOffset==Internals::kOddballKindOffset)
 
 STATIC_ASSERT (kNull==Internals::kNullOddballKind)
 
 STATIC_ASSERT (kUndefined==Internals::kUndefinedOddballKind)
 
- 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 Member Functions

static void Initialize (Isolate *isolate, Handle< Oddball > oddball, const char *to_string, Handle< Object > to_number, byte kind)
 
- 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)
 

Static Public Attributes

static const int kToStringOffset = HeapObject::kHeaderSize
 
static const int kToNumberOffset = kToStringOffset + kPointerSize
 
static const int kKindOffset = kToNumberOffset + kPointerSize
 
static const int kSize = kKindOffset + kPointerSize
 
static const byte kFalse = 0
 
static const byte kTrue = 1
 
static const byte kNotBooleanMask = ~1
 
static const byte kTheHole = 2
 
static const byte kNull = 3
 
static const byte kArgumentMarker = 4
 
static const byte kUndefined = 5
 
static const byte kUninitialized = 6
 
static const byte kOther = 7
 
static const byte kException = 8
 
- 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
 

Private Member Functions

 DISALLOW_IMPLICIT_CONSTRUCTORS (Oddball)
 

Additional Inherited Members

- 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)
 

Detailed Description

Definition at line 9371 of file objects.h.

Member Typedef Documentation

◆ BodyDescriptor

Member Function Documentation

◆ DISALLOW_IMPLICIT_CONSTRUCTORS()

v8::internal::Oddball::DISALLOW_IMPLICIT_CONSTRUCTORS ( Oddball  )
private

◆ Initialize()

void v8::internal::Oddball::Initialize ( Isolate isolate,
Handle< Oddball oddball,
const char *  to_string,
Handle< Object to_number,
byte  kind 
)
static

Definition at line 9596 of file objects.cc.

9600  {
9601  Handle<String> internalized_to_string =
9602  isolate->factory()->InternalizeUtf8String(to_string);
9603  oddball->set_to_string(*internalized_to_string);
9604  oddball->set_to_number(*to_number);
9605  oddball->set_kind(kind);
9606 }

References v8::internal::Isolate::factory(), and kind().

Referenced by v8::internal::Heap::CreateInitialObjects().

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

◆ kind()

byte v8::internal::Oddball::kind ( ) const
inline

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

1886  {
1887  return Smi::cast(READ_FIELD(this, kKindOffset))->value();
1888 }
static const int kKindOffset
Definition: objects.h:9397
#define READ_FIELD(p, offset)
Definition: objects-inl.h:1179

References READ_FIELD.

Referenced by Initialize().

+ Here is the caller graph for this function:

◆ set_kind()

void v8::internal::Oddball::set_kind ( byte  kind)
inline

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

1891  {
1892  WRITE_FIELD(this, kKindOffset, Smi::FromInt(value));
1893 }
static Smi * FromInt(int value)
Definition: objects-inl.h:1321
#define WRITE_FIELD(p, offset, value)
Definition: objects-inl.h:1190

References v8::internal::Smi::FromInt(), kKindOffset, and WRITE_FIELD.

+ Here is the call graph for this function:

◆ STATIC_ASSERT() [1/3]

v8::internal::Oddball::STATIC_ASSERT ( kKindOffset  = =Internals::kOddballKindOffset)

◆ STATIC_ASSERT() [2/3]

v8::internal::Oddball::STATIC_ASSERT ( kNull  = =Internals::kNullOddballKind)

◆ STATIC_ASSERT() [3/3]

v8::internal::Oddball::STATIC_ASSERT ( kUndefined  = =Internals::kUndefinedOddballKind)

Member Data Documentation

◆ kArgumentMarker

const byte v8::internal::Oddball::kArgumentMarker = 4
static

Definition at line 9405 of file objects.h.

Referenced by v8::internal::Heap::CreateInitialObjects().

◆ kException

const byte v8::internal::Oddball::kException = 8
static

Definition at line 9409 of file objects.h.

Referenced by v8::internal::Heap::CreateInitialObjects().

◆ kFalse

const byte v8::internal::Oddball::kFalse = 0
static

Definition at line 9400 of file objects.h.

Referenced by v8::internal::Heap::CreateInitialObjects().

◆ kKindOffset

const int v8::internal::Oddball::kKindOffset = kToNumberOffset + kPointerSize
static

Definition at line 9397 of file objects.h.

Referenced by set_kind().

◆ kNotBooleanMask

const byte v8::internal::Oddball::kNotBooleanMask = ~1
static

Definition at line 9402 of file objects.h.

◆ kNull

const byte v8::internal::Oddball::kNull = 3
static

◆ kOther

const byte v8::internal::Oddball::kOther = 7
static

Definition at line 9408 of file objects.h.

Referenced by v8::internal::Heap::CreateInitialObjects().

◆ kSize

const int v8::internal::Oddball::kSize = kKindOffset + kPointerSize
static

Definition at line 9398 of file objects.h.

Referenced by v8::internal::Heap::CreateInitialMaps().

◆ kTheHole

const byte v8::internal::Oddball::kTheHole = 2
static

Definition at line 9403 of file objects.h.

Referenced by v8::internal::Heap::CreateInitialObjects().

◆ kToNumberOffset

const int v8::internal::Oddball::kToNumberOffset = kToStringOffset + kPointerSize
static

Definition at line 9396 of file objects.h.

◆ kToStringOffset

const int v8::internal::Oddball::kToStringOffset = HeapObject::kHeaderSize
static

Definition at line 9395 of file objects.h.

◆ kTrue

const byte v8::internal::Oddball::kTrue = 1
static

Definition at line 9401 of file objects.h.

Referenced by v8::internal::Heap::CreateInitialObjects().

◆ kUndefined

const byte v8::internal::Oddball::kUndefined = 5
static

◆ kUninitialized

const byte v8::internal::Oddball::kUninitialized = 6
static

Definition at line 9407 of file objects.h.

Referenced by v8::internal::Heap::CreateInitialObjects().


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