V8 Project
|
#include <objects.h>
Public Types | |
enum | StoreFromKeyed { MAY_BE_STORE_FROM_KEYED , CERTAINLY_NOT_STORE_FROM_KEYED } |
enum | StorePropertyMode { NORMAL_PROPERTY , SUPER_PROPERTY } |
Public Member Functions | |
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< HeapType > | OptimalType (Isolate *isolate, Representation representation) |
bool | HasValidElements () |
bool | HasSpecificClassOf (String *name) |
bool | BooleanValue () |
Object * | GetHash () |
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 | kHeaderSize = 0 |
Private Member Functions | |
Map * | GetRootMap (Isolate *isolate) |
DISALLOW_IMPLICIT_CONSTRUCTORS (Object) | |
Friends | |
class | LookupIterator |
class | PrototypeIterator |
Enumerator | |
---|---|
MAY_BE_STORE_FROM_KEYED | |
CERTAINLY_NOT_STORE_FROM_KEYED |
Definition at line 1005 of file objects.h.
|
static |
Definition at line 2968 of file objects.cc.
References v8::internal::JSObject::AddSlowProperty(), arraysize, DCHECK, v8::internal::JSObject::EnqueueChangeRecord(), v8::internal::HandleVector(), v8::internal::SLOPPY, THROW_NEW_ERROR, and WriteToReadOnlyProperty().
Referenced by v8::internal::JSObject::AddProperty(), and SetProperty().
bool v8::internal::Object::BooleanValue | ( | ) |
Definition at line 87 of file objects.cc.
|
private |
|
inline |
Definition at line 1068 of file objects.h.
References v8::internal::Representation::IsDouble(), v8::internal::Representation::IsHeapObject(), v8::internal::Representation::IsNone(), and v8::internal::Representation::IsSmi().
Referenced by v8::internal::DescriptorArray::CanHoldValue().
|
inlinestatic |
Definition at line 1113 of file objects-inl.h.
References DCHECK, and GetElementWithReceiver().
Referenced by v8::internal::CheckActivation(), v8::internal::JSObject::DefineAccessor(), v8::internal::JSObject::DeleteElement(), v8::internal::DropActivationsInActiveThread(), v8::internal::FunctionInfoListener::FunctionCode(), v8::internal::FunctionInfoListener::FunctionDone(), v8::internal::FunctionInfoListener::FunctionInfo(), v8::Object::Get(), v8::internal::Runtime::GetElementOrCharAt(), v8::internal::JSArrayBasedStruct< S >::GetField(), v8::StackTrace::GetFrame(), v8::internal::GetOldValue(), GetPropertyOrElement(), v8::internal::SharedInfoWrapper::IsInstance(), v8::internal::IterateElements(), v8::internal::RUNTIME_FUNCTION(), v8::internal::JSObject::SetElement(), v8::internal::TranslatePosition(), and v8::internal::LiveEdit::WrapSharedFunctionInfos().
|
static |
Definition at line 747 of file objects.cc.
References v8::ACCESS_GET, ASSIGN_RETURN_ON_EXCEPTION, v8::internal::Handle< T >::cast(), v8::internal::Isolate::factory(), v8::internal::PrototypeIterator::GetCurrent(), v8::internal::JSProxy::GetElementWithHandler(), v8::internal::JSObject::GetElementWithInterceptor(), v8::internal::Isolate::heap(), v8::internal::PrototypeIterator::IsAtEnd(), v8::internal::Isolate::MayIndexedAccess(), v8::internal::Isolate::ReportFailedAccessCheck(), RETURN_EXCEPTION_IF_SCHEDULED_EXCEPTION, v8::internal::PrototypeIterator::START_AT_PROTOTYPE, v8::internal::PrototypeIterator::START_AT_RECEIVER, and UNREACHABLE.
Referenced by GetElement(), and v8::internal::JSObject::GetElementWithInterceptor().
Object * v8::internal::Object::GetHash | ( | ) |
Definition at line 835 of file objects.cc.
References v8::internal::ComputeLongHash(), DCHECK, v8::internal::double_to_uint64(), v8::internal::Smi::FromInt(), v8::internal::Smi::kMaxValue, and Number().
Referenced by v8::internal::ObjectHashTableShape::HashForObject(), and v8::internal::OrderedHashTable< Derived, Iterator, entrysize >::Rehash().
|
static |
Definition at line 856 of file objects.cc.
References v8::internal::Handle< T >::cast(), DCHECK, and v8::internal::JSReceiver::GetOrCreateIdentityHash().
Referenced by v8::internal::OrderedHashSet::Add(), v8::internal::ObjectHashTable::Put(), and v8::internal::OrderedHashMap::Put().
|
inlinestatic |
Definition at line 1106 of file objects-inl.h.
References GetProperty(), LookupIterator, and name.
|
inlinestatic |
Definition at line 1133 of file objects-inl.h.
References DCHECK, v8::internal::Isolate::factory(), GetProperty(), v8::internal::Handle< T >::is_null(), and name.
|
static |
Definition at line 109 of file objects.cc.
References v8::ACCESS_GET, v8::internal::ACCESSOR, GetPropertyWithAccessor(), v8::internal::JSObject::GetPropertyWithFailedAccessCheck(), v8::internal::JSProxy::GetPropertyWithHandler(), v8::internal::JSObject::GetPropertyWithInterceptor(), v8::internal::MaybeHandle< T >::is_null(), and UNREACHABLE.
Referenced by v8::internal::CallJsBuiltin(), v8::CallV8HeapFunction(), v8::internal::Isolate::CaptureSimpleStackTrace(), v8::internal::Debug::CheckBreakPoint(), v8::CheckConstructor(), v8::internal::CollectElementIndices(), v8::internal::JSObject::DefineAccessor(), v8::internal::Isolate::DoThrow(), v8::internal::anonymous_namespace{i18n.cc}::ExtractBooleanSetting(), v8::internal::anonymous_namespace{i18n.cc}::ExtractIntegerSetting(), v8::internal::anonymous_namespace{i18n.cc}::ExtractStringSetting(), v8::getBoolProperty(), v8::getIntProperty(), v8::internal::MessageImpl::GetJSON(), v8::internal::MessageHandler::GetMessage(), v8::Debug::GetMirror(), v8::internal::Script::GetNameOrSourceURL(), v8::internal::Runtime::GetObjectProperty(), v8::internal::GetOwnProperty(), GetProperty(), v8::GetPropertyByLookup(), GetPropertyOrElement(), v8::getStringProperty(), v8::internal::AstValue::Internalize(), v8::internal::Isolate::IsErrorObject(), v8::internal::LoadIC::Load(), v8::internal::LoadLookupSlotHelper(), v8::internal::Logger::LogRegExpSource(), v8::internal::Debug::MakeJSObject(), v8::internal::Debug::NotifyMessageHandler(), v8::internal::Debug::OnAfterCompile(), v8::internal::RUNTIME_FUNCTION(), v8::internal::JSProxy::SetPropertyViaPrototypesWithHandler(), v8::internal::Isolate::StackOverflow(), v8::TryCatch::StackTrace(), v8::internal::JSObjectWalkVisitor< ContextObject >::StructureWalk(), v8::internal::compiler::TEST_F(), and v8::internal::UnscopableLookup().
|
inlinestatic |
Definition at line 1124 of file objects-inl.h.
References GetElement(), GetProperty(), and name.
Referenced by v8::internal::JSProxy::CallTrap(), v8::Private::ForApi(), v8::internal::MaterializeClosure(), v8::internal::MaterializeLocalContext(), v8::internal::RUNTIME_FUNCTION(), v8::SymbolFor(), and v8::internal::UpdateStackLocalsFromMaterializedObject().
|
static |
Definition at line 411 of file objects.cc.
References arraysize, v8::internal::Handle< T >::cast(), DCHECK, v8::internal::Isolate::factory(), v8::internal::GetDeclaredAccessorProperty(), GetPropertyWithDefinedGetter(), v8::internal::handle(), v8::internal::HandleVector(), v8::Handle< T >::IsEmpty(), LOG, name, NULL, v8::Utils::OpenHandle(), RETURN_EXCEPTION_IF_SCHEDULED_EXCEPTION, THROW_NEW_ERROR, and v8::Utils::ToLocal().
Referenced by v8::internal::DebugGetProperty(), GetProperty(), and v8::internal::JSObject::GetPropertyWithFailedAccessCheck().
|
static |
Definition at line 536 of file objects.cc.
References v8::internal::Isolate::debug(), v8::internal::Debug::HandleStepIn(), NULL, and v8::internal::Debug::StepInActive().
Referenced by v8::internal::JSObject::GetElementWithCallback(), and GetPropertyWithAccessor().
Definition at line 803 of file objects.cc.
References v8::internal::Isolate::context(), v8::internal::Isolate::heap(), v8::internal::HeapObject::map(), and v8::internal::Context::native_context().
Referenced by v8::internal::PrototypeIterator::AdvanceIgnoringProxies().
Definition at line 1101 of file objects-inl.h.
References name.
|
inline |
Definition at line 270 of file objects-inl.h.
v8::internal::Object::INLINE | ( | bool IsAccessorInfo() const | ) |
v8::internal::Object::INLINE | ( | bool IsArgumentsMarker() const | ) |
v8::internal::Object::INLINE | ( | bool IsException() const | ) |
v8::internal::Object::INLINE | ( | bool IsExternal() const | ) |
v8::internal::Object::INLINE | ( | bool IsFalse() const | ) |
v8::internal::Object::INLINE | ( | bool IsFiller() const | ) |
v8::internal::Object::INLINE | ( | bool IsFixedArrayBase() const | ) |
v8::internal::Object::INLINE | ( | bool IsMinusZero() const | ) |
v8::internal::Object::INLINE | ( | bool IsNameDictionary() const | ) |
v8::internal::Object::INLINE | ( | bool IsNaN() const | ) |
v8::internal::Object::INLINE | ( | bool IsNull() const | ) |
v8::internal::Object::INLINE | ( | bool IsOrderedHashMap() const | ) |
v8::internal::Object::INLINE | ( | bool IsOrderedHashSet() const | ) |
v8::internal::Object::INLINE | ( | bool IsSeededNumberDictionary() const | ) |
v8::internal::Object::INLINE | ( | bool | IsSpecFunction() | ) | const |
v8::internal::Object::INLINE | ( | bool | IsSpecObject() | ) | const |
v8::internal::Object::INLINE | ( | bool IsStruct() const | ) |
v8::internal::Object::INLINE | ( | bool | IsTemplateInfo() | ) | const |
v8::internal::Object::INLINE | ( | bool IsTheHole() const | ) |
v8::internal::Object::INLINE | ( | bool IsTrue() const | ) |
v8::internal::Object::INLINE | ( | bool IsUndefined() const | ) |
v8::internal::Object::INLINE | ( | bool IsUninitialized() const | ) |
v8::internal::Object::INLINE | ( | bool IsUnseededNumberDictionary() const | ) |
bool v8::internal::Object::IsCallable | ( | ) | const |
Definition at line 98 of file objects.cc.
|
inline |
Definition at line 2135 of file objects-inl.h.
References v8::internal::String::length().
|
inlinestatic |
Definition at line 277 of file objects-inl.h.
References v8::internal::Isolate::factory(), v8::internal::Smi::FromInt(), v8::internal::handle(), v8::internal::Representation::IsDouble(), v8::internal::Representation::IsSmi(), and v8::internal::MUTABLE.
Referenced by v8::internal::JSObjectWalkVisitor< ContextObject >::StructureWalk().
|
inline |
Definition at line 1062 of file objects-inl.h.
References DCHECK, and v8::internal::HeapNumber::value().
Referenced by v8::internal::BUILTIN(), v8::internal::CheckArrayAbuse(), v8::internal::CopyDictionaryToDoubleElements(), v8::internal::CopyObjectToDoubleElements(), v8::internal::JSDate::DoGetField(), v8::internal::V8HeapExplorer::ExtractElementReferences(), GetHash(), v8::internal::UnseededNumberDictionaryShape::HashForObject(), v8::internal::TypeImpl< Config >::IsInteger(), v8::internal::NumberDictionaryShape::IsMatch(), v8::Array::Length(), v8::internal::TypeImpl< Config >::BitsetType::Lub(), v8::internal::NumberToInt32(), v8::internal::NumberToUint32(), v8::internal::RUNTIME_FUNCTION(), SameValue(), SameValueZero(), v8::internal::SeededNumberDictionaryShape::SeededHashForObject(), v8::internal::DictionaryElementsAccessor::SetLengthWithoutNormalize(), v8::internal::JSObject::SlowReverseLookup(), and v8::internal::JSObject::WriteToField().
|
inline |
Definition at line 1052 of file objects.h.
References DCHECK, v8::internal::Representation::Double(), v8::internal::Representation::HeapObject(), v8::internal::Representation::None(), v8::internal::Representation::Smi(), and v8::internal::Representation::Tagged().
Handle< HeapType > v8::internal::Object::OptimalType | ( | Isolate * | isolate, |
Representation | representation | ||
) |
Definition at line 47 of file objects.cc.
References v8::internal::TypeImpl< Config >::Class(), v8::internal::FIRST_NONCALLABLE_SPEC_OBJECT_TYPE, v8::internal::Representation::IsHeapObject(), v8::internal::Representation::IsNone(), v8::internal::LAST_NONCALLABLE_SPEC_OBJECT_TYPE, map, and v8::None.
Definition at line 865 of file objects.cc.
References v8::internal::equal, and Number().
Definition at line 886 of file objects.cc.
References Number().
Referenced by v8::internal::OrderedHashTable< Derived, Iterator, entrysize >::FindEntry().
|
static |
Definition at line 2933 of file objects.cc.
References v8::internal::Handle< T >::cast(), DCHECK, and v8::internal::JSObject::EnqueueChangeRecord().
Referenced by v8::internal::OrderedHashTable< OrderedHashSet, JSSetIterator, 1 >::Rehash(), and SetProperty().
|
static |
Definition at line 2798 of file objects.cc.
References LookupIterator, and name.
Referenced by v8::internal::Isolate::CaptureAndSetDetailedStackTrace(), v8::internal::Isolate::CaptureAndSetSimpleStackTrace(), v8::internal::Debug::ClearMirrorCache(), v8::Private::ForApi(), v8::internal::LiveEdit::GatherCompileInfo(), v8::internal::Isolate::GetSymbolRegistry(), v8::internal::Debug::Load(), v8::internal::RUNTIME_FUNCTION(), v8::internal::JSArray::SetElementsLength(), v8::internal::Runtime::SetObjectProperty(), v8::internal::anonymous_namespace{i18n.cc}::SetResolvedBreakIteratorSettings(), v8::internal::anonymous_namespace{i18n.cc}::SetResolvedCollatorSettings(), v8::internal::anonymous_namespace{i18n.cc}::SetResolvedDateSettings(), v8::internal::anonymous_namespace{i18n.cc}::SetResolvedNumberSettings(), v8::internal::StoreIC::Store(), v8::internal::StoreToSuper(), v8::internal::JSObjectWalkVisitor< ContextObject >::StructureWalk(), and v8::SymbolFor().
|
static |
Definition at line 2807 of file objects.cc.
References ABSENT, v8::ACCESS_SET, v8::internal::ACCESSOR, AddDataProperty(), v8::internal::JSObject::GetPropertyAttributesWithInterceptor(), v8::internal::HandleVector(), v8::Maybe< T >::has_value, v8::internal::MaybeHandle< T >::is_null(), NONE, READ_ONLY, SetDataProperty(), v8::internal::JSProxy::SetPropertyViaPrototypesWithHandler(), SetPropertyWithAccessor(), v8::internal::JSObject::SetPropertyWithFailedAccessCheck(), v8::internal::JSProxy::SetPropertyWithHandler(), v8::internal::JSObject::SetPropertyWithInterceptor(), v8::internal::STRICT, SUPER_PROPERTY, THROW_NEW_ERROR, UNREACHABLE, v8::Maybe< T >::value, and WriteToReadOnlyProperty().
|
static |
Definition at line 478 of file objects.cc.
References arraysize, DCHECK, v8::internal::HandleVector(), v8::internal::AccessorInfo::IsCompatibleReceiver(), LOG, name, NULL, RETURN_EXCEPTION_IF_SCHEDULED_EXCEPTION, SetPropertyWithDefinedSetter(), v8::internal::SLOPPY, THROW_NEW_ERROR, v8::Utils::ToLocal(), and UNREACHABLE.
Referenced by SetProperty(), and v8::internal::JSObject::SetPropertyWithFailedAccessCheck().
|
static |
Definition at line 552 of file objects.cc.
References arraysize, v8::internal::Isolate::debug(), v8::internal::Debug::HandleStepIn(), RETURN_ON_EXCEPTION, and v8::internal::Debug::StepInActive().
Referenced by v8::internal::Dictionary< UnseededNumberDictionary, UnseededNumberDictionaryShape, uint32_t >::DeleteProperty(), v8::internal::JSObject::SetElementWithCallback(), and SetPropertyWithAccessor().
void v8::internal::Object::ShortPrint | ( | FILE * | out = stdout | ) |
Definition at line 905 of file objects.cc.
Referenced by v8::internal::SharedFunctionInfo::DisableOptimization(), v8::internal::Deoptimizer::DoTranslateCommand(), v8::internal::Deoptimizer::DoTranslateObject(), v8::internal::CodeFlusher::EvictCandidate(), v8::internal::SharedFunctionInfo::EvictFromOptimizedCodeMap(), v8::internal::CodeFlusher::EvictOptimizedCodeMap(), v8::internal::JSFunction::MarkForConcurrentOptimization(), v8::internal::JSFunction::MarkInOptimizationQueue(), v8::internal::JavaScriptFrame::PrintTop(), v8::internal::PrintTransition(), v8::internal::CodeFlusher::ProcessJSFunctionCandidates(), v8::internal::CodeFlusher::ProcessSharedFunctionInfoCandidates(), v8::internal::SharedFunctionInfo::SearchOptimizedCodeMap(), and v8::internal::CodeSerializer::SerializeHeapObject().
void v8::internal::Object::ShortPrint | ( | StringStream * | accumulator | ) |
Definition at line 911 of file objects.cc.
References v8::internal::OStringStream::c_str().
Definition at line 2116 of file objects-inl.h.
Referenced by v8::internal::ComputeObjectLiteralMap(), v8::internal::JSObject::SetDictionaryElement(), v8::internal::JSObject::SetFastDoubleElement(), v8::internal::JSObject::SetFastElement(), v8::internal::JSObject::ShouldConvertToFastElements(), and v8::internal::JSObject::TransitionElementsKind().
bool v8::internal::Object::ToInt32 | ( | int32_t * | value | ) |
Definition at line 175 of file objects.cc.
References v8::internal::FastD2I(), and v8::internal::FastI2D().
|
inlinestatic |
Definition at line 1094 of file objects-inl.h.
References v8::internal::Isolate::context(), v8::internal::handle(), and v8::internal::Context::native_context().
Referenced by v8::BooleanObject::New(), v8::StringObject::New(), v8::NumberObject::New(), v8::SymbolObject::New(), and v8::internal::RUNTIME_FUNCTION().
|
static |
Definition at line 65 of file objects.cc.
References v8::internal::Handle< T >::cast(), v8::internal::Isolate::factory(), and v8::internal::handle().
|
inlinestatic |
Definition at line 1081 of file objects-inl.h.
References v8::internal::Handle< T >::cast(), v8::internal::FastD2I(), v8::internal::FastI2D(), v8::internal::Smi::FromInt(), v8::internal::handle(), and v8::internal::Smi::IsValid().
Referenced by v8::internal::KeyedStoreIC::GetStoreMode(), v8::internal::KeyedLoadIC::Load(), v8::internal::ElementsAccessorBase< ElementsAccessorSubclass, ElementsTraitsParam >::SetLengthImpl(), and v8::internal::KeyedStoreIC::Store().
Definition at line 191 of file objects.cc.
References v8::internal::FastD2UI(), and v8::internal::FastUI2D().
|
inline |
Definition at line 2148 of file objects-inl.h.
References FATAL.
Referenced by v8::internal::HandleApiCallAsFunctionOrConstructor(), and v8::internal::HandleApiCallHelper().
|
inlinestatic |
Definition at line 296 of file objects-inl.h.
References DCHECK, v8::internal::Isolate::factory(), and v8::internal::Representation::IsDouble().
Referenced by v8::internal::JSObject::FastPropertyAt(), and v8::internal::RUNTIME_FUNCTION().
|
static |
Definition at line 2920 of file objects.cc.
References arraysize, v8::internal::HandleVector(), v8::internal::STRICT, and THROW_NEW_ERROR.
Referenced by AddDataProperty(), and SetProperty().
|
friend |
Definition at line 1226 of file objects.h.
Referenced by v8::internal::JSObject::AddProperty(), v8::internal::JSObject::DefineAccessor(), v8::internal::JSObject::DeleteProperty(), v8::internal::JSObject::GetAccessor(), v8::internal::JSObject::GetDataProperty(), v8::internal::JSObject::GetHiddenPropertiesHashTable(), v8::internal::JSReceiver::GetOwnPropertyAttributes(), GetProperty(), v8::internal::JSReceiver::GetPropertyAttributes(), v8::internal::JSObject::HasHiddenProperties(), v8::internal::JSObject::HasRealNamedCallbackProperty(), v8::internal::JSObject::HasRealNamedProperty(), v8::internal::Context::Lookup(), v8::internal::JSObject::SetAccessor(), v8::internal::JSObject::SetOwnPropertyIgnoreAttributes(), SetProperty(), and v8::internal::JSArray::WouldChangeReadOnlyLength().
|
friend |
|
static |
Definition at line 1215 of file objects.h.
Referenced by v8::internal::ByteArray::LengthFor(), v8::internal::ByteArray::Size(), v8::internal::Code::SizeFor(), v8::internal::FixedArray::SizeFor(), v8::internal::FixedDoubleArray::SizeFor(), v8::internal::ByteArray::SizeFor(), v8::internal::SeqOneByteString::SizeFor(), and v8::internal::SeqTwoByteString::SizeFor().