@@ -36,11 +36,11 @@ DEFINE_NATIVE_ENTRY(Object_equals, 0, 1) {
3636 return Object::null ();
3737}
3838
39- static intptr_t GetHash (Isolate* isolate , const ObjectPtr obj) {
39+ static intptr_t GetHash (IsolateGroup* isolate_group , const ObjectPtr obj) {
4040#if defined(HASH_IN_OBJECT_HEADER)
4141 return Object::GetCachedHash (obj);
4242#else
43- Heap* heap = isolate-> group () ->heap ();
43+ Heap* heap = isolate_group ->heap ();
4444 ASSERT (obj->IsDartInstance ());
4545 return heap->GetHash (obj);
4646#endif
@@ -50,7 +50,7 @@ DEFINE_NATIVE_ENTRY(Object_getHash, 0, 1) {
5050 // Please note that no handle is created for the argument.
5151 // This is safe since the argument is only used in a tail call.
5252 // The performance benefit is more than 5% when using hashCode.
53- intptr_t hash = GetHash (isolate , arguments->NativeArgAt (0 ));
53+ intptr_t hash = GetHash (thread-> isolate_group () , arguments->NativeArgAt (0 ));
5454 if (LIKELY (hash != 0 )) {
5555 return Smi::New (hash);
5656 }
@@ -269,8 +269,9 @@ DEFINE_NATIVE_ENTRY(LibraryPrefix_loadingUnit, 0, 1) {
269269
270270DEFINE_NATIVE_ENTRY (LibraryPrefix_issueLoad, 0 , 1 ) {
271271 const Smi& id = Smi::CheckedHandle (zone, arguments->NativeArgAt (0 ));
272+ auto isolate_group = thread->isolate_group ();
272273 Array& units =
273- Array::Handle (zone, isolate-> group () ->object_store ()->loading_units ());
274+ Array::Handle (zone, isolate_group ->object_store ()->loading_units ());
274275 if (units.IsNull ()) {
275276 // Not actually split.
276277 const Library& lib = Library::Handle (zone, Library::CoreLibrary ());
@@ -300,8 +301,9 @@ DEFINE_NATIVE_ENTRY(Internal_nativeEffect, 0, 1) {
300301}
301302
302303DEFINE_NATIVE_ENTRY (Internal_collectAllGarbage, 0 , 0 ) {
303- isolate->group ()->heap ()->CollectAllGarbage (GCReason::kDebugging ,
304- /* compact=*/ true );
304+ auto isolate_group = thread->isolate_group ();
305+ isolate_group->heap ()->CollectAllGarbage (GCReason::kDebugging ,
306+ /* compact=*/ true );
305307 return Object::null ();
306308}
307309
@@ -311,26 +313,28 @@ DEFINE_NATIVE_ENTRY(Internal_deoptimizeFunctionsOnStack, 0, 0) {
311313}
312314
313315DEFINE_NATIVE_ENTRY (Internal_allocateObjectInstructionsStart, 0 , 0 ) {
314- auto & stub = Code::Handle (
315- zone, isolate->group ()->object_store ()->allocate_object_stub ());
316+ auto isolate_group = thread->isolate_group ();
317+ auto & stub =
318+ Code::Handle (zone, isolate_group->object_store ()->allocate_object_stub ());
316319 ASSERT (!stub.IsUnknownDartCode ());
317320 // We return the start offset in the isolate instructions instead of the
318321 // full address because that fits into small Smis on 32-bit architectures
319322 // or compressed pointer builds.
320323 const uword instructions_start =
321- reinterpret_cast <uword>(isolate ->source ()->snapshot_instructions );
324+ reinterpret_cast <uword>(isolate_group ->source ()->snapshot_instructions );
322325 return Smi::New (stub.PayloadStart () - instructions_start);
323326}
324327
325328DEFINE_NATIVE_ENTRY (Internal_allocateObjectInstructionsEnd, 0 , 0 ) {
326- auto & stub = Code::Handle (
327- zone, isolate->group ()->object_store ()->allocate_object_stub ());
329+ auto isolate_group = thread->isolate_group ();
330+ auto & stub =
331+ Code::Handle (zone, isolate_group->object_store ()->allocate_object_stub ());
328332 ASSERT (!stub.IsUnknownDartCode ());
329333 // We return the end offset in the isolate instructions instead of the
330334 // full address because that fits into small Smis on 32-bit architectures
331335 // or compressed pointer builds.
332336 const uword instructions_start =
333- reinterpret_cast <uword>(isolate ->source ()->snapshot_instructions );
337+ reinterpret_cast <uword>(isolate_group ->source ()->snapshot_instructions );
334338 return Smi::New ((stub.PayloadStart () - instructions_start) + stub.Size ());
335339}
336340
0 commit comments