Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
dart::Isolate Class Reference

#include <isolate.h>

Inheritance diagram for dart::Isolate:
dart::BaseIsolate dart::IntrusiveDListEntry< Isolate >

Public Types

enum  LibMsgId {
  kPauseMsg = 1 , kResumeMsg = 2 , kPingMsg = 3 , kKillMsg = 4 ,
  kAddExitMsg = 5 , kDelExitMsg = 6 , kAddErrorMsg = 7 , kDelErrorMsg = 8 ,
  kErrorFatalMsg = 9 , kInterruptMsg = 10 , kInternalKillMsg = 11 , kDrainServiceExtensionsMsg = 12 ,
  kCheckForReload = 13
}
 
enum  LibMsgPriority { kImmediateAction = 0 , kBeforeNextEventAction = 1 , kAsEventAction = 2 }
 

Public Member Functions

 ~Isolate ()
 
bool IsScheduled ()
 
Threadscheduled_mutator_thread () const
 
ThreadRegistrythread_registry () const
 
SafepointHandlersafepoint_handler () const
 
FieldTablefield_table () const
 
void set_field_table (Thread *T, FieldTable *field_table)
 
IsolateObjectStoreisolate_object_store () const
 
Dart_MessageNotifyCallback message_notify_callback () const
 
void set_message_notify_callback (Dart_MessageNotifyCallback value)
 
void set_on_shutdown_callback (Dart_IsolateShutdownCallback value)
 
Dart_IsolateShutdownCallback on_shutdown_callback ()
 
void set_on_cleanup_callback (Dart_IsolateCleanupCallback value)
 
Dart_IsolateCleanupCallback on_cleanup_callback ()
 
void bequeath (std::unique_ptr< Bequest > bequest)
 
IsolateGroupSourcesource () const
 
IsolateGroupgroup () const
 
bool HasPendingMessages ()
 
Threadmutator_thread () const
 
const char * name () const
 
void set_name (const char *name)
 
int64_t UptimeMicros () const
 
Dart_Port main_port () const
 
void set_main_port (Dart_Port port)
 
Dart_Port origin_id ()
 
void set_origin_id (Dart_Port id)
 
void set_pause_capability (uint64_t value)
 
uint64_t pause_capability () const
 
void set_terminate_capability (uint64_t value)
 
uint64_t terminate_capability () const
 
void SendInternalLibMessage (LibMsgId msg_id, uint64_t capability)
 
void set_init_callback_data (void *value)
 
void * init_callback_data () const
 
void set_finalizers (const GrowableObjectArray &value)
 
Dart_EnvironmentCallback environment_callback () const
 
void set_environment_callback (Dart_EnvironmentCallback value)
 
bool HasDeferredLoadHandler () const
 
ObjectPtr CallDeferredLoadHandler (intptr_t id)
 
void ScheduleInterrupts (uword interrupt_bits)
 
const char * MakeRunnable ()
 
void MakeRunnableLocked ()
 
void Run ()
 
MessageHandlermessage_handler () const
 
bool is_runnable () const
 
void set_is_runnable (bool value)
 
Mutexmutex ()
 
Debuggerdebugger () const
 
SampleBlockcurrent_sample_block () const
 
void set_current_sample_block (SampleBlock *block)
 
void ProcessFreeSampleBlocks (Thread *thread)
 
SampleBlockcurrent_allocation_sample_block () const
 
void set_current_allocation_sample_block (SampleBlock *block)
 
bool TakeHasCompletedBlocks ()
 
bool TrySetHasCompletedBlocks ()
 
void set_single_step (bool value)
 
bool single_step () const
 
void set_has_resumption_breakpoints (bool value)
 
bool has_resumption_breakpoints () const
 
bool ResumeRequest () const
 
void SetResumeRequest ()
 
void set_last_resume_timestamp ()
 
int64_t last_resume_timestamp () const
 
bool GetAndClearResumeRequest ()
 
bool VerifyPauseCapability (const Object &capability) const
 
bool VerifyTerminateCapability (const Object &capability) const
 
bool AddResumeCapability (const Capability &capability)
 
bool RemoveResumeCapability (const Capability &capability)
 
void AddExitListener (const SendPort &listener, const Instance &response)
 
void RemoveExitListener (const SendPort &listener)
 
void NotifyExitListeners ()
 
void AddErrorListener (const SendPort &listener)
 
void RemoveErrorListener (const SendPort &listener)
 
bool NotifyErrorListeners (const char *msg, const char *stacktrace)
 
bool ErrorsFatal () const
 
void SetErrorsFatal (bool value)
 
Randomrandom ()
 
Simulatorsimulator () const
 
void set_simulator (Simulator *value)
 
void IncrementSpawnCount ()
 
void DecrementSpawnCount ()
 
void WaitForOutstandingSpawns ()
 
ObjectIdRingobject_id_ring () const
 
ObjectIdRingEnsureObjectIdRing ()
 
bool IsDeoptimizing () const
 
DeoptContextdeopt_context () const
 
void set_deopt_context (DeoptContext *value)
 
FfiCallbackMetadata::Trampoline CreateAsyncFfiCallback (Zone *zone, const Function &send_function, Dart_Port send_port)
 
FfiCallbackMetadata::Trampoline CreateIsolateLocalFfiCallback (Zone *zone, const Function &trampoline, const Closure &target, bool keep_isolate_alive)
 
void DeleteFfiCallback (FfiCallbackMetadata::Trampoline callback)
 
void UpdateNativeCallableKeepIsolateAliveCounter (intptr_t delta)
 
bool HasOpenNativeCallables ()
 
bool HasLivePorts ()
 
ReceivePortPtr CreateReceivePort (const String &debug_name)
 
void SetReceivePortKeepAliveState (const ReceivePort &receive_port, bool keep_isolate_alive)
 
void CloseReceivePort (const ReceivePort &receive_port)
 
FfiCallbackMetadata::Metadataffi_callback_list_head ()
 
intptr_t BlockClassFinalization ()
 
intptr_t UnblockClassFinalization ()
 
bool AllowClassFinalization ()
 
void PrintJSON (JSONStream *stream, bool ref=true)
 
void PrintMemoryUsageJSON (JSONStream *stream)
 
void PrintPauseEventJSON (JSONStream *stream)
 
VMTagCountersvm_tag_counters ()
 
bool IsPaused () const
 
bool should_pause_post_service_request () const
 
void set_should_pause_post_service_request (bool value)
 
ErrorPtr PausePostRequest ()
 
uword user_tag () const
 
 ISOLATE_METRIC_LIST (ISOLATE_METRIC_ACCESSOR)
 
GrowableObjectArrayPtr tag_table () const
 
void set_tag_table (const GrowableObjectArray &value)
 
UserTagPtr current_tag () const
 
void set_current_tag (const UserTag &tag)
 
UserTagPtr default_tag () const
 
void set_default_tag (const UserTag &tag)
 
void SetStickyError (ErrorPtr sticky_error)
 
ErrorPtr sticky_error () const
 
DART_WARN_UNUSED_RESULT ErrorPtr StealStickyError ()
 
ErrorPtr InvokePendingServiceExtensionCalls ()
 
void AppendServiceExtensionCall (const Instance &closure, const String &method_name, const Array &parameter_keys, const Array &parameter_values, const Instance &reply_port, const Instance &id)
 
void RegisterServiceExtensionHandler (const String &name, const Instance &closure)
 
InstancePtr LookupServiceExtensionHandler (const String &name)
 
void PauseEventHandler ()
 
bool is_vm_isolate () const
 
void set_is_vm_isolate (bool value)
 
bool is_service_registered () const
 
void set_is_service_registered (bool value)
 
void FlagsCopyTo (Dart_IsolateFlags *api_flags) const
 
void FlagsCopyFrom (const Dart_IsolateFlags &api_flags)
 
bool has_attempted_stepping () const
 
void set_has_attempted_stepping (bool value)
 
HandlerInfoCachehandler_info_cache ()
 
CatchEntryMovesCachecatch_entry_moves_cache ()
 
WeakTableforward_table_new ()
 
void set_forward_table_new (WeakTable *table)
 
WeakTableforward_table_old ()
 
void set_forward_table_old (WeakTable *table)
 
void RememberLiveTemporaries ()
 
void DeferredMarkLiveTemporaries ()
 
std::unique_ptr< VirtualMemoryTakeRegexpBacktrackStack ()
 
void CacheRegexpBacktrackStack (std::unique_ptr< VirtualMemory > stack)
 
void init_loaded_prefixes_set_storage ()
 
bool IsPrefixLoaded (const LibraryPrefix &prefix) const
 
void SetPrefixIsLoaded (const LibraryPrefix &prefix)
 
MallocGrowableArray< ObjectPtr > * pointers_to_verify_at_exit ()
 
- Public Member Functions inherited from dart::IntrusiveDListEntry< Isolate >
 IntrusiveDListEntry ()
 
 ~IntrusiveDListEntry ()
 

Static Public Member Functions

static IsolateCurrent ()
 
static bool SendInternalLibMessage (Dart_Port main_port, LibMsgId msg_id, uint64_t capability)
 
static intptr_t finalizers_offset ()
 
static intptr_t single_step_offset ()
 
static intptr_t has_resumption_breakpoints_offset ()
 
static void SetCreateGroupCallback (Dart_IsolateGroupCreateCallback cb)
 
static Dart_IsolateGroupCreateCallback CreateGroupCallback ()
 
static void SetInitializeCallback_ (Dart_InitializeIsolateCallback cb)
 
static Dart_InitializeIsolateCallback InitializeCallback ()
 
static void SetShutdownCallback (Dart_IsolateShutdownCallback cb)
 
static Dart_IsolateShutdownCallback ShutdownCallback ()
 
static void SetCleanupCallback (Dart_IsolateCleanupCallback cb)
 
static Dart_IsolateCleanupCallback CleanupCallback ()
 
static void SetGroupCleanupCallback (Dart_IsolateGroupCleanupCallback cb)
 
static Dart_IsolateGroupCleanupCallback GroupCleanupCallback ()
 
static void SetRegisterKernelBlobCallback (Dart_RegisterKernelBlobCallback cb)
 
static Dart_RegisterKernelBlobCallback RegisterKernelBlobCallback ()
 
static void SetUnregisterKernelBlobCallback (Dart_UnregisterKernelBlobCallback cb)
 
static Dart_UnregisterKernelBlobCallback UnregisterKernelBlobCallback ()
 
static intptr_t user_tag_offset ()
 
static intptr_t current_tag_offset ()
 
static intptr_t default_tag_offset ()
 
static intptr_t IsolateListLength ()
 
static void VisitIsolates (IsolateVisitor *visitor)
 
static void FlagsInitialize (Dart_IsolateFlags *api_flags)
 
static void KillAllIsolates (LibMsgId msg_id)
 
static void KillAllSystemIsolates (LibMsgId msg_id)
 
static void KillIfExists (Isolate *isolate, LibMsgId msg_id)
 
static IsolateLookupIsolateByPort (Dart_Port port)
 
static std::unique_ptr< char[]> LookupIsolateNameByPort (Dart_Port port)
 
static void DisableIsolateCreation ()
 
static void EnableIsolateCreation ()
 
static bool IsolateCreationEnabled ()
 
static bool IsSystemIsolate (const Isolate *isolate)
 
static bool IsVMInternalIsolate (const Isolate *isolate)
 

Friends

class Dart
 
class IsolateKillerVisitor
 
class Become
 
class GCCompactor
 
class GCMarker
 
class SafepointHandler
 
class ObjectGraph
 
class HeapSnapshotWriter
 
class Scavenger
 
class HeapIterationScope
 
class ServiceIsolate
 
class Thread
 
class Timeline
 
class IsolateGroup
 
IsolateCreateWithinExistingIsolateGroup (IsolateGroup *g, const char *n, char **e)
 

Additional Inherited Members

- Protected Member Functions inherited from dart::BaseIsolate
 BaseIsolate ()
 
 ~BaseIsolate ()
 
- Protected Attributes inherited from dart::BaseIsolate
Threadscheduled_mutator_thread_ = nullptr
 
Threadmutator_thread_ = nullptr
 

Detailed Description

Definition at line 909 of file isolate.h.

Member Enumeration Documentation

◆ LibMsgId

Enumerator
kPauseMsg 
kResumeMsg 
kPingMsg 
kKillMsg 
kAddExitMsg 
kDelExitMsg 
kAddErrorMsg 
kDelErrorMsg 
kErrorFatalMsg 
kInterruptMsg 
kInternalKillMsg 
kDrainServiceExtensionsMsg 
kCheckForReload 

Definition at line 913 of file isolate.h.

913 {
914 kPauseMsg = 1,
915 kResumeMsg = 2,
916 kPingMsg = 3,
917 kKillMsg = 4,
918 kAddExitMsg = 5,
919 kDelExitMsg = 6,
920 kAddErrorMsg = 7,
921 kDelErrorMsg = 8,
922 kErrorFatalMsg = 9,
923
924 // Internal message ids.
925 kInterruptMsg = 10, // Break in the debugger.
926 kInternalKillMsg = 11, // Like kill, but does not run exit listeners, etc.
927 kDrainServiceExtensionsMsg = 12, // Invoke pending service extensions
928 kCheckForReload = 13, // Participate in other isolate group reload.
929 };
@ kDrainServiceExtensionsMsg
Definition isolate.h:927

◆ LibMsgPriority

Enumerator
kImmediateAction 
kBeforeNextEventAction 
kAsEventAction 

Definition at line 931 of file isolate.h.

931 {
935 };
@ kBeforeNextEventAction
Definition isolate.h:933

Constructor & Destructor Documentation

◆ ~Isolate()

dart::Isolate::~Isolate ( )

Definition at line 1744 of file isolate.cc.

1744 {
1745#if !defined(PRODUCT) && !defined(DART_PRECOMPILED_RUNTIME)
1746 // TODO(32796): Re-enable assertion.
1747 // RELEASE_ASSERT(program_reload_context_ == nullptr);
1748#endif // !defined(PRODUCT) && !defined(DART_PRECOMPILED_RUNTIME)
1749
1750#if !defined(PRODUCT)
1751 delete debugger_;
1752 debugger_ = nullptr;
1753 delete object_id_ring_;
1754 object_id_ring_ = nullptr;
1755 delete pause_loop_monitor_;
1756 pause_loop_monitor_ = nullptr;
1757#endif // !defined(PRODUCT)
1758
1759 free(name_);
1760 delete field_table_;
1761#if defined(USING_SIMULATOR)
1762 delete simulator_;
1763#endif
1764 delete message_handler_;
1765 message_handler_ =
1766 nullptr; // Fail fast if we send messages to a dead isolate.
1767 ASSERT(deopt_context_ ==
1768 nullptr); // No deopt in progress when isolate deleted.
1769 ASSERT(spawn_count_ == 0);
1770
1771 // The [Thread] object should've been released on the last
1772 // `Thread::ExitIsolate()` call.
1774 ASSERT(mutator_thread_ == nullptr);
1775}
Thread * scheduled_mutator_thread_
Thread * mutator_thread_
#define ASSERT(E)

Member Function Documentation

◆ AddErrorListener()

void dart::Isolate::AddErrorListener ( const SendPort listener)

Definition at line 2280 of file isolate.cc.

2280 {
2281 // Ensure a limit for the number of listeners remembered.
2282 const intptr_t kMaxListeners = compiler::target::kSmiMax / (6 * kWordSize);
2283
2284 const GrowableObjectArray& listeners = GrowableObjectArray::Handle(
2285 current_zone(), isolate_object_store()->error_listeners());
2286 SendPort& current = SendPort::Handle(current_zone());
2287 intptr_t insertion_index = -1;
2288 for (intptr_t i = 0; i < listeners.Length(); i++) {
2289 current ^= listeners.At(i);
2290 if (current.IsNull()) {
2291 if (insertion_index < 0) {
2292 insertion_index = i;
2293 }
2294 } else if (current.Id() == listener.Id()) {
2295 return;
2296 }
2297 }
2298 if (insertion_index < 0) {
2299 if (listeners.Length() >= kMaxListeners) {
2300 // Cannot grow the array of listeners beyond its max. Additional
2301 // listeners are ignored. In practice will never happen as we will
2302 // run out of memory beforehand.
2303 return;
2304 }
2305 listeners.Add(listener);
2306 } else {
2307 listeners.SetAt(insertion_index, listener);
2308 }
2309}
IsolateObjectStore * isolate_object_store() const
Definition isolate.h:960
static Object & Handle()
Definition object.h:407
constexpr intptr_t kWordSize
Definition globals.h:509

◆ AddExitListener()

void dart::Isolate::AddExitListener ( const SendPort listener,
const Instance response 
)

Definition at line 2212 of file isolate.cc.

2213 {
2214 // Ensure a limit for the number of listeners remembered.
2215 const intptr_t kMaxListeners = compiler::target::kSmiMax / (12 * kWordSize);
2216
2217 const GrowableObjectArray& listeners = GrowableObjectArray::Handle(
2218 current_zone(), isolate_object_store()->exit_listeners());
2219 SendPort& current = SendPort::Handle(current_zone());
2220 intptr_t insertion_index = -1;
2221 for (intptr_t i = 0; i < listeners.Length(); i += 2) {
2222 current ^= listeners.At(i);
2223 if (current.IsNull()) {
2224 if (insertion_index < 0) {
2225 insertion_index = i;
2226 }
2227 } else if (current.Id() == listener.Id()) {
2228 listeners.SetAt(i + 1, response);
2229 return;
2230 }
2231 }
2232 if (insertion_index < 0) {
2233 if (listeners.Length() >= kMaxListeners) {
2234 // Cannot grow the array of listeners beyond its max. Additional
2235 // listeners are ignored. In practice will never happen as we will
2236 // run out of memory beforehand.
2237 return;
2238 }
2239 listeners.Add(listener);
2240 listeners.Add(response);
2241 } else {
2242 listeners.SetAt(insertion_index, listener);
2243 listeners.SetAt(insertion_index + 1, response);
2244 }
2245}

◆ AddResumeCapability()

bool dart::Isolate::AddResumeCapability ( const Capability capability)

Definition at line 2161 of file isolate.cc.

2161 {
2162 // Ensure a limit for the number of resume capabilities remembered.
2163 const intptr_t kMaxResumeCapabilities =
2164 compiler::target::kSmiMax / (6 * kWordSize);
2165
2166 const GrowableObjectArray& caps = GrowableObjectArray::Handle(
2167 current_zone(), isolate_object_store()->resume_capabilities());
2168 Capability& current = Capability::Handle(current_zone());
2169 intptr_t insertion_index = -1;
2170 for (intptr_t i = 0; i < caps.Length(); i++) {
2171 current ^= caps.At(i);
2172 if (current.IsNull()) {
2173 if (insertion_index < 0) {
2174 insertion_index = i;
2175 }
2176 } else if (current.Id() == capability.Id()) {
2177 return false;
2178 }
2179 }
2180 if (insertion_index < 0) {
2181 if (caps.Length() >= kMaxResumeCapabilities) {
2182 // Cannot grow the array of resume capabilities beyond its max. Additional
2183 // pause requests are ignored. In practice will never happen as we will
2184 // run out of memory beforehand.
2185 return false;
2186 }
2187 caps.Add(capability);
2188 } else {
2189 caps.SetAt(insertion_index, capability);
2190 }
2191 return true;
2192}

◆ AllowClassFinalization()

bool dart::Isolate::AllowClassFinalization ( )
inline

Definition at line 1248 of file isolate.h.

1248 {
1249 ASSERT(defer_finalization_count_ >= 0);
1250 return defer_finalization_count_ == 0;
1251 }

◆ AppendServiceExtensionCall()

void dart::Isolate::AppendServiceExtensionCall ( const Instance closure,
const String method_name,
const Array parameter_keys,
const Array parameter_values,
const Instance reply_port,
const Instance id 
)

Definition at line 3286 of file isolate.cc.

3291 {
3292 if (FLAG_trace_service) {
3293 OS::PrintErr("[+%" Pd64
3294 "ms] Isolate %s ENQUEUING request for extension %s\n",
3295 Dart::UptimeMillis(), name(), method_name.ToCString());
3296 }
3297 GrowableObjectArray& calls =
3298 GrowableObjectArray::Handle(pending_service_extension_calls());
3299 bool schedule_drain = false;
3300 if (calls.IsNull()) {
3301 calls = GrowableObjectArray::New();
3302 ASSERT(!calls.IsNull());
3303 set_pending_service_extension_calls(calls);
3304 schedule_drain = true;
3305 }
3306 ASSERT(kPendingHandlerIndex == 0);
3307 calls.Add(closure);
3308 ASSERT(kPendingMethodNameIndex == 1);
3309 calls.Add(method_name);
3310 ASSERT(kPendingKeysIndex == 2);
3311 calls.Add(parameter_keys);
3312 ASSERT(kPendingValuesIndex == 3);
3313 calls.Add(parameter_values);
3314 ASSERT(kPendingReplyPortIndex == 4);
3315 calls.Add(reply_port);
3316 ASSERT(kPendingIdIndex == 5);
3317 calls.Add(id);
3318
3319 if (schedule_drain) {
3320 const Array& msg = Array::Handle(Array::New(3));
3321 Object& element = Object::Handle();
3323 msg.SetAt(0, element);
3325 msg.SetAt(1, element);
3327 msg.SetAt(2, element);
3328 std::unique_ptr<Message> message = WriteMessage(
3329 /* same_group */ false, msg, main_port(), Message::kOOBPriority);
3330 bool posted = PortMap::PostMessage(std::move(message));
3331 ASSERT(posted);
3332 }
3333}
static ArrayPtr New(intptr_t len, Heap::Space space=Heap::kNew)
Definition object.h:10933
static int64_t UptimeMillis()
Definition dart.h:76
static GrowableObjectArrayPtr New(Heap::Space space=Heap::kNew)
Definition object.h:11118
Dart_Port main_port() const
Definition isolate.h:1001
const char * name() const
Definition isolate.h:996
@ kIsolateLibOOBMsg
Definition message.h:42
static void static void PrintErr(const char *format,...) PRINTF_ATTRIBUTE(1
static bool PostMessage(std::unique_ptr< Message > message, bool before_events=false)
Definition port.cc:152
static SmiPtr New(intptr_t value)
Definition object.h:9985
Win32Message message
std::unique_ptr< Message > WriteMessage(bool same_group, const Object &obj, Dart_Port dest_port, Message::Priority priority)
#define Pd64
Definition globals.h:416

◆ bequeath()

void dart::Isolate::bequeath ( std::unique_ptr< Bequest bequest)
inline

Definition at line 985 of file isolate.h.

985 {
986 bequest_ = std::move(bequest);
987 }

◆ BlockClassFinalization()

intptr_t dart::Isolate::BlockClassFinalization ( )
inline

Definition at line 1238 of file isolate.h.

1238 {
1239 ASSERT(defer_finalization_count_ >= 0);
1240 return defer_finalization_count_++;
1241 }

◆ CacheRegexpBacktrackStack()

void dart::Isolate::CacheRegexpBacktrackStack ( std::unique_ptr< VirtualMemory stack)
inline

Definition at line 1424 of file isolate.h.

1424 {
1425 regexp_backtracking_stack_cache_ = std::move(stack);
1426 }

◆ CallDeferredLoadHandler()

ObjectPtr dart::Isolate::CallDeferredLoadHandler ( intptr_t  id)

Definition at line 1905 of file isolate.cc.

1905 {
1906 Thread* thread = Thread::Current();
1907 Api::Scope api_scope(thread);
1908 Dart_Handle api_result;
1909 {
1910 TransitionVMToNative transition(thread);
1912 api_result = group()->deferred_load_handler()(id);
1913 }
1914 return Api::UnwrapHandle(api_result);
1915}
#define RELEASE_ASSERT(cond)
Definition assert.h:327
static ObjectPtr UnwrapHandle(Dart_Handle object)
Dart_DeferredLoadHandler deferred_load_handler() const
Definition isolate.h:556
bool HasDeferredLoadHandler() const
Definition isolate.h:1035
IsolateGroup * group() const
Definition isolate.h:990
friend class Thread
Definition isolate.h:1701
static Thread * Current()
Definition thread.h:361
struct _Dart_Handle * Dart_Handle
Definition dart_api.h:258
const uintptr_t id

◆ catch_entry_moves_cache()

CatchEntryMovesCache * dart::Isolate::catch_entry_moves_cache ( )
inline

Definition at line 1405 of file isolate.h.

1405 {
1406 return &catch_entry_moves_cache_;
1407 }

◆ CleanupCallback()

static Dart_IsolateCleanupCallback dart::Isolate::CleanupCallback ( )
inlinestatic

Definition at line 1177 of file isolate.h.

1177 {
1178 return cleanup_callback_;
1179 }

◆ CloseReceivePort()

void dart::Isolate::CloseReceivePort ( const ReceivePort receive_port)

Definition at line 3739 of file isolate.cc.

3739 {
3740 // Closing an already closed port is a NOP.
3741 if (!receive_port.is_open()) return;
3742
3743 ASSERT(open_ports_ > 0);
3744 const bool ok = PortMap::ClosePort(receive_port.Id());
3746
3747 if (receive_port.keep_isolate_alive()) {
3748 --open_ports_keepalive_;
3749 receive_port.set_keep_isolate_alive(false);
3750 }
3751 --open_ports_;
3752 receive_port.set_is_open(false);
3753}
static bool ok(int result)
static bool ClosePort(Dart_Port id, MessageHandler **message_handler=nullptr)
Definition port.cc:90

◆ CreateAsyncFfiCallback()

FfiCallbackMetadata::Trampoline dart::Isolate::CreateAsyncFfiCallback ( Zone zone,
const Function send_function,
Dart_Port  send_port 
)

Definition at line 3686 of file isolate.cc.

3689 {
3691 this, zone, send_function, send_port, &ffi_callback_list_head_);
3692}
static FfiCallbackMetadata * Instance()
Trampoline CreateAsyncFfiCallback(Isolate *isolate, Zone *zone, const Function &function, Dart_Port send_port, Metadata **list_head)

◆ CreateGroupCallback()

static Dart_IsolateGroupCreateCallback dart::Isolate::CreateGroupCallback ( )
inlinestatic

Definition at line 1156 of file isolate.h.

1156 {
1157 return create_group_callback_;
1158 }

◆ CreateIsolateLocalFfiCallback()

FfiCallbackMetadata::Trampoline dart::Isolate::CreateIsolateLocalFfiCallback ( Zone zone,
const Function trampoline,
const Closure target,
bool  keep_isolate_alive 
)

Definition at line 3694 of file isolate.cc.

3698 {
3699 if (keep_isolate_alive) {
3701 }
3703 this, zone, trampoline, target, &ffi_callback_list_head_);
3704}
Trampoline CreateIsolateLocalFfiCallback(Isolate *isolate, Zone *zone, const Function &function, const Closure &closure, Metadata **list_head)
void UpdateNativeCallableKeepIsolateAliveCounter(intptr_t delta)
Definition isolate.cc:3760
uint32_t * target

◆ CreateReceivePort()

ReceivePortPtr dart::Isolate::CreateReceivePort ( const String debug_name)

Definition at line 3712 of file isolate.cc.

3712 {
3714 ++open_ports_;
3715 ++open_ports_keepalive_;
3716 return ReceivePort::New(port_id, debug_name);
3717}
MessageHandler * message_handler() const
Definition isolate.cc:2380
static Dart_Port CreatePort(MessageHandler *handler)
Definition port.cc:55
static ReceivePortPtr New(Dart_Port id, const String &debug_name, Heap::Space space=Heap::kNew)
Definition object.cc:25862
int64_t Dart_Port
Definition dart_api.h:1524

◆ Current()

static Isolate * dart::Isolate::Current ( )
inlinestatic

Definition at line 939 of file isolate.h.

939 {
940 Thread* thread = Thread::Current();
941 return thread == nullptr ? nullptr : thread->isolate();
942 }

◆ current_allocation_sample_block()

SampleBlock * dart::Isolate::current_allocation_sample_block ( ) const
inline

Definition at line 1071 of file isolate.h.

1071 {
1072 return current_allocation_sample_block_;
1073 }

◆ current_sample_block()

SampleBlock * dart::Isolate::current_sample_block ( ) const
inline

Definition at line 1064 of file isolate.h.

1064{ return current_sample_block_; }

◆ current_tag()

UserTagPtr dart::Isolate::current_tag ( ) const
inline

Definition at line 1301 of file isolate.h.

1301{ return current_tag_; }

◆ current_tag_offset()

static intptr_t dart::Isolate::current_tag_offset ( )
inlinestatic

Definition at line 1282 of file isolate.h.

1282 {
1283 return OFFSET_OF(Isolate, current_tag_);
1284 }
#define OFFSET_OF(type, field)
Definition globals.h:138

◆ debugger()

Debugger * dart::Isolate::debugger ( ) const
inline

Definition at line 1061 of file isolate.h.

1061{ return debugger_; }

◆ DecrementSpawnCount()

void dart::Isolate::DecrementSpawnCount ( )

Definition at line 3670 of file isolate.cc.

3670 {
3671 MonitorLocker ml(&spawn_count_monitor_);
3672 ASSERT(spawn_count_ > 0);
3673 spawn_count_--;
3674 ml.Notify();
3675}

◆ default_tag()

UserTagPtr dart::Isolate::default_tag ( ) const
inline

Definition at line 1304 of file isolate.h.

1304{ return default_tag_; }

◆ default_tag_offset()

static intptr_t dart::Isolate::default_tag_offset ( )
inlinestatic

Definition at line 1285 of file isolate.h.

1285 {
1286 return OFFSET_OF(Isolate, default_tag_);
1287 }

◆ DeferredMarkLiveTemporaries()

void dart::Isolate::DeferredMarkLiveTemporaries ( )

Definition at line 2754 of file isolate.cc.

2754 {
2755 if (mutator_thread_ != nullptr) {
2757 }
2758}
void DeferredMarkLiveTemporaries()
Definition thread.cc:1078

◆ DeleteFfiCallback()

void dart::Isolate::DeleteFfiCallback ( FfiCallbackMetadata::Trampoline  callback)

Definition at line 3755 of file isolate.cc.

3755 {
3757 &ffi_callback_list_head_);
3758}
void DeleteCallback(Trampoline trampoline, Metadata **list_head)
FlKeyEvent uint64_t FlKeyResponderAsyncCallback callback

◆ deopt_context()

DeoptContext * dart::Isolate::deopt_context ( ) const
inline

Definition at line 1208 of file isolate.h.

1208{ return deopt_context_; }

◆ DisableIsolateCreation()

void dart::Isolate::DisableIsolateCreation ( )
static

Definition at line 3544 of file isolate.cc.

3544 {
3545 MonitorLocker ml(isolate_creation_monitor_);
3546 creation_enabled_ = false;
3547}

◆ EnableIsolateCreation()

void dart::Isolate::EnableIsolateCreation ( )
static

Definition at line 3549 of file isolate.cc.

3549 {
3550 MonitorLocker ml(isolate_creation_monitor_);
3551 creation_enabled_ = true;
3552}

◆ EnsureObjectIdRing()

ObjectIdRing * dart::Isolate::EnsureObjectIdRing ( )

Definition at line 2968 of file isolate.cc.

2968 {
2969 if (object_id_ring_ == nullptr) {
2970 object_id_ring_ = new ObjectIdRing();
2971 }
2972 return object_id_ring_;
2973}

◆ environment_callback()

Dart_EnvironmentCallback dart::Isolate::environment_callback ( ) const
inline

Definition at line 1028 of file isolate.h.

1028 {
1029 return environment_callback_;
1030 }

◆ ErrorsFatal()

bool dart::Isolate::ErrorsFatal ( ) const
inline

Definition at line 1139 of file isolate.h.

1139{ return LoadIsolateFlagsBit<ErrorsFatalBit>(); }

◆ ffi_callback_list_head()

FfiCallbackMetadata::Metadata * dart::Isolate::ffi_callback_list_head ( )
inline

Definition at line 1234 of file isolate.h.

1234 {
1235 return ffi_callback_list_head_;
1236 }

◆ field_table()

FieldTable * dart::Isolate::field_table ( ) const
inline

Definition at line 953 of file isolate.h.

953{ return field_table_; }

◆ finalizers_offset()

static intptr_t dart::Isolate::finalizers_offset ( )
inlinestatic

Definition at line 1024 of file isolate.h.

1024 {
1025 return OFFSET_OF(Isolate, finalizers_);
1026 }

◆ FlagsCopyFrom()

void dart::Isolate::FlagsCopyFrom ( const Dart_IsolateFlags api_flags)

Definition at line 1638 of file isolate.cc.

1638 {
1639#if defined(DART_PRECOMPILER)
1640#define FLAG_FOR_PRECOMPILER(action) action
1641#else
1642#define FLAG_FOR_PRECOMPILER(action)
1643#endif
1644
1645#if !defined(PRODUCT)
1646#define FLAG_FOR_NONPRODUCT(action) action
1647#else
1648#define FLAG_FOR_NONPRODUCT(action)
1649#endif
1650
1651#define FLAG_FOR_PRODUCT(action) action
1652
1653#define SET_FROM_FLAG(when, name, bitname, isolate_flag, flag) \
1654 FLAG_FOR_##when(isolate_flags_ = bitname##Bit::update( \
1655 api_flags.isolate_flag, isolate_flags_));
1656
1658#undef FLAG_FOR_NONPRODUCT
1659#undef FLAG_FOR_PRECOMPILER
1660#undef FLAG_FOR_PRODUCT
1661#undef SET_FROM_FLAG
1662}
#define BOOL_ISOLATE_FLAG_LIST(V)
Definition isolate.h:151
#define SET_FROM_FLAG(when, name, bitname, isolate_flag, flag)

◆ FlagsCopyTo()

void dart::Isolate::FlagsCopyTo ( Dart_IsolateFlags api_flags) const

Definition at line 1625 of file isolate.cc.

1625 {
1626 group()->FlagsCopyTo(api_flags);
1627
1629#define INIT_FROM_FIELD(when, name, bitname, isolate_flag, flag) \
1630 api_flags->isolate_flag = name();
1632#undef INIT_FROM_FIELD
1633 api_flags->is_service_isolate = false;
1634 api_flags->is_kernel_isolate = false;
1635 api_flags->null_safety = true;
1636}
void FlagsCopyTo(Dart_IsolateFlags *api_flags)
Definition isolate.cc:1575
#define DART_FLAGS_CURRENT_VERSION
Definition dart_api.h:582
bool is_service_isolate
Definition dart_api.h:593
#define INIT_FROM_FIELD(when, name, bitname, isolate_flag, flag)

◆ FlagsInitialize()

void dart::Isolate::FlagsInitialize ( Dart_IsolateFlags api_flags)
static

Definition at line 1612 of file isolate.cc.

1612 {
1614
1616#define INIT_FROM_FLAG(when, name, bitname, isolate_flag, flag) \
1617 api_flags->isolate_flag = flag;
1619#undef INIT_FROM_FLAG
1620 api_flags->is_service_isolate = false;
1621 api_flags->is_kernel_isolate = false;
1622 api_flags->null_safety = true;
1623}
static void FlagsInitialize(Dart_IsolateFlags *api_flags)
Definition isolate.cc:1564
#define INIT_FROM_FLAG(when, name, bitname, isolate_flag, flag)

◆ forward_table_new()

WeakTable * dart::Isolate::forward_table_new ( )
inline

Definition at line 1411 of file isolate.h.

1411{ return forward_table_new_.get(); }

◆ forward_table_old()

WeakTable * dart::Isolate::forward_table_old ( )
inline

Definition at line 1414 of file isolate.h.

1414{ return forward_table_old_.get(); }

◆ GetAndClearResumeRequest()

bool dart::Isolate::GetAndClearResumeRequest ( )
inline

Definition at line 1116 of file isolate.h.

1116 {
1117 return UpdateIsolateFlagsBit<ResumeRequestBit>(false);
1118 }

◆ group()

IsolateGroup * dart::Isolate::group ( ) const
inline

Definition at line 990 of file isolate.h.

990{ return isolate_group_; }

◆ GroupCleanupCallback()

static Dart_IsolateGroupCleanupCallback dart::Isolate::GroupCleanupCallback ( )
inlinestatic

Definition at line 1184 of file isolate.h.

1184 {
1185 return cleanup_group_callback_;
1186 }

◆ handler_info_cache()

HandlerInfoCache * dart::Isolate::handler_info_cache ( )
inline

Definition at line 1403 of file isolate.h.

1403{ return &handler_info_cache_; }

◆ has_attempted_stepping()

bool dart::Isolate::has_attempted_stepping ( ) const
inline

Definition at line 1374 of file isolate.h.

1374 {
1375 return LoadIsolateFlagsBit<HasAttemptedSteppingBit>();
1376 }

◆ has_resumption_breakpoints()

bool dart::Isolate::has_resumption_breakpoints ( ) const
inline

Definition at line 1094 of file isolate.h.

1094 {
1095 return has_resumption_breakpoints_;
1096 }

◆ has_resumption_breakpoints_offset()

static intptr_t dart::Isolate::has_resumption_breakpoints_offset ( )
inlinestatic

Definition at line 1097 of file isolate.h.

1097 {
1098 return OFFSET_OF(Isolate, has_resumption_breakpoints_);
1099 }

◆ HasDeferredLoadHandler()

bool dart::Isolate::HasDeferredLoadHandler ( ) const
inline

Definition at line 1035 of file isolate.h.

1035 {
1036 return group()->deferred_load_handler() != nullptr;
1037 }

◆ HasLivePorts()

bool dart::Isolate::HasLivePorts ( )

Definition at line 3706 of file isolate.cc.

3706 {
3707 ASSERT(0 <= open_ports_ && 0 <= open_ports_keepalive_ &&
3708 open_ports_keepalive_ <= open_ports_);
3709 return open_ports_keepalive_ > 0;
3710}

◆ HasOpenNativeCallables()

bool dart::Isolate::HasOpenNativeCallables ( )

Definition at line 3765 of file isolate.cc.

3765 {
3766 ASSERT(ffi_callback_keep_alive_counter_ >= 0);
3767 return ffi_callback_keep_alive_counter_ > 0;
3768}

◆ HasPendingMessages()

bool dart::Isolate::HasPendingMessages ( )

Definition at line 1320 of file isolate.cc.

1320 {
1321 return message_handler_->HasMessages() || message_handler_->HasOOBMessages();
1322}

◆ IncrementSpawnCount()

void dart::Isolate::IncrementSpawnCount ( )

Definition at line 3665 of file isolate.cc.

3665 {
3666 MonitorLocker ml(&spawn_count_monitor_);
3667 spawn_count_++;
3668}

◆ init_callback_data()

void * dart::Isolate::init_callback_data ( ) const
inline

Definition at line 1021 of file isolate.h.

1021{ return init_callback_data_; }

◆ init_loaded_prefixes_set_storage()

void dart::Isolate::init_loaded_prefixes_set_storage ( )

Definition at line 2760 of file isolate.cc.

2760 {
2761 ASSERT(loaded_prefixes_set_storage_ == nullptr);
2762 loaded_prefixes_set_storage_ =
2763 HashTables::New<UnorderedHashSet<LibraryPrefixMapTraits> >(4);
2764}

◆ InitializeCallback()

static Dart_InitializeIsolateCallback dart::Isolate::InitializeCallback ( )
inlinestatic

Definition at line 1163 of file isolate.h.

1163 {
1164 return initialize_callback_;
1165 }

◆ InvokePendingServiceExtensionCalls()

ErrorPtr dart::Isolate::InvokePendingServiceExtensionCalls ( )

Definition at line 3207 of file isolate.cc.

3207 {
3208 GrowableObjectArray& calls =
3209 GrowableObjectArray::Handle(GetAndClearPendingServiceExtensionCalls());
3210 if (calls.IsNull()) {
3211 return Error::null();
3212 }
3213 // Grab run function.
3214 const Library& developer_lib = Library::Handle(Library::DeveloperLibrary());
3215 ASSERT(!developer_lib.IsNull());
3216 const Function& run_extension = Function::Handle(
3217 developer_lib.LookupFunctionAllowPrivate(Symbols::_runExtension()));
3218 ASSERT(!run_extension.IsNull());
3219
3220 const Array& arguments =
3221 Array::Handle(Array::New(kPendingEntrySize + 1, Heap::kNew));
3222 Object& result = Object::Handle();
3223 String& method_name = String::Handle();
3224 Instance& closure = Instance::Handle();
3225 Array& parameter_keys = Array::Handle();
3226 Array& parameter_values = Array::Handle();
3227 Instance& reply_port = Instance::Handle();
3228 Instance& id = Instance::Handle();
3229 for (intptr_t i = 0; i < calls.Length(); i += kPendingEntrySize) {
3230 // Grab arguments for call.
3231 closure ^= calls.At(i + kPendingHandlerIndex);
3232 ASSERT(!closure.IsNull());
3233 arguments.SetAt(kPendingHandlerIndex, closure);
3234 method_name ^= calls.At(i + kPendingMethodNameIndex);
3235 ASSERT(!method_name.IsNull());
3236 arguments.SetAt(kPendingMethodNameIndex, method_name);
3237 parameter_keys ^= calls.At(i + kPendingKeysIndex);
3238 ASSERT(!parameter_keys.IsNull());
3239 arguments.SetAt(kPendingKeysIndex, parameter_keys);
3240 parameter_values ^= calls.At(i + kPendingValuesIndex);
3241 ASSERT(!parameter_values.IsNull());
3242 arguments.SetAt(kPendingValuesIndex, parameter_values);
3243 reply_port ^= calls.At(i + kPendingReplyPortIndex);
3244 ASSERT(!reply_port.IsNull());
3245 arguments.SetAt(kPendingReplyPortIndex, reply_port);
3246 id ^= calls.At(i + kPendingIdIndex);
3247 arguments.SetAt(kPendingIdIndex, id);
3248 arguments.SetAt(kPendingEntrySize, Bool::Get(FLAG_trace_service));
3249
3250 if (FLAG_trace_service) {
3251 OS::PrintErr("[+%" Pd64 "ms] Isolate %s invoking _runExtension for %s\n",
3252 Dart::UptimeMillis(), name(), method_name.ToCString());
3253 }
3254 result = DartEntry::InvokeFunction(run_extension, arguments);
3255 if (FLAG_trace_service) {
3256 OS::PrintErr("[+%" Pd64 "ms] Isolate %s _runExtension complete for %s\n",
3257 Dart::UptimeMillis(), name(), method_name.ToCString());
3258 }
3259 // Propagate the error.
3260 if (result.IsError()) {
3261 // Remaining service extension calls are dropped.
3262 if (!result.IsUnwindError()) {
3263 // Send error back over the protocol.
3264 Service::PostError(method_name, parameter_keys, parameter_values,
3265 reply_port, id, Error::Cast(result));
3266 }
3267 return Error::Cast(result).ptr();
3268 }
3269 // Drain the microtask queue.
3271 // Propagate the error.
3272 if (result.IsError()) {
3273 // Remaining service extension calls are dropped.
3274 return Error::Cast(result).ptr();
3275 }
3276 }
3277 return Error::null();
3278}
static const Bool & Get(bool value)
Definition object.h:10780
static ObjectPtr InvokeFunction(const Function &function, const Array &arguments)
Definition dart_entry.cc:31
static ObjectPtr DrainMicrotaskQueue()
@ kNew
Definition heap.h:38
static LibraryPtr DeveloperLibrary()
Definition object.cc:14842
static ObjectPtr null()
Definition object.h:433
static void PostError(const String &method_name, const Array &parameter_keys, const Array &parameter_values, const Instance &reply_port, const Instance &id, const Error &error)
Definition service.cc:937
GAsyncResult * result
std::function< void()> closure
Definition closure.h:14

◆ is_runnable()

bool dart::Isolate::is_runnable ( ) const
inline

Definition at line 1048 of file isolate.h.

1048{ return LoadIsolateFlagsBit<IsRunnableBit>(); }

◆ is_service_registered()

bool dart::Isolate::is_service_registered ( ) const
inline

Definition at line 1338 of file isolate.h.

1338 {
1339 return LoadIsolateFlagsBit<IsServiceRegisteredBit>();
1340 }

◆ is_vm_isolate()

bool dart::Isolate::is_vm_isolate ( ) const
inline

Definition at line 1333 of file isolate.h.

1333{ return LoadIsolateFlagsBit<IsVMIsolateBit>(); }

◆ IsDeoptimizing()

bool dart::Isolate::IsDeoptimizing ( ) const
inline

Definition at line 1207 of file isolate.h.

1207{ return deopt_context_ != nullptr; }

◆ ISOLATE_METRIC_LIST()

dart::Isolate::ISOLATE_METRIC_LIST ( ISOLATE_METRIC_ACCESSOR  )

◆ isolate_object_store()

IsolateObjectStore * dart::Isolate::isolate_object_store ( ) const
inline

Definition at line 960 of file isolate.h.

960 {
961 return isolate_object_store_.get();
962 }

◆ IsolateCreationEnabled()

bool dart::Isolate::IsolateCreationEnabled ( )
static

Definition at line 3554 of file isolate.cc.

3554 {
3555 MonitorLocker ml(isolate_creation_monitor_);
3556 return creation_enabled_;
3557}

◆ IsolateListLength()

intptr_t dart::Isolate::IsolateListLength ( )
static

Definition at line 3495 of file isolate.cc.

3495 {
3496 intptr_t count = 0;
3498 group->ForEachIsolate([&](Isolate* isolate) { count++; });
3499 });
3500 return count;
3501}
int count
void ForEachIsolate(std::function< void(Isolate *isolate)> function, bool at_safepoint=false)
Definition isolate.cc:2798
static void ForEach(std::function< void(IsolateGroup *)> action)
Definition isolate.cc:677
friend class IsolateGroup
Definition isolate.h:1703

◆ IsPaused()

bool dart::Isolate::IsPaused ( ) const

Definition at line 1969 of file isolate.cc.

1969 {
1970#if defined(PRODUCT)
1971 return false;
1972#else
1973 return (debugger_ != nullptr) && (debugger_->PauseEvent() != nullptr);
1974#endif // !defined(PRODUCT)
1975}
const ServiceEvent * PauseEvent() const
Definition debugger.h:731

◆ IsPrefixLoaded()

bool dart::Isolate::IsPrefixLoaded ( const LibraryPrefix prefix) const

Definition at line 2766 of file isolate.cc.

2766 {
2767 UnorderedHashSet<LibraryPrefixMapTraits> loaded_prefixes_set(
2768 loaded_prefixes_set_storage_);
2769 bool result = loaded_prefixes_set.GetOrNull(prefix) != Object::null();
2770 loaded_prefixes_set.Release();
2771 return result;
2772}

◆ IsScheduled()

bool dart::Isolate::IsScheduled ( )
inline

Definition at line 944 of file isolate.h.

944{ return scheduled_mutator_thread() != nullptr; }
Thread * scheduled_mutator_thread() const
Definition isolate.h:945

◆ IsSystemIsolate()

static bool dart::Isolate::IsSystemIsolate ( const Isolate isolate)
inlinestatic

Definition at line 1398 of file isolate.h.

1398 {
1399 return IsolateGroup::IsSystemIsolateGroup(isolate->group());
1400 }
static bool IsSystemIsolateGroup(const IsolateGroup *group)
Definition isolate.cc:3559

◆ IsVMInternalIsolate()

bool dart::Isolate::IsVMInternalIsolate ( const Isolate isolate)
static

Definition at line 3563 of file isolate.cc.

3563 {
3564 return isolate->is_kernel_isolate() || isolate->is_service_isolate() ||
3565 isolate->is_vm_isolate();
3566}

◆ KillAllIsolates()

void dart::Isolate::KillAllIsolates ( LibMsgId  msg_id)
static

Definition at line 3650 of file isolate.cc.

3650 {
3651 IsolateKillerVisitor visitor(msg_id);
3652 VisitIsolates(&visitor);
3653}
static void VisitIsolates(IsolateVisitor *visitor)
Definition isolate.cc:3485
friend class IsolateKillerVisitor
Definition isolate.h:1438

◆ KillAllSystemIsolates()

void dart::Isolate::KillAllSystemIsolates ( LibMsgId  msg_id)
static

Definition at line 3655 of file isolate.cc.

3655 {
3656 IsolateKillerVisitor visitor(msg_id, /*kill_system_isolates=*/true);
3657 VisitIsolates(&visitor);
3658}

◆ KillIfExists()

void dart::Isolate::KillIfExists ( Isolate isolate,
LibMsgId  msg_id 
)
static

Definition at line 3660 of file isolate.cc.

3660 {
3661 IsolateKillerVisitor visitor(isolate, msg_id);
3662 VisitIsolates(&visitor);
3663}

◆ last_resume_timestamp()

int64_t dart::Isolate::last_resume_timestamp ( ) const
inline

Definition at line 1112 of file isolate.h.

1112{ return last_resume_timestamp_; }

◆ LookupIsolateByPort()

Isolate * dart::Isolate::LookupIsolateByPort ( Dart_Port  port)
static

Definition at line 3503 of file isolate.cc.

3503 {
3504 Isolate* match = nullptr;
3506 group->ForEachIsolate([&](Isolate* isolate) {
3507 if (isolate->main_port() == port) {
3508 match = isolate;
3509 }
3510 });
3511 });
3512 return match;
3513}
static bool match(const char *needle, const char *haystack)
Definition DM.cpp:1132

◆ LookupIsolateNameByPort()

std::unique_ptr< char[]> dart::Isolate::LookupIsolateNameByPort ( Dart_Port  port)
static

Definition at line 3515 of file isolate.cc.

3515 {
3516 MonitorLocker ml(isolate_creation_monitor_);
3517 std::unique_ptr<char[]> result;
3519 group->ForEachIsolate([&](Isolate* isolate) {
3520 if (isolate->main_port() == port) {
3521 const size_t len = strlen(isolate->name()) + 1;
3522 result = std::unique_ptr<char[]>(new char[len]);
3523 strncpy(result.get(), isolate->name(), len);
3524 }
3525 });
3526 });
3527 return result;
3528}

◆ LookupServiceExtensionHandler()

InstancePtr dart::Isolate::LookupServiceExtensionHandler ( const String name)

Definition at line 3375 of file isolate.cc.

3375 {
3376 const GrowableObjectArray& handlers =
3377 GrowableObjectArray::Handle(registered_service_extension_handlers());
3378 if (handlers.IsNull()) {
3379 return Instance::null();
3380 }
3381 String& handler_name = String::Handle();
3382 for (intptr_t i = 0; i < handlers.Length(); i += kRegisteredEntrySize) {
3383 handler_name ^= handlers.At(i + kRegisteredNameIndex);
3384 ASSERT(!handler_name.IsNull());
3385 if (handler_name.Equals(name)) {
3386 return Instance::RawCast(handlers.At(i + kRegisteredHandlerIndex));
3387 }
3388 }
3389 return Instance::null();
3390}
static ObjectPtr RawCast(ObjectPtr obj)
Definition object.h:325

◆ main_port()

Dart_Port dart::Isolate::main_port ( ) const
inline

Definition at line 1001 of file isolate.h.

1001{ return main_port_; }

◆ MakeRunnable()

const char * dart::Isolate::MakeRunnable ( )

Definition at line 2104 of file isolate.cc.

2104 {
2105 MutexLocker ml(&mutex_);
2106 // Check if we are in a valid state to make the isolate runnable.
2107 if (is_runnable() == true) {
2108 return "Isolate is already runnable";
2109 }
2110 if (group()->object_store()->root_library() == Library::null()) {
2111 return "The embedder has to ensure there is a root library (e.g. by "
2112 "calling Dart_LoadScriptFromKernel ).";
2113 }
2115 return nullptr;
2116}
void MakeRunnableLocked()
Definition isolate.cc:2118
bool is_runnable() const
Definition isolate.h:1048

◆ MakeRunnableLocked()

void dart::Isolate::MakeRunnableLocked ( )

Definition at line 2118 of file isolate.cc.

2118 {
2120 ASSERT(!is_runnable());
2121 ASSERT(group()->object_store()->root_library() != Library::null());
2122
2123 // Set the isolate as runnable and if we are being spawned schedule
2124 // isolate on thread pool for execution.
2125 set_is_runnable(true);
2126#ifndef PRODUCT
2127 if (!Isolate::IsSystemIsolate(this)) {
2128 if (FLAG_pause_isolates_on_unhandled_exceptions) {
2130 }
2131 }
2132#endif // !PRODUCT
2133#if defined(SUPPORT_TIMELINE)
2134 TimelineStream* stream = Timeline::GetIsolateStream();
2135 ASSERT(stream != nullptr);
2136 TimelineEvent* event = stream->StartEvent();
2137 if (event != nullptr) {
2138 event->Instant("Runnable");
2139 event->Complete();
2140 }
2141#endif
2142#ifndef PRODUCT
2143 if (!Isolate::IsSystemIsolate(this) && Service::isolate_stream.enabled()) {
2144 ServiceEvent runnableEvent(this, ServiceEvent::kIsolateRunnable);
2145 Service::HandleEvent(&runnableEvent, /* enter_safepoint */ false);
2146 }
2147 GetRunnableLatencyMetric()->set_value(UptimeMicros());
2148#endif // !PRODUCT
2149}
void SetExceptionPauseInfo(Dart_ExceptionPauseInfo pause_info)
Definition debugger.cc:1860
static bool IsSystemIsolate(const Isolate *isolate)
Definition isolate.h:1398
Debugger * debugger() const
Definition isolate.h:1061
void set_is_runnable(bool value)
Definition isolate.h:1049
int64_t UptimeMicros() const
Definition isolate.cc:1950
bool IsOwnedByCurrentThread() const
Definition os_thread.h:401
static StreamInfo isolate_stream
Definition service.h:180
static void HandleEvent(ServiceEvent *event, bool enter_safepoint=true)
Definition service.cc:1206
FlKeyEvent * event
@ kPauseOnUnhandledExceptions
Definition debugger.h:504

◆ message_handler()

MessageHandler * dart::Isolate::message_handler ( ) const

Definition at line 2380 of file isolate.cc.

2380 {
2381 return message_handler_;
2382}

◆ message_notify_callback()

Dart_MessageNotifyCallback dart::Isolate::message_notify_callback ( ) const
inline

Definition at line 964 of file isolate.h.

964 {
965 return message_notify_callback_.load(std::memory_order_relaxed);
966 }

◆ mutator_thread()

Thread * dart::Isolate::mutator_thread ( ) const

Definition at line 1884 of file isolate.cc.

1884 {
1885 ASSERT(thread_registry() != nullptr);
1886 return mutator_thread_;
1887}
ThreadRegistry * thread_registry() const
Definition isolate.h:947

◆ mutex()

Mutex * dart::Isolate::mutex ( )
inline

Definition at line 1058 of file isolate.h.

1058{ return &mutex_; }

◆ name()

const char * dart::Isolate::name ( ) const
inline

Definition at line 996 of file isolate.h.

996{ return name_; }

◆ NotifyErrorListeners()

bool dart::Isolate::NotifyErrorListeners ( const char *  msg,
const char *  stacktrace 
)

Definition at line 2326 of file isolate.cc.

2327 {
2328 const GrowableObjectArray& listeners = GrowableObjectArray::Handle(
2329 current_zone(), isolate_object_store()->error_listeners());
2330 if (listeners.IsNull()) return false;
2331
2332 Dart_CObject arr;
2333 Dart_CObject* arr_values[2];
2335 arr.value.as_array.length = 2;
2336 arr.value.as_array.values = arr_values;
2337 Dart_CObject msg;
2339 msg.value.as_string = const_cast<char*>(message);
2340 arr_values[0] = &msg;
2341 Dart_CObject stack;
2342 if (stacktrace == nullptr) {
2343 stack.type = Dart_CObject_kNull;
2344 } else {
2345 stack.type = Dart_CObject_kString;
2346 stack.value.as_string = const_cast<char*>(stacktrace);
2347 }
2348 arr_values[1] = &stack;
2349
2350 SendPort& listener = SendPort::Handle(current_zone());
2351 bool was_somebody_notified = false;
2352 for (intptr_t i = 0; i < listeners.Length(); i++) {
2353 listener ^= listeners.At(i);
2354 if (!listener.IsNull()) {
2355 Dart_Port port_id = listener.Id();
2356 PortMap::PostMessage(SerializeMessage(current_zone(), port_id, &arr));
2357 was_somebody_notified = true;
2358 }
2359 }
2360 return was_somebody_notified;
2361}
@ Dart_CObject_kString
@ Dart_CObject_kArray
@ Dart_CObject_kNull
static std::unique_ptr< Message > SerializeMessage(Dart_Port dest_port, const Instance &obj)
Definition isolate.cc:121
union _Dart_CObject::@86 value
Dart_CObject_Type type
const char * as_string
struct _Dart_CObject::@86::@89 as_array
struct _Dart_CObject ** values

◆ NotifyExitListeners()

void dart::Isolate::NotifyExitListeners ( )

Definition at line 2263 of file isolate.cc.

2263 {
2264 const GrowableObjectArray& listeners = GrowableObjectArray::Handle(
2265 current_zone(), isolate_object_store()->exit_listeners());
2266 if (listeners.IsNull()) return;
2267
2268 SendPort& listener = SendPort::Handle(current_zone());
2269 Instance& response = Instance::Handle(current_zone());
2270 for (intptr_t i = 0; i < listeners.Length(); i += 2) {
2271 listener ^= listeners.At(i);
2272 if (!listener.IsNull()) {
2273 Dart_Port port_id = listener.Id();
2274 response ^= listeners.At(i + 1);
2275 PortMap::PostMessage(SerializeMessage(port_id, response));
2276 }
2277 }
2278}

◆ object_id_ring()

ObjectIdRing * dart::Isolate::object_id_ring ( ) const
inline

Definition at line 1203 of file isolate.h.

1203{ return object_id_ring_; }

◆ on_cleanup_callback()

Dart_IsolateCleanupCallback dart::Isolate::on_cleanup_callback ( )
inline

Definition at line 981 of file isolate.h.

981 {
982 return on_cleanup_callback_;
983 }

◆ on_shutdown_callback()

Dart_IsolateShutdownCallback dart::Isolate::on_shutdown_callback ( )
inline

Definition at line 975 of file isolate.h.

975 {
976 return on_shutdown_callback_;
977 }

◆ origin_id()

Dart_Port dart::Isolate::origin_id ( )

Definition at line 1954 of file isolate.cc.

1954 {
1955 MutexLocker ml(&origin_id_mutex_);
1956 return origin_id_;
1957}

◆ pause_capability()

uint64_t dart::Isolate::pause_capability ( ) const
inline

Definition at line 1009 of file isolate.h.

1009{ return pause_capability_; }

◆ PauseEventHandler()

void dart::Isolate::PauseEventHandler ( )

Definition at line 3412 of file isolate.cc.

3412 {
3413 // We are stealing a pause event (like a breakpoint) from the
3414 // embedder. We don't know what kind of thread we are on -- it
3415 // could be from our thread pool or it could be a thread from the
3416 // embedder. Sit on the current thread handling service events
3417 // until we are told to resume.
3418 if (pause_loop_monitor_ == nullptr) {
3419 pause_loop_monitor_ = new Monitor();
3420 }
3422 MonitorLocker ml(pause_loop_monitor_, false);
3423
3424 Dart_MessageNotifyCallback saved_notify_callback = message_notify_callback();
3425 ASSERT(wake_pause_event_handler_count_ == 0);
3426 set_message_notify_callback(Isolate::WakePauseEventHandler);
3427
3428#if !defined(DART_PRECOMPILED_RUNTIME)
3429 const bool had_program_reload_context =
3430 group()->program_reload_context() != nullptr;
3431 const int64_t start_time_micros = !had_program_reload_context
3432 ? 0
3433 : group()
3437#endif // !defined(DART_PRECOMPILED_RUNTIME)
3438 bool resume = false;
3439 while (true) {
3440 // Handle all available vm service messages, up to a resume
3441 // request.
3442 while (!resume && Dart_HasServiceMessages()) {
3443 ml.Exit();
3444 resume = Dart_HandleServiceMessages();
3445 ml.Enter();
3446 }
3447 if (resume) {
3448 break;
3449 }
3450
3451#if !defined(DART_PRECOMPILED_RUNTIME)
3452 if (had_program_reload_context &&
3453 (group()->program_reload_context() == nullptr)) {
3454 if (FLAG_trace_reload) {
3455 const int64_t reload_time_micros =
3456 OS::GetCurrentMonotonicMicros() - start_time_micros;
3457 double reload_millis = MicrosecondsToMilliseconds(reload_time_micros);
3458 OS::PrintErr("Reloading has finished! (%.2f ms)\n", reload_millis);
3459 }
3460 break;
3461 }
3462#endif // !defined(DART_PRECOMPILED_RUNTIME)
3463
3464 // Wait for more service messages.
3465 Monitor::WaitResult res = ml.Wait();
3466 ASSERT(res == Monitor::kNotified);
3467 }
3468 // If any non-service messages came in, we need to notify the registered
3469 // message notify callback to check for unhandled messages. Otherwise, events
3470 // may be left unhandled until the next event comes in. See
3471 // https://github.com/dart-lang/sdk/issues/37312.
3472 if (saved_notify_callback != nullptr) {
3473 while (wake_pause_event_handler_count_ > 0) {
3474 saved_notify_callback(Api::CastIsolate(this));
3475 --wake_pause_event_handler_count_;
3476 }
3477 } else {
3478 wake_pause_event_handler_count_ = 0;
3479 }
3480 set_message_notify_callback(saved_notify_callback);
3482}
static Dart_Isolate CastIsolate(Isolate *isolate)
ProgramReloadContext * program_reload_context()
Definition isolate.h:652
Dart_MessageNotifyCallback message_notify_callback() const
Definition isolate.h:964
void set_message_notify_callback(Dart_MessageNotifyCallback value)
Definition isolate.h:968
static int64_t GetCurrentMonotonicMicros()
IsolateGroupReloadContext * group_reload_context()
void(* Dart_MessageNotifyCallback)(Dart_Isolate destination_isolate)
Definition dart_api.h:1541
DART_EXPORT bool Dart_HasServiceMessages()
DART_EXPORT void Dart_EnterScope()
DART_EXPORT void Dart_ExitScope()
constexpr double MicrosecondsToMilliseconds(int64_t micros)
Definition globals.h:574
DART_EXPORT bool Dart_HandleServiceMessages()

◆ PausePostRequest()

ErrorPtr dart::Isolate::PausePostRequest ( )

Definition at line 1977 of file isolate.cc.

1977 {
1978#if !defined(PRODUCT)
1979 if (debugger_ == nullptr) {
1980 return Error::null();
1981 }
1982 ASSERT(!IsPaused());
1983 const Error& error = Error::Handle(debugger_->PausePostRequest());
1984 if (!error.IsNull()) {
1985 if (Thread::Current()->top_exit_frame_info() == 0) {
1986 return error.ptr();
1987 } else {
1989 UNREACHABLE();
1990 }
1991 }
1992#endif
1993 return Error::null();
1994}
#define UNREACHABLE()
Definition assert.h:248
ErrorPtr PausePostRequest()
Definition debugger.cc:293
static DART_NORETURN void PropagateError(const Error &error)
bool IsPaused() const
Definition isolate.cc:1969
const uint8_t uint32_t uint32_t GError ** error

◆ pointers_to_verify_at_exit()

MallocGrowableArray< ObjectPtr > * dart::Isolate::pointers_to_verify_at_exit ( )
inline

Definition at line 1432 of file isolate.h.

1432 {
1433 return &pointers_to_verify_at_exit_;
1434 }

◆ PrintJSON()

void dart::Isolate::PrintJSON ( JSONStream stream,
bool  ref = true 
)

Definition at line 3038 of file isolate.cc.

3038 {
3039 JSONObject jsobj(stream);
3040 jsobj.AddProperty("type", (ref ? "@Isolate" : "Isolate"));
3041 jsobj.AddServiceId(ISOLATE_SERVICE_ID_FORMAT_STRING,
3042 static_cast<int64_t>(main_port()));
3043
3044 jsobj.AddProperty("name", name());
3045 jsobj.AddPropertyF("number", "%" Pd64 "", static_cast<int64_t>(main_port()));
3046 jsobj.AddProperty("isSystemIsolate", is_system_isolate());
3047 jsobj.AddPropertyF("isolateGroupId", ISOLATE_GROUP_SERVICE_ID_FORMAT_STRING,
3048 group()->id());
3049 if (ref) {
3050 return;
3051 }
3052 jsobj.AddPropertyF("_originNumber", "%" Pd64 "",
3053 static_cast<int64_t>(origin_id()));
3054 int64_t uptime_millis = UptimeMicros() / kMicrosecondsPerMillisecond;
3055 int64_t start_time = OS::GetCurrentTimeMillis() - uptime_millis;
3056 jsobj.AddPropertyTimeMillis("startTime", start_time);
3057 {
3058 JSONObject jsheap(&jsobj, "_heaps");
3059 group()->heap()->PrintToJSONObject(Heap::kNew, &jsheap);
3060 group()->heap()->PrintToJSONObject(Heap::kOld, &jsheap);
3061 }
3062
3063 {
3064// Stringification macros
3065// See https://gcc.gnu.org/onlinedocs/gcc-4.8.5/cpp/Stringification.html
3066#define TO_STRING(s) STR(s)
3067#define STR(s) #s
3068
3069#define ADD_ISOLATE_FLAGS(when, name, bitname, isolate_flag_name, flag_name) \
3070 { \
3071 JSONObject jsflag(&jsflags); \
3072 jsflag.AddProperty("name", TO_STRING(name)); \
3073 jsflag.AddProperty("valueAsString", name() ? "true" : "false"); \
3074 }
3075 JSONArray jsflags(&jsobj, "isolateFlags");
3077#undef ADD_ISOLATE_FLAGS
3078#undef TO_STRING
3079#undef STR
3080 }
3081
3082 jsobj.AddProperty("runnable", is_runnable());
3083 jsobj.AddProperty("livePorts", open_ports_keepalive_);
3084 jsobj.AddProperty("pauseOnExit", message_handler()->should_pause_on_exit());
3085#if !defined(DART_PRECOMPILED_RUNTIME)
3086 jsobj.AddProperty("_isReloading", group()->IsReloading());
3087#endif // !defined(DART_PRECOMPILED_RUNTIME)
3088
3089 ServiceEvent pause_event = IsolatePauseEvent(this);
3090 jsobj.AddProperty("pauseEvent", &pause_event);
3091
3092 const Library& lib = Library::Handle(group()->object_store()->root_library());
3093 if (!lib.IsNull()) {
3094 jsobj.AddProperty("rootLib", lib);
3095 }
3096
3097 if (FLAG_profiler) {
3098 JSONObject tagCounters(&jsobj, "_tagCounters");
3099 vm_tag_counters()->PrintToJSONObject(&tagCounters);
3100 }
3103 ASSERT(!error.IsNull());
3104 jsobj.AddProperty("error", error, false);
3105 } else if (sticky_error() != Object::null()) {
3106 Error& error = Error::Handle(sticky_error());
3107 ASSERT(!error.IsNull());
3108 jsobj.AddProperty("error", error, false);
3109 }
3110
3111 {
3112 const GrowableObjectArray& libs =
3113 GrowableObjectArray::Handle(group()->object_store()->libraries());
3114 intptr_t num_libs = libs.Length();
3115 Library& lib = Library::Handle();
3116
3117 JSONArray lib_array(&jsobj, "libraries");
3118 for (intptr_t i = 0; i < num_libs; i++) {
3119 lib ^= libs.At(i);
3120 ASSERT(!lib.IsNull());
3121 lib_array.AddValue(lib);
3122 }
3123 }
3124
3125 {
3126 JSONArray breakpoints(&jsobj, "breakpoints");
3127 if (debugger() != nullptr) {
3128 debugger()->PrintBreakpointsToJSONArray(&breakpoints);
3129 }
3130 }
3131
3132 Dart_ExceptionPauseInfo pause_info = (debugger() != nullptr)
3135 jsobj.AddProperty("exceptionPauseMode",
3137
3138 if (debugger() != nullptr) {
3139 JSONObject settings(&jsobj, "_debuggerSettings");
3140 debugger()->PrintSettingsToJSONObject(&settings);
3141 }
3142
3143 {
3144 GrowableObjectArray& handlers =
3145 GrowableObjectArray::Handle(registered_service_extension_handlers());
3146 if (!handlers.IsNull()) {
3147 JSONArray extensions(&jsobj, "extensionRPCs");
3148 String& handler_name = String::Handle();
3149 for (intptr_t i = 0; i < handlers.Length(); i += kRegisteredEntrySize) {
3150 handler_name ^= handlers.At(i + kRegisteredNameIndex);
3151 extensions.AddValue(handler_name.ToCString());
3152 }
3153 }
3154 }
3155
3156 {
3157 JSONObject isolate_group(&jsobj, "isolate_group");
3158 group()->PrintToJSONObject(&isolate_group, /*ref=*/true);
3159 }
3160}
Dart_ExceptionPauseInfo GetExceptionPauseInfo() const
Definition debugger.cc:1867
void PrintBreakpointsToJSONArray(JSONArray *jsarr) const
Definition debugger.cc:451
void PrintSettingsToJSONObject(JSONObject *jsobj) const
Definition debugger.cc:468
@ kOld
Definition heap.h:39
void PrintToJSONObject(Space space, JSONObject *object) const
Definition heap.cc:973
Heap * heap() const
Definition isolate.h:295
void PrintToJSONObject(JSONObject *jsobj, bool ref)
Definition isolate.cc:642
ErrorPtr sticky_error() const
Definition isolate.h:1310
VMTagCounters * vm_tag_counters()
Definition isolate.h:1264
Dart_Port origin_id()
Definition isolate.cc:1954
static int64_t GetCurrentTimeMillis()
void PrintToJSONObject(JSONObject *obj)
Definition tags.cc:123
static const char * ExceptionPauseInfoToServiceEnum(Dart_ExceptionPauseInfo pi)
Definition isolate.cc:2977
constexpr intptr_t kMicrosecondsPerMillisecond
Definition globals.h:561
static ServiceEvent IsolatePauseEvent(Isolate *isolate)
Definition isolate.cc:2991
Dart_ExceptionPauseInfo
Definition debugger.h:502
@ kNoPauseOnExceptions
Definition debugger.h:503
#define ISOLATE_GROUP_SERVICE_ID_FORMAT_STRING
Definition service.h:50
#define ISOLATE_SERVICE_ID_FORMAT_STRING
Definition service.h:48
#define ADD_ISOLATE_FLAGS(when, name, bitname, isolate_flag_name, flag_name)

◆ PrintMemoryUsageJSON()

void dart::Isolate::PrintMemoryUsageJSON ( JSONStream stream)

Definition at line 3162 of file isolate.cc.

3162 {
3163 group()->heap()->PrintMemoryUsageJSON(stream);
3164}
void PrintMemoryUsageJSON(JSONStream *stream) const
Definition heap.cc:981

◆ PrintPauseEventJSON()

void dart::Isolate::PrintPauseEventJSON ( JSONStream stream)

Definition at line 3166 of file isolate.cc.

3166 {
3167 IsolatePauseEvent(this).PrintJSON(stream);
3168}
void PrintJSON(JSONStream *js) const

◆ ProcessFreeSampleBlocks()

void dart::Isolate::ProcessFreeSampleBlocks ( Thread thread)

◆ random()

Random * dart::Isolate::random ( )
inline

Definition at line 1144 of file isolate.h.

1144{ return &random_; }

◆ RegisterKernelBlobCallback()

static Dart_RegisterKernelBlobCallback dart::Isolate::RegisterKernelBlobCallback ( )
inlinestatic

Definition at line 1191 of file isolate.h.

1191 {
1192 return register_kernel_blob_callback_;
1193 }

◆ RegisterServiceExtensionHandler()

void dart::Isolate::RegisterServiceExtensionHandler ( const String name,
const Instance closure 
)

Definition at line 3339 of file isolate.cc.

3340 {
3341 // Don't allow for service extensions to be registered for internal isolates.
3342 if (Isolate::IsVMInternalIsolate(this)) {
3343 return;
3344 }
3345 GrowableObjectArray& handlers =
3346 GrowableObjectArray::Handle(registered_service_extension_handlers());
3347 if (handlers.IsNull()) {
3349 set_registered_service_extension_handlers(handlers);
3350 }
3351#if defined(DEBUG)
3352 {
3353 // Sanity check.
3354 const Instance& existing_handler =
3356 ASSERT(existing_handler.IsNull());
3357 }
3358#endif
3359 ASSERT(kRegisteredNameIndex == 0);
3360 handlers.Add(name, Heap::kOld);
3361 ASSERT(kRegisteredHandlerIndex == 1);
3362 handlers.Add(closure, Heap::kOld);
3363 {
3364 // Fire off an event.
3365 ServiceEvent event(this, ServiceEvent::kServiceExtensionAdded);
3366 event.set_extension_rpc(&name);
3368 }
3369}
static bool IsVMInternalIsolate(const Isolate *isolate)
Definition isolate.cc:3563
InstancePtr LookupServiceExtensionHandler(const String &name)
Definition isolate.cc:3375

◆ RememberLiveTemporaries()

void dart::Isolate::RememberLiveTemporaries ( )

Definition at line 2748 of file isolate.cc.

2748 {
2749 if (mutator_thread_ != nullptr) {
2751 }
2752}
void RememberLiveTemporaries()
Definition thread.cc:1083

◆ RemoveErrorListener()

void dart::Isolate::RemoveErrorListener ( const SendPort listener)

Definition at line 2311 of file isolate.cc.

2311 {
2312 const GrowableObjectArray& listeners = GrowableObjectArray::Handle(
2313 current_zone(), isolate_object_store()->error_listeners());
2314 SendPort& current = SendPort::Handle(current_zone());
2315 for (intptr_t i = 0; i < listeners.Length(); i++) {
2316 current ^= listeners.At(i);
2317 if (!current.IsNull() && (current.Id() == listener.Id())) {
2318 // Remove the matching listener from the list.
2319 current = SendPort::null();
2320 listeners.SetAt(i, current);
2321 return;
2322 }
2323 }
2324}

◆ RemoveExitListener()

void dart::Isolate::RemoveExitListener ( const SendPort listener)

Definition at line 2247 of file isolate.cc.

2247 {
2248 const GrowableObjectArray& listeners = GrowableObjectArray::Handle(
2249 current_zone(), isolate_object_store()->exit_listeners());
2250 SendPort& current = SendPort::Handle(current_zone());
2251 for (intptr_t i = 0; i < listeners.Length(); i += 2) {
2252 current ^= listeners.At(i);
2253 if (!current.IsNull() && (current.Id() == listener.Id())) {
2254 // Remove the matching listener from the list.
2255 current = SendPort::null();
2256 listeners.SetAt(i, current);
2257 listeners.SetAt(i + 1, Object::null_instance());
2258 return;
2259 }
2260 }
2261}

◆ RemoveResumeCapability()

bool dart::Isolate::RemoveResumeCapability ( const Capability capability)

Definition at line 2194 of file isolate.cc.

2194 {
2195 const GrowableObjectArray& caps = GrowableObjectArray::Handle(
2196 current_zone(), isolate_object_store()->resume_capabilities());
2197 Capability& current = Capability::Handle(current_zone());
2198 for (intptr_t i = 0; i < caps.Length(); i++) {
2199 current ^= caps.At(i);
2200 if (!current.IsNull() && (current.Id() == capability.Id())) {
2201 // Remove the matching capability from the list.
2202 current = Capability::null();
2203 caps.SetAt(i, current);
2204 return true;
2205 }
2206 }
2207 return false;
2208}

◆ ResumeRequest()

bool dart::Isolate::ResumeRequest ( ) const
inline

Definition at line 1101 of file isolate.h.

1101{ return LoadIsolateFlagsBit<ResumeRequestBit>(); }

◆ Run()

void dart::Isolate::Run ( )

Definition at line 2375 of file isolate.cc.

2375 {
2376 message_handler()->Run(group()->thread_pool(), nullptr, ShutdownIsolate,
2377 reinterpret_cast<uword>(this));
2378}
bool Run(ThreadPool *pool, StartCallback start_callback, EndCallback end_callback, CallbackData data)
static void ShutdownIsolate(uword parameter)
Definition isolate.cc:2363
uintptr_t uword
Definition globals.h:501

◆ safepoint_handler()

SafepointHandler * dart::Isolate::safepoint_handler ( ) const
inline

Definition at line 949 of file isolate.h.

949 {
950 return group()->safepoint_handler();
951 }
SafepointHandler * safepoint_handler()
Definition isolate.h:333

◆ scheduled_mutator_thread()

Thread * dart::Isolate::scheduled_mutator_thread ( ) const
inline

Definition at line 945 of file isolate.h.

◆ ScheduleInterrupts()

void dart::Isolate::ScheduleInterrupts ( uword  interrupt_bits)

Definition at line 1931 of file isolate.cc.

1931 {
1932 // We take the threads lock here to ensure that the mutator thread does not
1933 // exit the isolate while we are trying to schedule interrupts on it.
1934 MonitorLocker ml(group()->thread_registry()->threads_lock());
1935 Thread* mthread = mutator_thread();
1936 if (mthread != nullptr) {
1937 mthread->ScheduleInterrupts(interrupt_bits);
1938 }
1939}
Thread * mutator_thread() const
Definition isolate.cc:1884

◆ SendInternalLibMessage() [1/2]

bool dart::Isolate::SendInternalLibMessage ( Dart_Port  main_port,
LibMsgId  msg_id,
uint64_t  capability 
)
static

Definition at line 1002 of file isolate.cc.

1004 {
1005 Dart_CObject array_entry_msg_kind;
1006 array_entry_msg_kind.type = Dart_CObject_kInt64;
1007 array_entry_msg_kind.value.as_int64 = Message::kIsolateLibOOBMsg;
1008
1009 Dart_CObject array_entry_msg_id;
1010 array_entry_msg_id.type = Dart_CObject_kInt64;
1011 array_entry_msg_id.value.as_int64 = msg_id;
1012
1013 Dart_CObject array_entry_capability;
1014 array_entry_capability.type = Dart_CObject_kCapability;
1015 array_entry_capability.value.as_capability.id = capability;
1016
1017 Dart_CObject* array_entries[3] = {
1018 &array_entry_msg_kind,
1019 &array_entry_msg_id,
1020 &array_entry_capability,
1021 };
1022
1025 message.value.as_array.values = array_entries;
1026 message.value.as_array.length = ARRAY_SIZE(array_entries);
1027
1028 AllocOnlyStackZone zone;
1029 std::unique_ptr<Message> msg = WriteApiMessage(
1030 zone.GetZone(), &message, main_port, Message::kOOBPriority);
1031 if (msg == nullptr) UNREACHABLE();
1032
1033 return PortMap::PostMessage(std::move(msg));
1034}
@ Dart_CObject_kInt64
@ Dart_CObject_kCapability
std::unique_ptr< Message > WriteApiMessage(Zone *zone, Dart_CObject *obj, Dart_Port dest_port, Message::Priority priority)
struct _Dart_CObject::@86::@88 as_capability
#define ARRAY_SIZE(array)
Definition globals.h:72

◆ SendInternalLibMessage() [2/2]

void dart::Isolate::SendInternalLibMessage ( LibMsgId  msg_id,
uint64_t  capability 
)

Definition at line 997 of file isolate.cc.

997 {
998 const bool ok = SendInternalLibMessage(main_port(), msg_id, capability);
999 if (!ok) UNREACHABLE();
1000}
void SendInternalLibMessage(LibMsgId msg_id, uint64_t capability)
Definition isolate.cc:997

◆ set_current_allocation_sample_block()

void dart::Isolate::set_current_allocation_sample_block ( SampleBlock block)
inline

Definition at line 1074 of file isolate.h.

1074 {
1075 current_allocation_sample_block_ = block;
1076 }

◆ set_current_sample_block()

void dart::Isolate::set_current_sample_block ( SampleBlock block)
inline

Definition at line 1065 of file isolate.h.

1065 {
1066 current_sample_block_ = block;
1067 }

◆ set_current_tag()

void dart::Isolate::set_current_tag ( const UserTag tag)

Definition at line 3176 of file isolate.cc.

3176 {
3177 uword user_tag = tag.tag();
3179 set_user_tag(user_tag);
3180 current_tag_ = tag.ptr();
3181}
uword user_tag() const
Definition isolate.h:1280
constexpr uword kUwordMax
Definition globals.h:519

◆ set_default_tag()

void dart::Isolate::set_default_tag ( const UserTag tag)

Definition at line 3183 of file isolate.cc.

3183 {
3184 default_tag_ = tag.ptr();
3185}

◆ set_deopt_context()

void dart::Isolate::set_deopt_context ( DeoptContext value)
inline

Definition at line 1209 of file isolate.h.

1209 {
1210 ASSERT(value == nullptr || deopt_context_ == nullptr);
1211 deopt_context_ = value;
1212 }
uint8_t value

◆ set_environment_callback()

void dart::Isolate::set_environment_callback ( Dart_EnvironmentCallback  value)
inline

Definition at line 1031 of file isolate.h.

1031 {
1032 environment_callback_ = value;
1033 }

◆ set_field_table()

void dart::Isolate::set_field_table ( Thread T,
FieldTable field_table 
)
inline

Definition at line 954 of file isolate.h.

954 {
955 delete field_table_;
956 field_table_ = field_table;
957 T->field_table_values_ = field_table->table();
958 }
ObjectPtr * table()
Definition field_table.h:42
FieldTable * field_table() const
Definition isolate.h:953
#define T

◆ set_finalizers()

void dart::Isolate::set_finalizers ( const GrowableObjectArray value)

Definition at line 1965 of file isolate.cc.

1965 {
1966 finalizers_ = value.ptr();
1967}

◆ set_forward_table_new()

void dart::Isolate::set_forward_table_new ( WeakTable table)

Definition at line 2512 of file isolate.cc.

2512 {
2513 std::unique_ptr<WeakTable> value(table);
2514 forward_table_new_ = std::move(value);
2515}
SI F table(const skcms_Curve *curve, F v)

◆ set_forward_table_old()

void dart::Isolate::set_forward_table_old ( WeakTable table)

Definition at line 2516 of file isolate.cc.

2516 {
2517 std::unique_ptr<WeakTable> value(table);
2518 forward_table_old_ = std::move(value);
2519}

◆ set_has_attempted_stepping()

void dart::Isolate::set_has_attempted_stepping ( bool  value)
inline

Definition at line 1377 of file isolate.h.

1377 {
1378 UpdateIsolateFlagsBit<HasAttemptedSteppingBit>(value);
1379 }

◆ set_has_resumption_breakpoints()

void dart::Isolate::set_has_resumption_breakpoints ( bool  value)
inline

Definition at line 1091 of file isolate.h.

1091 {
1092 has_resumption_breakpoints_ = value;
1093 }

◆ set_init_callback_data()

void dart::Isolate::set_init_callback_data ( void *  value)
inline

Definition at line 1020 of file isolate.h.

1020{ init_callback_data_ = value; }

◆ set_is_runnable()

void dart::Isolate::set_is_runnable ( bool  value)
inline

Definition at line 1049 of file isolate.h.

1049 {
1050 UpdateIsolateFlagsBit<IsRunnableBit>(value);
1051#if !defined(PRODUCT)
1052 if (is_runnable()) {
1054 }
1055#endif
1056 }
void set_last_resume_timestamp()
Definition isolate.h:1108

◆ set_is_service_registered()

void dart::Isolate::set_is_service_registered ( bool  value)
inline

Definition at line 1341 of file isolate.h.

1341 {
1342 UpdateIsolateFlagsBit<IsServiceRegisteredBit>(value);
1343 }

◆ set_is_vm_isolate()

void dart::Isolate::set_is_vm_isolate ( bool  value)
inline

Definition at line 1334 of file isolate.h.

1334 {
1335 UpdateIsolateFlagsBit<IsVMIsolateBit>(value);
1336 }

◆ set_last_resume_timestamp()

void dart::Isolate::set_last_resume_timestamp ( )
inline

Definition at line 1108 of file isolate.h.

1108 {
1109 last_resume_timestamp_ = OS::GetCurrentTimeMillis();
1110 }

◆ set_main_port()

void dart::Isolate::set_main_port ( Dart_Port  port)
inline

Definition at line 1002 of file isolate.h.

1002 {
1003 ASSERT(main_port_ == 0); // Only set main port once.
1004 main_port_ = port;
1005 }
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service port
Definition switches.h:87

◆ set_message_notify_callback()

void dart::Isolate::set_message_notify_callback ( Dart_MessageNotifyCallback  value)
inline

Definition at line 968 of file isolate.h.

968 {
969 message_notify_callback_.store(value, std::memory_order_release);
970 }

◆ set_name()

void dart::Isolate::set_name ( const char *  name)

Definition at line 1941 of file isolate.cc.

1941 {
1942 free(name_);
1943 name_ = Utils::StrDup(name);
1944}
static char * StrDup(const char *s)

◆ set_on_cleanup_callback()

void dart::Isolate::set_on_cleanup_callback ( Dart_IsolateCleanupCallback  value)
inline

Definition at line 978 of file isolate.h.

978 {
979 on_cleanup_callback_ = value;
980 }

◆ set_on_shutdown_callback()

void dart::Isolate::set_on_shutdown_callback ( Dart_IsolateShutdownCallback  value)
inline

Definition at line 972 of file isolate.h.

972 {
973 on_shutdown_callback_ = value;
974 }

◆ set_origin_id()

void dart::Isolate::set_origin_id ( Dart_Port  id)

Definition at line 1959 of file isolate.cc.

1959 {
1960 MutexLocker ml(&origin_id_mutex_);
1961 ASSERT((id == main_port_ && origin_id_ == 0) || (origin_id_ == main_port_));
1962 origin_id_ = id;
1963}

◆ set_pause_capability()

void dart::Isolate::set_pause_capability ( uint64_t  value)
inline

Definition at line 1008 of file isolate.h.

1008{ pause_capability_ = value; }

◆ set_should_pause_post_service_request()

void dart::Isolate::set_should_pause_post_service_request ( bool  value)
inline

Definition at line 1273 of file isolate.h.

1273 {
1274 UpdateIsolateFlagsBit<ShouldPausePostServiceRequestBit>(value);
1275 }

◆ set_simulator()

void dart::Isolate::set_simulator ( Simulator value)
inline

Definition at line 1147 of file isolate.h.

1147{ simulator_ = value; }

◆ set_single_step()

void dart::Isolate::set_single_step ( bool  value)
inline

Definition at line 1085 of file isolate.h.

1085{ single_step_ = value; }

◆ set_tag_table()

void dart::Isolate::set_tag_table ( const GrowableObjectArray value)

Definition at line 3172 of file isolate.cc.

3172 {
3173 tag_table_ = value.ptr();
3174}

◆ set_terminate_capability()

void dart::Isolate::set_terminate_capability ( uint64_t  value)
inline

Definition at line 1010 of file isolate.h.

1010 {
1011 terminate_capability_ = value;
1012 }

◆ SetCleanupCallback()

static void dart::Isolate::SetCleanupCallback ( Dart_IsolateCleanupCallback  cb)
inlinestatic

Definition at line 1174 of file isolate.h.

1174 {
1175 cleanup_callback_ = cb;
1176 }

◆ SetCreateGroupCallback()

static void dart::Isolate::SetCreateGroupCallback ( Dart_IsolateGroupCreateCallback  cb)
inlinestatic

Definition at line 1153 of file isolate.h.

1153 {
1154 create_group_callback_ = cb;
1155 }

◆ SetErrorsFatal()

void dart::Isolate::SetErrorsFatal ( bool  value)
inline

Definition at line 1140 of file isolate.h.

1140 {
1141 UpdateIsolateFlagsBit<ErrorsFatalBit>(value);
1142 }

◆ SetGroupCleanupCallback()

static void dart::Isolate::SetGroupCleanupCallback ( Dart_IsolateGroupCleanupCallback  cb)
inlinestatic

Definition at line 1181 of file isolate.h.

1181 {
1182 cleanup_group_callback_ = cb;
1183 }

◆ SetInitializeCallback_()

static void dart::Isolate::SetInitializeCallback_ ( Dart_InitializeIsolateCallback  cb)
inlinestatic

Definition at line 1160 of file isolate.h.

1160 {
1161 initialize_callback_ = cb;
1162 }

◆ SetPrefixIsLoaded()

void dart::Isolate::SetPrefixIsLoaded ( const LibraryPrefix prefix)

Definition at line 2774 of file isolate.cc.

2774 {
2775 UnorderedHashSet<LibraryPrefixMapTraits> loaded_prefixes_set(
2776 loaded_prefixes_set_storage_);
2777 loaded_prefixes_set.InsertOrGet(prefix);
2778 loaded_prefixes_set_storage_ = loaded_prefixes_set.Release().ptr();
2779}

◆ SetReceivePortKeepAliveState()

void dart::Isolate::SetReceivePortKeepAliveState ( const ReceivePort receive_port,
bool  keep_isolate_alive 
)

Definition at line 3719 of file isolate.cc.

3720 {
3721 // Changing keep-isolate-alive state of a closed port is a NOP.
3722 if (!receive_port.is_open()) return;
3723
3724 ASSERT(0 < open_ports_);
3725
3726 // If the state doesn't change it's a NOP.
3727 if (receive_port.keep_isolate_alive() == keep_isolate_alive) return;
3728
3729 if (keep_isolate_alive) {
3730 ASSERT(open_ports_keepalive_ < open_ports_);
3731 ++open_ports_keepalive_;
3732 } else {
3733 ASSERT(0 < open_ports_keepalive_);
3734 --open_ports_keepalive_;
3735 }
3736 receive_port.set_keep_isolate_alive(keep_isolate_alive);
3737}

◆ SetRegisterKernelBlobCallback()

static void dart::Isolate::SetRegisterKernelBlobCallback ( Dart_RegisterKernelBlobCallback  cb)
inlinestatic

Definition at line 1187 of file isolate.h.

1188 {
1189 register_kernel_blob_callback_ = cb;
1190 }

◆ SetResumeRequest()

void dart::Isolate::SetResumeRequest ( )
inline

Definition at line 1103 of file isolate.h.

1103 {
1104 UpdateIsolateFlagsBit<ResumeRequestBit>(true);
1106 }

◆ SetShutdownCallback()

static void dart::Isolate::SetShutdownCallback ( Dart_IsolateShutdownCallback  cb)
inlinestatic

Definition at line 1167 of file isolate.h.

1167 {
1168 shutdown_callback_ = cb;
1169 }

◆ SetStickyError()

void dart::Isolate::SetStickyError ( ErrorPtr  sticky_error)

Definition at line 2368 of file isolate.cc.

2368 {
2369 ASSERT(
2370 ((sticky_error_ == Error::null()) || (sticky_error == Error::null())) &&
2371 (sticky_error != sticky_error_));
2372 sticky_error_ = sticky_error;
2373}

◆ SetUnregisterKernelBlobCallback()

static void dart::Isolate::SetUnregisterKernelBlobCallback ( Dart_UnregisterKernelBlobCallback  cb)
inlinestatic

Definition at line 1194 of file isolate.h.

1195 {
1196 unregister_kernel_blob_callback_ = cb;
1197 }

◆ should_pause_post_service_request()

bool dart::Isolate::should_pause_post_service_request ( ) const
inline

Definition at line 1270 of file isolate.h.

1270 {
1271 return LoadIsolateFlagsBit<ShouldPausePostServiceRequestBit>();
1272 }

◆ ShutdownCallback()

static Dart_IsolateShutdownCallback dart::Isolate::ShutdownCallback ( )
inlinestatic

Definition at line 1170 of file isolate.h.

1170 {
1171 return shutdown_callback_;
1172 }

◆ simulator()

Simulator * dart::Isolate::simulator ( ) const
inline

Definition at line 1146 of file isolate.h.

1146{ return simulator_; }

◆ single_step()

bool dart::Isolate::single_step ( ) const
inline

Definition at line 1086 of file isolate.h.

1086{ return single_step_; }

◆ single_step_offset()

static intptr_t dart::Isolate::single_step_offset ( )
inlinestatic

Definition at line 1087 of file isolate.h.

1087 {
1088 return OFFSET_OF(Isolate, single_step_);
1089 }

◆ source()

IsolateGroupSource * dart::Isolate::source ( ) const
inline

Definition at line 989 of file isolate.h.

989{ return isolate_group_->source(); }
IsolateGroupSource * source() const
Definition isolate.h:285

◆ StealStickyError()

ErrorPtr dart::Isolate::StealStickyError ( )

Definition at line 3187 of file isolate.cc.

3187 {
3188 NoSafepointScope no_safepoint;
3189 ErrorPtr return_value = sticky_error_;
3190 sticky_error_ = Error::null();
3191 return return_value;
3192}

◆ sticky_error()

ErrorPtr dart::Isolate::sticky_error ( ) const
inline

Definition at line 1310 of file isolate.h.

1310{ return sticky_error_; }

◆ tag_table()

GrowableObjectArrayPtr dart::Isolate::tag_table ( ) const
inline

Definition at line 1298 of file isolate.h.

1298{ return tag_table_; }

◆ TakeHasCompletedBlocks()

bool dart::Isolate::TakeHasCompletedBlocks ( )
inline

Definition at line 1078 of file isolate.h.

1078 {
1079 return has_completed_blocks_.exchange(0) != 0;
1080 }
T exchange(T arg, std::memory_order order=std::memory_order_relaxed)
Definition atomic.h:48

◆ TakeRegexpBacktrackStack()

std::unique_ptr< VirtualMemory > dart::Isolate::TakeRegexpBacktrackStack ( )
inline

Definition at line 1420 of file isolate.h.

1420 {
1421 return std::move(regexp_backtracking_stack_cache_);
1422 }

◆ terminate_capability()

uint64_t dart::Isolate::terminate_capability ( ) const
inline

Definition at line 1013 of file isolate.h.

1013{ return terminate_capability_; }

◆ thread_registry()

ThreadRegistry * dart::Isolate::thread_registry ( ) const
inline

Definition at line 947 of file isolate.h.

947{ return group()->thread_registry(); }
ThreadRegistry * thread_registry() const
Definition isolate.h:332

◆ TrySetHasCompletedBlocks()

bool dart::Isolate::TrySetHasCompletedBlocks ( )
inline

Definition at line 1081 of file isolate.h.

1081 {
1082 return has_completed_blocks_.exchange(1) == 0;
1083 }

◆ UnblockClassFinalization()

intptr_t dart::Isolate::UnblockClassFinalization ( )
inline

Definition at line 1243 of file isolate.h.

1243 {
1244 ASSERT(defer_finalization_count_ > 0);
1245 return defer_finalization_count_--;
1246 }

◆ UnregisterKernelBlobCallback()

static Dart_UnregisterKernelBlobCallback dart::Isolate::UnregisterKernelBlobCallback ( )
inlinestatic

Definition at line 1198 of file isolate.h.

1198 {
1199 return unregister_kernel_blob_callback_;
1200 }

◆ UpdateNativeCallableKeepIsolateAliveCounter()

void dart::Isolate::UpdateNativeCallableKeepIsolateAliveCounter ( intptr_t  delta)

Definition at line 3760 of file isolate.cc.

3760 {
3761 ffi_callback_keep_alive_counter_ += delta;
3762 ASSERT(ffi_callback_keep_alive_counter_ >= 0);
3763}

◆ UptimeMicros()

int64_t dart::Isolate::UptimeMicros ( ) const

Definition at line 1950 of file isolate.cc.

1950 {
1951 return OS::GetCurrentMonotonicMicros() - start_time_micros_;
1952}

◆ user_tag()

uword dart::Isolate::user_tag ( ) const
inline

Definition at line 1280 of file isolate.h.

1280{ return user_tag_; }

◆ user_tag_offset()

static intptr_t dart::Isolate::user_tag_offset ( )
inlinestatic

Definition at line 1281 of file isolate.h.

1281{ return OFFSET_OF(Isolate, user_tag_); }

◆ VerifyPauseCapability()

bool dart::Isolate::VerifyPauseCapability ( const Object capability) const

Definition at line 2151 of file isolate.cc.

2151 {
2152 return !capability.IsNull() && capability.IsCapability() &&
2153 (pause_capability() == Capability::Cast(capability).Id());
2154}
uint64_t pause_capability() const
Definition isolate.h:1009

◆ VerifyTerminateCapability()

bool dart::Isolate::VerifyTerminateCapability ( const Object capability) const

Definition at line 2156 of file isolate.cc.

2156 {
2157 return !capability.IsNull() && capability.IsCapability() &&
2158 (terminate_capability() == Capability::Cast(capability).Id());
2159}
uint64_t terminate_capability() const
Definition isolate.h:1013

◆ VisitIsolates()

void dart::Isolate::VisitIsolates ( IsolateVisitor visitor)
static

Definition at line 3485 of file isolate.cc.

3485 {
3486 if (visitor == nullptr) {
3487 return;
3488 }
3491 [&](Isolate* isolate) { visitor->VisitIsolate(isolate); });
3492 });
3493}

◆ vm_tag_counters()

VMTagCounters * dart::Isolate::vm_tag_counters ( )
inline

Definition at line 1264 of file isolate.h.

1264{ return &vm_tag_counters_; }

◆ WaitForOutstandingSpawns()

void dart::Isolate::WaitForOutstandingSpawns ( )

Definition at line 3677 of file isolate.cc.

3677 {
3678 Thread* thread = Thread::Current();
3679 ASSERT(thread != nullptr);
3680 MonitorLocker ml(&spawn_count_monitor_);
3681 while (spawn_count_ > 0) {
3682 ml.WaitWithSafepointCheck(thread);
3683 }
3684}

Friends And Related Symbol Documentation

◆ Become

friend class Become
friend

Definition at line 1692 of file isolate.h.

◆ CreateWithinExistingIsolateGroup

Isolate * CreateWithinExistingIsolateGroup ( IsolateGroup g,
const char *  n,
char **  e 
)
friend

Definition at line 1302 of file dart_api_impl.cc.

1304 {
1307
1308 auto spawning_group = group;
1309
1310 Isolate* isolate = reinterpret_cast<Isolate*>(
1311 CreateIsolate(spawning_group, /*is_new_group=*/false, name,
1312 /*isolate_data=*/nullptr, error));
1313 if (isolate == nullptr) return nullptr;
1314
1315 auto source = spawning_group->source();
1316 ASSERT(isolate->source() == source);
1317
1318 return isolate;
1319}
IsolateGroupSource * source() const
Definition isolate.h:989
static Isolate * Current()
Definition isolate.h:939
#define API_TIMELINE_DURATION(thread)
#define CHECK_NO_ISOLATE(isolate)
static Dart_Isolate CreateIsolate(IsolateGroup *group, bool is_new_group, const char *name, void *isolate_data, char **error)

◆ Dart

friend class Dart
friend

Definition at line 1437 of file isolate.h.

◆ GCCompactor

friend class GCCompactor
friend

Definition at line 1693 of file isolate.h.

◆ GCMarker

friend class GCMarker
friend

Definition at line 1694 of file isolate.h.

◆ HeapIterationScope

friend class HeapIterationScope
friend

Definition at line 1699 of file isolate.h.

◆ HeapSnapshotWriter

friend class HeapSnapshotWriter
friend

Definition at line 1697 of file isolate.h.

◆ IsolateGroup

friend class IsolateGroup
friend

Definition at line 1703 of file isolate.h.

◆ IsolateKillerVisitor

friend class IsolateKillerVisitor
friend

Definition at line 1438 of file isolate.h.

◆ ObjectGraph

friend class ObjectGraph
friend

Definition at line 1696 of file isolate.h.

◆ SafepointHandler

friend class SafepointHandler
friend

Definition at line 1695 of file isolate.h.

◆ Scavenger

friend class Scavenger
friend

Definition at line 1698 of file isolate.h.

◆ ServiceIsolate

friend class ServiceIsolate
friend

Definition at line 1700 of file isolate.h.

◆ Thread

friend class Thread
friend

Definition at line 1701 of file isolate.h.

◆ Timeline

friend class Timeline
friend

Definition at line 1702 of file isolate.h.


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