v8
3.25.30(node0.11.13)
V8 is Google's open source JavaScript engine
|
#include <objects.h>
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 |
enum ValueType |
|
inline |
Definition at line 279 of file objects-inl.h.
References Heap::AllocateHeapNumber(), Smi::FromInt(), Representation::IsDouble(), Representation::IsSmi(), and Object::Number().
Referenced by JSObject::FastPropertyAt().
bool BooleanValue | ( | ) |
Definition at line 113 of file objects.cc.
References Smi::cast(), HeapNumber::cast(), String::cast(), HeapNumber::HeapNumberBooleanValue(), String::length(), and Smi::value().
Definition at line 1641 of file objects.h.
Referenced by v8::internal::GetEnumPropertyKeys(), and Object::GetProperty().
|
inline |
Definition at line 1507 of file objects.h.
References Representation::IsDouble(), Representation::IsHeapObject(), Representation::IsNone(), and Representation::IsSmi().
|
inlinestatic |
Definition at line 1060 of file objects-inl.h.
References ASSERT, and Object::GetElementWithReceiver().
Referenced by v8::internal::BUILTIN(), Object::Get(), Runtime::GetElementOrCharAt(), Object::GetProperty(), v8::internal::RUNTIME_FUNCTION(), and TEST().
|
inlinestatic |
Definition at line 1071 of file objects-inl.h.
References CHECK_NOT_EMPTY_HANDLE, and Object::GetElementWithReceiver().
Referenced by JSObject::DefineAccessor(), Factory::EmergencyNewError(), StackTrace::GetFrame(), Execution::InstantiateFunction(), Logger::LogRuntime(), JSObject::SetElement(), and THREADED_TEST().
|
static |
Definition at line 965 of file objects.cc.
References v8::ACCESS_GET, ASSERT, CALL_HEAP_FUNCTION, Handle< T >::cast(), Isolate::context(), Isolate::factory(), JSObject::GetElementWithInterceptor(), Object::GetPrototype(), Isolate::heap(), Value::IsBoolean(), Value::IsNull(), Value::IsNumber(), Value::IsString(), Value::IsSymbol(), Value::IsUndefined(), Isolate::MayIndexedAccessWrapper(), Context::native_context(), Isolate::ReportFailedAccessCheckWrapper(), RETURN_HANDLE_IF_SCHEDULED_EXCEPTION, and RETURN_IF_EMPTY_HANDLE_VALUE.
Referenced by Object::GetElement(), Object::GetElementNoExceptionThrown(), and JSObject::GetElementWithInterceptor().
Object * GetHash | ( | ) |
Definition at line 1070 of file objects.cc.
References ASSERT, JSReceiver::cast(), Name::cast(), Oddball::cast(), v8::internal::ComputeLongHash(), v8::internal::double_to_uint64(), Smi::FromInt(), JSReceiver::GetIdentityHash(), Name::Hash(), Smi::kMaxValue, and Object::Number().
Referenced by ObjectHashSet::Contains(), ObjectHashTableShape< entrysize >::Hash(), ObjectHashTableShape< entrysize >::HashForObject(), and ObjectHashTable::Lookup().
Definition at line 1064 of file objects.cc.
References HeapObject::cast(), Isolate::heap(), and HeapObject::map().
Definition at line 1091 of file objects.cc.
References ASSERT, and JSReceiver::GetOrCreateIdentityHash().
Referenced by ObjectHashSet::Add(), and ObjectHashTable::Put().
|
inline |
Definition at line 1081 of file objects-inl.h.
References Object::GetPropertyWithReceiver().
Referenced by JSObject::DefineAccessor(), Symbol::For(), Symbol::ForApi(), Private::ForApi(), JSObject::GetLocalPropertyPostInterceptor(), GlobalObject::GetPropertyNoExceptionThrown(), JSObject::GetPropertyPostInterceptor(), Object::GetPropertyWithReceiver(), LoadIC::Load(), v8::internal::RUNTIME_FUNCTION(), JSObject::SetLocalPropertyIgnoreAttributes(), JSObject::SetPropertyForResult(), and TEST().
|
inline |
Definition at line 1087 of file objects-inl.h.
References Object::GetPropertyWithReceiver().
Definition at line 490 of file objects.cc.
References CALL_HEAP_FUNCTION, Object::GetElement(), and v8::internal::Object.
|
static |
Definition at line 829 of file objects.cc.
References CALL_HEAP_FUNCTION, and v8::internal::Object.
MaybeObject * GetProperty | ( | Object * | receiver, |
LookupResult * | result, | ||
Name * | key, | ||
PropertyAttributes * | attributes | ||
) |
Definition at line 855 of file objects.cc.
References ABSENT, v8::ACCESS_GET, ASSERT, v8::internal::CALLBACKS, Object::cast(), JSObject::cast(), v8::internal::CONSTANT, v8::internal::FIELD, HeapObject::GetIsolate(), JSObject::GetPropertyWithCallback(), JSObject::GetPropertyWithInterceptor(), Object::GetPrototype(), v8::internal::handle(), v8::internal::HANDLER, Isolate::heap(), v8::internal::INTERCEPTOR, Isolate::MayNamedAccess(), v8::internal::NONEXISTENT, v8::internal::NORMAL, v8::internal::NULL, RETURN_IF_EMPTY_HANDLE, v8::internal::TRANSITION, and UNREACHABLE.
|
static |
Definition at line 842 of file objects.cc.
References CALL_HEAP_FUNCTION_PASS_EXCEPTION.
MaybeObject * GetPropertyWithDefinedGetter | ( | Object * | receiver, |
JSReceiver * | getter | ||
) |
Definition at line 529 of file objects.cc.
References Execution::Call(), Failure::Exception(), HeapObject::GetIsolate(), and v8::internal::NULL.
|
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 | ||
) |
Definition at line 173 of file objects.cc.
References ABSENT, ASSERT, HeapObject::GetIsolate(), Object::GetProperty(), and Object::Lookup().
Definition at line 1032 of file objects.cc.
References HeapObject::cast(), Isolate::context(), Isolate::heap(), HeapObject::map(), and Context::native_context().
Referenced by Deoptimizer::DeoptimizeGlobalObject(), Object::FindInstanceInPrototypeChain(), JSObject::GetLocalElementAccessorPair(), Object::GetProperty(), v8::internal::RUNTIME_FUNCTION(), and JSObject::SetPrototype().
|
inline |
Definition at line 1055 of file objects-inl.h.
References JSObject::cast(), JSReceiver::class_name(), and v8::internal::name.
|
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() | ) |
|
inline |
Definition at line 158 of file objects-inl.h.
Referenced by BASE_EMBEDDED< Visitor >::IsDataProperty().
|
inline |
Definition at line 1010 of file objects-inl.h.
References Oddball::cast(), Oddball::kArgumentMarker, and Oddball::kind().
bool IsCallable | ( | ) |
Definition at line 124 of file objects.cc.
References HeapObject::cast(), JSFunctionProxy::cast(), Map::has_instance_call_handler(), and HeapObject::map().
|
inline |
Definition at line 151 of file objects-inl.h.
References HeapObject::cast(), HeapObject::GetHeap(), and HeapObject::map().
|
inline |
Definition at line 606 of file objects-inl.h.
References HeapObject::cast(), v8::internal::FILLER_TYPE, v8::internal::FREE_SPACE_TYPE, Map::instance_type(), and HeapObject::map().
Referenced by Heap::AllowedToBeMigrated(), IncrementalMarking::UpdateMarkingDequeAfterScavenge(), and ElementsAccessorBase< FastPackedSmiElementsAccessor, ElementsKindTraits< FAST_SMI_ELEMENTS > >::ValidateImpl().
|
inline |
Definition at line 144 of file objects-inl.h.
Referenced by FixedArrayBase::cast().
|
inline |
Definition at line 1023 of file objects-inl.h.
References HeapNumber::cast(), and std::isnan().
|
inline |
Definition at line 2091 of file objects-inl.h.
References JSValue::cast(), String::cast(), and String::length().
|
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 | ||
) |
Definition at line 135 of file objects.cc.
References ASSERT, JSReceiver::cast(), JSReceiver::Lookup(), v8::internal::map, Context::native_context(), and v8::internal::NULL.
Referenced by Object::GetPropertyWithReceiver(), and v8::internal::RUNTIME_FUNCTION().
|
inline |
Definition at line 173 of file objects-inl.h.
References ASSERT, and v8::internal::kSmiTagMask.
Referenced by IncrementalMarkingMarkingVisitor::INLINE().
|
inline |
Definition at line 1015 of file objects-inl.h.
References ASSERT.
Referenced by Object::AllocateNewStorageFor(), v8::internal::BUILTIN(), v8::internal::CheckArrayAbuse(), Object::GetHash(), Heap::GetNumberStringCache(), UnseededNumberDictionaryShape::HashForObject(), HeapNumber::HeapNumberPrint(), NumberDictionaryShape::IsMatch(), JSObject::JSObjectShortPrint(), Array::Length(), v8::internal::NumberToInt32(), v8::internal::NumberToUint32(), StringStream::PrintMentionedObjectCache(), v8::internal::RUNTIME_FUNCTION(), Object::SameValue(), SeededNumberDictionaryShape::SeededHashForObject(), DictionaryElementsAccessor::SetLengthWithoutNormalize(), Heap::SetNumberStringCache(), JSObject::SlowReverseLookup(), and TEST().
|
inline |
Definition at line 1489 of file objects.h.
References ASSERT, Representation::Double(), Object::FORCE_TAGGED, Representation::HeapObject(), Representation::None(), Representation::Smi(), and Representation::Tagged().
bool SameValue | ( | Object * | other | ) |
Definition at line 1102 of file objects.cc.
References String::cast(), v8::internal::equal, String::Equals(), std::isnan(), and Object::Number().
Referenced by ObjectHashTableShape< entrysize >::IsMatch(), WeakHashTableShape< entrysize >::IsMatch(), and v8::internal::RUNTIME_FUNCTION().
void ShortPrint | ( | FILE * | out = stdout | ) |
Definition at line 1123 of file objects.cc.
References StringStream::OutputToFile().
Referenced by SharedFunctionInfo::DisableOptimization(), CodeFlusher::EvictCandidate(), SharedFunctionInfo::EvictFromOptimizedCodeMap(), CodeFlusher::EvictOptimizedCodeMap(), HeapObject::HeapObjectShortPrint(), JSObject::JSObjectShortPrint(), StringStream::PrintMentionedObjectCache(), JavaScriptFrame::PrintTop(), StringStream::PrintUsingMap(), v8::internal::RUNTIME_FUNCTION(), and SharedFunctionInfo::SearchOptimizedCodeMap().
void ShortPrint | ( | StringStream * | accumulator | ) |
Definition at line 1131 of file objects.cc.
References Smi::cast(), Failure::cast(), HeapObject::cast(), Failure::FailurePrint(), HeapObject::HeapObjectShortPrint(), and Smi::SmiPrint().
|
inline |
Definition at line 2072 of file objects-inl.h.
References Smi::cast(), HeapNumber::cast(), Smi::value(), and HeapNumber::value().
Referenced by JSArray::JSArrayUpdateLengthFromIndex(), v8::internal::RUNTIME_FUNCTION(), JSObject::SetFastElement(), ElementsAccessorBase< ElementsAccessorSubclass, ElementsTraitsParam >::SetLengthImpl(), JSObject::ShouldConvertToFastElements(), THREADED_TEST(), and JSObject::TransitionElementsKind().
bool ToInt32 | ( | int32_t * | value | ) |
Definition at line 184 of file objects.cc.
References Smi::cast(), HeapNumber::cast(), v8::internal::FastD2I(), v8::internal::FastI2D(), Smi::value(), and HeapNumber::value().
MaybeObject * ToObject | ( | Isolate * | isolate | ) |
Definition at line 91 of file objects.cc.
References Isolate::context(), Failure::InternalError(), and Context::native_context().
MaybeObject * ToObject | ( | Context * | native_context | ) |
Definition at line 76 of file objects.cc.
References ASSERT.
Definition at line 1028 of file objects-inl.h.
References Handle< T >::cast(), v8::internal::FastD2I(), v8::internal::FastI2D(), Smi::FromInt(), v8::internal::handle(), and Smi::IsValid().
|
inline |
Definition at line 1042 of file objects-inl.h.
References HeapNumber::cast(), Failure::Exception(), v8::internal::FastD2I(), v8::internal::FastI2D(), Smi::FromInt(), Smi::IsValid(), and HeapNumber::value().
Referenced by ElementsAccessorBase< ElementsAccessorSubclass, ElementsTraitsParam >::SetLengthImpl().
bool ToUint32 | ( | uint32_t * | value | ) |
Definition at line 200 of file objects.cc.
References Smi::cast(), HeapNumber::cast(), v8::internal::FastD2UI(), v8::internal::FastUI2D(), Smi::value(), and HeapNumber::value().
|
inline |
Definition at line 2104 of file objects-inl.h.
References FATAL.
|
static |
Definition at line 1644 of file objects.h.
Referenced by ByteArray::LengthFor(), ByteArray::Size(), FixedArray::SizeFor(), FixedDoubleArray::SizeFor(), and ByteArray::SizeFor().