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::SlowObjectCopyBase Class Reference
Inheritance diagram for dart::SlowObjectCopyBase:
dart::ObjectCopyBase dart::ObjectCopy< SlowObjectCopyBase > dart::SlowObjectCopy

Public Types

using Types = HandleTypes
 

Public Member Functions

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

Protected Member Functions

DART_FORCE_INLINE void ForwardCompressedPointers (const Object &src, const Object &dst, intptr_t offset, intptr_t end_offset)
 
DART_FORCE_INLINE void ForwardCompressedPointers (const Object &src, const Object &dst, intptr_t offset, intptr_t end_offset, UnboxedFieldBitmap bitmap)
 
void ForwardCompressedArrayPointers (intptr_t array_length, const Object &src, const Object &dst, intptr_t offset, intptr_t end_offset)
 
void ForwardCompressedContextPointers (intptr_t context_length, const Object &src, const Object &dst, intptr_t offset, intptr_t end_offset)
 
DART_FORCE_INLINE void ForwardCompressedLargeArrayPointer (const Object &src, const Object &dst, intptr_t offset)
 
DART_FORCE_INLINE void ForwardCompressedPointer (const Object &src, const Object &dst, intptr_t offset)
 
ObjectPtr Forward (uword tags, const Object &from)
 
void EnqueueTransferable (const TransferableTypedData &from, const TransferableTypedData &to)
 
void EnqueueWeakProperty (const WeakProperty &from)
 
void EnqueueWeakReference (const WeakReference &from)
 
void EnqueueObjectToRehash (const Object &to)
 
void EnqueueExpandoToRehash (const Object &to)
 
void StoreCompressedArrayPointers (intptr_t array_length, const Object &src, const Object &dst, intptr_t offset, intptr_t end_offset)
 
void StoreCompressedPointers (const Object &src, const Object &dst, intptr_t offset, intptr_t end_offset)
 
- 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 StoreCompressedPointersNoBarrier (const Object &src, const Object &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

SlowForwardMap slow_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 1464 of file object_graph_copy.cc.

Member Typedef Documentation

◆ Types

Definition at line 1466 of file object_graph_copy.cc.

Constructor & Destructor Documentation

◆ SlowObjectCopyBase()

dart::SlowObjectCopyBase::SlowObjectCopyBase ( Thread thread,
IdentityMap map 
)
inlineexplicit

Definition at line 1468 of file object_graph_copy.cc.

1469 : ObjectCopyBase(thread), slow_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::SlowObjectCopyBase::EnqueueExpandoToRehash ( const Object to)
inlineprotected

Definition at line 1637 of file object_graph_copy.cc.

1637 {
1639 }
void AddExpandoToRehash(const Object &to)

◆ EnqueueObjectToRehash()

void dart::SlowObjectCopyBase::EnqueueObjectToRehash ( const Object to)
inlineprotected

Definition at line 1634 of file object_graph_copy.cc.

1634 {
1636 }
void AddObjectToRehash(const Object &to)

◆ EnqueueTransferable()

void dart::SlowObjectCopyBase::EnqueueTransferable ( const TransferableTypedData from,
const TransferableTypedData to 
)
inlineprotected

Definition at line 1624 of file object_graph_copy.cc.

1625 {
1627 }
void AddTransferable(const TransferableTypedData &from, const TransferableTypedData &to)

◆ EnqueueWeakProperty()

void dart::SlowObjectCopyBase::EnqueueWeakProperty ( const WeakProperty from)
inlineprotected

Definition at line 1628 of file object_graph_copy.cc.

1628 {
1630 }
void AddWeakProperty(const WeakProperty &from)

◆ EnqueueWeakReference()

void dart::SlowObjectCopyBase::EnqueueWeakReference ( const WeakReference from)
inlineprotected

Definition at line 1631 of file object_graph_copy.cc.

1631 {
1633 }
void AddWeakReference(const WeakReference &from)

◆ Forward()

ObjectPtr dart::SlowObjectCopyBase::Forward ( uword  tags,
const Object from 
)
inlineprotected

Definition at line 1596 of file object_graph_copy.cc.

1596 {
1597 const intptr_t cid = UntaggedObject::ClassIdTag::decode(tags);
1598 intptr_t size = UntaggedObject::SizeTag::decode(tags);
1599 if (size == 0) {
1600 size = from.ptr().untag()->HeapSize();
1601 }
1602 to_ = AllocateObject(cid, size, slow_forward_map_.allocated_bytes);
1603 UpdateLengthField(cid, from.ptr(), to_.ptr());
1605 ObjectPtr to = to_.ptr();
1606 if ((cid == kArrayCid || cid == kImmutableArrayCid) &&
1609 }
1611 const auto& external_to = slow_forward_map_.AddExternalTypedData(
1614 thread_, cid, ExternalTypedData::Cast(from), external_to);
1615 return external_to.ptr();
1616 } else if (IsTypedDataViewClassId(cid) ||
1618 // We set the views backing store to `null` to satisfy an assertion in
1619 // GCCompactor::VisitTypedDataViewPointers().
1621 }
1622 return to;
1623 }
static constexpr ClassIdTagType decode(uword value)
Definition: bitfield.h:171
UntaggedObject * untag() const
ObjectPtr ptr() const
Definition: object.h:332
static ObjectPtr RawCast(ObjectPtr obj)
Definition: object.h:325
const ExternalTypedData & AddExternalTypedData(ExternalTypedDataPtr to)
void Insert(const Object &from, const Object &to, intptr_t size)
static constexpr uword decode(uword tag)
Definition: raw_object.h:208
void SetCardRememberedBitUnsynchronized()
Definition: raw_object.h:386
bool IsTypedDataViewClassId(intptr_t index)
Definition: class_id.h:439
void InitializeExternalTypedDataWithSafepointChecks(Thread *thread, intptr_t cid, const ExternalTypedData &from, const ExternalTypedData &to)
void InitializeTypedDataView(TypedDataViewPtr obj)
bool IsUnmodifiableTypedDataViewClassId(intptr_t index)
Definition: class_id.h:453
bool IsAllocatableInNewSpace(intptr_t size)
Definition: spaces.h:57
DART_FORCE_INLINE void UpdateLengthField(intptr_t cid, ObjectPtr from, ObjectPtr to)
const intptr_t cid
static InstancePtr AllocateObject(Thread *thread, const Class &cls)
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::SlowObjectCopyBase::ForwardCompressedArrayPointers ( intptr_t  array_length,
const Object src,
const Object dst,
intptr_t  offset,
intptr_t  end_offset 
)
inlineprotected

Definition at line 1499 of file object_graph_copy.cc.

1503 {
1504 if (Array::UseCardMarkingForAllocation(array_length)) {
1505 for (; offset < end_offset; offset += kCompressedWordSize) {
1508 }
1509 } else {
1510 for (; offset < end_offset; offset += kCompressedWordSize) {
1512 }
1513 }
1514 }
static constexpr bool UseCardMarkingForAllocation(const intptr_t array_length)
Definition: object.h:10818
DART_FORCE_INLINE void ForwardCompressedLargeArrayPointer(const Object &src, const Object &dst, intptr_t offset)
DART_FORCE_INLINE void ForwardCompressedPointer(const Object &src, const Object &dst, intptr_t offset)
void CheckForSafepoint()
Definition: thread.h:1104
static constexpr intptr_t kCompressedWordSize
Definition: globals.h:42
dst
Definition: cp.py:12
SeparatedVector2 offset

◆ ForwardCompressedContextPointers()

void dart::SlowObjectCopyBase::ForwardCompressedContextPointers ( intptr_t  context_length,
const Object src,
const Object dst,
intptr_t  offset,
intptr_t  end_offset 
)
inlineprotected

Definition at line 1516 of file object_graph_copy.cc.

1520 {
1521 for (; offset < end_offset; offset += kCompressedWordSize) {
1523 }
1524 }

◆ ForwardCompressedLargeArrayPointer()

DART_FORCE_INLINE void dart::SlowObjectCopyBase::ForwardCompressedLargeArrayPointer ( const Object src,
const Object dst,
intptr_t  offset 
)
inlineprotected

Definition at line 1527 of file object_graph_copy.cc.

1529 {
1530 auto value = LoadCompressedPointer(src.ptr(), offset);
1531 if (!value.IsHeapObject()) {
1533 return;
1534 }
1535
1536 auto value_decompressed = value.Decompress(heap_base_);
1537 const uword tags = TagsFromUntaggedObject(value_decompressed.untag());
1538 if (CanShareObject(value_decompressed, tags)) {
1540 value_decompressed);
1541 return;
1542 }
1543
1544 ObjectPtr existing_to =
1545 slow_forward_map_.ForwardedObject(value_decompressed);
1546 if (existing_to != Marker()) {
1548 return;
1549 }
1550
1551 if (UNLIKELY(!CanCopyObject(tags, value_decompressed))) {
1552 ASSERT(exception_msg_ != nullptr);
1554 Object::null());
1555 return;
1556 }
1557
1558 tmp_ = value_decompressed;
1559 tmp_ = Forward(tags, tmp_); // Only this can cause allocation.
1561 }
static CompressedObjectPtr LoadCompressedPointer(ObjectPtr src, intptr_t offset)
DART_FORCE_INLINE bool CanCopyObject(uword tags, ObjectPtr object)
void StoreCompressedLargeArrayPointerBarrier(ObjectPtr obj, intptr_t offset, ObjectPtr value)
static void StoreCompressedPointerNoBarrier(ObjectPtr obj, intptr_t offset, T value)
static ObjectPtr null()
Definition: object.h:433
ObjectPtr ForwardedObject(ObjectPtr object)
ObjectPtr Forward(uword tags, const Object &from)
#define ASSERT(E)
uint8_t value
uintptr_t uword
Definition: globals.h:501
static DART_FORCE_INLINE bool CanShareObject(ObjectPtr obj, uword tags)
DART_FORCE_INLINE uword TagsFromUntaggedObject(UntaggedObject *obj)
static DART_FORCE_INLINE ObjectPtr Marker()
#define UNLIKELY(cond)
Definition: globals.h:261

◆ ForwardCompressedPointer()

DART_FORCE_INLINE void dart::SlowObjectCopyBase::ForwardCompressedPointer ( const Object src,
const Object dst,
intptr_t  offset 
)
inlineprotected

Definition at line 1563 of file object_graph_copy.cc.

1565 {
1566 auto value = LoadCompressedPointer(src.ptr(), offset);
1567 if (!value.IsHeapObject()) {
1569 return;
1570 }
1571 auto value_decompressed = value.Decompress(heap_base_);
1572 const uword tags = TagsFromUntaggedObject(value_decompressed.untag());
1573 if (CanShareObject(value_decompressed, tags)) {
1574 StoreCompressedPointerBarrier(dst.ptr(), offset, value_decompressed);
1575 return;
1576 }
1577
1578 ObjectPtr existing_to =
1579 slow_forward_map_.ForwardedObject(value_decompressed);
1580 if (existing_to != Marker()) {
1581 StoreCompressedPointerBarrier(dst.ptr(), offset, existing_to);
1582 return;
1583 }
1584
1585 if (UNLIKELY(!CanCopyObject(tags, value_decompressed))) {
1586 ASSERT(exception_msg_ != nullptr);
1588 return;
1589 }
1590
1591 tmp_ = value_decompressed;
1592 tmp_ = Forward(tags, tmp_); // Only this can cause allocation.
1594 }
static void StoreCompressedPointerBarrier(ObjectPtr obj, intptr_t offset, ObjectPtr value)

◆ ForwardCompressedPointers() [1/2]

DART_FORCE_INLINE void dart::SlowObjectCopyBase::ForwardCompressedPointers ( const Object src,
const Object dst,
intptr_t  offset,
intptr_t  end_offset 
)
inlineprotected

Definition at line 1473 of file object_graph_copy.cc.

1476 {
1477 for (; offset < end_offset; offset += kCompressedWordSize) {
1479 }
1480 }

◆ ForwardCompressedPointers() [2/2]

DART_FORCE_INLINE void dart::SlowObjectCopyBase::ForwardCompressedPointers ( const Object src,
const Object dst,
intptr_t  offset,
intptr_t  end_offset,
UnboxedFieldBitmap  bitmap 
)
inlineprotected

Definition at line 1483 of file object_graph_copy.cc.

1487 {
1488 intptr_t bit = offset >> kCompressedWordSizeLog2;
1489 for (; offset < end_offset; offset += kCompressedWordSize) {
1490 if (bitmap.Get(bit++)) {
1493 } else {
1495 }
1496 }
1497 }
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()

void dart::SlowObjectCopyBase::StoreCompressedArrayPointers ( intptr_t  array_length,
const Object src,
const Object dst,
intptr_t  offset,
intptr_t  end_offset 
)
inlineprotected

Definition at line 1641 of file object_graph_copy.cc.

1645 {
1646 auto src_ptr = src.ptr();
1647 auto dst_ptr = dst.ptr();
1648 if (Array::UseCardMarkingForAllocation(array_length)) {
1649 for (; offset <= end_offset; offset += kCompressedWordSize) {
1651 dst_ptr, offset,
1653 }
1654 } else {
1655 for (; offset <= end_offset; offset += kCompressedWordSize) {
1657 dst_ptr, offset,
1659 }
1660 }
1661 }
void Decompress(const uint8_t *input, intptr_t input_len, uint8_t **output, intptr_t *output_length)
Definition: gzip.cc:15

◆ StoreCompressedPointers()

void dart::SlowObjectCopyBase::StoreCompressedPointers ( const Object src,
const Object dst,
intptr_t  offset,
intptr_t  end_offset 
)
inlineprotected

Definition at line 1662 of file object_graph_copy.cc.

1665 {
1666 auto src_ptr = src.ptr();
1667 auto dst_ptr = dst.ptr();
1668 for (; offset <= end_offset; offset += kCompressedWordSize) {
1670 dst_ptr, offset,
1672 }
1673 }

◆ StoreCompressedPointersNoBarrier()

static void dart::SlowObjectCopyBase::StoreCompressedPointersNoBarrier ( const Object src,
const Object dst,
intptr_t  offset,
intptr_t  end_offset 
)
inlinestaticprotected

Definition at line 1674 of file object_graph_copy.cc.

1677 {
1678 auto src_ptr = src.ptr();
1679 auto dst_ptr = dst.ptr();
1680 for (; offset <= end_offset; offset += kCompressedWordSize) {
1682 LoadCompressedPointer(src_ptr, offset));
1683 }
1684 }

Friends And Related Function Documentation

◆ ObjectGraphCopier

friend class ObjectGraphCopier
friend

Definition at line 1687 of file object_graph_copy.cc.

Member Data Documentation

◆ slow_forward_map_

SlowForwardMap dart::SlowObjectCopyBase::slow_forward_map_
protected

Definition at line 1689 of file object_graph_copy.cc.


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