Flutter Engine
The Flutter Engine
Public Member Functions | Static Public Member Functions | Static Protected Attributes | Friends | List of all members
dart::LinkedHashBase Class Reference

#include <object.h>

Inheritance diagram for dart::LinkedHashBase:
dart::Instance dart::Object dart::Map dart::Set

Public Member Functions

bool IsImmutable () const
 
virtual TypeArgumentsPtr GetTypeArguments () const
 
virtual void SetTypeArguments (const TypeArguments &value) const
 
TypedDataPtr index () const
 
void set_index (const TypedData &value) const
 
ArrayPtr data () const
 
void set_data (const Array &value) const
 
SmiPtr hash_mask () const
 
void set_hash_mask (intptr_t value) const
 
SmiPtr used_data () const
 
void set_used_data (intptr_t value) const
 
SmiPtr deleted_keys () const
 
void set_deleted_keys (intptr_t value) const
 
intptr_t Length () const
 
void ComputeAndSetHashMask () const
 
virtual bool CanonicalizeEquals (const Instance &other) const
 
virtual uint32_t CanonicalizeHash () const
 
virtual void CanonicalizeFieldsLocked (Thread *thread) const
 
- Public Member Functions inherited from dart::Instance
virtual bool OperatorEquals (const Instance &other) const
 
bool IsIdenticalTo (const Instance &other) const
 
virtual bool CanonicalizeEquals (const Instance &other) const
 
virtual uint32_t CanonicalizeHash () const
 
intptr_t SizeFromClass () const
 
InstancePtr Canonicalize (Thread *thread) const
 
virtual InstancePtr CanonicalizeLocked (Thread *thread) const
 
virtual void CanonicalizeFieldsLocked (Thread *thread) const
 
InstancePtr CopyShallowToOldSpace (Thread *thread) const
 
ObjectPtr GetField (const Field &field) const
 
void SetField (const Field &field, const Object &value) const
 
AbstractTypePtr GetType (Heap::Space space) const
 
virtual TypeArgumentsPtr GetTypeArguments () const
 
virtual void SetTypeArguments (const TypeArguments &value) const
 
bool IsInstanceOf (const AbstractType &other, const TypeArguments &other_instantiator_type_arguments, const TypeArguments &other_function_type_arguments) const
 
bool IsAssignableTo (const AbstractType &other, const TypeArguments &other_instantiator_type_arguments, const TypeArguments &other_function_type_arguments) const
 
bool IsValidNativeIndex (int index) const
 
intptr_t * NativeFieldsDataAddr () const
 
intptr_t GetNativeField (int index) const
 
void GetNativeFields (uint16_t num_fields, intptr_t *field_values) const
 
void SetNativeFields (uint16_t num_fields, const intptr_t *field_values) const
 
uint16_t NumNativeFields () const
 
void SetNativeField (int index, intptr_t value) const
 
bool IsCallable (Function *function) const
 
ObjectPtr Invoke (const String &selector, const Array &arguments, const Array &argument_names, bool respect_reflectable=true, bool check_is_entrypoint=false) const
 
ObjectPtr InvokeGetter (const String &selector, bool respect_reflectable=true, bool check_is_entrypoint=false) const
 
ObjectPtr InvokeSetter (const String &selector, const Instance &argument, bool respect_reflectable=true, bool check_is_entrypoint=false) const
 
ObjectPtr EvaluateCompiledExpression (const Class &klass, const ExternalTypedData &kernel_buffer, const Array &type_definitions, const Array &arguments, const TypeArguments &type_arguments) const
 
virtual ObjectPtr HashCode () const
 
IntegerPtr IdentityHashCode (Thread *thread) const
 
virtual bool IsPointer () const
 
- Public Member Functions inherited from dart::Object
virtual ~Object ()
 
ObjectPtr ptr () const
 
void operator= (ObjectPtr value)
 
bool IsCanonical () const
 
void SetCanonical () const
 
void ClearCanonical () const
 
bool IsImmutable () const
 
void SetImmutable () const
 
void ClearImmutable () const
 
intptr_t GetClassId () const
 
ClassPtr clazz () const
 
 CLASS_LIST_FOR_HANDLES (DEFINE_CLASS_TESTER)
 
bool IsNull () const
 
virtual const char * ToCString () const
 
void PrintJSON (JSONStream *stream, bool ref=true) const
 
virtual void PrintJSONImpl (JSONStream *stream, bool ref) const
 
void PrintImplementationFields (JSONStream *stream) const
 
virtual void PrintImplementationFieldsImpl (const JSONArray &jsarr_fields) const
 
virtual const char * JSONType () const
 
virtual StringPtr DictionaryName () const
 
bool IsNew () const
 
bool IsOld () const
 
bool InVMIsolateHeap () const
 
void Print () const
 

Static Public Member Functions

static intptr_t IndexSizeToHashMask (intptr_t index_size)
 
static intptr_t InstanceSize ()
 
static intptr_t type_arguments_offset ()
 
static intptr_t index_offset ()
 
static intptr_t data_offset ()
 
static intptr_t hash_mask_offset ()
 
static intptr_t used_data_offset ()
 
static intptr_t deleted_keys_offset ()
 
static const LinkedHashBaseCast (const Object &obj)
 
- Static Public Member Functions inherited from dart::Instance
static bool NullIsAssignableTo (const AbstractType &other)
 
static bool NullIsAssignableTo (const AbstractType &other, const TypeArguments &other_instantiator_type_arguments, const TypeArguments &other_function_type_arguments)
 
static ObjectPtr EvaluateCompiledExpression (Thread *thread, const Object &receiver, const Library &library, const Class &klass, const ExternalTypedData &kernel_buffer, const Array &type_definitions, const Array &param_values, const TypeArguments &type_param_values)
 
static intptr_t UnroundedSize ()
 
static intptr_t InstanceSize ()
 
static InstancePtr New (const Class &cls, Heap::Space space=Heap::kNew)
 
static InstancePtr NewAlreadyFinalized (const Class &cls, Heap::Space space=Heap::kNew)
 
static intptr_t DataOffsetFor (intptr_t cid)
 
static intptr_t ElementSizeFor (intptr_t cid)
 
static intptr_t NextFieldOffset ()
 
static intptr_t NativeFieldsOffset ()
 
- Static Public Member Functions inherited from dart::Object
static ObjectPtr RawCast (ObjectPtr obj)
 
static constexpr bool ContainsCompressedPointers ()
 
static intptr_t tags_offset ()
 
static ObjectHandle ()
 
static ObjectHandle (Zone *zone)
 
static ObjectHandle (ObjectPtr ptr)
 
static ObjectHandle (Zone *zone, ObjectPtr ptr)
 
static ObjectZoneHandle ()
 
static ObjectZoneHandle (Zone *zone)
 
static ObjectZoneHandle (ObjectPtr ptr)
 
static ObjectZoneHandle (Zone *zone, ObjectPtr ptr)
 
static ObjectReadOnlyHandle ()
 
static ObjectPtr null ()
 
static void set_vm_isolate_snapshot_object_table (const Array &table)
 
static ClassPtr class_class ()
 
static ClassPtr dynamic_class ()
 
static ClassPtr void_class ()
 
static ClassPtr type_parameters_class ()
 
static ClassPtr type_arguments_class ()
 
static ClassPtr patch_class_class ()
 
static ClassPtr function_class ()
 
static ClassPtr closure_data_class ()
 
static ClassPtr ffi_trampoline_data_class ()
 
static ClassPtr field_class ()
 
static ClassPtr script_class ()
 
static ClassPtr library_class ()
 
static ClassPtr namespace_class ()
 
static ClassPtr kernel_program_info_class ()
 
static ClassPtr code_class ()
 
static ClassPtr instructions_class ()
 
static ClassPtr instructions_section_class ()
 
static ClassPtr instructions_table_class ()
 
static ClassPtr object_pool_class ()
 
static ClassPtr pc_descriptors_class ()
 
static ClassPtr code_source_map_class ()
 
static ClassPtr compressed_stackmaps_class ()
 
static ClassPtr var_descriptors_class ()
 
static ClassPtr exception_handlers_class ()
 
static ClassPtr context_class ()
 
static ClassPtr context_scope_class ()
 
static ClassPtr sentinel_class ()
 
static ClassPtr api_error_class ()
 
static ClassPtr language_error_class ()
 
static ClassPtr unhandled_exception_class ()
 
static ClassPtr unwind_error_class ()
 
static ClassPtr singletargetcache_class ()
 
static ClassPtr unlinkedcall_class ()
 
static ClassPtr monomorphicsmiablecall_class ()
 
static ClassPtr icdata_class ()
 
static ClassPtr megamorphic_cache_class ()
 
static ClassPtr subtypetestcache_class ()
 
static ClassPtr loadingunit_class ()
 
static ClassPtr weak_serialization_reference_class ()
 
static ClassPtr weak_array_class ()
 
static void InitNullAndBool (IsolateGroup *isolate_group)
 
static void Init (IsolateGroup *isolate_group)
 
static void InitVtables ()
 
static void FinishInit (IsolateGroup *isolate_group)
 
static void FinalizeVMIsolate (IsolateGroup *isolate_group)
 
static void FinalizeReadOnlyObject (ObjectPtr object)
 
static void Cleanup ()
 
static ErrorPtr Init (IsolateGroup *isolate_group, const uint8_t *kernel_buffer, intptr_t kernel_buffer_size)
 
static void MakeUnusedSpaceTraversable (const Object &obj, intptr_t original_size, intptr_t used_size)
 
static intptr_t InstanceSize ()
 
template<class FakeObject >
static void VerifyBuiltinVtable (intptr_t cid)
 
static void VerifyBuiltinVtables ()
 
static bool ShouldHaveImmutabilityBitSet (classid_t class_id)
 

Static Protected Attributes

static constexpr intptr_t kInitialIndexBits = 2
 
static constexpr intptr_t kInitialIndexSize = 1 << (kInitialIndexBits + 1)
 

Friends

class Class
 
class ImmutableLinkedHashBase
 
class LinkedHashBaseDeserializationCluster
 

Additional Inherited Members

- Public Types inherited from dart::Object
enum  NameVisibility { kInternalName = 0 , kScrubbedName , kUserVisibleName }
 
enum class  NameDisambiguation { kYes , kNo }
 
using UntaggedObjectType = UntaggedObject
 
using ObjectPtrType = ObjectPtr
 
- Static Public Attributes inherited from dart::Object
static constexpr intptr_t kHashBits = 30
 
static const ClassId kClassId = kObjectCid
 
- Protected Member Functions inherited from dart::Instance
virtual void PrintSharedInstanceJSON (JSONObject *jsobj, bool ref, bool include_id=true) const
 
- Protected Member Functions inherited from dart::Object
 Object ()
 
uword raw_value () const
 
void setPtr (ObjectPtr value, intptr_t default_cid)
 
void CheckHandle () const
 
cpp_vtable vtable () const
 
void set_vtable (cpp_vtable value)
 
bool Contains (uword addr) const
 
template<typename type , std::memory_order order = std::memory_order_relaxed>
type LoadPointer (type const *addr) const
 
template<typename type , std::memory_order order = std::memory_order_relaxed>
void StorePointer (type const *addr, type value) const
 
template<typename type , typename compressed_type , std::memory_order order = std::memory_order_relaxed>
void StoreCompressedPointer (compressed_type const *addr, type value) const
 
template<typename type >
void StorePointerUnaligned (type const *addr, type value, Thread *thread) const
 
void StoreSmi (SmiPtr const *addr, SmiPtr value) const
 
template<typename FieldType >
void StoreSimd128 (const FieldType *addr, simd128_value_t value) const
 
template<typename FieldType >
FieldType LoadNonPointer (const FieldType *addr) const
 
template<typename FieldType , std::memory_order order>
FieldType LoadNonPointer (const FieldType *addr) const
 
template<typename FieldType , typename ValueType >
void StoreNonPointer (const FieldType *addr, ValueType value) const
 
template<typename FieldType , typename ValueType , std::memory_order order>
void StoreNonPointer (const FieldType *addr, ValueType value) const
 
template<typename FieldType >
FieldType * UnsafeMutableNonPointer (const FieldType *addr) const
 
 CLASS_LIST (STORE_NON_POINTER_ILLEGAL_TYPE)
 
void UnimplementedMethod () const
 
void AddCommonObjectProperties (JSONObject *jsobj, const char *protocol_type, bool ref) const
 
- Static Protected Member Functions inherited from dart::Object
static DART_NOINLINE ObjectHandleImpl (Zone *zone, ObjectPtr ptr, intptr_t default_cid)
 
static DART_NOINLINE ObjectZoneHandleImpl (Zone *zone, ObjectPtr ptr, intptr_t default_cid)
 
static DART_NOINLINE ObjectReadOnlyHandleImpl (intptr_t cid)
 
static ObjectPtr Allocate (intptr_t cls_id, intptr_t size, Heap::Space space, bool compressed, uword ptr_field_start_offset, uword ptr_field_end_offset)
 
template<typename T >
static DART_FORCE_INLINE T::ObjectPtrType Allocate (Heap::Space space)
 
template<typename T >
static DART_FORCE_INLINE T::ObjectPtrType Allocate (Heap::Space space, intptr_t elements)
 
template<typename T >
static DART_FORCE_INLINE T::ObjectPtrType AllocateVariant (intptr_t class_id, Heap::Space space)
 
template<typename T >
static DART_FORCE_INLINE T::ObjectPtrType AllocateVariant (intptr_t class_id, Heap::Space space, intptr_t elements)
 
static constexpr intptr_t RoundedAllocationSize (intptr_t size)
 
static ObjectPtr Clone (const Object &orig, Heap::Space space, bool load_with_relaxed_atomics=false)
 
template<typename T >
static DART_FORCE_INLINE uword from_offset ()
 
template<typename T >
static DART_FORCE_INLINE uword to_offset (intptr_t length=0)
 
- Protected Attributes inherited from dart::Object
ObjectPtr ptr_
 

Detailed Description

Definition at line 11970 of file object.h.

Member Function Documentation

◆ CanonicalizeEquals()

bool dart::LinkedHashBase::CanonicalizeEquals ( const Instance other) const
virtual

Reimplemented from dart::Instance.

Definition at line 25150 of file object.cc.

25150 {
25152
25153 if (this->ptr() == other.ptr()) {
25154 // Both handles point to the same raw instance.
25155 return true;
25156 }
25157 if (other.IsNull()) {
25158 return false;
25159 }
25160 if (GetClassId() != other.GetClassId()) {
25161 return false;
25162 }
25163
25164 Zone* zone = Thread::Current()->zone();
25165
25166 const LinkedHashBase& other_map = LinkedHashBase::Cast(other);
25167
25168 if (!Smi::Handle(zone, used_data())
25169 .Equals(Smi::Handle(zone, other_map.used_data()))) {
25170 return false;
25171 }
25172
25173 // Immutable maps and sets do not have deleted keys.
25175
25176 if (!Array::Handle(zone, data())
25177 .CanonicalizeEquals(Array::Handle(zone, other_map.data()))) {
25178 return false;
25179 }
25180
25181 if (GetTypeArguments() == other.GetTypeArguments()) {
25182 return true;
25183 }
25184 const TypeArguments& type_args =
25186 const TypeArguments& other_type_args =
25187 TypeArguments::Handle(zone, other.GetTypeArguments());
25188 return type_args.Equals(other_type_args);
25189}
#define ASSERT_EQUAL(expected, actual)
Definition: assert.h:309
bool IsImmutable() const
Definition: object.h:12015
SmiPtr deleted_keys() const
Definition: object.h:12051
ArrayPtr data() const
Definition: object.h:12038
virtual bool CanonicalizeEquals(const Instance &other) const
Definition: object.cc:25150
static const LinkedHashBase & Cast(const Object &obj)
Definition: object.h:12010
SmiPtr used_data() const
Definition: object.h:12046
virtual TypeArgumentsPtr GetTypeArguments() const
Definition: object.h:12019
intptr_t GetClassId() const
Definition: object.h:341
static Object & Handle()
Definition: object.h:407
Zone * zone() const
Definition: thread_state.h:37
static Thread * Current()
Definition: thread.h:362
#define ASSERT(E)
static bool Equals(const Object &expected, const Object &actual)
intptr_t RawSmiValue(const SmiPtr raw_value)

◆ CanonicalizeFieldsLocked()

void dart::LinkedHashBase::CanonicalizeFieldsLocked ( Thread thread) const
virtual

Reimplemented from dart::Instance.

Definition at line 25215 of file object.cc.

25215 {
25217
25218 Zone* zone = thread->zone();
25219
25220 TypeArguments& type_args = TypeArguments::Handle(zone, GetTypeArguments());
25221 if (!type_args.IsNull()) {
25222 type_args = type_args.Canonicalize(thread);
25223 SetTypeArguments(type_args);
25224 }
25225
25226 auto& data_array = Array::Handle(zone, data());
25227 data_array.MakeImmutable();
25228 data_array ^= data_array.CanonicalizeLocked(thread);
25229 set_data(data_array);
25230
25231 // Ignoring index. It will be initially null, created on first use, and
25232 // possibly non-null here if we are rehashing.
25233}
void set_data(const Array &value) const
Definition: object.h:12039
virtual void SetTypeArguments(const TypeArguments &value) const
Definition: object.h:12022

◆ CanonicalizeHash()

uint32_t dart::LinkedHashBase::CanonicalizeHash ( ) const
virtual

Reimplemented from dart::Instance.

Definition at line 25191 of file object.cc.

25191 {
25193
25194 Thread* thread = Thread::Current();
25195 uint32_t hash = thread->heap()->GetCanonicalHash(ptr());
25196 if (hash != 0) {
25197 return hash;
25198 }
25199
25200 // Immutable maps and sets do not have deleted keys.
25202
25203 Zone* zone = thread->zone();
25204 auto& member = Instance::Handle(zone, GetTypeArguments());
25205 hash = member.CanonicalizeHash();
25206 member = data();
25207 hash = CombineHashes(hash, member.CanonicalizeHash());
25208 member = used_data();
25209 hash = CombineHashes(hash, member.CanonicalizeHash());
25211 thread->heap()->SetCanonicalHash(ptr(), hash);
25212 return hash;
25213}
static uint32_t hash(const SkShaderBase::GradientInfo &v)
friend class Thread
Definition: object.h:1025
static constexpr intptr_t kHashBits
Definition: object.h:323
uint32_t CombineHashes(uint32_t hash, uint32_t other_hash)
Definition: hash.h:12
uint32_t FinalizeHash(uint32_t hash, intptr_t hashbits=kBitsPerInt32)
Definition: hash.h:20

◆ Cast()

static const LinkedHashBase & dart::LinkedHashBase::Cast ( const Object obj)
inlinestatic

Definition at line 12010 of file object.h.

12010 {
12011 ASSERT(obj.IsMap() || obj.IsSet());
12012 return static_cast<const LinkedHashBase&>(obj);
12013 }

◆ ComputeAndSetHashMask()

void dart::LinkedHashBase::ComputeAndSetHashMask ( ) const

Definition at line 25133 of file object.cc.

25133 {
25136 Thread* const thread = Thread::Current();
25137 Zone* const zone = thread->zone();
25138
25139 const auto& data_array = Array::Handle(zone, data());
25140 const intptr_t data_length = Utils::RoundUpToPowerOfTwo(data_array.Length());
25141 const intptr_t index_size_mult = IsMap() ? 1 : 2;
25142 const intptr_t index_size = Utils::Maximum(LinkedHashBase::kInitialIndexSize,
25143 data_length * index_size_mult);
25144 ASSERT(Utils::IsPowerOfTwo(index_size));
25145
25146 const intptr_t hash_mask = IndexSizeToHashMask(index_size);
25148}
void set_hash_mask(intptr_t value) const
Definition: object.h:12042
static intptr_t IndexSizeToHashMask(intptr_t index_size)
Definition: object.h:11973
SmiPtr hash_mask() const
Definition: object.h:12041
static constexpr intptr_t kInitialIndexSize
Definition: object.h:12081
intptr_t Value() const
Definition: object.h:9990
static constexpr uintptr_t RoundUpToPowerOfTwo(uintptr_t x)
Definition: utils.h:135
static constexpr T Maximum(T x, T y)
Definition: utils.h:41
static constexpr bool IsPowerOfTwo(T x)
Definition: utils.h:76

◆ data()

ArrayPtr dart::LinkedHashBase::data ( ) const
inline

Definition at line 12038 of file object.h.

12038{ return untag()->data(); }

◆ data_offset()

static intptr_t dart::LinkedHashBase::data_offset ( )
inlinestatic

Definition at line 11994 of file object.h.

11994 {
11995 return OFFSET_OF(UntaggedLinkedHashBase, data_);
11996 }
#define OFFSET_OF(type, field)
Definition: globals.h:138

◆ deleted_keys()

SmiPtr dart::LinkedHashBase::deleted_keys ( ) const
inline

Definition at line 12051 of file object.h.

12051{ return untag()->deleted_keys(); }

◆ deleted_keys_offset()

static intptr_t dart::LinkedHashBase::deleted_keys_offset ( )
inlinestatic

Definition at line 12006 of file object.h.

12006 {
12007 return OFFSET_OF(UntaggedLinkedHashBase, deleted_keys_);
12008 }

◆ GetTypeArguments()

virtual TypeArgumentsPtr dart::LinkedHashBase::GetTypeArguments ( ) const
inlinevirtual

Reimplemented from dart::Instance.

Definition at line 12019 of file object.h.

12019 {
12020 return untag()->type_arguments();
12021 }

◆ hash_mask()

SmiPtr dart::LinkedHashBase::hash_mask ( ) const
inline

Definition at line 12041 of file object.h.

12041{ return untag()->hash_mask(); }

◆ hash_mask_offset()

static intptr_t dart::LinkedHashBase::hash_mask_offset ( )
inlinestatic

Definition at line 11998 of file object.h.

11998 {
11999 return OFFSET_OF(UntaggedLinkedHashBase, hash_mask_);
12000 }

◆ index()

TypedDataPtr dart::LinkedHashBase::index ( ) const
inline

Definition at line 12032 of file object.h.

12032{ return untag()->index(); }

◆ index_offset()

static intptr_t dart::LinkedHashBase::index_offset ( )
inlinestatic

Definition at line 11990 of file object.h.

11990 {
11991 return OFFSET_OF(UntaggedLinkedHashBase, index_);
11992 }

◆ IndexSizeToHashMask()

static intptr_t dart::LinkedHashBase::IndexSizeToHashMask ( intptr_t  index_size)
inlinestatic

Definition at line 11973 of file object.h.

11973 {
11974 ASSERT(index_size >= kInitialIndexSize);
11975 intptr_t index_bits = Utils::BitLength(index_size) - 2;
11976#if defined(HAS_SMI_63_BITS)
11977 return (1 << (32 - index_bits)) - 1;
11978#else
11979 return (1 << (Object::kHashBits - index_bits)) - 1;
11980#endif
11981 }
static constexpr size_t BitLength(int64_t value)
Definition: utils.h:213

◆ InstanceSize()

static intptr_t dart::LinkedHashBase::InstanceSize ( )
inlinestatic

Definition at line 11982 of file object.h.

11982 {
11983 return RoundedAllocationSize(sizeof(UntaggedLinkedHashBase));
11984 }
static constexpr intptr_t RoundedAllocationSize(intptr_t size)
Definition: object.h:758

◆ IsImmutable()

bool dart::LinkedHashBase::IsImmutable ( ) const
inline

Definition at line 12015 of file object.h.

12015 {
12016 return GetClassId() == kConstMapCid || GetClassId() == kConstSetCid;
12017 }

◆ Length()

intptr_t dart::LinkedHashBase::Length ( ) const
inline

Definition at line 12056 of file object.h.

12056 {
12057 // The map or set may be uninitialized.
12058 if (untag()->used_data() == Object::null()) return 0;
12059 if (untag()->deleted_keys() == Object::null()) return 0;
12060
12061 intptr_t used = Smi::Value(untag()->used_data());
12062 if (IsMap()) {
12063 used >>= 1;
12064 }
12065 const intptr_t deleted = Smi::Value(untag()->deleted_keys());
12066 return used - deleted;
12067 }
static ObjectPtr null()
Definition: object.h:433

◆ set_data()

void dart::LinkedHashBase::set_data ( const Array value) const
inline

Definition at line 12039 of file object.h.

12039{ untag()->set_data(value.ptr()); }
uint8_t value

◆ set_deleted_keys()

void dart::LinkedHashBase::set_deleted_keys ( intptr_t  value) const
inline

Definition at line 12052 of file object.h.

12052 {
12053 untag()->set_deleted_keys(Smi::New(value));
12054 }
static SmiPtr New(intptr_t value)
Definition: object.h:10006

◆ set_hash_mask()

void dart::LinkedHashBase::set_hash_mask ( intptr_t  value) const
inline

Definition at line 12042 of file object.h.

12042 {
12043 untag()->set_hash_mask(Smi::New(value));
12044 }

◆ set_index()

void dart::LinkedHashBase::set_index ( const TypedData value) const
inline

Definition at line 12033 of file object.h.

12033 {
12034 ASSERT(!value.IsNull());
12035 untag()->set_index(value.ptr());
12036 }

◆ set_used_data()

void dart::LinkedHashBase::set_used_data ( intptr_t  value) const
inline

Definition at line 12047 of file object.h.

12047 {
12048 untag()->set_used_data(Smi::New(value));
12049 }

◆ SetTypeArguments()

virtual void dart::LinkedHashBase::SetTypeArguments ( const TypeArguments value) const
inlinevirtual

Reimplemented from dart::Instance.

Definition at line 12022 of file object.h.

12022 {
12023 const intptr_t num_type_args = IsMap() ? 2 : 1;
12024 ASSERT(value.IsNull() ||
12025 ((value.Length() >= num_type_args) &&
12026 value.IsInstantiated() /*&& value.IsCanonical()*/));
12027 // TODO(asiva): Values read from a message snapshot are not properly marked
12028 // as canonical. See for example tests/isolate/message3_test.dart.
12029 untag()->set_type_arguments(value.ptr());
12030 }

◆ type_arguments_offset()

static intptr_t dart::LinkedHashBase::type_arguments_offset ( )
inlinestatic

Definition at line 11986 of file object.h.

11986 {
11987 return OFFSET_OF(UntaggedLinkedHashBase, type_arguments_);
11988 }

◆ used_data()

SmiPtr dart::LinkedHashBase::used_data ( ) const
inline

Definition at line 12046 of file object.h.

12046{ return untag()->used_data(); }

◆ used_data_offset()

static intptr_t dart::LinkedHashBase::used_data_offset ( )
inlinestatic

Definition at line 12002 of file object.h.

12002 {
12003 return OFFSET_OF(UntaggedLinkedHashBase, used_data_);
12004 }

Friends And Related Function Documentation

◆ Class

friend class Class
friend

Definition at line 12090 of file object.h.

◆ ImmutableLinkedHashBase

friend class ImmutableLinkedHashBase
friend

Definition at line 12091 of file object.h.

◆ LinkedHashBaseDeserializationCluster

friend class LinkedHashBaseDeserializationCluster
friend

Definition at line 12092 of file object.h.

Member Data Documentation

◆ kInitialIndexBits

constexpr intptr_t dart::LinkedHashBase::kInitialIndexBits = 2
staticconstexprprotected

Definition at line 12080 of file object.h.

◆ kInitialIndexSize

constexpr intptr_t dart::LinkedHashBase::kInitialIndexSize = 1 << (kInitialIndexBits + 1)
staticconstexprprotected

Definition at line 12081 of file object.h.


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