Flutter Engine
The Flutter Engine
Public Types | Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Friends | List of all members
dart::FastObjectCopyBase Class Reference
Inheritance diagram for dart::FastObjectCopyBase:
dart::ObjectCopyBase dart::ObjectCopy< FastObjectCopyBase > dart::FastObjectCopy

Public Types

using Types = PtrTypes
 

Public Member Functions

 FastObjectCopyBase (Thread *thread, IdentityMap *map)
 
- Public Member Functions inherited from dart::ObjectCopyBase
 ObjectCopyBase (Thread *thread)
 
 ~ObjectCopyBase ()
 

Protected Member Functions

DART_FORCE_INLINE void ForwardCompressedPointers (ObjectPtr src, ObjectPtr dst, intptr_t offset, intptr_t end_offset)
 
DART_FORCE_INLINE void ForwardCompressedPointers (ObjectPtr src, ObjectPtr dst, intptr_t offset, intptr_t end_offset, UnboxedFieldBitmap bitmap)
 
void ForwardCompressedArrayPointers (intptr_t array_length, ObjectPtr src, ObjectPtr dst, intptr_t offset, intptr_t end_offset)
 
void ForwardCompressedContextPointers (intptr_t context_length, ObjectPtr src, ObjectPtr dst, intptr_t offset, intptr_t end_offset)
 
DART_FORCE_INLINE void ForwardCompressedPointer (ObjectPtr src, ObjectPtr dst, intptr_t offset)
 
ObjectPtr Forward (uword tags, ObjectPtr from)
 
void EnqueueTransferable (TransferableTypedDataPtr from, TransferableTypedDataPtr to)
 
void EnqueueWeakProperty (WeakPropertyPtr from)
 
void EnqueueWeakReference (WeakReferencePtr from)
 
void EnqueueObjectToRehash (ObjectPtr to)
 
void EnqueueExpandoToRehash (ObjectPtr to)
 
- Protected Member Functions inherited from dart::ObjectCopyBase
void StoreCompressedLargeArrayPointerBarrier (ObjectPtr obj, intptr_t offset, ObjectPtr value)
 
DART_FORCE_INLINE bool CanCopyObject (uword tags, ObjectPtr object)
 

Static Protected Member Functions

static void StoreCompressedArrayPointers (intptr_t array_length, ObjectPtr src, ObjectPtr dst, intptr_t offset, intptr_t end_offset)
 
static void StoreCompressedPointers (ObjectPtr src, ObjectPtr dst, intptr_t offset, intptr_t end_offset)
 
static void StoreCompressedPointersNoBarrier (ObjectPtr src, ObjectPtr dst, intptr_t offset, intptr_t end_offset)
 
- Static Protected Member Functions inherited from dart::ObjectCopyBase
static ObjectPtr LoadPointer (ObjectPtr src, intptr_t offset)
 
static CompressedObjectPtr LoadCompressedPointer (ObjectPtr src, intptr_t offset)
 
static compressed_uword LoadCompressedNonPointerWord (ObjectPtr src, intptr_t offset)
 
static void StorePointerBarrier (ObjectPtr obj, intptr_t offset, ObjectPtr value)
 
static void StoreCompressedPointerBarrier (ObjectPtr obj, intptr_t offset, ObjectPtr value)
 
static void StorePointerNoBarrier (ObjectPtr obj, intptr_t offset, ObjectPtr value)
 
template<typename T = ObjectPtr>
static void StoreCompressedPointerNoBarrier (ObjectPtr obj, intptr_t offset, T value)
 
static void StoreCompressedNonPointerWord (ObjectPtr obj, intptr_t offset, compressed_uword value)
 

Protected Attributes

FastForwardMap fast_forward_map_
 
- Protected Attributes inherited from dart::ObjectCopyBase
Threadthread_
 
uword heap_base_
 
Zonezone_
 
Heapheap_
 
ClassTableclass_table_
 
Scavengernew_space_
 
Objecttmp_
 
Objectto_
 
intptr_t expando_cid_
 
const char * exception_msg_ = nullptr
 
Objectexception_unexpected_object_
 

Friends

class ObjectGraphCopier
 

Detailed Description

Definition at line 1297 of file object_graph_copy.cc.

Member Typedef Documentation

◆ Types

Definition at line 1299 of file object_graph_copy.cc.

Constructor & Destructor Documentation

◆ FastObjectCopyBase()

dart::FastObjectCopyBase::FastObjectCopyBase ( Thread thread,
IdentityMap map 
)
inline

Definition at line 1301 of file object_graph_copy.cc.

1302 : ObjectCopyBase(thread), fast_forward_map_(thread, map) {}
ObjectCopyBase(Thread *thread)
SI auto map(std::index_sequence< I... >, Fn &&fn, const Args &... args) -> skvx::Vec< sizeof...(I), decltype(fn(args[0]...))>
Definition: SkVx.h:680

Member Function Documentation

◆ EnqueueExpandoToRehash()

void dart::FastObjectCopyBase::EnqueueExpandoToRehash ( ObjectPtr  to)
inlineprotected

Definition at line 1431 of file object_graph_copy.cc.

1431 {
1433 }
void AddExpandoToRehash(ObjectPtr to)

◆ EnqueueObjectToRehash()

void dart::FastObjectCopyBase::EnqueueObjectToRehash ( ObjectPtr  to)
inlineprotected

Definition at line 1428 of file object_graph_copy.cc.

1428 {
1430 }
void AddObjectToRehash(ObjectPtr to)

◆ EnqueueTransferable()

void dart::FastObjectCopyBase::EnqueueTransferable ( TransferableTypedDataPtr  from,
TransferableTypedDataPtr  to 
)
inlineprotected

Definition at line 1418 of file object_graph_copy.cc.

1419 {
1421 }
void AddTransferable(TransferableTypedDataPtr from, TransferableTypedDataPtr to)

◆ EnqueueWeakProperty()

void dart::FastObjectCopyBase::EnqueueWeakProperty ( WeakPropertyPtr  from)
inlineprotected

Definition at line 1422 of file object_graph_copy.cc.

1422 {
1424 }
void AddWeakProperty(WeakPropertyPtr from)

◆ EnqueueWeakReference()

void dart::FastObjectCopyBase::EnqueueWeakReference ( WeakReferencePtr  from)
inlineprotected

Definition at line 1425 of file object_graph_copy.cc.

1425 {
1427 }
void AddWeakReference(WeakReferencePtr from)

◆ Forward()

ObjectPtr dart::FastObjectCopyBase::Forward ( uword  tags,
ObjectPtr  from 
)
inlineprotected

Definition at line 1387 of file object_graph_copy.cc.

1387 {
1388 const intptr_t header_size = UntaggedObject::SizeTag::decode(tags);
1389 const auto cid = UntaggedObject::ClassIdTag::decode(tags);
1390 const uword size =
1391 header_size != 0 ? header_size : from.untag()->HeapSize();
1394 if (alloc != 0) {
1395 ObjectPtr to(reinterpret_cast<UntaggedObject*>(alloc));
1396 fast_forward_map_.Insert(from, to, size);
1397
1399 SetNewSpaceTaggingWord(to, cid, header_size);
1404 } else if (IsTypedDataViewClassId(cid) ||
1406 // We set the views backing store to `null` to satisfy an assertion in
1407 // GCCompactor::VisitTypedDataViewPointers().
1408 SetNewSpaceTaggingWord(to, cid, header_size);
1410 }
1411 return to;
1412 }
1413 }
1415 return Marker();
1416 }
static constexpr ClassIdTagType decode(uword value)
Definition: bitfield.h:171
void Insert(ObjectPtr from, ObjectPtr to, intptr_t size)
void AddExternalTypedData(ExternalTypedDataPtr to)
static ObjectPtr RawCast(ObjectPtr obj)
Definition: object.h:325
uword TryAllocateNoSafepoint(Thread *thread, intptr_t size)
Definition: scavenger.h:146
static constexpr uword decode(uword tag)
Definition: raw_object.h:208
bool IsTypedDataViewClassId(intptr_t index)
Definition: class_id.h:439
void InitializeTypedDataView(TypedDataViewPtr obj)
const char * kFastAllocationFailed
bool IsUnmodifiableTypedDataViewClassId(intptr_t index)
Definition: class_id.h:453
uintptr_t uword
Definition: globals.h:501
bool IsAllocatableInNewSpace(intptr_t size)
Definition: spaces.h:57
const intptr_t cid
static DART_FORCE_INLINE ObjectPtr Marker()
void InitializeExternalTypedData(intptr_t cid, ExternalTypedDataPtr from, ExternalTypedDataPtr to)
DART_FORCE_INLINE void SetNewSpaceTaggingWord(ObjectPtr to, classid_t cid, uint32_t size)
bool IsExternalTypedDataClassId(intptr_t index)
Definition: class_id.h:447
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
Definition: switches.h:259

◆ ForwardCompressedArrayPointers()

void dart::FastObjectCopyBase::ForwardCompressedArrayPointers ( intptr_t  array_length,
ObjectPtr  src,
ObjectPtr  dst,
intptr_t  offset,
intptr_t  end_offset 
)
inlineprotected

Definition at line 1336 of file object_graph_copy.cc.

1340 {
1341 for (; offset < end_offset; offset += kCompressedWordSize) {
1343 }
1344 }
DART_FORCE_INLINE void ForwardCompressedPointer(ObjectPtr src, ObjectPtr dst, intptr_t offset)
static constexpr intptr_t kCompressedWordSize
Definition: globals.h:42
dst
Definition: cp.py:12
SeparatedVector2 offset

◆ ForwardCompressedContextPointers()

void dart::FastObjectCopyBase::ForwardCompressedContextPointers ( intptr_t  context_length,
ObjectPtr  src,
ObjectPtr  dst,
intptr_t  offset,
intptr_t  end_offset 
)
inlineprotected

Definition at line 1346 of file object_graph_copy.cc.

1350 {
1351 for (; offset < end_offset; offset += kCompressedWordSize) {
1353 }
1354 }

◆ ForwardCompressedPointer()

DART_FORCE_INLINE void dart::FastObjectCopyBase::ForwardCompressedPointer ( ObjectPtr  src,
ObjectPtr  dst,
intptr_t  offset 
)
inlineprotected

Definition at line 1357 of file object_graph_copy.cc.

1357 {
1359 if (!value.IsHeapObject()) {
1361 return;
1362 }
1363 auto value_decompressed = value.Decompress(heap_base_);
1364 const uword tags = TagsFromUntaggedObject(value_decompressed.untag());
1365 if (CanShareObject(value_decompressed, tags)) {
1367 return;
1368 }
1369
1370 ObjectPtr existing_to =
1371 fast_forward_map_.ForwardedObject(value_decompressed);
1372 if (existing_to != Marker()) {
1374 return;
1375 }
1376
1377 if (UNLIKELY(!CanCopyObject(tags, value_decompressed))) {
1378 ASSERT(exception_msg_ != nullptr);
1380 return;
1381 }
1382
1383 auto to = Forward(tags, value_decompressed);
1385 }
ObjectPtr ForwardedObject(ObjectPtr object)
ObjectPtr Forward(uword tags, ObjectPtr from)
static CompressedObjectPtr LoadCompressedPointer(ObjectPtr src, intptr_t offset)
DART_FORCE_INLINE bool CanCopyObject(uword tags, ObjectPtr object)
static void StoreCompressedPointerNoBarrier(ObjectPtr obj, intptr_t offset, T value)
static ObjectPtr null()
Definition: object.h:433
#define ASSERT(E)
uint8_t value
static DART_FORCE_INLINE bool CanShareObject(ObjectPtr obj, uword tags)
DART_FORCE_INLINE uword TagsFromUntaggedObject(UntaggedObject *obj)
#define UNLIKELY(cond)
Definition: globals.h:261

◆ ForwardCompressedPointers() [1/2]

DART_FORCE_INLINE void dart::FastObjectCopyBase::ForwardCompressedPointers ( ObjectPtr  src,
ObjectPtr  dst,
intptr_t  offset,
intptr_t  end_offset 
)
inlineprotected

Definition at line 1306 of file object_graph_copy.cc.

1309 {
1310 for (; offset < end_offset; offset += kCompressedWordSize) {
1312 }
1313 }

◆ ForwardCompressedPointers() [2/2]

DART_FORCE_INLINE void dart::FastObjectCopyBase::ForwardCompressedPointers ( ObjectPtr  src,
ObjectPtr  dst,
intptr_t  offset,
intptr_t  end_offset,
UnboxedFieldBitmap  bitmap 
)
inlineprotected

Definition at line 1316 of file object_graph_copy.cc.

1320 {
1321 if (bitmap.IsEmpty()) {
1322 ForwardCompressedPointers(src, dst, offset, end_offset);
1323 return;
1324 }
1325 intptr_t bit = offset >> kCompressedWordSizeLog2;
1326 for (; offset < end_offset; offset += kCompressedWordSize) {
1327 if (bitmap.Get(bit++)) {
1330 } else {
1332 }
1333 }
1334 }
DART_FORCE_INLINE void ForwardCompressedPointers(ObjectPtr src, ObjectPtr dst, intptr_t offset, intptr_t end_offset)
static void StoreCompressedNonPointerWord(ObjectPtr obj, intptr_t offset, compressed_uword value)
static compressed_uword LoadCompressedNonPointerWord(ObjectPtr src, intptr_t offset)
Definition: bitmap.py:1
static constexpr intptr_t kCompressedWordSizeLog2
Definition: globals.h:43

◆ StoreCompressedArrayPointers()

static void dart::FastObjectCopyBase::StoreCompressedArrayPointers ( intptr_t  array_length,
ObjectPtr  src,
ObjectPtr  dst,
intptr_t  offset,
intptr_t  end_offset 
)
inlinestaticprotected

Definition at line 1435 of file object_graph_copy.cc.

1439 {
1440 StoreCompressedPointers(src, dst, offset, end_offset);
1441 }
static void StoreCompressedPointers(ObjectPtr src, ObjectPtr dst, intptr_t offset, intptr_t end_offset)

◆ StoreCompressedPointers()

static void dart::FastObjectCopyBase::StoreCompressedPointers ( ObjectPtr  src,
ObjectPtr  dst,
intptr_t  offset,
intptr_t  end_offset 
)
inlinestaticprotected

Definition at line 1442 of file object_graph_copy.cc.

1445 {
1447 }
static void StoreCompressedPointersNoBarrier(ObjectPtr src, ObjectPtr dst, intptr_t offset, intptr_t end_offset)

◆ StoreCompressedPointersNoBarrier()

static void dart::FastObjectCopyBase::StoreCompressedPointersNoBarrier ( ObjectPtr  src,
ObjectPtr  dst,
intptr_t  offset,
intptr_t  end_offset 
)
inlinestaticprotected

Definition at line 1448 of file object_graph_copy.cc.

1451 {
1452 for (; offset <= end_offset; offset += kCompressedWordSize) {
1455 }
1456 }

Friends And Related Function Documentation

◆ ObjectGraphCopier

friend class ObjectGraphCopier
friend

Definition at line 1459 of file object_graph_copy.cc.

Member Data Documentation

◆ fast_forward_map_

FastForwardMap dart::FastObjectCopyBase::fast_forward_map_
protected

Definition at line 1461 of file object_graph_copy.cc.


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