Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Classes | Namespaces | Macros | Functions | Variables
object_graph_copy.cc File Reference
#include "vm/object_graph_copy.h"
#include <memory>
#include "vm/dart_api_state.h"
#include "vm/flags.h"
#include "vm/heap/weak_table.h"
#include "vm/longjump.h"
#include "vm/object.h"
#include "vm/object_store.h"
#include "vm/snapshot.h"
#include "vm/symbols.h"
#include "vm/timeline.h"

Go to the source code of this file.

Classes

struct  dart::PtrTypes
 
struct  dart::HandleTypes
 
class  dart::SlowFromTo
 
class  dart::FastFromTo
 
class  dart::IdentityMap
 
class  dart::ForwardMapBase
 
class  dart::FastForwardMap
 
class  dart::SlowForwardMap
 
class  dart::ObjectCopyBase
 
class  dart::RetainingPath
 
class  dart::FastObjectCopyBase
 
class  dart::SlowObjectCopyBase
 
class  dart::ObjectCopy< Base >
 
class  dart::FastObjectCopy
 
class  dart::SlowObjectCopy
 
class  dart::ObjectGraphCopier
 

Namespaces

namespace  dart
 

Macros

#define Z   zone_
 
#define FOR_UNSUPPORTED_CLASSES(V)
 
#define DO(V)
 
#define DO(V)
 
#define HANDLE_ILLEGAL_CASE(Type)
 
#define COPY_TO(clazz)
 
#define COPY_TO(clazz)   case kTypedData##clazz##Cid:
 
#define COPY_TO(clazz)
 
#define COPY_TO(clazz)   case kExternalTypedData##clazz##Cid:
 
#define DEFINE_UNSUPPORTED(clazz)
 
#define DO(V)
 

Functions

 dart::DEFINE_FLAG (bool, enable_fast_object_copy, true, "Enable fast path for fast object copy.")
 
 dart::DEFINE_FLAG (bool, gc_on_foc_slow_path, false, "Cause a GC when falling off the fast path for fast object copy.")
 
static DART_FORCE_INLINE ObjectPtr dart::Marker ()
 
static DART_FORCE_INLINE bool dart::CanShareObject (ObjectPtr obj, uword tags)
 
bool dart::CanShareObjectAcrossIsolates (ObjectPtr obj)
 
static DART_FORCE_INLINE bool dart::MightNeedReHashing (ObjectPtr object)
 
DART_FORCE_INLINE uword dart::TagsFromUntaggedObject (UntaggedObject *obj)
 
DART_FORCE_INLINE void dart::SetNewSpaceTaggingWord (ObjectPtr to, classid_t cid, uint32_t size)
 
DART_FORCE_INLINE ObjectPtr dart::AllocateObject (intptr_t cid, intptr_t size, intptr_t allocated_bytes)
 
DART_FORCE_INLINE void dart::UpdateLengthField (intptr_t cid, ObjectPtr from, ObjectPtr to)
 
void dart::InitializeExternalTypedData (intptr_t cid, ExternalTypedDataPtr from, ExternalTypedDataPtr to)
 
template<typename T >
void dart::CopyTypedDataBaseWithSafepointChecks (Thread *thread, const T &from, const T &to, intptr_t length)
 
void dart::InitializeExternalTypedDataWithSafepointChecks (Thread *thread, intptr_t cid, const ExternalTypedData &from, const ExternalTypedData &to)
 
void dart::InitializeTypedDataView (TypedDataViewPtr obj)
 
void dart::FreeExternalTypedData (void *isolate_callback_data, void *buffer)
 
void dart::FreeTransferablePeer (void *isolate_callback_data, void *peer)
 
static ObjectPtr dart::Ptr (ObjectPtr obj)
 
static ObjectPtr dart::Ptr (const Object &obj)
 
const char * dart::FindRetainingPath (Zone *zone_, Isolate *isolate, const Object &from, const Object &to, TraversalRules traversal_rules)
 
ObjectPtr dart::CopyMutableObjectGraph (const Object &object)
 

Variables

const char * dart::kFastAllocationFailed = "fast allocation failed"
 

Macro Definition Documentation

◆ COPY_TO [1/4]

#define COPY_TO (   clazz)
Value:
case clazz::kClassId: { \
typename Types::clazz casted_from = Types::Cast##clazz(from); \
typename Types::clazz casted_to = Types::Cast##clazz(to); \
Copy##clazz(casted_from, casted_to); \
return; \
}

◆ COPY_TO [2/4]

#define COPY_TO (   clazz)    case kTypedData##clazz##Cid:

◆ COPY_TO [3/4]

#define COPY_TO (   clazz)
Value:
case kTypedData##clazz##ViewCid: \
case kUnmodifiableTypedData##clazz##ViewCid:

◆ COPY_TO [4/4]

#define COPY_TO (   clazz)    case kExternalTypedData##clazz##Cid:

◆ DEFINE_UNSUPPORTED

#define DEFINE_UNSUPPORTED (   clazz)
Value:
void Copy##clazz(typename Types::clazz from, typename Types::clazz to) { \
FATAL("Objects of type " #clazz " should not occur in object graphs"); \
}

Definition at line 2099 of file object_graph_copy.cc.

2100 { \
2101 FATAL("Objects of type " #clazz " should not occur in object graphs"); \
2102 }

◆ DO [1/3]

#define DO (   V)
Value:
using V = V##Ptr; \
static Untagged##V* Untag##V(V##Ptr arg) { return arg.untag(); } \
static V##Ptr Get##V##Ptr(V##Ptr arg) { return arg; } \
static V##Ptr Cast##V(ObjectPtr arg) { return dart::V::RawCast(arg); }
UntaggedObject * untag() const
T __attribute__((ext_vector_type(N))) V
static ObjectPtr Ptr(ObjectPtr obj)
#define V(name)
Definition raw_object.h:124

Definition at line 117 of file object_graph_copy.cc.

119 { return arg.untag(); } \
120 static V##Ptr Get##V##Ptr(V##Ptr arg) { return arg; } \
121 static V##Ptr Cast##V(ObjectPtr arg) { return dart::V::RawCast(arg); }
const GrXPFactory * Get(SkBlendMode mode)

◆ DO [2/3]

#define DO (   V)
Value:
using V = const dart::V&; \
static Untagged##V* Untag##V(V arg) { return arg.ptr().untag(); } \
static V##Ptr Get##V##Ptr(V arg) { return arg.ptr(); } \
static V Cast##V(const dart::Object& arg) { return dart::V::Cast(arg); }

Definition at line 117 of file object_graph_copy.cc.

119 { return arg.untag(); } \
120 static V##Ptr Get##V##Ptr(V##Ptr arg) { return arg; } \
121 static V##Ptr Cast##V(ObjectPtr arg) { return dart::V::RawCast(arg); }

◆ DO [3/3]

#define DO (   V)
Value:
DART_FORCE_INLINE \
Untagged##V* Untag##V(typename Types::V obj) { \
return Types::Get##V##Ptr(obj).Decompress(Base::heap_base_).untag(); \
}
ObjectPtr Decompress(uword heap_base) const

Definition at line 117 of file object_graph_copy.cc.

119 { return arg.untag(); } \
120 static V##Ptr Get##V##Ptr(V##Ptr arg) { return arg; } \
121 static V##Ptr Cast##V(ObjectPtr arg) { return dart::V::RawCast(arg); }

◆ FOR_UNSUPPORTED_CLASSES

#define FOR_UNSUPPORTED_CLASSES (   V)

Definition at line 24 of file object_graph_copy.cc.

◆ HANDLE_ILLEGAL_CASE

#define HANDLE_ILLEGAL_CASE (   Type)
Value:
case k##Type##Cid: { \
exception_msg_ = \
"Illegal argument in isolate message: " \
"(object is a " #Type ")"; \
exception_unexpected_object_ = object; \
return false; \
}

◆ Z

#define Z   zone_

Definition at line 19 of file object_graph_copy.cc.