diff --git a/pkg/vm/lib/modular/transformations/ffi/common.dart b/pkg/vm/lib/modular/transformations/ffi/common.dart index ba1b711e5ed..8746e087d14 100644 --- a/pkg/vm/lib/modular/transformations/ffi/common.dart +++ b/pkg/vm/lib/modular/transformations/ffi/common.dart @@ -329,10 +329,10 @@ class FfiTransformer extends Transformer { final Procedure nativeCallbackFunctionProcedure; final Procedure nativeAsyncCallbackFunctionProcedure; final Procedure createNativeCallableIsolateLocalProcedure; - final Procedure createNativeCallableIsolateGroupSharedProcedure; + final Procedure createNativeCallableIsolateGroupBoundProcedure; final Procedure nativeIsolateLocalCallbackFunctionProcedure; - final Procedure nativeIsolateGroupSharedCallbackFunctionProcedure; - final Procedure nativeIsolateGroupSharedClosureFunctionProcedure; + final Procedure nativeIsolateGroupBoundCallbackFunctionProcedure; + final Procedure nativeIsolateGroupBoundClosureFunctionProcedure; final Map loadMethods; final Map loadUnalignedMethods; final Map storeMethods; @@ -356,9 +356,9 @@ class FfiTransformer extends Transformer { final Class rawRecvPortClass; final Class nativeCallableClass; final Procedure nativeCallableIsolateLocalConstructor; - final Procedure nativeCallableIsolateGroupSharedConstructor; + final Procedure nativeCallableIsolateGroupBoundConstructor; final Constructor nativeCallablePrivateIsolateLocalConstructor; - final Constructor nativeCallablePrivateIsolateGroupSharedConstructor; + final Constructor nativeCallablePrivateIsolateGroupBoundConstructor; final Procedure nativeCallableListenerConstructor; final Constructor nativeCallablePrivateListenerConstructor; final Field nativeCallablePortField; @@ -842,10 +842,10 @@ class FfiTransformer extends Transformer { 'dart:ffi', '_createNativeCallableIsolateLocal', ), - createNativeCallableIsolateGroupSharedProcedure = index + createNativeCallableIsolateGroupBoundProcedure = index .getTopLevelProcedure( 'dart:ffi', - '_createNativeCallableIsolateGroupShared', + '_createNativeCallableIsolateGroupBound', ), nativeCallbackFunctionProcedure = index.getTopLevelProcedure( 'dart:ffi', @@ -859,15 +859,15 @@ class FfiTransformer extends Transformer { 'dart:ffi', '_nativeIsolateLocalCallbackFunction', ), - nativeIsolateGroupSharedCallbackFunctionProcedure = index + nativeIsolateGroupBoundCallbackFunctionProcedure = index .getTopLevelProcedure( 'dart:ffi', - '_nativeIsolateGroupSharedCallbackFunction', + '_nativeIsolateGroupBoundCallbackFunction', ), - nativeIsolateGroupSharedClosureFunctionProcedure = index + nativeIsolateGroupBoundClosureFunctionProcedure = index .getTopLevelProcedure( 'dart:ffi', - '_nativeIsolateGroupSharedClosureFunction', + '_nativeIsolateGroupBoundClosureFunction', ), nativeTypesClasses = nativeTypeClassNames.map( (nativeType, name) => @@ -973,10 +973,10 @@ class FfiTransformer extends Transformer { 'NativeCallable', 'isolateLocal', ), - nativeCallableIsolateGroupSharedConstructor = index.getProcedure( + nativeCallableIsolateGroupBoundConstructor = index.getProcedure( 'dart:ffi', 'NativeCallable', - 'isolateGroupShared', + 'isolateGroupBound', ), nativeCallablePrivateIsolateLocalConstructor = index.getConstructor( 'dart:ffi', @@ -993,9 +993,9 @@ class FfiTransformer extends Transformer { '_NativeCallableListener', '', ), - nativeCallablePrivateIsolateGroupSharedConstructor = index.getConstructor( + nativeCallablePrivateIsolateGroupBoundConstructor = index.getConstructor( 'dart:ffi', - '_NativeCallableIsolateGroupShared', + '_NativeCallableIsolateGroupBound', '', ), nativeCallablePortField = index.getField( diff --git a/pkg/vm/lib/modular/transformations/ffi/use_sites.dart b/pkg/vm/lib/modular/transformations/ffi/use_sites.dart index a991bddabad..1a5ac703d9f 100644 --- a/pkg/vm/lib/modular/transformations/ffi/use_sites.dart +++ b/pkg/vm/lib/modular/transformations/ffi/use_sites.dart @@ -570,10 +570,10 @@ mixin _FfiUseSiteTransformer on FfiTransformer { ); } else if (target == nativeCallableIsolateLocalConstructor) { return _verifyAndReplaceNativeCallableIsolateLocal(node); - } else if (target == nativeCallableIsolateGroupSharedConstructor) { + } else if (target == nativeCallableIsolateGroupBoundConstructor) { return _verifyAndReplaceNativeCallable( node, - replacement: _replaceNativeCallableIsolateGroupSharedConstructor, + replacement: _replaceNativeCallableIsolateGroupBoundConstructor, ); } else if (target == nativeCallableListenerConstructor) { final DartType nativeType = InterfaceType( @@ -1059,18 +1059,18 @@ mixin _FfiUseSiteTransformer on FfiTransformer { ); } - // NativeCallable.isolateGroupShared(target, exceptionalReturn) calls become: + // NativeCallable.isolateGroupBound(target, exceptionalReturn) calls become: // isStaticFunction is true: - // _NativeCallableIsolateGroupShared( - // _createNativeCallableIsolateGroupShared>( - // _nativeIsolateGroupSharedCallbackFunction(target, exceptionalReturn), + // _NativeCallableIsolateGroupBound( + // _createNativeCallableIsolateGroupBound>( + // _nativeIsolateGroupBoundCallbackFunction(target, exceptionalReturn), // null); // isStaticFunction is false: - // _NativeCallableIsolateGroupShared( - // _createNativeCallableIsolateGroupShared>( - // _nativeIsolateGroupSharedClosureFunction(exceptionalReturn), + // _NativeCallableIsolateGroupBound( + // _createNativeCallableIsolateGroupBound>( + // _nativeIsolateGroupBoundClosureFunction(exceptionalReturn), // target)); - Expression _replaceNativeCallableIsolateGroupSharedConstructor( + Expression _replaceNativeCallableIsolateGroupBoundConstructor( StaticInvocation node, Expression exceptionalReturn, bool isStaticFunction, @@ -1084,11 +1084,11 @@ mixin _FfiUseSiteTransformer on FfiTransformer { late StaticInvocation pointerValue; if (isStaticFunction) { pointerValue = StaticInvocation( - createNativeCallableIsolateGroupSharedProcedure, + createNativeCallableIsolateGroupBoundProcedure, Arguments( [ StaticInvocation( - nativeIsolateGroupSharedCallbackFunctionProcedure, + nativeIsolateGroupBoundCallbackFunctionProcedure, Arguments([ target, exceptionalReturn, @@ -1101,11 +1101,11 @@ mixin _FfiUseSiteTransformer on FfiTransformer { ); } else { pointerValue = StaticInvocation( - createNativeCallableIsolateGroupSharedProcedure, + createNativeCallableIsolateGroupBoundProcedure, Arguments( [ StaticInvocation( - nativeIsolateGroupSharedClosureFunctionProcedure, + nativeIsolateGroupBoundClosureFunctionProcedure, Arguments([exceptionalReturn], types: node.arguments.types), ), target, @@ -1116,7 +1116,7 @@ mixin _FfiUseSiteTransformer on FfiTransformer { } return ConstructorInvocation( - nativeCallablePrivateIsolateGroupSharedConstructor, + nativeCallablePrivateIsolateGroupBoundConstructor, Arguments([pointerValue], types: node.arguments.types), ); } diff --git a/runtime/lib/ffi.cc b/runtime/lib/ffi.cc index d2703cfdc4f..b42f495927e 100644 --- a/runtime/lib/ffi.cc +++ b/runtime/lib/ffi.cc @@ -46,12 +46,12 @@ DEFINE_NATIVE_ENTRY(Ffi_createNativeCallableIsolateLocal, 1, 3) { zone, trampoline, target, keep_isolate_alive)); } -DEFINE_NATIVE_ENTRY(Ffi_createNativeCallableIsolateGroupShared, 1, 2) { +DEFINE_NATIVE_ENTRY(Ffi_createNativeCallableIsolateGroupBound, 1, 2) { const auto& trampoline = Function::CheckedHandle(zone, arguments->NativeArg0()); const auto& target = Closure::CheckedHandle(zone, arguments->NativeArgAt(1)); return Pointer::New( - isolate->CreateIsolateGroupSharedFfiCallback(zone, trampoline, target)); + isolate->CreateIsolateGroupBoundFfiCallback(zone, trampoline, target)); } DEFINE_NATIVE_ENTRY(Ffi_deleteNativeCallable, 1, 1) { diff --git a/runtime/vm/bootstrap_natives.h b/runtime/vm/bootstrap_natives.h index 53dff2dafb8..dac9f38d2eb 100644 --- a/runtime/vm/bootstrap_natives.h +++ b/runtime/vm/bootstrap_natives.h @@ -297,7 +297,7 @@ namespace dart { V(VMService_RemoveUserTagsFromStreamableSampleList, 1) \ V(Ffi_createNativeCallableListener, 2) \ V(Ffi_createNativeCallableIsolateLocal, 3) \ - V(Ffi_createNativeCallableIsolateGroupShared, 2) \ + V(Ffi_createNativeCallableIsolateGroupBound, 2) \ V(Ffi_deleteNativeCallable, 1) \ V(Ffi_updateNativeCallableKeepIsolateAliveCounter, 1) \ V(Ffi_dl_open, 1) \ diff --git a/runtime/vm/bss_relocs.cc b/runtime/vm/bss_relocs.cc index b4062e17655..5af45ef1478 100644 --- a/runtime/vm/bss_relocs.cc +++ b/runtime/vm/bss_relocs.cc @@ -35,9 +35,9 @@ void BSS::Initialize(Thread* current, uword* bss_start, bool vm) { InitializeBSSEntry(Relocation::DLRT_ExitTemporaryIsolate, reinterpret_cast(DLRT_ExitTemporaryIsolate), bss_start); - InitializeBSSEntry( - Relocation::DLRT_ExitIsolateGroupSharedIsolate, - reinterpret_cast(DLRT_ExitIsolateGroupSharedIsolate), bss_start); + InitializeBSSEntry(Relocation::DLRT_ExitIsolateGroupBoundIsolate, + reinterpret_cast(DLRT_ExitIsolateGroupBoundIsolate), + bss_start); } } // namespace dart diff --git a/runtime/vm/bss_relocs.h b/runtime/vm/bss_relocs.h index 67ab37f5520..9b380cacab0 100644 --- a/runtime/vm/bss_relocs.h +++ b/runtime/vm/bss_relocs.h @@ -18,7 +18,7 @@ class BSS : public AllStatic { enum class Relocation : intptr_t { DLRT_GetFfiCallbackMetadata, // TODO(https://dartbug.com/52579): Remove. DLRT_ExitTemporaryIsolate, // TODO(https://dartbug.com/52579): Remove. - DLRT_ExitIsolateGroupSharedIsolate, // TODO(https://dartbug.com/52579) + DLRT_ExitIsolateGroupBoundIsolate, // TODO(https://dartbug.com/52579) EndOfVmEntries, // We don't have any isolate group specific entries at the moment. diff --git a/runtime/vm/compiler/ffi/callback.cc b/runtime/vm/compiler/ffi/callback.cc index 691595cdce2..f0c519f1f0f 100644 --- a/runtime/vm/compiler/ffi/callback.cc +++ b/runtime/vm/compiler/ffi/callback.cc @@ -28,9 +28,9 @@ const String& NativeCallbackFunctionName(Thread* thread, return String::Handle( zone, Symbols::FromConcat(thread, Symbols::FfiCallback(), String::Handle(zone, dart_target.name()))); - case FfiCallbackKind::kIsolateGroupSharedClosureCallback: - return Symbols::FfiIsolateGroupSharedCallback(); - case FfiCallbackKind::kIsolateGroupSharedStaticCallback: + case FfiCallbackKind::kIsolateGroupBoundClosureCallback: + return Symbols::FfiIsolateGroupBoundCallback(); + case FfiCallbackKind::kIsolateGroupBoundStaticCallback: return String::Handle( zone, Symbols::FromConcat(thread, Symbols::FfiCallback(), String::Handle(zone, dart_target.name()))); diff --git a/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc b/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc index 4f5070778f1..7b71ae9d4c9 100644 --- a/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc +++ b/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc @@ -3390,12 +3390,12 @@ Fragment StreamingFlowGraphBuilder::BuildStaticInvocation(TokenPosition* p) { case MethodRecognizer::kFfiNativeIsolateLocalCallbackFunction: return BuildFfiNativeCallbackFunction( FfiCallbackKind::kIsolateLocalClosureCallback); - case MethodRecognizer::kFfiNativeIsolateGroupSharedCallbackFunction: + case MethodRecognizer::kFfiNativeIsolateGroupBoundCallbackFunction: return BuildFfiNativeCallbackFunction( - FfiCallbackKind::kIsolateGroupSharedStaticCallback); - case MethodRecognizer::kFfiNativeIsolateGroupSharedClosureFunction: + FfiCallbackKind::kIsolateGroupBoundStaticCallback); + case MethodRecognizer::kFfiNativeIsolateGroupBoundClosureFunction: return BuildFfiNativeCallbackFunction( - FfiCallbackKind::kIsolateGroupSharedClosureCallback); + FfiCallbackKind::kIsolateGroupBoundClosureCallback); case MethodRecognizer::kFfiNativeAsyncCallbackFunction: return BuildFfiNativeCallbackFunction(FfiCallbackKind::kAsyncCallback); case MethodRecognizer::kFfiLoadAbiSpecificInt: @@ -6216,7 +6216,7 @@ Fragment StreamingFlowGraphBuilder::BuildFfiNativeCallbackFunction( // FfiCallbackKind::kIsolateLocalStaticCallback: // _nativeCallbackFunction(target, exceptionalReturn) // - // FfiCallbackKind::kIsolateGroupSharedStaticCallback: + // FfiCallbackKind::kIsolateGroupBoundStaticCallback: // _nativeCallbackFunction(target, exceptionalReturn) // // FfiCallbackKind::kAsyncCallback: @@ -6226,15 +6226,15 @@ Fragment StreamingFlowGraphBuilder::BuildFfiNativeCallbackFunction( // _nativeIsolateLocalCallbackFunction( // exceptionalReturn) // - // FfiCallbackKind::kIsolateGroupSharedClosureCallback: - // _nativeIsolateGroupSharedCallbackFunction( + // FfiCallbackKind::kIsolateGroupBoundClosureCallback: + // _nativeIsolateGroupBoundCallbackFunction( // exceptionalReturn) // // The FE also guarantees that the arguments are constants. const bool has_target = kind == FfiCallbackKind::kIsolateLocalStaticCallback || - kind == FfiCallbackKind::kIsolateGroupSharedStaticCallback; + kind == FfiCallbackKind::kIsolateGroupBoundStaticCallback; const bool has_exceptional_return = kind != FfiCallbackKind::kAsyncCallback; const intptr_t expected_argc = static_cast(has_target) + static_cast(has_exceptional_return); diff --git a/runtime/vm/compiler/frontend/kernel_to_il.cc b/runtime/vm/compiler/frontend/kernel_to_il.cc index c40b1fec7d4..d2ef033db45 100644 --- a/runtime/vm/compiler/frontend/kernel_to_il.cc +++ b/runtime/vm/compiler/frontend/kernel_to_il.cc @@ -1061,8 +1061,8 @@ bool FlowGraphBuilder::IsRecognizedMethodForFlowGraph( case MethodRecognizer::kFfiNativeCallbackFunction: case MethodRecognizer::kFfiNativeAsyncCallbackFunction: case MethodRecognizer::kFfiNativeIsolateLocalCallbackFunction: - case MethodRecognizer::kFfiNativeIsolateGroupSharedCallbackFunction: - case MethodRecognizer::kFfiNativeIsolateGroupSharedClosureFunction: + case MethodRecognizer::kFfiNativeIsolateGroupBoundCallbackFunction: + case MethodRecognizer::kFfiNativeIsolateGroupBoundClosureFunction: case MethodRecognizer::kFfiStoreInt8: case MethodRecognizer::kFfiStoreInt16: case MethodRecognizer::kFfiStoreInt32: @@ -1555,8 +1555,8 @@ FlowGraph* FlowGraphBuilder::BuildGraphOfRecognizedMethod( case MethodRecognizer::kFfiNativeCallbackFunction: case MethodRecognizer::kFfiNativeAsyncCallbackFunction: case MethodRecognizer::kFfiNativeIsolateLocalCallbackFunction: - case MethodRecognizer::kFfiNativeIsolateGroupSharedCallbackFunction: - case MethodRecognizer::kFfiNativeIsolateGroupSharedClosureFunction: { + case MethodRecognizer::kFfiNativeIsolateGroupBoundCallbackFunction: + case MethodRecognizer::kFfiNativeIsolateGroupBoundClosureFunction: { const auto& error = String::ZoneHandle( Z, Symbols::New(thread_, "This function should be handled on call site.")); @@ -5274,9 +5274,9 @@ FlowGraph* FlowGraphBuilder::BuildGraphOfFfiTrampoline( const Function& function) { switch (function.GetFfiCallbackKind()) { case FfiCallbackKind::kIsolateLocalStaticCallback: - case FfiCallbackKind::kIsolateGroupSharedStaticCallback: + case FfiCallbackKind::kIsolateGroupBoundStaticCallback: case FfiCallbackKind::kIsolateLocalClosureCallback: - case FfiCallbackKind::kIsolateGroupSharedClosureCallback: + case FfiCallbackKind::kIsolateGroupBoundClosureCallback: return BuildGraphOfSyncFfiCallback(function); case FfiCallbackKind::kAsyncCallback: return BuildGraphOfAsyncFfiCallback(function); @@ -5591,7 +5591,7 @@ FlowGraph* FlowGraphBuilder::BuildGraphOfSyncFfiCallback( function.GetFfiCallbackKind() == FfiCallbackKind::kIsolateLocalClosureCallback || function.GetFfiCallbackKind() == - FfiCallbackKind::kIsolateGroupSharedClosureCallback; + FfiCallbackKind::kIsolateGroupBoundClosureCallback; graph_entry_ = new (Z) GraphEntryInstr(*parsed_function_, Compiler::kNoOSRDeoptId); diff --git a/runtime/vm/compiler/recognized_methods_list.h b/runtime/vm/compiler/recognized_methods_list.h index 663ef77c40a..bc4c14cc5e2 100644 --- a/runtime/vm/compiler/recognized_methods_list.h +++ b/runtime/vm/compiler/recognized_methods_list.h @@ -120,10 +120,10 @@ namespace dart { FfiNativeAsyncCallbackFunction, 0xbdd1a333) \ V(FfiLibrary, ::, _nativeIsolateLocalCallbackFunction, \ FfiNativeIsolateLocalCallbackFunction, 0x21b66eba) \ - V(FfiLibrary, ::, _nativeIsolateGroupSharedCallbackFunction, \ - FfiNativeIsolateGroupSharedCallbackFunction, 0x8882d3ca) \ - V(FfiLibrary, ::, _nativeIsolateGroupSharedClosureFunction, \ - FfiNativeIsolateGroupSharedClosureFunction, 0x2c93f675) \ + V(FfiLibrary, ::, _nativeIsolateGroupBoundCallbackFunction, \ + FfiNativeIsolateGroupBoundCallbackFunction, 0xc20a0b32) \ + V(FfiLibrary, ::, _nativeIsolateGroupBoundClosureFunction, \ + FfiNativeIsolateGroupBoundClosureFunction, 0x0714be84) \ V(FfiLibrary, ::, _loadAbiSpecificInt, FfiLoadAbiSpecificInt, 0x6abf70a6) \ V(FfiLibrary, ::, _loadAbiSpecificIntAtIndex, FfiLoadAbiSpecificIntAtIndex, \ 0xc188dd75) \ diff --git a/runtime/vm/compiler/stub_code_compiler_arm.cc b/runtime/vm/compiler/stub_code_compiler_arm.cc index bd62db2152b..5fecf5290eb 100644 --- a/runtime/vm/compiler/stub_code_compiler_arm.cc +++ b/runtime/vm/compiler/stub_code_compiler_arm.cc @@ -391,7 +391,7 @@ void StubCodeCompiler::GenerateFfiCallbackTrampolineStub() { __ PopRegisters(argument_registers); Label async_callback; - Label sync_isolate_group_shared_callback; + Label sync_isolate_group_bound_callback; Label done; // If GetFfiCallbackMetadata returned a null thread, it means that the async @@ -405,10 +405,9 @@ void StubCodeCompiler::GenerateFfiCallbackTrampolineStub() { Operand(static_cast(FfiCallbackMetadata::TrampolineType::kAsync))); __ b(&async_callback, EQ); - __ cmp(R4, - Operand(static_cast( - FfiCallbackMetadata::TrampolineType::kSyncIsolateGroupShared))); - __ b(&sync_isolate_group_shared_callback, EQ); + __ cmp(R4, Operand(static_cast( + FfiCallbackMetadata::TrampolineType::kSyncIsolateGroupBound))); + __ b(&sync_isolate_group_bound_callback, EQ); // Sync callback. The entry point contains the target function, so just call // it. DLRT_GetThreadForNativeCallbackTrampoline exited the safepoint, so @@ -424,11 +423,11 @@ void StubCodeCompiler::GenerateFfiCallbackTrampolineStub() { __ b(&done); - __ Bind(&sync_isolate_group_shared_callback); + __ Bind(&sync_isolate_group_bound_callback); __ blx(R5); - // Exit isolate group shared isolate. + // Exit isolate group bound isolate. { __ EnterFrame(1 << FP, 0); __ ReserveAlignedFrameSpace(0); @@ -440,7 +439,7 @@ void StubCodeCompiler::GenerateFfiCallbackTrampolineStub() { __ PushRegisters(return_registers); GenerateLoadFfiCallbackMetadataRuntimeFunction( - FfiCallbackMetadata::kExitIsolateGroupSharedIsolate, R4); + FfiCallbackMetadata::kExitIsolateGroupBoundIsolate, R4); __ blx(R4); diff --git a/runtime/vm/compiler/stub_code_compiler_arm64.cc b/runtime/vm/compiler/stub_code_compiler_arm64.cc index 04ef9a5d27b..982cc87ca00 100644 --- a/runtime/vm/compiler/stub_code_compiler_arm64.cc +++ b/runtime/vm/compiler/stub_code_compiler_arm64.cc @@ -568,7 +568,7 @@ void StubCodeCompiler::GenerateFfiCallbackTrampolineStub() { } Label async_callback; - Label sync_isolate_group_shared_callback; + Label sync_isolate_group_bound_callback; Label done; // If GetFfiCallbackMetadata returned a null thread, it means that the async @@ -582,10 +582,9 @@ void StubCodeCompiler::GenerateFfiCallbackTrampolineStub() { Operand(static_cast(FfiCallbackMetadata::TrampolineType::kAsync))); __ b(&async_callback, EQ); - __ cmp(R9, - Operand(static_cast( - FfiCallbackMetadata::TrampolineType::kSyncIsolateGroupShared))); - __ b(&sync_isolate_group_shared_callback, EQ); + __ cmp(R9, Operand(static_cast( + FfiCallbackMetadata::TrampolineType::kSyncIsolateGroupBound))); + __ b(&sync_isolate_group_bound_callback, EQ); // Sync callback. The entry point contains the target function, so just call // it. DLRT_GetThreadForNativeCallbackTrampoline exited the safepoint, so @@ -600,11 +599,11 @@ void StubCodeCompiler::GenerateFfiCallbackTrampolineStub() { __ b(&done); - __ Bind(&sync_isolate_group_shared_callback); + __ Bind(&sync_isolate_group_bound_callback); __ blr(R10); - // Exit isolate group shared isolate. + // Exit isolate group bound isolate. { __ SetupDartSP(); __ EnterFrame(0); @@ -619,18 +618,18 @@ void StubCodeCompiler::GenerateFfiCallbackTrampolineStub() { #if defined(DART_TARGET_OS_FUCHSIA) // TODO(https://dartbug.com/52579): Remove. if (FLAG_precompiled_mode) { - GenerateLoadBSSEntry(BSS::Relocation::DLRT_ExitIsolateGroupSharedIsolate, + GenerateLoadBSSEntry(BSS::Relocation::DLRT_ExitIsolateGroupBoundIsolate, R4, R9); } else { Label call; __ ldr(R4, compiler::Address::PC(2 * Instr::kInstrSize)); __ b(&call); - __ Emit64(reinterpret_cast(&DLRT_ExitIsolateGroupSharedIsolate)); + __ Emit64(reinterpret_cast(&DLRT_ExitIsolateGroupBoundIsolate)); __ Bind(&call); } #else GenerateLoadFfiCallbackMetadataRuntimeFunction( - FfiCallbackMetadata::kExitIsolateGroupSharedIsolate, R4); + FfiCallbackMetadata::kExitIsolateGroupBoundIsolate, R4); #endif __ mov(CSP, SP); diff --git a/runtime/vm/compiler/stub_code_compiler_ia32.cc b/runtime/vm/compiler/stub_code_compiler_ia32.cc index 6535dc7bb80..9325a810ef7 100644 --- a/runtime/vm/compiler/stub_code_compiler_ia32.cc +++ b/runtime/vm/compiler/stub_code_compiler_ia32.cc @@ -287,7 +287,7 @@ void StubCodeCompiler::GenerateFfiCallbackTrampolineStub() { COMPILE_ASSERT(ECX != THR); Label async_callback; - Label sync_isolate_group_shared_callback; + Label sync_isolate_group_bound_callback; Label done; // If GetFfiCallbackMetadata returned a null thread, it means that the async @@ -302,8 +302,8 @@ void StubCodeCompiler::GenerateFfiCallbackTrampolineStub() { __ cmpl(EBX, Immediate(static_cast( - FfiCallbackMetadata::TrampolineType::kSyncIsolateGroupShared))); - __ j(EQUAL, &sync_isolate_group_shared_callback, Assembler::kNearJump); + FfiCallbackMetadata::TrampolineType::kSyncIsolateGroupBound))); + __ j(EQUAL, &sync_isolate_group_bound_callback, Assembler::kNearJump); // Sync callback. The entry point contains the target function, so just call // it. DLRT_GetThreadForNativeCallbackTrampoline exited the safepoint, so @@ -331,11 +331,11 @@ void StubCodeCompiler::GenerateFfiCallbackTrampolineStub() { __ Bind(&ret_4); __ ret(Immediate(4)); - __ Bind(&sync_isolate_group_shared_callback); + __ Bind(&sync_isolate_group_bound_callback); __ call(ECX); - // Exit isolate group shared isolate. + // Exit isolate group bound isolate. { __ pushl(CallingConventions::kReturnReg); __ pushl(CallingConventions::kSecondReturnReg); @@ -346,7 +346,7 @@ void StubCodeCompiler::GenerateFfiCallbackTrampolineStub() { __ ReserveAlignedFrameSpace(0); __ movl(EAX, Immediate(reinterpret_cast( - DLRT_ExitIsolateGroupSharedIsolate))); + DLRT_ExitIsolateGroupBoundIsolate))); __ CallCFunction(EAX); __ LeaveFrame(); diff --git a/runtime/vm/compiler/stub_code_compiler_riscv.cc b/runtime/vm/compiler/stub_code_compiler_riscv.cc index 1be777775d2..3fdbdef01b5 100644 --- a/runtime/vm/compiler/stub_code_compiler_riscv.cc +++ b/runtime/vm/compiler/stub_code_compiler_riscv.cc @@ -462,11 +462,11 @@ void StubCodeCompiler::GenerateFfiCallbackTrampolineStub() { COMPILE_ASSERT( static_cast( - FfiCallbackMetadata::TrampolineType::kSyncIsolateGroupShared) == 3); + FfiCallbackMetadata::TrampolineType::kSyncIsolateGroupBound) == 3); // isolate-group-shared callback __ jalr(T2); - // Exit isolate group shared isolate. + // Exit isolate group bound isolate. { __ EnterFrame(0); __ ReserveAlignedFrameSpace(0); @@ -482,7 +482,7 @@ void StubCodeCompiler::GenerateFfiCallbackTrampolineStub() { #if defined(DART_TARGET_OS_FUCHSIA) // TODO(https://dartbug.com/52579): Remove. if (FLAG_precompiled_mode) { - GenerateLoadBSSEntry(BSS::Relocation::DRT_ExitIsolateGroupSharedIsolate, + GenerateLoadBSSEntry(BSS::Relocation::DRT_ExitIsolateGroupBoundIsolate, T1, T2); } else { const intptr_t kPCRelativeLoadOffset = 12; @@ -493,14 +493,14 @@ void StubCodeCompiler::GenerateFfiCallbackTrampolineStub() { ASSERT_EQUAL(__ CodeSize() - start, kPCRelativeLoadOffset); #if XLEN == 32 - __ Emit32(reinterpret_cast(&DLRT_ExitIsolateGroupSharedIsolate)); + __ Emit32(reinterpret_cast(&DLRT_ExitIsolateGroupBoundIsolate)); #else - __ Emit64(reinterpret_cast(&DLRT_ExitIsolateGroupSharedIsolate)); + __ Emit64(reinterpret_cast(&DLRT_ExitIsolateGroupBoundIsolate)); #endif } #else GenerateLoadFfiCallbackMetadataRuntimeFunction( - FfiCallbackMetadata::kExitIsolateGroupSharedIsolate, T1); + FfiCallbackMetadata::kExitIsolateGroupBoundIsolate, T1); #endif // defined(DART_TARGET_OS_FUCHSIA) __ Bind(&call); diff --git a/runtime/vm/compiler/stub_code_compiler_x64.cc b/runtime/vm/compiler/stub_code_compiler_x64.cc index 8f5b0710ca8..f1a2e411e02 100644 --- a/runtime/vm/compiler/stub_code_compiler_x64.cc +++ b/runtime/vm/compiler/stub_code_compiler_x64.cc @@ -530,7 +530,7 @@ void StubCodeCompiler::GenerateFfiCallbackTrampolineStub() { // All argument registers are untouched. Label async_callback; - Label sync_isolate_group_shared_callback; + Label sync_isolate_group_bound_callback; Label done; // If GetFfiCallbackMetadata returned a null thread, it means that the @@ -545,8 +545,8 @@ void StubCodeCompiler::GenerateFfiCallbackTrampolineStub() { __ cmpq(RAX, Immediate(static_cast( - FfiCallbackMetadata::TrampolineType::kSyncIsolateGroupShared))); - __ j(EQUAL, &sync_isolate_group_shared_callback, Assembler::kNearJump); + FfiCallbackMetadata::TrampolineType::kSyncIsolateGroupBound))); + __ j(EQUAL, &sync_isolate_group_bound_callback, Assembler::kNearJump); // Sync callback. The entry point contains the target function, so just call // it. DLRT_GetThreadForNativeCallbackTrampoline exited the safepoint, so @@ -561,11 +561,11 @@ void StubCodeCompiler::GenerateFfiCallbackTrampolineStub() { __ jmp(&done, Assembler::kNearJump); - __ Bind(&sync_isolate_group_shared_callback); + __ Bind(&sync_isolate_group_bound_callback); __ call(TMP); - // Exit isolate group shared isolate. + // Exit isolate group bound isolate. { const RegisterSet return_registers( (1 << CallingConventions::kReturnReg) | @@ -576,15 +576,15 @@ void StubCodeCompiler::GenerateFfiCallbackTrampolineStub() { #if defined(DART_TARGET_OS_FUCHSIA) // TODO(https://dartbug.com/52579): Remove. if (FLAG_precompiled_mode) { - GenerateLoadBSSEntry(BSS::Relocation::DLRT_ExitIsolateGroupSharedIsolate, + GenerateLoadBSSEntry(BSS::Relocation::DLRT_ExitIsolateGroupBoundIsolate, RAX, TMP); } else { __ movq(RAX, Immediate(reinterpret_cast( - DLRT_ExitIsolateGroupSharedIsolate))); + DLRT_ExitIsolateGroupBoundIsolate))); } #else GenerateLoadFfiCallbackMetadataRuntimeFunction( - FfiCallbackMetadata::kExitIsolateGroupSharedIsolate, RAX); + FfiCallbackMetadata::kExitIsolateGroupBoundIsolate, RAX); #endif // defined(DART_TARGET_OS_FUCHSIA) __ EnterFrame(0); diff --git a/runtime/vm/ffi_callback_metadata.cc b/runtime/vm/ffi_callback_metadata.cc index a0c8dd1ba9f..716db15a183 100644 --- a/runtime/vm/ffi_callback_metadata.cc +++ b/runtime/vm/ffi_callback_metadata.cc @@ -232,8 +232,8 @@ void FfiCallbackMetadata::EnsureFreeListNotEmptyLocked() { FillRuntimeFunction(new_page, kExitTemporaryIsolate, reinterpret_cast(DLRT_ExitTemporaryIsolate)); FillRuntimeFunction( - new_page, kExitIsolateGroupSharedIsolate, - reinterpret_cast(DLRT_ExitIsolateGroupSharedIsolate)); + new_page, kExitIsolateGroupBoundIsolate, + reinterpret_cast(DLRT_ExitIsolateGroupBoundIsolate)); // Add all the trampolines to the free list. const intptr_t trampolines_per_page = NumCallbackTrampolinesPerPage(); @@ -367,14 +367,14 @@ FfiCallbackMetadata::Trampoline FfiCallbackMetadata::CreateLocalFfiCallback( FfiCallbackKind::kIsolateLocalStaticCallback) || (isolate == nullptr && isolate_group != nullptr && function.GetFfiCallbackKind() == - FfiCallbackKind::kIsolateGroupSharedStaticCallback)); + FfiCallbackKind::kIsolateGroupBoundStaticCallback)); } else { ASSERT((isolate != nullptr && isolate_group == nullptr && function.GetFfiCallbackKind() == FfiCallbackKind::kIsolateLocalClosureCallback) || (isolate == nullptr && isolate_group != nullptr && function.GetFfiCallbackKind() == - FfiCallbackKind::kIsolateGroupSharedClosureCallback)); + FfiCallbackKind::kIsolateGroupBoundClosureCallback)); handle = CreatePersistentHandle( isolate != nullptr ? isolate->group() : isolate_group, closure); } @@ -389,9 +389,9 @@ FfiCallbackMetadata::Trampoline FfiCallbackMetadata::CreateSyncFfiCallbackImpl( const Function& function, PersistentHandle* closure, MetadataEntry** list_head) { - TrampolineType trampoline_type = - isolate != nullptr ? TrampolineType::kSync - : TrampolineType::kSyncIsolateGroupShared; + TrampolineType trampoline_type = isolate != nullptr + ? TrampolineType::kSync + : TrampolineType::kSyncIsolateGroupBound; #if defined(TARGET_ARCH_IA32) // On ia32, store the stack delta that we need to use when returning. @@ -403,7 +403,7 @@ FfiCallbackMetadata::Trampoline FfiCallbackMetadata::CreateSyncFfiCallbackImpl( ASSERT(stack_return_delta == 4); trampoline_type = isolate != nullptr ? TrampolineType::kSyncStackDelta4 - : TrampolineType::kSyncIsolateGroupSharedStackDelta4; + : TrampolineType::kSyncIsolateGroupBoundStackDelta4; } #endif @@ -503,8 +503,8 @@ FfiCallbackMetadata::Metadata FfiCallbackMetadata::LookupMetadataForTrampoline( FfiCallbackMetadata* FfiCallbackMetadata::singleton_ = nullptr; ApiState* FfiCallbackMetadata::Metadata::api_state() const { - return (is_isolate_group_shared() ? target_isolate_group_ - : target_isolate_->group()) + return (is_isolate_group_bound() ? target_isolate_group_ + : target_isolate_->group()) ->api_state(); } diff --git a/runtime/vm/ffi_callback_metadata.h b/runtime/vm/ffi_callback_metadata.h index 4c57f2856c3..5d5ed3f3c81 100644 --- a/runtime/vm/ffi_callback_metadata.h +++ b/runtime/vm/ffi_callback_metadata.h @@ -46,14 +46,14 @@ class FfiCallbackMetadata { kSync = 0, kSyncStackDelta4 = 1, // Only used by TARGET_ARCH_IA32 kAsync = 2, - kSyncIsolateGroupShared = 3, - kSyncIsolateGroupSharedStackDelta4 = 4, // Only used by TARGET_ARCH_IA32 + kSyncIsolateGroupBound = 3, + kSyncIsolateGroupBoundStackDelta4 = 4, // Only used by TARGET_ARCH_IA32 }; enum RuntimeFunctions { kGetFfiCallbackMetadata, kExitTemporaryIsolate, - kExitIsolateGroupSharedIsolate, + kExitIsolateGroupBoundIsolate, kNumRuntimeFunctions, }; @@ -161,16 +161,16 @@ class FfiCallbackMetadata { ASSERT(IsLive()); ASSERT(trampoline_type_ == TrampolineType::kSync || trampoline_type_ == TrampolineType::kSyncStackDelta4 || - trampoline_type_ == TrampolineType::kSyncIsolateGroupShared || + trampoline_type_ == TrampolineType::kSyncIsolateGroupBound || trampoline_type_ == - TrampolineType::kSyncIsolateGroupSharedStackDelta4); + TrampolineType::kSyncIsolateGroupBoundStackDelta4); return reinterpret_cast(context_); } - bool is_isolate_group_shared() const { - return trampoline_type_ == TrampolineType::kSyncIsolateGroupShared || + bool is_isolate_group_bound() const { + return trampoline_type_ == TrampolineType::kSyncIsolateGroupBound || trampoline_type_ == - TrampolineType::kSyncIsolateGroupSharedStackDelta4; + TrampolineType::kSyncIsolateGroupBoundStackDelta4; } // ApiState associated with an isolate group associated with this metadata. ApiState* api_state() const; diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc index 9f392edea15..0645ea7295f 100644 --- a/runtime/vm/isolate.cc +++ b/runtime/vm/isolate.cc @@ -3845,7 +3845,7 @@ FfiCallbackMetadata::Trampoline Isolate::CreateIsolateLocalFfiCallback( } // TODO(aam): Should this be in IsolateGroup? -FfiCallbackMetadata::Trampoline Isolate::CreateIsolateGroupSharedFfiCallback( +FfiCallbackMetadata::Trampoline Isolate::CreateIsolateGroupBoundFfiCallback( Zone* zone, const Function& trampoline, const Closure& target) { diff --git a/runtime/vm/isolate.h b/runtime/vm/isolate.h index af279453f2f..3e6dbdcdddf 100644 --- a/runtime/vm/isolate.h +++ b/runtime/vm/isolate.h @@ -1325,7 +1325,7 @@ class Isolate : public IntrusiveDListEntry { const Function& trampoline, const Closure& target, bool keep_isolate_alive); - FfiCallbackMetadata::Trampoline CreateIsolateGroupSharedFfiCallback( + FfiCallbackMetadata::Trampoline CreateIsolateGroupBoundFfiCallback( Zone* zone, const Function& trampoline, const Closure& target); diff --git a/runtime/vm/object.h b/runtime/vm/object.h index be55f550907..548921cc28a 100644 --- a/runtime/vm/object.h +++ b/runtime/vm/object.h @@ -2990,9 +2990,9 @@ struct NameFormattingParams { enum class FfiCallbackKind : uint8_t { kIsolateLocalStaticCallback, - kIsolateGroupSharedStaticCallback, + kIsolateGroupBoundStaticCallback, kIsolateLocalClosureCallback, - kIsolateGroupSharedClosureCallback, + kIsolateGroupBoundClosureCallback, kAsyncCallback, }; diff --git a/runtime/vm/runtime_entry.cc b/runtime/vm/runtime_entry.cc index e0934744c0a..c14a164c3a7 100644 --- a/runtime/vm/runtime_entry.cc +++ b/runtime/vm/runtime_entry.cc @@ -4685,7 +4685,7 @@ extern "C" Thread* DLRT_GetFfiCallbackMetadata( if (!metadata.IsLive()) { FATAL("Callback invoked after it has been deleted."); } - if (metadata.is_isolate_group_shared()) { + if (metadata.is_isolate_group_bound()) { *out_entry_point = metadata.target_entry_point(); *out_trampoline_type = static_cast(metadata.trampoline_type()); } else { @@ -4717,7 +4717,7 @@ extern "C" Thread* DLRT_GetFfiCallbackMetadata( current_thread->set_execution_state(Thread::kThreadInVM); } - if (metadata.is_isolate_group_shared()) { + if (metadata.is_isolate_group_bound()) { Isolate* current_isolate = current_thread != nullptr ? current_thread->isolate() : nullptr; @@ -4747,8 +4747,8 @@ extern "C" Thread* DLRT_GetFfiCallbackMetadata( return current_thread; } -extern "C" void DLRT_ExitIsolateGroupSharedIsolate() { - TRACE_RUNTIME_CALL("ExitIsolateGroupSharedIsolate%s", ""); +extern "C" void DLRT_ExitIsolateGroupBoundIsolate() { + TRACE_RUNTIME_CALL("ExitIsolateGroupBoundIsolate%s", ""); Thread* thread = Thread::Current(); ASSERT(thread != nullptr); Isolate* source_isolate = diff --git a/runtime/vm/runtime_entry.h b/runtime/vm/runtime_entry.h index 2d840c77929..1b9579f3449 100644 --- a/runtime/vm/runtime_entry.h +++ b/runtime/vm/runtime_entry.h @@ -99,7 +99,7 @@ extern "C" Thread* DLRT_GetFfiCallbackMetadata(uword trampoline, uword* out_entry_point, uword* out_callback_kind); extern "C" void DLRT_ExitTemporaryIsolate(); -extern "C" void DLRT_ExitIsolateGroupSharedIsolate(); +extern "C" void DLRT_ExitIsolateGroupBoundIsolate(); const char* DeoptReasonToCString(ICData::DeoptReasonId deopt_reason); diff --git a/runtime/vm/symbols.h b/runtime/vm/symbols.h index 9737c4c09b1..e1a6bc8002d 100644 --- a/runtime/vm/symbols.h +++ b/runtime/vm/symbols.h @@ -123,7 +123,7 @@ class ObjectPointerVisitor; V(FfiInt8, "Int8") \ V(FfiIntPtr, "IntPtr") \ V(FfiIsolateLocalCallback, "_FfiIsolateLocalCallback") \ - V(FfiIsolateGroupSharedCallback, "_FfiIsolateGroupSharedCallback") \ + V(FfiIsolateGroupBoundCallback, "_FfiIsolateGroupBoundCallback") \ V(FfiNative, "Native") \ V(FfiNativeFunction, "NativeFunction") \ V(FfiNativeType, "NativeType") \ diff --git a/runtime/vm/thread.h b/runtime/vm/thread.h index d611c8f6608..cc6054c598d 100644 --- a/runtime/vm/thread.h +++ b/runtime/vm/thread.h @@ -378,7 +378,7 @@ class Thread : public ThreadState { kSampleBlockTask, kIncrementalCompactorTask, kSpawnTask, - kIsolateGroupSharedCallbackTask, + kIsolateGroupBoundCallbackTask, }; ~Thread(); diff --git a/samples/ffi/httpIG/lib/http.dart b/samples/ffi/httpIG/lib/http.dart index a7331ad0310..b150d47ea34 100644 --- a/samples/ffi/httpIG/lib/http.dart +++ b/samples/ffi/httpIG/lib/http.dart @@ -27,7 +27,7 @@ Future httpGet(String uri) async { }, ); final sendPort = rp.sendPort; - final callback = NativeCallable.isolateGroupShared(( + final callback = NativeCallable.isolateGroupBound(( Pointer responsePointer, ) { final typedList = responsePointer.cast().asTypedList( @@ -60,7 +60,7 @@ late int counter; ReceivePort httpServe(void Function(String) onRequest) { counter = 0; final rp = ReceivePort(); - final callback = NativeCallable.isolateGroupShared(( + final callback = NativeCallable.isolateGroupBound(( Pointer requestPointer, ) { counter++; diff --git a/sdk/lib/_internal/vm/lib/ffi_patch.dart b/sdk/lib/_internal/vm/lib/ffi_patch.dart index 95cca1d64e2..671f0548820 100644 --- a/sdk/lib/_internal/vm/lib/ffi_patch.dart +++ b/sdk/lib/_internal/vm/lib/ffi_patch.dart @@ -193,8 +193,8 @@ external Pointer _createNativeCallableIsolateLocal< NS extends NativeFunction >(dynamic trampoline, dynamic target, bool keepIsolateAlive); -@pragma("vm:external-name", "Ffi_createNativeCallableIsolateGroupShared") -external Pointer _createNativeCallableIsolateGroupShared< +@pragma("vm:external-name", "Ffi_createNativeCallableIsolateGroupBound") +external Pointer _createNativeCallableIsolateGroupBound< NS extends NativeFunction >(dynamic trampoline, dynamic target); @@ -215,15 +215,15 @@ external dynamic _nativeIsolateLocalCallbackFunction( ); @pragma("vm:recognized", "other") -@pragma("vm:external-name", "Ffi_nativeIsolateGroupSharedCallbackFunction") -external dynamic _nativeIsolateGroupSharedCallbackFunction( +@pragma("vm:external-name", "Ffi_nativeIsolateGroupBoundCallbackFunction") +external dynamic _nativeIsolateGroupBoundCallbackFunction( Function target, dynamic exceptionalReturn, ); @pragma("vm:recognized", "other") -@pragma("vm:external-name", "Ffi_nativeIsolateGroupSharedClosureFunction") -external dynamic _nativeIsolateGroupSharedClosureFunction( +@pragma("vm:external-name", "Ffi_nativeIsolateGroupBoundClosureFunction") +external dynamic _nativeIsolateGroupBoundClosureFunction( dynamic exceptionalReturn, ); @@ -347,11 +347,11 @@ final class _NativeCallableListener bool get _keepIsolateAlive => _port.keepIsolateAlive; } -final class _NativeCallableIsolateGroupShared +final class _NativeCallableIsolateGroupBound extends _NativeCallableBase { bool _isKeepingIsolateAlive = true; - _NativeCallableIsolateGroupShared(super._pointer) { + _NativeCallableIsolateGroupBound(super._pointer) { _updateNativeCallableKeepIsolateAliveCounter(1); } diff --git a/sdk/lib/ffi/ffi.dart b/sdk/lib/ffi/ffi.dart index 8b872ff1ba9..1c1d4720760 100644 --- a/sdk/lib/ffi/ffi.dart +++ b/sdk/lib/ffi/ffi.dart @@ -396,7 +396,7 @@ abstract final class NativeCallable { throw UnsupportedError("NativeCallable cannot be constructed dynamically."); } - factory NativeCallable.isolateGroupShared( + factory NativeCallable.isolateGroupBound( @DartRepresentationOf("T") Function callback, { Object? exceptionalReturn, }) { diff --git a/sdk/lib/internal/internal.dart b/sdk/lib/internal/internal.dart index a0983ab143a..449dcfd0fc4 100644 --- a/sdk/lib/internal/internal.dart +++ b/sdk/lib/internal/internal.dart @@ -1158,6 +1158,6 @@ class TypeTest { abstract interface class IsolateGroup { external static Object _runSync(Object computation); - /// Runs [computation] in isolate-group shared context. + /// Runs [computation] in isolate-group bound context. static R runSync(R computation()) => _runSync(computation) as R; } diff --git a/tests/ffi/isolate_group_shared_callback_test.dart b/tests/ffi/isolate_group_bound_callback_test.dart similarity index 99% rename from tests/ffi/isolate_group_shared_callback_test.dart rename to tests/ffi/isolate_group_bound_callback_test.dart index 18cb79836ab..64110fdbacb 100644 --- a/tests/ffi/isolate_group_shared_callback_test.dart +++ b/tests/ffi/isolate_group_bound_callback_test.dart @@ -100,7 +100,7 @@ void simpleFunction(int a, int b) { Future testNativeCallableHelloWorld(NativeLibrary lib) async { mutexCondvar = Mutex(); conditionVariable = ConditionVariable(); - final callback = NativeCallable.isolateGroupShared( + final callback = NativeCallable.isolateGroupBound( simpleFunction, ); @@ -137,7 +137,7 @@ void simpleFunctionThatThrows(int a, int b) { Future testNativeCallableThrows(NativeLibrary lib) async { mutexCondvar = Mutex(); conditionVariable = ConditionVariable(); - final callback = NativeCallable.isolateGroupShared( + final callback = NativeCallable.isolateGroupBound( simpleFunctionThatThrows, ); @@ -161,7 +161,7 @@ Future testNativeCallableThrows(NativeLibrary lib) async { Future testNativeCallableHelloWorldClosure(NativeLibrary lib) async { mutexCondvar = Mutex(); conditionVariable = ConditionVariable(); - final callback = NativeCallable.isolateGroupShared(( + final callback = NativeCallable.isolateGroupBound(( int a, int b, ) { @@ -198,7 +198,7 @@ Future testNativeCallableHelloWorldClosure(NativeLibrary lib) async { void testNativeCallableSync(NativeLibrary lib) { final callback = - NativeCallable.isolateGroupShared(( + NativeCallable.isolateGroupBound(( int a, int b, ) { @@ -214,7 +214,7 @@ void testNativeCallableSync(NativeLibrary lib) { void testNativeCallableSyncThrows(NativeLibrary lib) { final callback = - NativeCallable.isolateGroupShared( + NativeCallable.isolateGroupBound( (int a, int b) { throw "foo"; } @@ -233,7 +233,7 @@ int isolateVar = 10; void testNativeCallableAccessNonSharedVar(NativeLibrary lib) { final callback = - NativeCallable.isolateGroupShared(( + NativeCallable.isolateGroupBound(( int a, int b, ) { @@ -255,7 +255,7 @@ Future testKeepIsolateAliveTrue() async { unawaited( Isolate.spawn( (_) async { - final callback = NativeCallable.isolateGroupShared( + final callback = NativeCallable.isolateGroupBound( simpleFunction, ); callback.keepIsolateAlive = true; @@ -282,7 +282,7 @@ Future testKeepIsolateAliveFalse() async { unawaited( Isolate.spawn( (_) async { - final callback = NativeCallable.isolateGroupShared( + final callback = NativeCallable.isolateGroupBound( simpleFunction, ); callback.keepIsolateAlive = false; diff --git a/tests/ffi/isolate_group_shared_init_test.dart b/tests/ffi/isolate_group_bound_init_test.dart similarity index 100% rename from tests/ffi/isolate_group_shared_init_test.dart rename to tests/ffi/isolate_group_bound_init_test.dart diff --git a/tests/ffi/isolate_group_shared_send_test.dart b/tests/ffi/isolate_group_bound_send_test.dart similarity index 100% rename from tests/ffi/isolate_group_shared_send_test.dart rename to tests/ffi/isolate_group_bound_send_test.dart