v8  3.25.30(node0.11.13)
V8 is Google's open source JavaScript engine
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Object Class Reference

#include <objects.h>

Inheritance diagram for Object:
Collaboration diagram for Object:

Public Types

enum  ValueType { OPTIMAL_REPRESENTATION, FORCE_TAGGED }
 

Public Member Functions

bool IsObject ()
 
bool IsFixedArrayBase ()
 
bool IsExternal ()
 
bool IsAccessorInfo ()
 
bool IsStruct ()
 
 INLINE (bool IsSpecObject())
 
 INLINE (bool IsSpecFunction())
 
bool IsCallable ()
 
 INLINE (bool IsUndefined())
 
 INLINE (bool IsNull())
 
 INLINE (bool IsTheHole())
 
 INLINE (bool IsUninitialized())
 
 INLINE (bool IsTrue())
 
 INLINE (bool IsFalse())
 
bool IsArgumentsMarker ()
 
bool NonFailureIsHeapObject ()
 
bool IsFiller ()
 
double Number ()
 
bool IsNaN ()
 
bool ToInt32 (int32_t *value)
 
bool ToUint32 (uint32_t *value)
 
Representation OptimalRepresentation (ValueType type=OPTIMAL_REPRESENTATION)
 
bool FitsRepresentation (Representation representation)
 
MaybeObject * AllocateNewStorageFor (Heap *heap, Representation representation)
 
bool HasValidElements ()
 
bool HasSpecificClassOf (String *name)
 
MUST_USE_RESULT MaybeObject * ToObject (Isolate *isolate)
 
bool BooleanValue ()
 
MUST_USE_RESULT MaybeObject * ToObject (Context *native_context)
 
MUST_USE_RESULT MaybeObject * ToSmi ()
 
void Lookup (Name *name, LookupResult *result)
 
MUST_USE_RESULT MaybeObject * GetProperty (Name *key)
 
MUST_USE_RESULT MaybeObject * GetProperty (Name *key, PropertyAttributes *attributes)
 
MUST_USE_RESULT MaybeObject * GetPropertyWithReceiver (Object *receiver, Name *key, PropertyAttributes *attributes)
 
MUST_USE_RESULT MaybeObject * GetProperty (Object *receiver, LookupResult *result, Name *key, PropertyAttributes *attributes)
 
MUST_USE_RESULT MaybeObject * GetPropertyWithDefinedGetter (Object *receiver, JSReceiver *getter)
 
Object * GetPrototype (Isolate *isolate)
 
Map * GetMarkerMap (Isolate *isolate)
 
Object * GetHash ()
 
bool SameValue (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 MUST_USE_RESULT Handle
< Object > 
ToSmi (Isolate *isolate, Handle< Object > object)
 
static Handle< Object > GetPropertyWithReceiver (Handle< Object > object, Handle< Object > receiver, Handle< Name > name, PropertyAttributes *attributes)
 
static Handle< Object > GetProperty (Handle< Object > object, Handle< Name > key)
 
static Handle< Object > GetProperty (Handle< Object > object, Handle< Object > receiver, LookupResult *result, Handle< Name > key, PropertyAttributes *attributes)
 
static MUST_USE_RESULT
MaybeObject * 
GetPropertyOrFail (Handle< Object > object, Handle< Object > receiver, LookupResult *result, Handle< Name > key, PropertyAttributes *attributes)
 
static Handle< Object > GetElement (Isolate *isolate, Handle< Object > object, uint32_t index)
 
static Handle< Object > GetElementNoExceptionThrown (Isolate *isolate, Handle< Object > object, uint32_t index)
 
static Handle< Object > GetElementWithReceiver (Isolate *isolate, Handle< Object > object, Handle< Object > receiver, uint32_t index)
 
static Handle< Object > GetOrCreateHash (Handle< Object > object, Isolate *isolate)
 
static Object * cast (Object *value)
 

Static Public Attributes

static const int kHeaderSize = 0
 

Detailed Description

Definition at line 1440 of file objects.h.

Member Enumeration Documentation

enum ValueType
Enumerator
OPTIMAL_REPRESENTATION 
FORCE_TAGGED 

Definition at line 1484 of file objects.h.

Member Function Documentation

MaybeObject * AllocateNewStorageFor ( Heap *  heap,
Representation  representation 
)
inline
bool BooleanValue ( )
static Object* cast ( Object *  value)
inlinestatic

Definition at line 1641 of file objects.h.

Referenced by v8::internal::GetEnumPropertyKeys(), and Object::GetProperty().

bool FitsRepresentation ( Representation  representation)
inline
Handle< Object > GetElement ( Isolate *  isolate,
Handle< Object >  object,
uint32_t  index 
)
inlinestatic
Handle< Object > GetElementNoExceptionThrown ( Isolate *  isolate,
Handle< Object >  object,
uint32_t  index 
)
inlinestatic
Map * GetMarkerMap ( Isolate *  isolate)

Definition at line 1064 of file objects.cc.

References HeapObject::cast(), Isolate::heap(), and HeapObject::map().

Handle< Object > GetOrCreateHash ( Handle< Object >  object,
Isolate *  isolate 
)
static

Definition at line 1091 of file objects.cc.

References ASSERT, and JSReceiver::GetOrCreateIdentityHash().

Referenced by ObjectHashSet::Add(), and ObjectHashTable::Put().

MaybeObject * GetProperty ( Name *  key,
PropertyAttributes *  attributes 
)
inline

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

References Object::GetPropertyWithReceiver().

Handle< Object > GetProperty ( Handle< Object >  object,
Handle< Name >  key 
)
static

Definition at line 490 of file objects.cc.

References CALL_HEAP_FUNCTION, Object::GetElement(), and v8::internal::Object.

Handle< Object > GetProperty ( Handle< Object >  object,
Handle< Object >  receiver,
LookupResult *  result,
Handle< Name >  key,
PropertyAttributes *  attributes 
)
static

Definition at line 829 of file objects.cc.

References CALL_HEAP_FUNCTION, and v8::internal::Object.

MaybeObject * GetPropertyOrFail ( Handle< Object >  object,
Handle< Object >  receiver,
LookupResult *  result,
Handle< Name >  key,
PropertyAttributes *  attributes 
)
static

Definition at line 842 of file objects.cc.

References CALL_HEAP_FUNCTION_PASS_EXCEPTION.

MaybeObject * GetPropertyWithDefinedGetter ( Object *  receiver,
JSReceiver *  getter 
)
Handle< Object > GetPropertyWithReceiver ( Handle< Object >  object,
Handle< Object >  receiver,
Handle< Name >  name,
PropertyAttributes *  attributes 
)
static

Definition at line 159 of file objects.cc.

References ABSENT, ASSERT, and Object::GetProperty().

Referenced by Object::GetProperty(), and JSObject::GetPropertyPostInterceptor().

MaybeObject * GetPropertyWithReceiver ( Object *  receiver,
Name *  key,
PropertyAttributes *  attributes 
)
bool HasSpecificClassOf ( String *  name)
inline

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

References JSObject::cast(), JSReceiver::class_name(), and v8::internal::name.

bool HasValidElements ( )
inline

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

Referenced by JSObject::set_map_and_elements().

INLINE ( bool   IsSpecObject())
INLINE ( bool   IsSpecFunction())
INLINE ( bool   IsUndefined())
INLINE ( bool   IsNull())
INLINE ( bool   IsTheHole())
INLINE ( bool   IsUninitialized())
INLINE ( bool   IsTrue())
INLINE ( bool   IsFalse())
bool IsAccessorInfo ( )
inline

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

Referenced by BASE_EMBEDDED< Visitor >::IsDataProperty().

bool IsArgumentsMarker ( )
inline

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

References Oddball::cast(), Oddball::kArgumentMarker, and Oddball::kind().

bool IsCallable ( )
bool IsExternal ( )
inline

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

References HeapObject::cast(), HeapObject::GetHeap(), and HeapObject::map().

bool IsFixedArrayBase ( )
inline

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

Referenced by FixedArrayBase::cast().

bool IsNaN ( )
inline

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

References HeapNumber::cast(), and std::isnan().

bool IsObject ( )
inline

Definition at line 1443 of file objects.h.

bool IsStringObjectWithCharacterAt ( uint32_t  index)
inline

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

References JSValue::cast(), String::cast(), and String::length().

bool IsStruct ( )
inline

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

References HeapObject::cast(), MAKE_STRUCT_CASE, v8::internal::map, and STRUCT_LIST.

void Lookup ( Name *  name,
LookupResult *  result 
)
bool NonFailureIsHeapObject ( )
inline

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

References ASSERT, and v8::internal::kSmiTagMask.

Referenced by IncrementalMarkingMarkingVisitor::INLINE().

bool ToInt32 ( int32_t *  value)
MaybeObject * ToObject ( Isolate *  isolate)
MaybeObject * ToObject ( Context *  native_context)

Definition at line 76 of file objects.cc.

References ASSERT.

Handle< Object > ToSmi ( Isolate *  isolate,
Handle< Object >  object 
)
inlinestatic
bool ToUint32 ( uint32_t *  value)
void VerifyApiCallResultType ( )
inline

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

References FATAL.

Field Documentation

const int kHeaderSize = 0
static

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