Flutter Engine
The Flutter Engine
third_party
dart-lang
sdk
runtime
vm
object_graph_copy.h
Go to the documentation of this file.
1
// Copyright (c) 2021, the Dart project authors. Please see the AUTHORS file
2
// for details. All rights reserved. Use of this source code is governed by a
3
// BSD-style license that can be found in the LICENSE file.
4
5
#ifndef RUNTIME_VM_OBJECT_GRAPH_COPY_H_
6
#define RUNTIME_VM_OBJECT_GRAPH_COPY_H_
7
8
namespace
dart
{
9
10
class
Isolate;
11
class
Object;
12
class
ObjectPtr;
13
class
Zone;
14
15
// Whether the object can safely be shared across isolates due to it being
16
// deeply immutable.
17
bool
CanShareObjectAcrossIsolates
(ObjectPtr obj);
18
19
// Makes a transitive copy of the object graph referenced by [object]. Will not
20
// copy objects that can be safely shared - due to being immutable.
21
//
22
// The result will be an array of length 3 of the format
23
//
24
// [
25
// <message>,
26
// <collection-lib-objects-to-rehash>,
27
// <core-lib-objects-to-rehash>,
28
// ]
29
//
30
// If the array of objects to rehash is not `null` the receiver should re-hash
31
// those objects.
32
ObjectPtr
CopyMutableObjectGraph
(
const
Object&
root
);
33
34
typedef
enum
{
35
kInternalToIsolateGroup
,
36
kExternalBetweenIsolateGroups
,
37
}
TraversalRules
;
38
39
// Returns a string representation of a retaining path from `from` to `to`,
40
// blank string if `to` is not reachable from `from`.
41
// Traversal doesn't follow all the object graph links, only those
42
// that makes sense isolate message passing.
43
const
char
*
FindRetainingPath
(Zone* zone,
44
Isolate* isolate,
45
const
Object& from,
46
const
Object& to,
47
TraversalRules
traversal_rules);
48
49
}
// namespace dart
50
51
#endif
// RUNTIME_VM_OBJECT_GRAPH_COPY_H_
dart
Definition:
dart_vm.cc:33
dart::TraversalRules
TraversalRules
Definition:
object_graph_copy.h:34
dart::kInternalToIsolateGroup
@ kInternalToIsolateGroup
Definition:
object_graph_copy.h:35
dart::kExternalBetweenIsolateGroups
@ kExternalBetweenIsolateGroups
Definition:
object_graph_copy.h:36
dart::CanShareObjectAcrossIsolates
bool CanShareObjectAcrossIsolates(ObjectPtr obj)
Definition:
object_graph_copy.cc:178
dart::FindRetainingPath
const char * FindRetainingPath(Zone *zone_, Isolate *isolate, const Object &from, const Object &to, TraversalRules traversal_rules)
Definition:
object_graph_copy.cc:1288
dart::CopyMutableObjectGraph
ObjectPtr CopyMutableObjectGraph(const Object &object)
Definition:
object_graph_copy.cc:2722
scale_cpu.root
string root
Definition:
scale_cpu.py:20
Generated on Sun Jun 23 2024 21:55:46 for Flutter Engine by
1.9.4