Flutter Engine
The Flutter Engine
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 956 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 960 of file isolate.h.

960 {
961 kPauseMsg = 1,
962 kResumeMsg = 2,
963 kPingMsg = 3,
964 kKillMsg = 4,
965 kAddExitMsg = 5,
966 kDelExitMsg = 6,
967 kAddErrorMsg = 7,
968 kDelErrorMsg = 8,
969 kErrorFatalMsg = 9,
970
971 // Internal message ids.
972 kInterruptMsg = 10, // Break in the debugger.
973 kInternalKillMsg = 11, // Like kill, but does not run exit listeners, etc.
974 kDrainServiceExtensionsMsg = 12, // Invoke pending service extensions
975 kCheckForReload = 13, // Participate in other isolate group reload.
976 };
@ kErrorFatalMsg
Definition: isolate.h:969
@ kCheckForReload
Definition: isolate.h:975
@ kDrainServiceExtensionsMsg
Definition: isolate.h:974
@ kInternalKillMsg
Definition: isolate.h:973

◆ LibMsgPriority

Enumerator
kImmediateAction 
kBeforeNextEventAction 
kAsEventAction 

Definition at line 978 of file isolate.h.

978 {
982 };
@ kImmediateAction
Definition: isolate.h:979
@ kBeforeNextEventAction
Definition: isolate.h:980
@ kAsEventAction
Definition: isolate.h:981

Constructor & Destructor Documentation

◆ ~Isolate()

dart::Isolate::~Isolate ( )

Definition at line 1780 of file isolate.cc.

1780 {
1781#if !defined(PRODUCT) && !defined(DART_PRECOMPILED_RUNTIME)
1782 // TODO(32796): Re-enable assertion.
1783 // RELEASE_ASSERT(program_reload_context_ == nullptr);
1784#endif // !defined(PRODUCT) && !defined(DART_PRECOMPILED_RUNTIME)
1785
1786#if !defined(PRODUCT)
1787 delete debugger_;
1788 debugger_ = nullptr;
1789 delete object_id_ring_;
1790 object_id_ring_ = nullptr;
1791 delete pause_loop_monitor_;
1792 pause_loop_monitor_ = nullptr;
1793#endif // !defined(PRODUCT)
1794
1795 free(name_);
1796 delete field_table_;
1797#if defined(USING_SIMULATOR)
1798 delete simulator_;
1799#endif
1800 delete message_handler_;
1801 message_handler_ =
1802 nullptr; // Fail fast if we send messages to a dead isolate.
1803 ASSERT(deopt_context_ ==
1804 nullptr); // No deopt in progress when isolate deleted.
1805 ASSERT(spawn_count_ == 0);
1806
1807 // The [Thread] object should've been released on the last
1808 // `Thread::ExitIsolate()` call.
1810 ASSERT(mutator_thread_ == nullptr);
1811}
Thread * scheduled_mutator_thread_
Definition: base_isolate.h:34
Thread * mutator_thread_
Definition: base_isolate.h:38
#define ASSERT(E)

Member Function Documentation

◆ AddErrorListener()

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

Definition at line 2316 of file isolate.cc.

2316 {
2317 // Ensure a limit for the number of listeners remembered.
2318 const intptr_t kMaxListeners = compiler::target::kSmiMax / (6 * kWordSize);
2319
2320 const GrowableObjectArray& listeners = GrowableObjectArray::Handle(
2321 current_zone(), isolate_object_store()->error_listeners());
2322 SendPort& current = SendPort::Handle(current_zone());
2323 intptr_t insertion_index = -1;
2324 for (intptr_t i = 0; i < listeners.Length(); i++) {
2325 current ^= listeners.At(i);
2326 if (current.IsNull()) {
2327 if (insertion_index < 0) {
2328 insertion_index = i;
2329 }
2330 } else if (current.Id() == listener.Id()) {
2331 return;
2332 }
2333 }
2334 if (insertion_index < 0) {
2335 if (listeners.Length() >= kMaxListeners) {
2336 // Cannot grow the array of listeners beyond its max. Additional
2337 // listeners are ignored. In practice will never happen as we will
2338 // run out of memory beforehand.
2339 return;
2340 }
2341 listeners.Add(listener);
2342 } else {
2343 listeners.SetAt(insertion_index, listener);
2344 }
2345}
IsolateObjectStore * isolate_object_store() const
Definition: isolate.h:1007
static Object & Handle()
Definition: object.h:407
constexpr word kSmiMax
Definition: runtime_api.h:305
constexpr intptr_t kWordSize
Definition: globals.h:509

◆ AddExitListener()

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

Definition at line 2248 of file isolate.cc.

2249 {
2250 // Ensure a limit for the number of listeners remembered.
2251 const intptr_t kMaxListeners = compiler::target::kSmiMax / (12 * kWordSize);
2252
2253 const GrowableObjectArray& listeners = GrowableObjectArray::Handle(
2254 current_zone(), isolate_object_store()->exit_listeners());
2255 SendPort& current = SendPort::Handle(current_zone());
2256 intptr_t insertion_index = -1;
2257 for (intptr_t i = 0; i < listeners.Length(); i += 2) {
2258 current ^= listeners.At(i);
2259 if (current.IsNull()) {
2260 if (insertion_index < 0) {
2261 insertion_index = i;
2262 }
2263 } else if (current.Id() == listener.Id()) {
2264 listeners.SetAt(i + 1, response);
2265 return;
2266 }
2267 }
2268 if (insertion_index < 0) {
2269 if (listeners.Length() >= kMaxListeners) {
2270 // Cannot grow the array of listeners beyond its max. Additional
2271 // listeners are ignored. In practice will never happen as we will
2272 // run out of memory beforehand.
2273 return;
2274 }
2275 listeners.Add(listener);
2276 listeners.Add(response);
2277 } else {
2278 listeners.SetAt(insertion_index, listener);
2279 listeners.SetAt(insertion_index + 1, response);
2280 }
2281}

◆ AddResumeCapability()

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

Definition at line 2197 of file isolate.cc.

2197 {
2198 // Ensure a limit for the number of resume capabilities remembered.
2199 const intptr_t kMaxResumeCapabilities =
2201
2202 const GrowableObjectArray& caps = GrowableObjectArray::Handle(
2203 current_zone(), isolate_object_store()->resume_capabilities());
2204 Capability& current = Capability::Handle(current_zone());
2205 intptr_t insertion_index = -1;
2206 for (intptr_t i = 0; i < caps.Length(); i++) {
2207 current ^= caps.At(i);
2208 if (current.IsNull()) {
2209 if (insertion_index < 0) {
2210 insertion_index = i;
2211 }
2212 } else if (current.Id() == capability.Id()) {
2213 return false;
2214 }
2215 }
2216 if (insertion_index < 0) {
2217 if (caps.Length() >= kMaxResumeCapabilities) {
2218 // Cannot grow the array of resume capabilities beyond its max. Additional
2219 // pause requests are ignored. In practice will never happen as we will
2220 // run out of memory beforehand.
2221 return false;
2222 }
2223 caps.Add(capability);
2224 } else {
2225 caps.SetAt(insertion_index, capability);
2226 }
2227 return true;
2228}

◆ AllowClassFinalization()

bool dart::Isolate::AllowClassFinalization ( )
inline

Definition at line 1295 of file isolate.h.

1295 {
1296 ASSERT(defer_finalization_count_ >= 0);
1297 return defer_finalization_count_ == 0;
1298 }

◆ 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 3332 of file isolate.cc.

3337 {
3338 if (FLAG_trace_service) {
3339 OS::PrintErr("[+%" Pd64
3340 "ms] Isolate %s ENQUEUING request for extension %s\n",
3341 Dart::UptimeMillis(), name(), method_name.ToCString());
3342 }
3343 GrowableObjectArray& calls =
3344 GrowableObjectArray::Handle(pending_service_extension_calls());
3345 bool schedule_drain = false;
3346 if (calls.IsNull()) {
3347 calls = GrowableObjectArray::New();
3348 ASSERT(!calls.IsNull());
3349 set_pending_service_extension_calls(calls);
3350 schedule_drain = true;
3351 }
3352 ASSERT(kPendingHandlerIndex == 0);
3353 calls.Add(closure);
3354 ASSERT(kPendingMethodNameIndex == 1);
3355 calls.Add(method_name);
3356 ASSERT(kPendingKeysIndex == 2);
3357 calls.Add(parameter_keys);
3358 ASSERT(kPendingValuesIndex == 3);
3359 calls.Add(parameter_values);
3360 ASSERT(kPendingReplyPortIndex == 4);
3361 calls.Add(reply_port);
3362 ASSERT(kPendingIdIndex == 5);
3363 calls.Add(id);
3364
3365 if (schedule_drain) {
3366 const Array& msg = Array::Handle(Array::New(3));
3367 Object& element = Object::Handle();
3369 msg.SetAt(0, element);
3371 msg.SetAt(1, element);
3373 msg.SetAt(2, element);
3374 std::unique_ptr<Message> message = WriteMessage(
3375 /* same_group */ false, msg, main_port(), Message::kOOBPriority);
3376 bool posted = PortMap::PostMessage(std::move(message));
3377 ASSERT(posted);
3378 }
3379}
static ArrayPtr New(intptr_t len, Heap::Space space=Heap::kNew)
Definition: object.h:10959
static int64_t UptimeMillis()
Definition: dart.h:76
static GrowableObjectArrayPtr New(Heap::Space space=Heap::kNew)
Definition: object.h:11144
Dart_Port main_port() const
Definition: isolate.h:1048
const char * name() const
Definition: isolate.h:1043
@ kIsolateLibOOBMsg
Definition: message.h:42
@ kOOBPriority
Definition: message.h:29
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:10006
Win32Message message
std::unique_ptr< Message > WriteMessage(bool same_group, const Object &obj, Dart_Port dest_port, Message::Priority priority)
std::function< void()> closure
Definition: closure.h:14
#define Pd64
Definition: globals.h:416

◆ bequeath()

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

Definition at line 1032 of file isolate.h.

1032 {
1033 bequest_ = std::move(bequest);
1034 }

◆ BlockClassFinalization()

intptr_t dart::Isolate::BlockClassFinalization ( )
inline

Definition at line 1285 of file isolate.h.

1285 {
1286 ASSERT(defer_finalization_count_ >= 0);
1287 return defer_finalization_count_++;
1288 }

◆ CacheRegexpBacktrackStack()

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

Definition at line 1471 of file isolate.h.

1471 {
1472 regexp_backtracking_stack_cache_ = std::move(stack);
1473 }

◆ CallDeferredLoadHandler()

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

Definition at line 1941 of file isolate.cc.

1941 {
1942 Thread* thread = Thread::Current();
1943 Api::Scope api_scope(thread);
1944 Dart_Handle api_result;
1945 {
1946 TransitionVMToNative transition(thread);
1948 api_result = group()->deferred_load_handler()(id);
1949 }
1950 return Api::UnwrapHandle(api_result);
1951}
#define RELEASE_ASSERT(cond)
Definition: assert.h:327
static ObjectPtr UnwrapHandle(Dart_Handle object)
Dart_DeferredLoadHandler deferred_load_handler() const
Definition: isolate.h:561
bool HasDeferredLoadHandler() const
Definition: isolate.h:1082
IsolateGroup * group() const
Definition: isolate.h:1037
friend class Thread
Definition: isolate.h:1757
static Thread * Current()
Definition: thread.h:362
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 1452 of file isolate.h.

1452 {
1453 return &catch_entry_moves_cache_;
1454 }

◆ CleanupCallback()

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

Definition at line 1224 of file isolate.h.

1224 {
1225 return cleanup_callback_;
1226 }

◆ CloseReceivePort()

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

Definition at line 3785 of file isolate.cc.

3785 {
3786 // Closing an already closed port is a NOP.
3787 if (!receive_port.is_open()) return;
3788
3789 ASSERT(open_ports_ > 0);
3790 const bool ok = PortMap::ClosePort(receive_port.Id());
3792
3793 if (receive_port.keep_isolate_alive()) {
3794 --open_ports_keepalive_;
3795 receive_port.set_keep_isolate_alive(false);
3796 }
3797 --open_ports_;
3798 receive_port.set_is_open(false);
3799}
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 3732 of file isolate.cc.

3735 {
3737 this, zone, send_function, send_port, &ffi_callback_list_head_);
3738}
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 1203 of file isolate.h.

1203 {
1204 return create_group_callback_;
1205 }

◆ CreateIsolateLocalFfiCallback()

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

Definition at line 3740 of file isolate.cc.

3744 {
3745 if (keep_isolate_alive) {
3747 }
3749 this, zone, trampoline, target, &ffi_callback_list_head_);
3750}
Trampoline CreateIsolateLocalFfiCallback(Isolate *isolate, Zone *zone, const Function &function, const Closure &closure, Metadata **list_head)
void UpdateNativeCallableKeepIsolateAliveCounter(intptr_t delta)
Definition: isolate.cc:3806
uint32_t * target

◆ CreateReceivePort()

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

Definition at line 3758 of file isolate.cc.

3758 {
3760 ++open_ports_;
3761 ++open_ports_keepalive_;
3762 return ReceivePort::New(port_id, debug_name);
3763}
MessageHandler * message_handler() const
Definition: isolate.cc:2416
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:25783
int64_t Dart_Port
Definition: dart_api.h:1525

◆ Current()

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

Definition at line 986 of file isolate.h.

986 {
987 Thread* thread = Thread::Current();
988 return thread == nullptr ? nullptr : thread->isolate();
989 }

◆ current_allocation_sample_block()

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

Definition at line 1118 of file isolate.h.

1118 {
1119 return current_allocation_sample_block_;
1120 }

◆ current_sample_block()

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

Definition at line 1111 of file isolate.h.

1111{ return current_sample_block_; }

◆ current_tag()

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

Definition at line 1348 of file isolate.h.

1348{ return current_tag_; }

◆ current_tag_offset()

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

Definition at line 1329 of file isolate.h.

1329 {
1330 return OFFSET_OF(Isolate, current_tag_);
1331 }
#define OFFSET_OF(type, field)
Definition: globals.h:138

◆ debugger()

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

Definition at line 1108 of file isolate.h.

1108{ return debugger_; }

◆ DecrementSpawnCount()

void dart::Isolate::DecrementSpawnCount ( )

Definition at line 3716 of file isolate.cc.

3716 {
3717 MonitorLocker ml(&spawn_count_monitor_);
3718 ASSERT(spawn_count_ > 0);
3719 spawn_count_--;
3720 ml.Notify();
3721}

◆ default_tag()

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

Definition at line 1351 of file isolate.h.

1351{ return default_tag_; }

◆ default_tag_offset()

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

Definition at line 1332 of file isolate.h.

1332 {
1333 return OFFSET_OF(Isolate, default_tag_);
1334 }

◆ DeferredMarkLiveTemporaries()

void dart::Isolate::DeferredMarkLiveTemporaries ( )

Definition at line 2790 of file isolate.cc.

2790 {
2791 if (mutator_thread_ != nullptr) {
2793 }
2794}
void DeferredMarkLiveTemporaries()
Definition: thread.cc:1144

◆ DeleteFfiCallback()

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

Definition at line 3801 of file isolate.cc.

3801 {
3803 &ffi_callback_list_head_);
3804}
void DeleteCallback(Trampoline trampoline, Metadata **list_head)
FlKeyEvent uint64_t FlKeyResponderAsyncCallback callback

◆ deopt_context()

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

Definition at line 1255 of file isolate.h.

1255{ return deopt_context_; }

◆ DisableIsolateCreation()

void dart::Isolate::DisableIsolateCreation ( )
static

Definition at line 3590 of file isolate.cc.

3590 {
3591 MonitorLocker ml(isolate_creation_monitor_);
3592 creation_enabled_ = false;
3593}

◆ EnableIsolateCreation()

void dart::Isolate::EnableIsolateCreation ( )
static

Definition at line 3595 of file isolate.cc.

3595 {
3596 MonitorLocker ml(isolate_creation_monitor_);
3597 creation_enabled_ = true;
3598}

◆ EnsureObjectIdRing()

ObjectIdRing * dart::Isolate::EnsureObjectIdRing ( )

Definition at line 3014 of file isolate.cc.

3014 {
3015 if (object_id_ring_ == nullptr) {
3016 object_id_ring_ = new ObjectIdRing();
3017 }
3018 return object_id_ring_;
3019}

◆ environment_callback()

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

Definition at line 1075 of file isolate.h.

1075 {
1076 return environment_callback_;
1077 }

◆ ErrorsFatal()

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

Definition at line 1186 of file isolate.h.

1186{ return LoadIsolateFlagsBit<ErrorsFatalBit>(); }

◆ ffi_callback_list_head()

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

Definition at line 1281 of file isolate.h.

1281 {
1282 return ffi_callback_list_head_;
1283 }

◆ field_table()

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

Definition at line 1000 of file isolate.h.

1000{ return field_table_; }

◆ finalizers_offset()

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

Definition at line 1071 of file isolate.h.

1071 {
1072 return OFFSET_OF(Isolate, finalizers_);
1073 }

◆ FlagsCopyFrom()

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

Definition at line 1674 of file isolate.cc.

1674 {
1675#if defined(DART_PRECOMPILER)
1676#define FLAG_FOR_PRECOMPILER(action) action
1677#else
1678#define FLAG_FOR_PRECOMPILER(action)
1679#endif
1680
1681#if !defined(PRODUCT)
1682#define FLAG_FOR_NONPRODUCT(action) action
1683#else
1684#define FLAG_FOR_NONPRODUCT(action)
1685#endif
1686
1687#define FLAG_FOR_PRODUCT(action) action
1688
1689#define SET_FROM_FLAG(when, name, bitname, isolate_flag, flag) \
1690 FLAG_FOR_##when(isolate_flags_ = bitname##Bit::update( \
1691 api_flags.isolate_flag, isolate_flags_));
1692
1694#undef FLAG_FOR_NONPRODUCT
1695#undef FLAG_FOR_PRECOMPILER
1696#undef FLAG_FOR_PRODUCT
1697#undef SET_FROM_FLAG
1698}
#define BOOL_ISOLATE_FLAG_LIST(V)
Definition: isolate.h:152
#define SET_FROM_FLAG(when, name, bitname, isolate_flag, flag)

◆ FlagsCopyTo()

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

Definition at line 1661 of file isolate.cc.

1661 {
1662 group()->FlagsCopyTo(api_flags);
1663
1665#define INIT_FROM_FIELD(when, name, bitname, isolate_flag, flag) \
1666 api_flags->isolate_flag = name();
1668#undef INIT_FROM_FIELD
1669 api_flags->is_service_isolate = false;
1670 api_flags->is_kernel_isolate = false;
1671 api_flags->null_safety = true;
1672}
void FlagsCopyTo(Dart_IsolateFlags *api_flags)
Definition: isolate.cc:1611
#define DART_FLAGS_CURRENT_VERSION
Definition: dart_api.h:582
bool is_service_isolate
Definition: dart_api.h:593
int32_t version
Definition: dart_api.h:585
bool is_kernel_isolate
Definition: dart_api.h:594
#define INIT_FROM_FIELD(when, name, bitname, isolate_flag, flag)

◆ FlagsInitialize()

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

Definition at line 1648 of file isolate.cc.

1648 {
1650
1652#define INIT_FROM_FLAG(when, name, bitname, isolate_flag, flag) \
1653 api_flags->isolate_flag = flag;
1655#undef INIT_FROM_FLAG
1656 api_flags->is_service_isolate = false;
1657 api_flags->is_kernel_isolate = false;
1658 api_flags->null_safety = true;
1659}
static void FlagsInitialize(Dart_IsolateFlags *api_flags)
Definition: isolate.cc:1600
#define INIT_FROM_FLAG(when, name, bitname, isolate_flag, flag)

◆ forward_table_new()

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

Definition at line 1458 of file isolate.h.

1458{ return forward_table_new_.get(); }

◆ forward_table_old()

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

Definition at line 1461 of file isolate.h.

1461{ return forward_table_old_.get(); }

◆ GetAndClearResumeRequest()

bool dart::Isolate::GetAndClearResumeRequest ( )
inline

Definition at line 1163 of file isolate.h.

1163 {
1164 return UpdateIsolateFlagsBit<ResumeRequestBit>(false);
1165 }

◆ group()

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

Definition at line 1037 of file isolate.h.

1037{ return isolate_group_; }

◆ GroupCleanupCallback()

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

Definition at line 1231 of file isolate.h.

1231 {
1232 return cleanup_group_callback_;
1233 }

◆ handler_info_cache()

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

Definition at line 1450 of file isolate.h.

1450{ return &handler_info_cache_; }

◆ has_attempted_stepping()

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

Definition at line 1421 of file isolate.h.

1421 {
1422 return LoadIsolateFlagsBit<HasAttemptedSteppingBit>();
1423 }

◆ has_resumption_breakpoints()

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

Definition at line 1141 of file isolate.h.

1141 {
1142 return has_resumption_breakpoints_;
1143 }

◆ has_resumption_breakpoints_offset()

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

Definition at line 1144 of file isolate.h.

1144 {
1145 return OFFSET_OF(Isolate, has_resumption_breakpoints_);
1146 }

◆ HasDeferredLoadHandler()

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

Definition at line 1082 of file isolate.h.

1082 {
1083 return group()->deferred_load_handler() != nullptr;
1084 }

◆ HasLivePorts()

bool dart::Isolate::HasLivePorts ( )

Definition at line 3752 of file isolate.cc.

3752 {
3753 ASSERT(0 <= open_ports_ && 0 <= open_ports_keepalive_ &&
3754 open_ports_keepalive_ <= open_ports_);
3755 return open_ports_keepalive_ > 0;
3756}

◆ HasOpenNativeCallables()

bool dart::Isolate::HasOpenNativeCallables ( )

Definition at line 3811 of file isolate.cc.

3811 {
3812 ASSERT(ffi_callback_keep_alive_counter_ >= 0);
3813 return ffi_callback_keep_alive_counter_ > 0;
3814}

◆ HasPendingMessages()

bool dart::Isolate::HasPendingMessages ( )

Definition at line 1356 of file isolate.cc.

1356 {
1357 return message_handler_->HasMessages() || message_handler_->HasOOBMessages();
1358}

◆ IncrementSpawnCount()

void dart::Isolate::IncrementSpawnCount ( )

Definition at line 3711 of file isolate.cc.

3711 {
3712 MonitorLocker ml(&spawn_count_monitor_);
3713 spawn_count_++;
3714}

◆ init_callback_data()

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

Definition at line 1068 of file isolate.h.

1068{ return init_callback_data_; }

◆ init_loaded_prefixes_set_storage()

void dart::Isolate::init_loaded_prefixes_set_storage ( )

Definition at line 2796 of file isolate.cc.

2796 {
2797 ASSERT(loaded_prefixes_set_storage_ == nullptr);
2798 loaded_prefixes_set_storage_ =
2799 HashTables::New<UnorderedHashSet<LibraryPrefixMapTraits> >(4);
2800}

◆ InitializeCallback()

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

Definition at line 1210 of file isolate.h.

1210 {
1211 return initialize_callback_;
1212 }

◆ InvokePendingServiceExtensionCalls()

ErrorPtr dart::Isolate::InvokePendingServiceExtensionCalls ( )

Definition at line 3253 of file isolate.cc.

3253 {
3254 GrowableObjectArray& calls =
3255 GrowableObjectArray::Handle(GetAndClearPendingServiceExtensionCalls());
3256 if (calls.IsNull()) {
3257 return Error::null();
3258 }
3259 // Grab run function.
3260 const Library& developer_lib = Library::Handle(Library::DeveloperLibrary());
3261 ASSERT(!developer_lib.IsNull());
3262 const Function& run_extension = Function::Handle(
3263 developer_lib.LookupFunctionAllowPrivate(Symbols::_runExtension()));
3264 ASSERT(!run_extension.IsNull());
3265
3266 const Array& arguments =
3267 Array::Handle(Array::New(kPendingEntrySize + 1, Heap::kNew));
3268 Object& result = Object::Handle();
3269 String& method_name = String::Handle();
3270 Instance& closure = Instance::Handle();
3271 Array& parameter_keys = Array::Handle();
3272 Array& parameter_values = Array::Handle();
3273 Instance& reply_port = Instance::Handle();
3274 Instance& id = Instance::Handle();
3275 for (intptr_t i = 0; i < calls.Length(); i += kPendingEntrySize) {
3276 // Grab arguments for call.
3277 closure ^= calls.At(i + kPendingHandlerIndex);
3278 ASSERT(!closure.IsNull());
3279 arguments.SetAt(kPendingHandlerIndex, closure);
3280 method_name ^= calls.At(i + kPendingMethodNameIndex);
3281 ASSERT(!method_name.IsNull());
3282 arguments.SetAt(kPendingMethodNameIndex, method_name);
3283 parameter_keys ^= calls.At(i + kPendingKeysIndex);
3284 ASSERT(!parameter_keys.IsNull());
3285 arguments.SetAt(kPendingKeysIndex, parameter_keys);
3286 parameter_values ^= calls.At(i + kPendingValuesIndex);
3287 ASSERT(!parameter_values.IsNull());
3288 arguments.SetAt(kPendingValuesIndex, parameter_values);
3289 reply_port ^= calls.At(i + kPendingReplyPortIndex);
3290 ASSERT(!reply_port.IsNull());
3291 arguments.SetAt(kPendingReplyPortIndex, reply_port);
3292 id ^= calls.At(i + kPendingIdIndex);
3293 arguments.SetAt(kPendingIdIndex, id);
3294 arguments.SetAt(kPendingEntrySize, Bool::Get(FLAG_trace_service));
3295
3296 if (FLAG_trace_service) {
3297 OS::PrintErr("[+%" Pd64 "ms] Isolate %s invoking _runExtension for %s\n",
3298 Dart::UptimeMillis(), name(), method_name.ToCString());
3299 }
3300 result = DartEntry::InvokeFunction(run_extension, arguments);
3301 if (FLAG_trace_service) {
3302 OS::PrintErr("[+%" Pd64 "ms] Isolate %s _runExtension complete for %s\n",
3303 Dart::UptimeMillis(), name(), method_name.ToCString());
3304 }
3305 // Propagate the error.
3306 if (result.IsError()) {
3307 // Remaining service extension calls are dropped.
3308 if (!result.IsUnwindError()) {
3309 // Send error back over the protocol.
3310 Service::PostError(method_name, parameter_keys, parameter_values,
3311 reply_port, id, Error::Cast(result));
3312 }
3313 return Error::Cast(result).ptr();
3314 }
3315 // Drain the microtask queue.
3317 // Propagate the error.
3318 if (result.IsError()) {
3319 // Remaining service extension calls are dropped.
3320 return Error::Cast(result).ptr();
3321 }
3322 }
3323 return Error::null();
3324}
static const Bool & Get(bool value)
Definition: object.h:10801
static ObjectPtr InvokeFunction(const Function &function, const Array &arguments)
Definition: dart_entry.cc:31
static ObjectPtr DrainMicrotaskQueue()
Definition: dart_entry.cc:750
@ kNew
Definition: heap.h:38
static LibraryPtr DeveloperLibrary()
Definition: object.cc:14795
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

◆ is_runnable()

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

Definition at line 1095 of file isolate.h.

1095{ return LoadIsolateFlagsBit<IsRunnableBit>(); }

◆ is_service_registered()

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

Definition at line 1385 of file isolate.h.

1385 {
1386 return LoadIsolateFlagsBit<IsServiceRegisteredBit>();
1387 }

◆ is_vm_isolate()

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

Definition at line 1380 of file isolate.h.

1380{ return LoadIsolateFlagsBit<IsVMIsolateBit>(); }

◆ IsDeoptimizing()

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

Definition at line 1254 of file isolate.h.

1254{ 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 1007 of file isolate.h.

1007 {
1008 return isolate_object_store_.get();
1009 }

◆ IsolateCreationEnabled()

bool dart::Isolate::IsolateCreationEnabled ( )
static

Definition at line 3600 of file isolate.cc.

3600 {
3601 MonitorLocker ml(isolate_creation_monitor_);
3602 return creation_enabled_;
3603}

◆ IsolateListLength()

intptr_t dart::Isolate::IsolateListLength ( )
static

Definition at line 3541 of file isolate.cc.

3541 {
3542 intptr_t count = 0;
3544 group->ForEachIsolate([&](Isolate* isolate) { count++; });
3545 });
3546 return count;
3547}
int count
Definition: FontMgrTest.cpp:50
void ForEachIsolate(std::function< void(Isolate *isolate)> function, bool at_safepoint=false)
Definition: isolate.cc:2841
static void ForEach(std::function< void(IsolateGroup *)> action)
Definition: isolate.cc:683
friend class IsolateGroup
Definition: isolate.h:1759

◆ IsPaused()

bool dart::Isolate::IsPaused ( ) const

Definition at line 2005 of file isolate.cc.

2005 {
2006#if defined(PRODUCT)
2007 return false;
2008#else
2009 return (debugger_ != nullptr) && (debugger_->PauseEvent() != nullptr);
2010#endif // !defined(PRODUCT)
2011}
const ServiceEvent * PauseEvent() const
Definition: debugger.h:733

◆ IsPrefixLoaded()

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

Definition at line 2802 of file isolate.cc.

2802 {
2803 UnorderedHashSet<LibraryPrefixMapTraits> loaded_prefixes_set(
2804 loaded_prefixes_set_storage_);
2805 bool result = loaded_prefixes_set.GetOrNull(prefix) != Object::null();
2806 loaded_prefixes_set.Release();
2807 return result;
2808}

◆ IsScheduled()

bool dart::Isolate::IsScheduled ( )
inline

Definition at line 991 of file isolate.h.

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

◆ IsSystemIsolate()

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

Definition at line 1445 of file isolate.h.

1445 {
1446 return IsolateGroup::IsSystemIsolateGroup(isolate->group());
1447 }
static bool IsSystemIsolateGroup(const IsolateGroup *group)
Definition: isolate.cc:3605

◆ IsVMInternalIsolate()

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

Definition at line 3609 of file isolate.cc.

3609 {
3610 return isolate->is_kernel_isolate() || isolate->is_service_isolate() ||
3611 isolate->is_vm_isolate();
3612}

◆ KillAllIsolates()

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

Definition at line 3696 of file isolate.cc.

3696 {
3697 IsolateKillerVisitor visitor(msg_id);
3698 VisitIsolates(&visitor);
3699}
static void VisitIsolates(IsolateVisitor *visitor)
Definition: isolate.cc:3531
friend class IsolateKillerVisitor
Definition: isolate.h:1485

◆ KillAllSystemIsolates()

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

Definition at line 3701 of file isolate.cc.

3701 {
3702 IsolateKillerVisitor visitor(msg_id, /*kill_system_isolates=*/true);
3703 VisitIsolates(&visitor);
3704}

◆ KillIfExists()

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

Definition at line 3706 of file isolate.cc.

3706 {
3707 IsolateKillerVisitor visitor(isolate, msg_id);
3708 VisitIsolates(&visitor);
3709}

◆ last_resume_timestamp()

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

Definition at line 1159 of file isolate.h.

1159{ return last_resume_timestamp_; }

◆ LookupIsolateByPort()

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

Definition at line 3549 of file isolate.cc.

3549 {
3550 Isolate* match = nullptr;
3552 group->ForEachIsolate([&](Isolate* isolate) {
3553 if (isolate->main_port() == port) {
3554 match = isolate;
3555 }
3556 });
3557 });
3558 return match;
3559}
def match(bench, filt)
Definition: benchmark.py:23
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

◆ LookupIsolateNameByPort()

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

Definition at line 3561 of file isolate.cc.

3561 {
3562 MonitorLocker ml(isolate_creation_monitor_);
3563 std::unique_ptr<char[]> result;
3565 group->ForEachIsolate([&](Isolate* isolate) {
3566 if (isolate->main_port() == port) {
3567 const size_t len = strlen(isolate->name()) + 1;
3568 result = std::unique_ptr<char[]>(new char[len]);
3569 strncpy(result.get(), isolate->name(), len);
3570 }
3571 });
3572 });
3573 return result;
3574}

◆ LookupServiceExtensionHandler()

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

Definition at line 3421 of file isolate.cc.

3421 {
3422 const GrowableObjectArray& handlers =
3423 GrowableObjectArray::Handle(registered_service_extension_handlers());
3424 if (handlers.IsNull()) {
3425 return Instance::null();
3426 }
3427 String& handler_name = String::Handle();
3428 for (intptr_t i = 0; i < handlers.Length(); i += kRegisteredEntrySize) {
3429 handler_name ^= handlers.At(i + kRegisteredNameIndex);
3430 ASSERT(!handler_name.IsNull());
3431 if (handler_name.Equals(name)) {
3432 return Instance::RawCast(handlers.At(i + kRegisteredHandlerIndex));
3433 }
3434 }
3435 return Instance::null();
3436}
static ObjectPtr RawCast(ObjectPtr obj)
Definition: object.h:325

◆ main_port()

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

Definition at line 1048 of file isolate.h.

1048{ return main_port_; }

◆ MakeRunnable()

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

Definition at line 2140 of file isolate.cc.

2140 {
2141 MutexLocker ml(&mutex_);
2142 // Check if we are in a valid state to make the isolate runnable.
2143 if (is_runnable() == true) {
2144 return "Isolate is already runnable";
2145 }
2146 if (group()->object_store()->root_library() == Library::null()) {
2147 return "The embedder has to ensure there is a root library (e.g. by "
2148 "calling Dart_LoadScriptFromKernel ).";
2149 }
2151 return nullptr;
2152}
void MakeRunnableLocked()
Definition: isolate.cc:2154
bool is_runnable() const
Definition: isolate.h:1095

◆ MakeRunnableLocked()

void dart::Isolate::MakeRunnableLocked ( )

Definition at line 2154 of file isolate.cc.

2154 {
2156 ASSERT(!is_runnable());
2157 ASSERT(group()->object_store()->root_library() != Library::null());
2158
2159 // Set the isolate as runnable and if we are being spawned schedule
2160 // isolate on thread pool for execution.
2161 set_is_runnable(true);
2162#ifndef PRODUCT
2163 if (!Isolate::IsSystemIsolate(this)) {
2164 if (FLAG_pause_isolates_on_unhandled_exceptions) {
2166 }
2167 }
2168#endif // !PRODUCT
2169#if defined(SUPPORT_TIMELINE)
2170 TimelineStream* stream = Timeline::GetIsolateStream();
2171 ASSERT(stream != nullptr);
2172 TimelineEvent* event = stream->StartEvent();
2173 if (event != nullptr) {
2174 event->Instant("Runnable");
2175 event->Complete();
2176 }
2177#endif
2178#ifndef PRODUCT
2179 if (!Isolate::IsSystemIsolate(this) && Service::isolate_stream.enabled()) {
2180 ServiceEvent runnableEvent(this, ServiceEvent::kIsolateRunnable);
2181 Service::HandleEvent(&runnableEvent, /* enter_safepoint */ false);
2182 }
2183 GetRunnableLatencyMetric()->set_value(UptimeMicros());
2184#endif // !PRODUCT
2185}
void SetExceptionPauseInfo(Dart_ExceptionPauseInfo pause_info)
Definition: debugger.cc:1860
static bool IsSystemIsolate(const Isolate *isolate)
Definition: isolate.h:1445
Debugger * debugger() const
Definition: isolate.h:1108
void set_is_runnable(bool value)
Definition: isolate.h:1096
int64_t UptimeMicros() const
Definition: isolate.cc:1986
bool IsOwnedByCurrentThread() const
Definition: os_thread.h:402
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:506

◆ message_handler()

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

Definition at line 2416 of file isolate.cc.

2416 {
2417 return message_handler_;
2418}

◆ message_notify_callback()

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

Definition at line 1011 of file isolate.h.

1011 {
1012 return message_notify_callback_.load(std::memory_order_relaxed);
1013 }

◆ mutator_thread()

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

Definition at line 1920 of file isolate.cc.

1920 {
1921 ASSERT(thread_registry() != nullptr);
1922 return mutator_thread_;
1923}
ThreadRegistry * thread_registry() const
Definition: isolate.h:994

◆ mutex()

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

Definition at line 1105 of file isolate.h.

1105{ return &mutex_; }

◆ name()

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

Definition at line 1043 of file isolate.h.

1043{ return name_; }

◆ NotifyErrorListeners()

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

Definition at line 2362 of file isolate.cc.

2363 {
2364 const GrowableObjectArray& listeners = GrowableObjectArray::Handle(
2365 current_zone(), isolate_object_store()->error_listeners());
2366 if (listeners.IsNull()) return false;
2367
2368 Dart_CObject arr;
2369 Dart_CObject* arr_values[2];
2371 arr.value.as_array.length = 2;
2372 arr.value.as_array.values = arr_values;
2373 Dart_CObject msg;
2375 msg.value.as_string = const_cast<char*>(message);
2376 arr_values[0] = &msg;
2377 Dart_CObject stack;
2378 if (stacktrace == nullptr) {
2379 stack.type = Dart_CObject_kNull;
2380 } else {
2381 stack.type = Dart_CObject_kString;
2382 stack.value.as_string = const_cast<char*>(stacktrace);
2383 }
2384 arr_values[1] = &stack;
2385
2386 SendPort& listener = SendPort::Handle(current_zone());
2387 bool was_somebody_notified = false;
2388 for (intptr_t i = 0; i < listeners.Length(); i++) {
2389 listener ^= listeners.At(i);
2390 if (!listener.IsNull()) {
2391 Dart_Port port_id = listener.Id();
2392 PortMap::PostMessage(SerializeMessage(current_zone(), port_id, &arr));
2393 was_somebody_notified = true;
2394 }
2395 }
2396 return was_somebody_notified;
2397}
@ 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 2299 of file isolate.cc.

2299 {
2300 const GrowableObjectArray& listeners = GrowableObjectArray::Handle(
2301 current_zone(), isolate_object_store()->exit_listeners());
2302 if (listeners.IsNull()) return;
2303
2304 SendPort& listener = SendPort::Handle(current_zone());
2305 Instance& response = Instance::Handle(current_zone());
2306 for (intptr_t i = 0; i < listeners.Length(); i += 2) {
2307 listener ^= listeners.At(i);
2308 if (!listener.IsNull()) {
2309 Dart_Port port_id = listener.Id();
2310 response ^= listeners.At(i + 1);
2311 PortMap::PostMessage(SerializeMessage(port_id, response));
2312 }
2313 }
2314}

◆ object_id_ring()

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

Definition at line 1250 of file isolate.h.

1250{ return object_id_ring_; }

◆ on_cleanup_callback()

Dart_IsolateCleanupCallback dart::Isolate::on_cleanup_callback ( )
inline

Definition at line 1028 of file isolate.h.

1028 {
1029 return on_cleanup_callback_;
1030 }

◆ on_shutdown_callback()

Dart_IsolateShutdownCallback dart::Isolate::on_shutdown_callback ( )
inline

Definition at line 1022 of file isolate.h.

1022 {
1023 return on_shutdown_callback_;
1024 }

◆ origin_id()

Dart_Port dart::Isolate::origin_id ( )

Definition at line 1990 of file isolate.cc.

1990 {
1991 MutexLocker ml(&origin_id_mutex_);
1992 return origin_id_;
1993}

◆ pause_capability()

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

Definition at line 1056 of file isolate.h.

1056{ return pause_capability_; }

◆ PauseEventHandler()

void dart::Isolate::PauseEventHandler ( )

Definition at line 3458 of file isolate.cc.

3458 {
3459 // We are stealing a pause event (like a breakpoint) from the
3460 // embedder. We don't know what kind of thread we are on -- it
3461 // could be from our thread pool or it could be a thread from the
3462 // embedder. Sit on the current thread handling service events
3463 // until we are told to resume.
3464 if (pause_loop_monitor_ == nullptr) {
3465 pause_loop_monitor_ = new Monitor();
3466 }
3468 MonitorLocker ml(pause_loop_monitor_, false);
3469
3470 Dart_MessageNotifyCallback saved_notify_callback = message_notify_callback();
3471 ASSERT(wake_pause_event_handler_count_ == 0);
3472 set_message_notify_callback(Isolate::WakePauseEventHandler);
3473
3474#if !defined(DART_PRECOMPILED_RUNTIME)
3475 const bool had_program_reload_context =
3476 group()->program_reload_context() != nullptr;
3477 const int64_t start_time_micros = !had_program_reload_context
3478 ? 0
3479 : group()
3483#endif // !defined(DART_PRECOMPILED_RUNTIME)
3484 bool resume = false;
3485 while (true) {
3486 // Handle all available vm service messages, up to a resume
3487 // request.
3488 while (!resume && Dart_HasServiceMessages()) {
3489 ml.Exit();
3490 resume = Dart_HandleServiceMessages();
3491 ml.Enter();
3492 }
3493 if (resume) {
3494 break;
3495 }
3496
3497#if !defined(DART_PRECOMPILED_RUNTIME)
3498 if (had_program_reload_context &&
3499 (group()->program_reload_context() == nullptr)) {
3500 if (FLAG_trace_reload) {
3501 const int64_t reload_time_micros =
3502 OS::GetCurrentMonotonicMicros() - start_time_micros;
3503 double reload_millis = MicrosecondsToMilliseconds(reload_time_micros);
3504 OS::PrintErr("Reloading has finished! (%.2f ms)\n", reload_millis);
3505 }
3506 break;
3507 }
3508#endif // !defined(DART_PRECOMPILED_RUNTIME)
3509
3510 // Wait for more service messages.
3511 Monitor::WaitResult res = ml.Wait();
3512 ASSERT(res == Monitor::kNotified);
3513 }
3514 // If any non-service messages came in, we need to notify the registered
3515 // message notify callback to check for unhandled messages. Otherwise, events
3516 // may be left unhandled until the next event comes in. See
3517 // https://github.com/dart-lang/sdk/issues/37312.
3518 if (saved_notify_callback != nullptr) {
3519 while (wake_pause_event_handler_count_ > 0) {
3520 saved_notify_callback(Api::CastIsolate(this));
3521 --wake_pause_event_handler_count_;
3522 }
3523 } else {
3524 wake_pause_event_handler_count_ = 0;
3525 }
3526 set_message_notify_callback(saved_notify_callback);
3528}
static Dart_Isolate CastIsolate(Isolate *isolate)
ProgramReloadContext * program_reload_context()
Definition: isolate.h:659
Dart_MessageNotifyCallback message_notify_callback() const
Definition: isolate.h:1011
void set_message_notify_callback(Dart_MessageNotifyCallback value)
Definition: isolate.h:1015
static int64_t GetCurrentMonotonicMicros()
IsolateGroupReloadContext * group_reload_context()
void(* Dart_MessageNotifyCallback)(Dart_Isolate destination_isolate)
Definition: dart_api.h:1546
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 2013 of file isolate.cc.

2013 {
2014#if !defined(PRODUCT)
2015 if (debugger_ == nullptr) {
2016 return Error::null();
2017 }
2018 ASSERT(!IsPaused());
2019 const Error& error = Error::Handle(debugger_->PausePostRequest());
2020 if (!error.IsNull()) {
2021 if (Thread::Current()->top_exit_frame_info() == 0) {
2022 return error.ptr();
2023 } else {
2025 UNREACHABLE();
2026 }
2027 }
2028#endif
2029 return Error::null();
2030}
#define UNREACHABLE()
Definition: assert.h:248
ErrorPtr PausePostRequest()
Definition: debugger.cc:293
static DART_NORETURN void PropagateError(const Error &error)
Definition: exceptions.cc:1003
bool IsPaused() const
Definition: isolate.cc:2005
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 1479 of file isolate.h.

1479 {
1480 return &pointers_to_verify_at_exit_;
1481 }

◆ PrintJSON()

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

Definition at line 3084 of file isolate.cc.

3084 {
3085 JSONObject jsobj(stream);
3086 jsobj.AddProperty("type", (ref ? "@Isolate" : "Isolate"));
3087 jsobj.AddServiceId(ISOLATE_SERVICE_ID_FORMAT_STRING,
3088 static_cast<int64_t>(main_port()));
3089
3090 jsobj.AddProperty("name", name());
3091 jsobj.AddPropertyF("number", "%" Pd64 "", static_cast<int64_t>(main_port()));
3092 jsobj.AddProperty("isSystemIsolate", is_system_isolate());
3093 jsobj.AddPropertyF("isolateGroupId", ISOLATE_GROUP_SERVICE_ID_FORMAT_STRING,
3094 group()->id());
3095 if (ref) {
3096 return;
3097 }
3098 jsobj.AddPropertyF("_originNumber", "%" Pd64 "",
3099 static_cast<int64_t>(origin_id()));
3100 int64_t uptime_millis = UptimeMicros() / kMicrosecondsPerMillisecond;
3101 int64_t start_time = OS::GetCurrentTimeMillis() - uptime_millis;
3102 jsobj.AddPropertyTimeMillis("startTime", start_time);
3103 {
3104 JSONObject jsheap(&jsobj, "_heaps");
3105 group()->heap()->PrintToJSONObject(Heap::kNew, &jsheap);
3106 group()->heap()->PrintToJSONObject(Heap::kOld, &jsheap);
3107 }
3108
3109 {
3110// Stringification macros
3111// See https://gcc.gnu.org/onlinedocs/gcc-4.8.5/cpp/Stringification.html
3112#define TO_STRING(s) STR(s)
3113#define STR(s) #s
3114
3115#define ADD_ISOLATE_FLAGS(when, name, bitname, isolate_flag_name, flag_name) \
3116 { \
3117 JSONObject jsflag(&jsflags); \
3118 jsflag.AddProperty("name", TO_STRING(name)); \
3119 jsflag.AddProperty("valueAsString", name() ? "true" : "false"); \
3120 }
3121 JSONArray jsflags(&jsobj, "isolateFlags");
3123#undef ADD_ISOLATE_FLAGS
3124#undef TO_STRING
3125#undef STR
3126 }
3127
3128 jsobj.AddProperty("runnable", is_runnable());
3129 jsobj.AddProperty("livePorts", open_ports_keepalive_);
3130 jsobj.AddProperty("pauseOnExit", message_handler()->should_pause_on_exit());
3131#if !defined(DART_PRECOMPILED_RUNTIME)
3132 jsobj.AddProperty("_isReloading", group()->IsReloading());
3133#endif // !defined(DART_PRECOMPILED_RUNTIME)
3134
3135 ServiceEvent pause_event = IsolatePauseEvent(this);
3136 jsobj.AddProperty("pauseEvent", &pause_event);
3137
3138 const Library& lib = Library::Handle(group()->object_store()->root_library());
3139 if (!lib.IsNull()) {
3140 jsobj.AddProperty("rootLib", lib);
3141 }
3142
3143 if (FLAG_profiler) {
3144 JSONObject tagCounters(&jsobj, "_tagCounters");
3145 vm_tag_counters()->PrintToJSONObject(&tagCounters);
3146 }
3149 ASSERT(!error.IsNull());
3150 jsobj.AddProperty("error", error, false);
3151 } else if (sticky_error() != Object::null()) {
3152 Error& error = Error::Handle(sticky_error());
3153 ASSERT(!error.IsNull());
3154 jsobj.AddProperty("error", error, false);
3155 }
3156
3157 {
3158 const GrowableObjectArray& libs =
3159 GrowableObjectArray::Handle(group()->object_store()->libraries());
3160 intptr_t num_libs = libs.Length();
3161 Library& lib = Library::Handle();
3162
3163 JSONArray lib_array(&jsobj, "libraries");
3164 for (intptr_t i = 0; i < num_libs; i++) {
3165 lib ^= libs.At(i);
3166 ASSERT(!lib.IsNull());
3167 lib_array.AddValue(lib);
3168 }
3169 }
3170
3171 {
3172 JSONArray breakpoints(&jsobj, "breakpoints");
3173 if (debugger() != nullptr) {
3174 debugger()->PrintBreakpointsToJSONArray(&breakpoints);
3175 }
3176 }
3177
3178 Dart_ExceptionPauseInfo pause_info = (debugger() != nullptr)
3181 jsobj.AddProperty("exceptionPauseMode",
3183
3184 if (debugger() != nullptr) {
3185 JSONObject settings(&jsobj, "_debuggerSettings");
3187 }
3188
3189 {
3190 GrowableObjectArray& handlers =
3191 GrowableObjectArray::Handle(registered_service_extension_handlers());
3192 if (!handlers.IsNull()) {
3193 JSONArray extensions(&jsobj, "extensionRPCs");
3194 String& handler_name = String::Handle();
3195 for (intptr_t i = 0; i < handlers.Length(); i += kRegisteredEntrySize) {
3196 handler_name ^= handlers.At(i + kRegisteredNameIndex);
3197 extensions.AddValue(handler_name.ToCString());
3198 }
3199 }
3200 }
3201
3202 {
3203 JSONObject isolate_group(&jsobj, "isolate_group");
3204 group()->PrintToJSONObject(&isolate_group, /*ref=*/true);
3205 }
3206}
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:984
Heap * heap() const
Definition: isolate.h:296
void PrintToJSONObject(JSONObject *jsobj, bool ref)
Definition: isolate.cc:648
ErrorPtr sticky_error() const
Definition: isolate.h:1357
VMTagCounters * vm_tag_counters()
Definition: isolate.h:1311
Dart_Port origin_id()
Definition: isolate.cc:1990
static int64_t GetCurrentTimeMillis()
void PrintToJSONObject(JSONObject *obj)
Definition: tags.cc:123
static const char * ExceptionPauseInfoToServiceEnum(Dart_ExceptionPauseInfo pi)
Definition: isolate.cc:3023
constexpr intptr_t kMicrosecondsPerMillisecond
Definition: globals.h:561
static ServiceEvent IsolatePauseEvent(Isolate *isolate)
Definition: isolate.cc:3037
Dart_ExceptionPauseInfo
Definition: debugger.h:504
@ kNoPauseOnExceptions
Definition: debugger.h:505
#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 3208 of file isolate.cc.

3208 {
3210}
void PrintMemoryUsageJSON(JSONStream *stream) const
Definition: heap.cc:992

◆ PrintPauseEventJSON()

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

Definition at line 3212 of file isolate.cc.

3212 {
3214}
void PrintJSON(JSONStream *js) const

◆ ProcessFreeSampleBlocks()

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

◆ random()

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

Definition at line 1191 of file isolate.h.

1191{ return &random_; }

◆ RegisterKernelBlobCallback()

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

Definition at line 1238 of file isolate.h.

1238 {
1239 return register_kernel_blob_callback_;
1240 }

◆ RegisterServiceExtensionHandler()

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

Definition at line 3385 of file isolate.cc.

3386 {
3387 // Don't allow for service extensions to be registered for internal isolates.
3388 if (Isolate::IsVMInternalIsolate(this)) {
3389 return;
3390 }
3391 GrowableObjectArray& handlers =
3392 GrowableObjectArray::Handle(registered_service_extension_handlers());
3393 if (handlers.IsNull()) {
3395 set_registered_service_extension_handlers(handlers);
3396 }
3397#if defined(DEBUG)
3398 {
3399 // Sanity check.
3400 const Instance& existing_handler =
3402 ASSERT(existing_handler.IsNull());
3403 }
3404#endif
3405 ASSERT(kRegisteredNameIndex == 0);
3406 handlers.Add(name, Heap::kOld);
3407 ASSERT(kRegisteredHandlerIndex == 1);
3408 handlers.Add(closure, Heap::kOld);
3409 {
3410 // Fire off an event.
3411 ServiceEvent event(this, ServiceEvent::kServiceExtensionAdded);
3412 event.set_extension_rpc(&name);
3414 }
3415}
static bool IsVMInternalIsolate(const Isolate *isolate)
Definition: isolate.cc:3609
InstancePtr LookupServiceExtensionHandler(const String &name)
Definition: isolate.cc:3421

◆ RememberLiveTemporaries()

void dart::Isolate::RememberLiveTemporaries ( )

Definition at line 2784 of file isolate.cc.

2784 {
2785 if (mutator_thread_ != nullptr) {
2787 }
2788}
void RememberLiveTemporaries()
Definition: thread.cc:1149

◆ RemoveErrorListener()

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

Definition at line 2347 of file isolate.cc.

2347 {
2348 const GrowableObjectArray& listeners = GrowableObjectArray::Handle(
2349 current_zone(), isolate_object_store()->error_listeners());
2350 SendPort& current = SendPort::Handle(current_zone());
2351 for (intptr_t i = 0; i < listeners.Length(); i++) {
2352 current ^= listeners.At(i);
2353 if (!current.IsNull() && (current.Id() == listener.Id())) {
2354 // Remove the matching listener from the list.
2355 current = SendPort::null();
2356 listeners.SetAt(i, current);
2357 return;
2358 }
2359 }
2360}

◆ RemoveExitListener()

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

Definition at line 2283 of file isolate.cc.

2283 {
2284 const GrowableObjectArray& listeners = GrowableObjectArray::Handle(
2285 current_zone(), isolate_object_store()->exit_listeners());
2286 SendPort& current = SendPort::Handle(current_zone());
2287 for (intptr_t i = 0; i < listeners.Length(); i += 2) {
2288 current ^= listeners.At(i);
2289 if (!current.IsNull() && (current.Id() == listener.Id())) {
2290 // Remove the matching listener from the list.
2291 current = SendPort::null();
2292 listeners.SetAt(i, current);
2293 listeners.SetAt(i + 1, Object::null_instance());
2294 return;
2295 }
2296 }
2297}

◆ RemoveResumeCapability()

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

Definition at line 2230 of file isolate.cc.

2230 {
2231 const GrowableObjectArray& caps = GrowableObjectArray::Handle(
2232 current_zone(), isolate_object_store()->resume_capabilities());
2233 Capability& current = Capability::Handle(current_zone());
2234 for (intptr_t i = 0; i < caps.Length(); i++) {
2235 current ^= caps.At(i);
2236 if (!current.IsNull() && (current.Id() == capability.Id())) {
2237 // Remove the matching capability from the list.
2238 current = Capability::null();
2239 caps.SetAt(i, current);
2240 return true;
2241 }
2242 }
2243 return false;
2244}

◆ ResumeRequest()

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

Definition at line 1148 of file isolate.h.

1148{ return LoadIsolateFlagsBit<ResumeRequestBit>(); }

◆ Run()

void dart::Isolate::Run ( )

Definition at line 2411 of file isolate.cc.

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

◆ safepoint_handler()

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

Definition at line 996 of file isolate.h.

996 {
997 return group()->safepoint_handler();
998 }
SafepointHandler * safepoint_handler()
Definition: isolate.h:334

◆ scheduled_mutator_thread()

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

Definition at line 992 of file isolate.h.

◆ ScheduleInterrupts()

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

Definition at line 1967 of file isolate.cc.

1967 {
1968 // We take the threads lock here to ensure that the mutator thread does not
1969 // exit the isolate while we are trying to schedule interrupts on it.
1970 MonitorLocker ml(group()->thread_registry()->threads_lock());
1971 Thread* mthread = mutator_thread();
1972 if (mthread != nullptr) {
1973 mthread->ScheduleInterrupts(interrupt_bits);
1974 }
1975}
Thread * mutator_thread() const
Definition: isolate.cc:1920

◆ SendInternalLibMessage() [1/2]

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

Definition at line 1038 of file isolate.cc.

1040 {
1041 Dart_CObject array_entry_msg_kind;
1042 array_entry_msg_kind.type = Dart_CObject_kInt64;
1043 array_entry_msg_kind.value.as_int64 = Message::kIsolateLibOOBMsg;
1044
1045 Dart_CObject array_entry_msg_id;
1046 array_entry_msg_id.type = Dart_CObject_kInt64;
1047 array_entry_msg_id.value.as_int64 = msg_id;
1048
1049 Dart_CObject array_entry_capability;
1050 array_entry_capability.type = Dart_CObject_kCapability;
1051 array_entry_capability.value.as_capability.id = capability;
1052
1053 Dart_CObject* array_entries[3] = {
1054 &array_entry_msg_kind,
1055 &array_entry_msg_id,
1056 &array_entry_capability,
1057 };
1058
1061 message.value.as_array.values = array_entries;
1062 message.value.as_array.length = ARRAY_SIZE(array_entries);
1063
1064 AllocOnlyStackZone zone;
1065 std::unique_ptr<Message> msg = WriteApiMessage(
1066 zone.GetZone(), &message, main_port, Message::kOOBPriority);
1067 if (msg == nullptr) UNREACHABLE();
1068
1069 return PortMap::PostMessage(std::move(msg));
1070}
@ 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 1033 of file isolate.cc.

1033 {
1034 const bool ok = SendInternalLibMessage(main_port(), msg_id, capability);
1035 if (!ok) UNREACHABLE();
1036}
void SendInternalLibMessage(LibMsgId msg_id, uint64_t capability)
Definition: isolate.cc:1033

◆ set_current_allocation_sample_block()

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

Definition at line 1121 of file isolate.h.

1121 {
1122 current_allocation_sample_block_ = block;
1123 }

◆ set_current_sample_block()

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

Definition at line 1112 of file isolate.h.

1112 {
1113 current_sample_block_ = block;
1114 }

◆ set_current_tag()

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

Definition at line 3222 of file isolate.cc.

3222 {
3223 uword user_tag = tag.tag();
3225 set_user_tag(user_tag);
3226 current_tag_ = tag.ptr();
3227}
uword user_tag() const
Definition: isolate.h:1327
constexpr uword kUwordMax
Definition: globals.h:519

◆ set_default_tag()

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

Definition at line 3229 of file isolate.cc.

3229 {
3230 default_tag_ = tag.ptr();
3231}

◆ set_deopt_context()

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

Definition at line 1256 of file isolate.h.

1256 {
1257 ASSERT(value == nullptr || deopt_context_ == nullptr);
1258 deopt_context_ = value;
1259 }
uint8_t value

◆ set_environment_callback()

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

Definition at line 1078 of file isolate.h.

1078 {
1079 environment_callback_ = value;
1080 }

◆ set_field_table()

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

Definition at line 1001 of file isolate.h.

1001 {
1002 delete field_table_;
1003 field_table_ = field_table;
1004 T->field_table_values_ = field_table->table();
1005 }
ObjectPtr * table()
Definition: field_table.h:43
FieldTable * field_table() const
Definition: isolate.h:1000
#define T
Definition: precompiler.cc:65

◆ set_finalizers()

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

Definition at line 2001 of file isolate.cc.

2001 {
2002 finalizers_ = value.ptr();
2003}

◆ set_forward_table_new()

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

Definition at line 2548 of file isolate.cc.

2548 {
2549 std::unique_ptr<WeakTable> value(table);
2550 forward_table_new_ = std::move(value);
2551}
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 2552 of file isolate.cc.

2552 {
2553 std::unique_ptr<WeakTable> value(table);
2554 forward_table_old_ = std::move(value);
2555}

◆ set_has_attempted_stepping()

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

Definition at line 1424 of file isolate.h.

1424 {
1425 UpdateIsolateFlagsBit<HasAttemptedSteppingBit>(value);
1426 }

◆ set_has_resumption_breakpoints()

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

Definition at line 1138 of file isolate.h.

1138 {
1139 has_resumption_breakpoints_ = value;
1140 }

◆ set_init_callback_data()

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

Definition at line 1067 of file isolate.h.

1067{ init_callback_data_ = value; }

◆ set_is_runnable()

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

Definition at line 1096 of file isolate.h.

1096 {
1097 UpdateIsolateFlagsBit<IsRunnableBit>(value);
1098#if !defined(PRODUCT)
1099 if (is_runnable()) {
1101 }
1102#endif
1103 }
void set_last_resume_timestamp()
Definition: isolate.h:1155

◆ set_is_service_registered()

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

Definition at line 1388 of file isolate.h.

1388 {
1389 UpdateIsolateFlagsBit<IsServiceRegisteredBit>(value);
1390 }

◆ set_is_vm_isolate()

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

Definition at line 1381 of file isolate.h.

1381 {
1382 UpdateIsolateFlagsBit<IsVMIsolateBit>(value);
1383 }

◆ set_last_resume_timestamp()

void dart::Isolate::set_last_resume_timestamp ( )
inline

Definition at line 1155 of file isolate.h.

1155 {
1156 last_resume_timestamp_ = OS::GetCurrentTimeMillis();
1157 }

◆ set_main_port()

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

Definition at line 1049 of file isolate.h.

1049 {
1050 ASSERT(main_port_ == 0); // Only set main port once.
1051 main_port_ = port;
1052 }

◆ set_message_notify_callback()

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

Definition at line 1015 of file isolate.h.

1015 {
1016 message_notify_callback_.store(value, std::memory_order_release);
1017 }

◆ set_name()

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

Definition at line 1977 of file isolate.cc.

1977 {
1978 free(name_);
1979 name_ = Utils::StrDup(name);
1980}
static char * StrDup(const char *s)

◆ set_on_cleanup_callback()

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

Definition at line 1025 of file isolate.h.

1025 {
1026 on_cleanup_callback_ = value;
1027 }

◆ set_on_shutdown_callback()

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

Definition at line 1019 of file isolate.h.

1019 {
1020 on_shutdown_callback_ = value;
1021 }

◆ set_origin_id()

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

Definition at line 1995 of file isolate.cc.

1995 {
1996 MutexLocker ml(&origin_id_mutex_);
1997 ASSERT((id == main_port_ && origin_id_ == 0) || (origin_id_ == main_port_));
1998 origin_id_ = id;
1999}

◆ set_pause_capability()

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

Definition at line 1055 of file isolate.h.

1055{ pause_capability_ = value; }

◆ set_should_pause_post_service_request()

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

Definition at line 1320 of file isolate.h.

1320 {
1321 UpdateIsolateFlagsBit<ShouldPausePostServiceRequestBit>(value);
1322 }

◆ set_simulator()

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

Definition at line 1194 of file isolate.h.

1194{ simulator_ = value; }

◆ set_single_step()

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

Definition at line 1132 of file isolate.h.

1132{ single_step_ = value; }

◆ set_tag_table()

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

Definition at line 3218 of file isolate.cc.

3218 {
3219 tag_table_ = value.ptr();
3220}

◆ set_terminate_capability()

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

Definition at line 1057 of file isolate.h.

1057 {
1058 terminate_capability_ = value;
1059 }

◆ SetCleanupCallback()

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

Definition at line 1221 of file isolate.h.

1221 {
1222 cleanup_callback_ = cb;
1223 }

◆ SetCreateGroupCallback()

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

Definition at line 1200 of file isolate.h.

1200 {
1201 create_group_callback_ = cb;
1202 }

◆ SetErrorsFatal()

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

Definition at line 1187 of file isolate.h.

1187 {
1188 UpdateIsolateFlagsBit<ErrorsFatalBit>(value);
1189 }

◆ SetGroupCleanupCallback()

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

Definition at line 1228 of file isolate.h.

1228 {
1229 cleanup_group_callback_ = cb;
1230 }

◆ SetInitializeCallback_()

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

Definition at line 1207 of file isolate.h.

1207 {
1208 initialize_callback_ = cb;
1209 }

◆ SetPrefixIsLoaded()

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

Definition at line 2810 of file isolate.cc.

2810 {
2811 UnorderedHashSet<LibraryPrefixMapTraits> loaded_prefixes_set(
2812 loaded_prefixes_set_storage_);
2813 loaded_prefixes_set.InsertOrGet(prefix);
2814 loaded_prefixes_set_storage_ = loaded_prefixes_set.Release().ptr();
2815}

◆ SetReceivePortKeepAliveState()

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

Definition at line 3765 of file isolate.cc.

3766 {
3767 // Changing keep-isolate-alive state of a closed port is a NOP.
3768 if (!receive_port.is_open()) return;
3769
3770 ASSERT(0 < open_ports_);
3771
3772 // If the state doesn't change it's a NOP.
3773 if (receive_port.keep_isolate_alive() == keep_isolate_alive) return;
3774
3775 if (keep_isolate_alive) {
3776 ASSERT(open_ports_keepalive_ < open_ports_);
3777 ++open_ports_keepalive_;
3778 } else {
3779 ASSERT(0 < open_ports_keepalive_);
3780 --open_ports_keepalive_;
3781 }
3782 receive_port.set_keep_isolate_alive(keep_isolate_alive);
3783}

◆ SetRegisterKernelBlobCallback()

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

Definition at line 1234 of file isolate.h.

1235 {
1236 register_kernel_blob_callback_ = cb;
1237 }

◆ SetResumeRequest()

void dart::Isolate::SetResumeRequest ( )
inline

Definition at line 1150 of file isolate.h.

1150 {
1151 UpdateIsolateFlagsBit<ResumeRequestBit>(true);
1153 }

◆ SetShutdownCallback()

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

Definition at line 1214 of file isolate.h.

1214 {
1215 shutdown_callback_ = cb;
1216 }

◆ SetStickyError()

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

Definition at line 2404 of file isolate.cc.

2404 {
2405 ASSERT(
2406 ((sticky_error_ == Error::null()) || (sticky_error == Error::null())) &&
2407 (sticky_error != sticky_error_));
2408 sticky_error_ = sticky_error;
2409}

◆ SetUnregisterKernelBlobCallback()

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

Definition at line 1241 of file isolate.h.

1242 {
1243 unregister_kernel_blob_callback_ = cb;
1244 }

◆ should_pause_post_service_request()

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

Definition at line 1317 of file isolate.h.

1317 {
1318 return LoadIsolateFlagsBit<ShouldPausePostServiceRequestBit>();
1319 }

◆ ShutdownCallback()

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

Definition at line 1217 of file isolate.h.

1217 {
1218 return shutdown_callback_;
1219 }

◆ simulator()

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

Definition at line 1193 of file isolate.h.

1193{ return simulator_; }

◆ single_step()

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

Definition at line 1133 of file isolate.h.

1133{ return single_step_; }

◆ single_step_offset()

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

Definition at line 1134 of file isolate.h.

1134 {
1135 return OFFSET_OF(Isolate, single_step_);
1136 }

◆ source()

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

Definition at line 1036 of file isolate.h.

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

◆ StealStickyError()

ErrorPtr dart::Isolate::StealStickyError ( )

Definition at line 3233 of file isolate.cc.

3233 {
3234 NoSafepointScope no_safepoint;
3235 ErrorPtr return_value = sticky_error_;
3236 sticky_error_ = Error::null();
3237 return return_value;
3238}

◆ sticky_error()

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

Definition at line 1357 of file isolate.h.

1357{ return sticky_error_; }

◆ tag_table()

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

Definition at line 1345 of file isolate.h.

1345{ return tag_table_; }

◆ TakeHasCompletedBlocks()

bool dart::Isolate::TakeHasCompletedBlocks ( )
inline

Definition at line 1125 of file isolate.h.

1125 {
1126 return has_completed_blocks_.exchange(0) != 0;
1127 }
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 1467 of file isolate.h.

1467 {
1468 return std::move(regexp_backtracking_stack_cache_);
1469 }

◆ terminate_capability()

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

Definition at line 1060 of file isolate.h.

1060{ return terminate_capability_; }

◆ thread_registry()

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

Definition at line 994 of file isolate.h.

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

◆ TrySetHasCompletedBlocks()

bool dart::Isolate::TrySetHasCompletedBlocks ( )
inline

Definition at line 1128 of file isolate.h.

1128 {
1129 return has_completed_blocks_.exchange(1) == 0;
1130 }

◆ UnblockClassFinalization()

intptr_t dart::Isolate::UnblockClassFinalization ( )
inline

Definition at line 1290 of file isolate.h.

1290 {
1291 ASSERT(defer_finalization_count_ > 0);
1292 return defer_finalization_count_--;
1293 }

◆ UnregisterKernelBlobCallback()

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

Definition at line 1245 of file isolate.h.

1245 {
1246 return unregister_kernel_blob_callback_;
1247 }

◆ UpdateNativeCallableKeepIsolateAliveCounter()

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

Definition at line 3806 of file isolate.cc.

3806 {
3807 ffi_callback_keep_alive_counter_ += delta;
3808 ASSERT(ffi_callback_keep_alive_counter_ >= 0);
3809}

◆ UptimeMicros()

int64_t dart::Isolate::UptimeMicros ( ) const

Definition at line 1986 of file isolate.cc.

1986 {
1987 return OS::GetCurrentMonotonicMicros() - start_time_micros_;
1988}

◆ user_tag()

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

Definition at line 1327 of file isolate.h.

1327{ return user_tag_; }

◆ user_tag_offset()

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

Definition at line 1328 of file isolate.h.

1328{ return OFFSET_OF(Isolate, user_tag_); }

◆ VerifyPauseCapability()

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

Definition at line 2187 of file isolate.cc.

2187 {
2188 return !capability.IsNull() && capability.IsCapability() &&
2189 (pause_capability() == Capability::Cast(capability).Id());
2190}
uint64_t pause_capability() const
Definition: isolate.h:1056

◆ VerifyTerminateCapability()

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

Definition at line 2192 of file isolate.cc.

2192 {
2193 return !capability.IsNull() && capability.IsCapability() &&
2194 (terminate_capability() == Capability::Cast(capability).Id());
2195}
uint64_t terminate_capability() const
Definition: isolate.h:1060

◆ VisitIsolates()

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

Definition at line 3531 of file isolate.cc.

3531 {
3532 if (visitor == nullptr) {
3533 return;
3534 }
3537 [&](Isolate* isolate) { visitor->VisitIsolate(isolate); });
3538 });
3539}

◆ vm_tag_counters()

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

Definition at line 1311 of file isolate.h.

1311{ return &vm_tag_counters_; }

◆ WaitForOutstandingSpawns()

void dart::Isolate::WaitForOutstandingSpawns ( )

Definition at line 3723 of file isolate.cc.

3723 {
3724 Thread* thread = Thread::Current();
3725 ASSERT(thread != nullptr);
3726 MonitorLocker ml(&spawn_count_monitor_);
3727 while (spawn_count_ > 0) {
3728 ml.WaitWithSafepointCheck(thread);
3729 }
3730}

Friends And Related Function Documentation

◆ Become

friend class Become
friend

Definition at line 1748 of file isolate.h.

◆ CreateWithinExistingIsolateGroup

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

Definition at line 1301 of file dart_api_impl.cc.

1303 {
1306
1307 auto spawning_group = group;
1308
1309 Isolate* isolate = reinterpret_cast<Isolate*>(
1310 CreateIsolate(spawning_group, /*is_new_group=*/false, name,
1311 /*isolate_data=*/nullptr, error));
1312 if (isolate == nullptr) return nullptr;
1313
1314 auto source = spawning_group->source();
1315 ASSERT(isolate->source() == source);
1316
1317 return isolate;
1318}
IsolateGroupSource * source() const
Definition: isolate.h:1036
static Isolate * Current()
Definition: isolate.h:986
#define API_TIMELINE_DURATION(thread)
#define CHECK_NO_ISOLATE(isolate)
Definition: dart_api_impl.h:53
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 1484 of file isolate.h.

◆ GCCompactor

friend class GCCompactor
friend

Definition at line 1749 of file isolate.h.

◆ GCMarker

friend class GCMarker
friend

Definition at line 1750 of file isolate.h.

◆ HeapIterationScope

friend class HeapIterationScope
friend

Definition at line 1755 of file isolate.h.

◆ HeapSnapshotWriter

friend class HeapSnapshotWriter
friend

Definition at line 1753 of file isolate.h.

◆ IsolateGroup

friend class IsolateGroup
friend

Definition at line 1759 of file isolate.h.

◆ IsolateKillerVisitor

friend class IsolateKillerVisitor
friend

Definition at line 1485 of file isolate.h.

◆ ObjectGraph

friend class ObjectGraph
friend

Definition at line 1752 of file isolate.h.

◆ SafepointHandler

friend class SafepointHandler
friend

Definition at line 1751 of file isolate.h.

◆ Scavenger

friend class Scavenger
friend

Definition at line 1754 of file isolate.h.

◆ ServiceIsolate

friend class ServiceIsolate
friend

Definition at line 1756 of file isolate.h.

◆ Thread

friend class Thread
friend

Definition at line 1757 of file isolate.h.

◆ Timeline

friend class Timeline
friend

Definition at line 1758 of file isolate.h.


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