Skip to content

Commit a36f38b

Browse files
aamCommit Queue
authored andcommitted
[vm/shared] Rename IsolateGroupShared to IsolateGroupBound.
TEST=ci CoreLibraryReviewExempt: vm-only change Change-Id: If9c8bbd0e90e4ec1f70742c704ad31fce5681ec1 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/441063 Commit-Queue: Alexander Aprelev <[email protected]> Reviewed-by: Ryan Macnak <[email protected]>
1 parent fb22849 commit a36f38b

31 files changed

+144
-146
lines changed

pkg/vm/lib/modular/transformations/ffi/common.dart

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -329,10 +329,10 @@ class FfiTransformer extends Transformer {
329329
final Procedure nativeCallbackFunctionProcedure;
330330
final Procedure nativeAsyncCallbackFunctionProcedure;
331331
final Procedure createNativeCallableIsolateLocalProcedure;
332-
final Procedure createNativeCallableIsolateGroupSharedProcedure;
332+
final Procedure createNativeCallableIsolateGroupBoundProcedure;
333333
final Procedure nativeIsolateLocalCallbackFunctionProcedure;
334-
final Procedure nativeIsolateGroupSharedCallbackFunctionProcedure;
335-
final Procedure nativeIsolateGroupSharedClosureFunctionProcedure;
334+
final Procedure nativeIsolateGroupBoundCallbackFunctionProcedure;
335+
final Procedure nativeIsolateGroupBoundClosureFunctionProcedure;
336336
final Map<NativeType, Procedure> loadMethods;
337337
final Map<NativeType, Procedure> loadUnalignedMethods;
338338
final Map<NativeType, Procedure> storeMethods;
@@ -356,9 +356,9 @@ class FfiTransformer extends Transformer {
356356
final Class rawRecvPortClass;
357357
final Class nativeCallableClass;
358358
final Procedure nativeCallableIsolateLocalConstructor;
359-
final Procedure nativeCallableIsolateGroupSharedConstructor;
359+
final Procedure nativeCallableIsolateGroupBoundConstructor;
360360
final Constructor nativeCallablePrivateIsolateLocalConstructor;
361-
final Constructor nativeCallablePrivateIsolateGroupSharedConstructor;
361+
final Constructor nativeCallablePrivateIsolateGroupBoundConstructor;
362362
final Procedure nativeCallableListenerConstructor;
363363
final Constructor nativeCallablePrivateListenerConstructor;
364364
final Field nativeCallablePortField;
@@ -842,10 +842,10 @@ class FfiTransformer extends Transformer {
842842
'dart:ffi',
843843
'_createNativeCallableIsolateLocal',
844844
),
845-
createNativeCallableIsolateGroupSharedProcedure = index
845+
createNativeCallableIsolateGroupBoundProcedure = index
846846
.getTopLevelProcedure(
847847
'dart:ffi',
848-
'_createNativeCallableIsolateGroupShared',
848+
'_createNativeCallableIsolateGroupBound',
849849
),
850850
nativeCallbackFunctionProcedure = index.getTopLevelProcedure(
851851
'dart:ffi',
@@ -859,15 +859,15 @@ class FfiTransformer extends Transformer {
859859
'dart:ffi',
860860
'_nativeIsolateLocalCallbackFunction',
861861
),
862-
nativeIsolateGroupSharedCallbackFunctionProcedure = index
862+
nativeIsolateGroupBoundCallbackFunctionProcedure = index
863863
.getTopLevelProcedure(
864864
'dart:ffi',
865-
'_nativeIsolateGroupSharedCallbackFunction',
865+
'_nativeIsolateGroupBoundCallbackFunction',
866866
),
867-
nativeIsolateGroupSharedClosureFunctionProcedure = index
867+
nativeIsolateGroupBoundClosureFunctionProcedure = index
868868
.getTopLevelProcedure(
869869
'dart:ffi',
870-
'_nativeIsolateGroupSharedClosureFunction',
870+
'_nativeIsolateGroupBoundClosureFunction',
871871
),
872872
nativeTypesClasses = nativeTypeClassNames.map(
873873
(nativeType, name) =>
@@ -973,10 +973,10 @@ class FfiTransformer extends Transformer {
973973
'NativeCallable',
974974
'isolateLocal',
975975
),
976-
nativeCallableIsolateGroupSharedConstructor = index.getProcedure(
976+
nativeCallableIsolateGroupBoundConstructor = index.getProcedure(
977977
'dart:ffi',
978978
'NativeCallable',
979-
'isolateGroupShared',
979+
'isolateGroupBound',
980980
),
981981
nativeCallablePrivateIsolateLocalConstructor = index.getConstructor(
982982
'dart:ffi',
@@ -993,9 +993,9 @@ class FfiTransformer extends Transformer {
993993
'_NativeCallableListener',
994994
'',
995995
),
996-
nativeCallablePrivateIsolateGroupSharedConstructor = index.getConstructor(
996+
nativeCallablePrivateIsolateGroupBoundConstructor = index.getConstructor(
997997
'dart:ffi',
998-
'_NativeCallableIsolateGroupShared',
998+
'_NativeCallableIsolateGroupBound',
999999
'',
10001000
),
10011001
nativeCallablePortField = index.getField(

pkg/vm/lib/modular/transformations/ffi/use_sites.dart

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -570,10 +570,10 @@ mixin _FfiUseSiteTransformer on FfiTransformer {
570570
);
571571
} else if (target == nativeCallableIsolateLocalConstructor) {
572572
return _verifyAndReplaceNativeCallableIsolateLocal(node);
573-
} else if (target == nativeCallableIsolateGroupSharedConstructor) {
573+
} else if (target == nativeCallableIsolateGroupBoundConstructor) {
574574
return _verifyAndReplaceNativeCallable(
575575
node,
576-
replacement: _replaceNativeCallableIsolateGroupSharedConstructor,
576+
replacement: _replaceNativeCallableIsolateGroupBoundConstructor,
577577
);
578578
} else if (target == nativeCallableListenerConstructor) {
579579
final DartType nativeType = InterfaceType(
@@ -1059,18 +1059,18 @@ mixin _FfiUseSiteTransformer on FfiTransformer {
10591059
);
10601060
}
10611061

1062-
// NativeCallable<T>.isolateGroupShared(target, exceptionalReturn) calls become:
1062+
// NativeCallable<T>.isolateGroupBound(target, exceptionalReturn) calls become:
10631063
// isStaticFunction is true:
1064-
// _NativeCallableIsolateGroupShared<T>(
1065-
// _createNativeCallableIsolateGroupShared<NativeFunction<T>>(
1066-
// _nativeIsolateGroupSharedCallbackFunction<T>(target, exceptionalReturn),
1064+
// _NativeCallableIsolateGroupBound<T>(
1065+
// _createNativeCallableIsolateGroupBound<NativeFunction<T>>(
1066+
// _nativeIsolateGroupBoundCallbackFunction<T>(target, exceptionalReturn),
10671067
// null);
10681068
// isStaticFunction is false:
1069-
// _NativeCallableIsolateGroupShared<T>(
1070-
// _createNativeCallableIsolateGroupShared<NativeFunction<T>>(
1071-
// _nativeIsolateGroupSharedClosureFunction<T>(exceptionalReturn),
1069+
// _NativeCallableIsolateGroupBound<T>(
1070+
// _createNativeCallableIsolateGroupBound<NativeFunction<T>>(
1071+
// _nativeIsolateGroupBoundClosureFunction<T>(exceptionalReturn),
10721072
// target));
1073-
Expression _replaceNativeCallableIsolateGroupSharedConstructor(
1073+
Expression _replaceNativeCallableIsolateGroupBoundConstructor(
10741074
StaticInvocation node,
10751075
Expression exceptionalReturn,
10761076
bool isStaticFunction,
@@ -1084,11 +1084,11 @@ mixin _FfiUseSiteTransformer on FfiTransformer {
10841084
late StaticInvocation pointerValue;
10851085
if (isStaticFunction) {
10861086
pointerValue = StaticInvocation(
1087-
createNativeCallableIsolateGroupSharedProcedure,
1087+
createNativeCallableIsolateGroupBoundProcedure,
10881088
Arguments(
10891089
[
10901090
StaticInvocation(
1091-
nativeIsolateGroupSharedCallbackFunctionProcedure,
1091+
nativeIsolateGroupBoundCallbackFunctionProcedure,
10921092
Arguments([
10931093
target,
10941094
exceptionalReturn,
@@ -1101,11 +1101,11 @@ mixin _FfiUseSiteTransformer on FfiTransformer {
11011101
);
11021102
} else {
11031103
pointerValue = StaticInvocation(
1104-
createNativeCallableIsolateGroupSharedProcedure,
1104+
createNativeCallableIsolateGroupBoundProcedure,
11051105
Arguments(
11061106
[
11071107
StaticInvocation(
1108-
nativeIsolateGroupSharedClosureFunctionProcedure,
1108+
nativeIsolateGroupBoundClosureFunctionProcedure,
11091109
Arguments([exceptionalReturn], types: node.arguments.types),
11101110
),
11111111
target,
@@ -1116,7 +1116,7 @@ mixin _FfiUseSiteTransformer on FfiTransformer {
11161116
}
11171117

11181118
return ConstructorInvocation(
1119-
nativeCallablePrivateIsolateGroupSharedConstructor,
1119+
nativeCallablePrivateIsolateGroupBoundConstructor,
11201120
Arguments([pointerValue], types: node.arguments.types),
11211121
);
11221122
}

runtime/lib/ffi.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@ DEFINE_NATIVE_ENTRY(Ffi_createNativeCallableIsolateLocal, 1, 3) {
4646
zone, trampoline, target, keep_isolate_alive));
4747
}
4848

49-
DEFINE_NATIVE_ENTRY(Ffi_createNativeCallableIsolateGroupShared, 1, 2) {
49+
DEFINE_NATIVE_ENTRY(Ffi_createNativeCallableIsolateGroupBound, 1, 2) {
5050
const auto& trampoline =
5151
Function::CheckedHandle(zone, arguments->NativeArg0());
5252
const auto& target = Closure::CheckedHandle(zone, arguments->NativeArgAt(1));
5353
return Pointer::New(
54-
isolate->CreateIsolateGroupSharedFfiCallback(zone, trampoline, target));
54+
isolate->CreateIsolateGroupBoundFfiCallback(zone, trampoline, target));
5555
}
5656

5757
DEFINE_NATIVE_ENTRY(Ffi_deleteNativeCallable, 1, 1) {

runtime/vm/bootstrap_natives.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ namespace dart {
297297
V(VMService_RemoveUserTagsFromStreamableSampleList, 1) \
298298
V(Ffi_createNativeCallableListener, 2) \
299299
V(Ffi_createNativeCallableIsolateLocal, 3) \
300-
V(Ffi_createNativeCallableIsolateGroupShared, 2) \
300+
V(Ffi_createNativeCallableIsolateGroupBound, 2) \
301301
V(Ffi_deleteNativeCallable, 1) \
302302
V(Ffi_updateNativeCallableKeepIsolateAliveCounter, 1) \
303303
V(Ffi_dl_open, 1) \

runtime/vm/bss_relocs.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ void BSS::Initialize(Thread* current, uword* bss_start, bool vm) {
3535
InitializeBSSEntry(Relocation::DLRT_ExitTemporaryIsolate,
3636
reinterpret_cast<uword>(DLRT_ExitTemporaryIsolate),
3737
bss_start);
38-
InitializeBSSEntry(
39-
Relocation::DLRT_ExitIsolateGroupSharedIsolate,
40-
reinterpret_cast<uword>(DLRT_ExitIsolateGroupSharedIsolate), bss_start);
38+
InitializeBSSEntry(Relocation::DLRT_ExitIsolateGroupBoundIsolate,
39+
reinterpret_cast<uword>(DLRT_ExitIsolateGroupBoundIsolate),
40+
bss_start);
4141
}
4242

4343
} // namespace dart

runtime/vm/bss_relocs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class BSS : public AllStatic {
1818
enum class Relocation : intptr_t {
1919
DLRT_GetFfiCallbackMetadata, // TODO(https://dartbug.com/52579): Remove.
2020
DLRT_ExitTemporaryIsolate, // TODO(https://dartbug.com/52579): Remove.
21-
DLRT_ExitIsolateGroupSharedIsolate, // TODO(https://dartbug.com/52579)
21+
DLRT_ExitIsolateGroupBoundIsolate, // TODO(https://dartbug.com/52579)
2222
EndOfVmEntries,
2323

2424
// We don't have any isolate group specific entries at the moment.

runtime/vm/compiler/ffi/callback.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ const String& NativeCallbackFunctionName(Thread* thread,
2828
return String::Handle(
2929
zone, Symbols::FromConcat(thread, Symbols::FfiCallback(),
3030
String::Handle(zone, dart_target.name())));
31-
case FfiCallbackKind::kIsolateGroupSharedClosureCallback:
32-
return Symbols::FfiIsolateGroupSharedCallback();
33-
case FfiCallbackKind::kIsolateGroupSharedStaticCallback:
31+
case FfiCallbackKind::kIsolateGroupBoundClosureCallback:
32+
return Symbols::FfiIsolateGroupBoundCallback();
33+
case FfiCallbackKind::kIsolateGroupBoundStaticCallback:
3434
return String::Handle(
3535
zone, Symbols::FromConcat(thread, Symbols::FfiCallback(),
3636
String::Handle(zone, dart_target.name())));

runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3390,12 +3390,12 @@ Fragment StreamingFlowGraphBuilder::BuildStaticInvocation(TokenPosition* p) {
33903390
case MethodRecognizer::kFfiNativeIsolateLocalCallbackFunction:
33913391
return BuildFfiNativeCallbackFunction(
33923392
FfiCallbackKind::kIsolateLocalClosureCallback);
3393-
case MethodRecognizer::kFfiNativeIsolateGroupSharedCallbackFunction:
3393+
case MethodRecognizer::kFfiNativeIsolateGroupBoundCallbackFunction:
33943394
return BuildFfiNativeCallbackFunction(
3395-
FfiCallbackKind::kIsolateGroupSharedStaticCallback);
3396-
case MethodRecognizer::kFfiNativeIsolateGroupSharedClosureFunction:
3395+
FfiCallbackKind::kIsolateGroupBoundStaticCallback);
3396+
case MethodRecognizer::kFfiNativeIsolateGroupBoundClosureFunction:
33973397
return BuildFfiNativeCallbackFunction(
3398-
FfiCallbackKind::kIsolateGroupSharedClosureCallback);
3398+
FfiCallbackKind::kIsolateGroupBoundClosureCallback);
33993399
case MethodRecognizer::kFfiNativeAsyncCallbackFunction:
34003400
return BuildFfiNativeCallbackFunction(FfiCallbackKind::kAsyncCallback);
34013401
case MethodRecognizer::kFfiLoadAbiSpecificInt:
@@ -6216,7 +6216,7 @@ Fragment StreamingFlowGraphBuilder::BuildFfiNativeCallbackFunction(
62166216
// FfiCallbackKind::kIsolateLocalStaticCallback:
62176217
// _nativeCallbackFunction<NativeSignatureType>(target, exceptionalReturn)
62186218
//
6219-
// FfiCallbackKind::kIsolateGroupSharedStaticCallback:
6219+
// FfiCallbackKind::kIsolateGroupBoundStaticCallback:
62206220
// _nativeCallbackFunction<NativeSignatureType>(target, exceptionalReturn)
62216221
//
62226222
// FfiCallbackKind::kAsyncCallback:
@@ -6226,15 +6226,15 @@ Fragment StreamingFlowGraphBuilder::BuildFfiNativeCallbackFunction(
62266226
// _nativeIsolateLocalCallbackFunction<NativeSignatureType>(
62276227
// exceptionalReturn)
62286228
//
6229-
// FfiCallbackKind::kIsolateGroupSharedClosureCallback:
6230-
// _nativeIsolateGroupSharedCallbackFunction<NativeSignatureType>(
6229+
// FfiCallbackKind::kIsolateGroupBoundClosureCallback:
6230+
// _nativeIsolateGroupBoundCallbackFunction<NativeSignatureType>(
62316231
// exceptionalReturn)
62326232
//
62336233
// The FE also guarantees that the arguments are constants.
62346234

62356235
const bool has_target =
62366236
kind == FfiCallbackKind::kIsolateLocalStaticCallback ||
6237-
kind == FfiCallbackKind::kIsolateGroupSharedStaticCallback;
6237+
kind == FfiCallbackKind::kIsolateGroupBoundStaticCallback;
62386238
const bool has_exceptional_return = kind != FfiCallbackKind::kAsyncCallback;
62396239
const intptr_t expected_argc =
62406240
static_cast<int>(has_target) + static_cast<int>(has_exceptional_return);

runtime/vm/compiler/frontend/kernel_to_il.cc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1061,8 +1061,8 @@ bool FlowGraphBuilder::IsRecognizedMethodForFlowGraph(
10611061
case MethodRecognizer::kFfiNativeCallbackFunction:
10621062
case MethodRecognizer::kFfiNativeAsyncCallbackFunction:
10631063
case MethodRecognizer::kFfiNativeIsolateLocalCallbackFunction:
1064-
case MethodRecognizer::kFfiNativeIsolateGroupSharedCallbackFunction:
1065-
case MethodRecognizer::kFfiNativeIsolateGroupSharedClosureFunction:
1064+
case MethodRecognizer::kFfiNativeIsolateGroupBoundCallbackFunction:
1065+
case MethodRecognizer::kFfiNativeIsolateGroupBoundClosureFunction:
10661066
case MethodRecognizer::kFfiStoreInt8:
10671067
case MethodRecognizer::kFfiStoreInt16:
10681068
case MethodRecognizer::kFfiStoreInt32:
@@ -1555,8 +1555,8 @@ FlowGraph* FlowGraphBuilder::BuildGraphOfRecognizedMethod(
15551555
case MethodRecognizer::kFfiNativeCallbackFunction:
15561556
case MethodRecognizer::kFfiNativeAsyncCallbackFunction:
15571557
case MethodRecognizer::kFfiNativeIsolateLocalCallbackFunction:
1558-
case MethodRecognizer::kFfiNativeIsolateGroupSharedCallbackFunction:
1559-
case MethodRecognizer::kFfiNativeIsolateGroupSharedClosureFunction: {
1558+
case MethodRecognizer::kFfiNativeIsolateGroupBoundCallbackFunction:
1559+
case MethodRecognizer::kFfiNativeIsolateGroupBoundClosureFunction: {
15601560
const auto& error = String::ZoneHandle(
15611561
Z, Symbols::New(thread_,
15621562
"This function should be handled on call site."));
@@ -5274,9 +5274,9 @@ FlowGraph* FlowGraphBuilder::BuildGraphOfFfiTrampoline(
52745274
const Function& function) {
52755275
switch (function.GetFfiCallbackKind()) {
52765276
case FfiCallbackKind::kIsolateLocalStaticCallback:
5277-
case FfiCallbackKind::kIsolateGroupSharedStaticCallback:
5277+
case FfiCallbackKind::kIsolateGroupBoundStaticCallback:
52785278
case FfiCallbackKind::kIsolateLocalClosureCallback:
5279-
case FfiCallbackKind::kIsolateGroupSharedClosureCallback:
5279+
case FfiCallbackKind::kIsolateGroupBoundClosureCallback:
52805280
return BuildGraphOfSyncFfiCallback(function);
52815281
case FfiCallbackKind::kAsyncCallback:
52825282
return BuildGraphOfAsyncFfiCallback(function);
@@ -5591,7 +5591,7 @@ FlowGraph* FlowGraphBuilder::BuildGraphOfSyncFfiCallback(
55915591
function.GetFfiCallbackKind() ==
55925592
FfiCallbackKind::kIsolateLocalClosureCallback ||
55935593
function.GetFfiCallbackKind() ==
5594-
FfiCallbackKind::kIsolateGroupSharedClosureCallback;
5594+
FfiCallbackKind::kIsolateGroupBoundClosureCallback;
55955595

55965596
graph_entry_ =
55975597
new (Z) GraphEntryInstr(*parsed_function_, Compiler::kNoOSRDeoptId);

runtime/vm/compiler/recognized_methods_list.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,10 @@ namespace dart {
120120
FfiNativeAsyncCallbackFunction, 0xbdd1a333) \
121121
V(FfiLibrary, ::, _nativeIsolateLocalCallbackFunction, \
122122
FfiNativeIsolateLocalCallbackFunction, 0x21b66eba) \
123-
V(FfiLibrary, ::, _nativeIsolateGroupSharedCallbackFunction, \
124-
FfiNativeIsolateGroupSharedCallbackFunction, 0x8882d3ca) \
125-
V(FfiLibrary, ::, _nativeIsolateGroupSharedClosureFunction, \
126-
FfiNativeIsolateGroupSharedClosureFunction, 0x2c93f675) \
123+
V(FfiLibrary, ::, _nativeIsolateGroupBoundCallbackFunction, \
124+
FfiNativeIsolateGroupBoundCallbackFunction, 0xc20a0b32) \
125+
V(FfiLibrary, ::, _nativeIsolateGroupBoundClosureFunction, \
126+
FfiNativeIsolateGroupBoundClosureFunction, 0x0714be84) \
127127
V(FfiLibrary, ::, _loadAbiSpecificInt, FfiLoadAbiSpecificInt, 0x6abf70a6) \
128128
V(FfiLibrary, ::, _loadAbiSpecificIntAtIndex, FfiLoadAbiSpecificIntAtIndex, \
129129
0xc188dd75) \

0 commit comments

Comments
 (0)