From a192e22eb37c525c09f19a5e17c1cafde22788a8 Mon Sep 17 00:00:00 2001 From: Liam Appelbe Date: Tue, 28 Nov 2023 13:40:31 +1300 Subject: [PATCH 1/6] Only use objc_msgSend variants on x64 --- pkgs/ffigen/lib/src/code_generator/func.dart | 15 +++- .../objc_built_in_functions.dart | 74 +++++++++++++------ 2 files changed, 63 insertions(+), 26 deletions(-) diff --git a/pkgs/ffigen/lib/src/code_generator/func.dart b/pkgs/ffigen/lib/src/code_generator/func.dart index 766cc289e..576e9b0c2 100644 --- a/pkgs/ffigen/lib/src/code_generator/func.dart +++ b/pkgs/ffigen/lib/src/code_generator/func.dart @@ -95,6 +95,7 @@ class Func extends LookUpBinding { BindingString toBindingString(Writer w) { final s = StringBuffer(); final enclosingFuncName = name; + final useFfiNative = ffiNativeConfig.enabled && nameExpressionIsConst; if (dartDoc != null) { s.write(makeDartDoc(dartDoc!)); @@ -134,7 +135,7 @@ class Func extends LookUpBinding { funcImplCall = functionType.returnType.convertFfiDartTypeToDartType( w, '$funcVarName($argString)', - ffiNativeConfig.enabled ? 'lib' : 'this', + useFfiNative ? 'lib' : 'this', objCRetain: !objCReturnsRetained, ); } else { @@ -145,13 +146,13 @@ class Func extends LookUpBinding { funcImplCall = '$funcVarName($argString)'; } - if (ffiNativeConfig.enabled) { + if (useFfiNative) { final assetString = ffiNativeConfig.assetId != null ? ", assetId: '${ffiNativeConfig.assetId}'" : ''; final nativeFuncName = needsWrapper ? funcVarName : enclosingFuncName; s.write(''' -@${w.ffiLibraryPrefix}.Native<$cType>(symbol: '$originalName'$assetString$isLeafString) +@${w.ffiLibraryPrefix}.Native<$cType>(symbol: $nameExpression$assetString$isLeafString) external $ffiReturnType $nativeFuncName($ffiArgDeclString); '''); @@ -188,7 +189,7 @@ $dartReturnType $enclosingFuncName($dartArgDeclString) { // Write function pointer. s.write(''' late final $funcPointerName = ${w.lookupFuncIdentifier}< - ${w.ffiLibraryPrefix}.NativeFunction<$cType>>('$originalName'); + ${w.ffiLibraryPrefix}.NativeFunction<$cType>>($nameExpression); late final $funcVarName = $funcPointerName.asFunction<$dartType>($isLeafString); '''); @@ -197,6 +198,12 @@ late final $funcVarName = $funcPointerName.asFunction<$dartType>($isLeafString); return BindingString(type: BindingStringType.func, string: s.toString()); } + // Returns the expression used to construct the function name that is used to + // look up the native function. If the expression is not const, this function + // cannot be loaded using a @Native style function lookup. + String get nameExpression => "'$originalName'"; + bool get nameExpressionIsConst => true; + @override void addDependencies(Set dependencies) { if (dependencies.contains(this)) return; diff --git a/pkgs/ffigen/lib/src/code_generator/objc_built_in_functions.dart b/pkgs/ffigen/lib/src/code_generator/objc_built_in_functions.dart index 60c998b88..70f6a5259 100644 --- a/pkgs/ffigen/lib/src/code_generator/objc_built_in_functions.dart +++ b/pkgs/ffigen/lib/src/code_generator/objc_built_in_functions.dart @@ -105,9 +105,19 @@ $objType $name(String name) { key += ' ${p.type.cacheKey()}'; } return _msgSendFuncs[key] ??= ObjCMsgSendFunc( - '_objc_msgSend_${_msgSendFuncs.length}', returnType, params); + '_objc_msgSend_${_msgSendFuncs.length}', + returnType, + params, + _msgSendUseVariants); } + late final _msgSendUseVariants = ObjCInternalGlobal( + '_objc_msgSend_useVariants', + (Writer w) => ''' +${w.ffiLibraryPrefix}.Abi.current() == ${w.ffiLibraryPrefix}.Abi.iosX64 || +${w.ffiLibraryPrefix}.Abi.current() == ${w.ffiLibraryPrefix}.Abi.macosX64 +'''); + final _selObjects = {}; ObjCInternalGlobal getSelObject(String methodName) { return _selObjects[methodName] ??= ObjCInternalGlobal( @@ -285,7 +295,7 @@ class $name implements ${w.ffiLibraryPrefix}.Finalizable { _releaseFunc.addDependencies(dependencies); _releaseFinalizer.addDependencies(dependencies); for (final msgSendFunc in _msgSendFuncs.values) { - msgSendFunc.func.addDependencies(dependencies); + msgSendFunc.addDependencies(dependencies); } for (final sel in _selObjects.values) { sel.addDependencies(dependencies); @@ -415,30 +425,50 @@ enum ObjCMsgSendVariant { } /// A wrapper around the objc_msgSend function, or the stret or fpret variants. -class ObjCMsgSendFunc { +class ObjCMsgSendFunc extends Func { final ObjCMsgSendVariant variant; - late final Func func; - - ObjCMsgSendFunc(String name, Type returnType, List params) - : variant = ObjCMsgSendVariant.fromReturnType(returnType) { - func = Func( - name: name, - originalName: variant.name, - returnType: isStret ? voidType : returnType, - parameters: [ - if (isStret) Parameter(name: 'stret', type: PointerType(returnType)), - Parameter(name: 'obj', type: PointerType(objCObjectType)), - Parameter(name: 'sel', type: PointerType(objCSelType)), - for (final p in params) Parameter(name: p.name, type: p.type), - ], - isInternal: true, - ); - } + final ObjCInternalGlobal useVariants; + + ObjCMsgSendFunc(String name, Type returnType, List params, + ObjCInternalGlobal useVariants) + : this._(name, returnType, params, useVariants, + ObjCMsgSendVariant.fromReturnType(returnType)); + + ObjCMsgSendFunc._(String name, Type returnType, List params, + this.useVariants, this.variant) + : super( + name: name, + originalName: variant.name, + returnType: + variant == ObjCMsgSendVariant.stret ? voidType : returnType, + parameters: [ + if (variant == ObjCMsgSendVariant.stret) + Parameter(name: 'stret', type: PointerType(returnType)), + Parameter(name: 'obj', type: PointerType(objCObjectType)), + Parameter(name: 'sel', type: PointerType(objCSelType)), + for (final p in params) Parameter(name: p.name, type: p.type), + ], + isInternal: true, + ); - String get name => func.name; bool get isStret => variant == ObjCMsgSendVariant.stret; + bool get isNormal => variant == ObjCMsgSendVariant.normal; + @override void addDependencies(Set dependencies) { - func.addDependencies(dependencies); + if (!isNormal) { + useVariants.addDependencies(dependencies); + } + super.addDependencies(dependencies); } + + @override + String get nameExpression => isNormal + ? "'${variant.name}'" + : ''' +${useVariants.name} ? '${variant.name}' : '${ObjCMsgSendVariant.normal.name}' +'''; + + @override + bool get nameExpressionIsConst => isNormal; } From 76038fd08beb4030c12f6e9d4a2f8d87df615b39 Mon Sep 17 00:00:00 2001 From: Liam Appelbe Date: Tue, 28 Nov 2023 13:50:50 +1300 Subject: [PATCH 2/6] Update examples --- .../objective_c/avf_audio_bindings.dart | 285 +++++++++--------- .../example/swift/swift_api_bindings.dart | 278 ++++++++--------- 2 files changed, 286 insertions(+), 277 deletions(-) diff --git a/pkgs/ffigen/example/objective_c/avf_audio_bindings.dart b/pkgs/ffigen/example/objective_c/avf_audio_bindings.dart index cde69673d..1fba9cba2 100644 --- a/pkgs/ffigen/example/objective_c/avf_audio_bindings.dart +++ b/pkgs/ffigen/example/objective_c/avf_audio_bindings.dart @@ -1415,6 +1415,8 @@ class AVFAudio { ffi.Pointer, ffi.Pointer, _NSRange)>(); late final _sel_rangeValue1 = _registerName1("rangeValue"); + late final _objc_msgSend_useVariants1 = ffi.Abi.current() == ffi.Abi.iosX64 || + ffi.Abi.current() == ffi.Abi.macosX64; void _objc_msgSend_54( ffi.Pointer<_NSRange> stret, ffi.Pointer obj, @@ -1428,9 +1430,10 @@ class AVFAudio { } late final __objc_msgSend_54Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend_stret'); + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer)>>( + _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); late final __objc_msgSend_54 = __objc_msgSend_54Ptr.asFunction< void Function(ffi.Pointer<_NSRange>, ffi.Pointer, ffi.Pointer)>(); @@ -1534,9 +1537,10 @@ class AVFAudio { } late final __objc_msgSend_59Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend_stret'); + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>( + _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); late final __objc_msgSend_59 = __objc_msgSend_59Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -1555,9 +1559,10 @@ class AVFAudio { } late final __objc_msgSend_60Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend_stret'); + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>( + _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); late final __objc_msgSend_60 = __objc_msgSend_60Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -1576,9 +1581,10 @@ class AVFAudio { } late final __objc_msgSend_61Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend_stret'); + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>( + _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); late final __objc_msgSend_61 = __objc_msgSend_61Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -1597,9 +1603,10 @@ class AVFAudio { } late final __objc_msgSend_62Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend_stret'); + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>( + _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); late final __objc_msgSend_62 = __objc_msgSend_62Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -4386,9 +4393,10 @@ class AVFAudio { } late final __objc_msgSend_165Ptr = _lookup< - ffi.NativeFunction< - ffi.Double Function(ffi.Pointer, - ffi.Pointer)>>('objc_msgSend_fpret'); + ffi.NativeFunction< + ffi.Double Function( + ffi.Pointer, ffi.Pointer)>>( + _objc_msgSend_useVariants1 ? 'objc_msgSend_fpret' : 'objc_msgSend'); late final __objc_msgSend_165 = __objc_msgSend_165Ptr.asFunction< double Function(ffi.Pointer, ffi.Pointer)>(); @@ -4429,9 +4437,10 @@ class AVFAudio { } late final __objc_msgSend_167Ptr = _lookup< - ffi.NativeFunction< - ffi.Double Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend_fpret'); + ffi.NativeFunction< + ffi.Double Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>( + _objc_msgSend_useVariants1 ? 'objc_msgSend_fpret' : 'objc_msgSend'); late final __objc_msgSend_167 = __objc_msgSend_167Ptr.asFunction< double Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -6295,9 +6304,10 @@ class AVFAudio { } late final __objc_msgSend_239Ptr = _lookup< - ffi.NativeFunction< - ffi.Float Function(ffi.Pointer, - ffi.Pointer)>>('objc_msgSend_fpret'); + ffi.NativeFunction< + ffi.Float Function( + ffi.Pointer, ffi.Pointer)>>( + _objc_msgSend_useVariants1 ? 'objc_msgSend_fpret' : 'objc_msgSend'); late final __objc_msgSend_239 = __objc_msgSend_239Ptr.asFunction< double Function(ffi.Pointer, ffi.Pointer)>(); @@ -7264,14 +7274,15 @@ class AVFAudio { } late final __objc_msgSend_271Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange)>>('objc_msgSend_stret'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange)>>( + _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); late final __objc_msgSend_271 = __objc_msgSend_271Ptr.asFunction< void Function(ffi.Pointer<_NSRange>, ffi.Pointer, ffi.Pointer, ffi.Pointer, int, _NSRange)>(); @@ -8189,9 +8200,10 @@ class AVFAudio { } late final __objc_msgSend_307Ptr = _lookup< - ffi.NativeFunction< - ffi.Float Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend_fpret'); + ffi.NativeFunction< + ffi.Float Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>( + _objc_msgSend_useVariants1 ? 'objc_msgSend_fpret' : 'objc_msgSend'); late final __objc_msgSend_307 = __objc_msgSend_307Ptr.asFunction< double Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -8210,9 +8222,10 @@ class AVFAudio { } late final __objc_msgSend_308Ptr = _lookup< - ffi.NativeFunction< - ffi.Double Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend_fpret'); + ffi.NativeFunction< + ffi.Double Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>( + _objc_msgSend_useVariants1 ? 'objc_msgSend_fpret' : 'objc_msgSend'); late final __objc_msgSend_308 = __objc_msgSend_308Ptr.asFunction< double Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -8764,12 +8777,10 @@ class AVFAudio { } late final __objc_msgSend_329Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend_stret'); + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>( + _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); late final __objc_msgSend_329 = __objc_msgSend_329Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -8790,12 +8801,10 @@ class AVFAudio { } late final __objc_msgSend_330Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend_stret'); + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>( + _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); late final __objc_msgSend_330 = __objc_msgSend_330Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -8816,12 +8825,10 @@ class AVFAudio { } late final __objc_msgSend_331Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend_stret'); + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>( + _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); late final __objc_msgSend_331 = __objc_msgSend_331Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -9054,12 +9061,10 @@ class AVFAudio { } late final __objc_msgSend_340Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend_stret'); + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>( + _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); late final __objc_msgSend_340 = __objc_msgSend_340Ptr.asFunction< void Function(ffi.Pointer<_NSRange>, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -9084,13 +9089,10 @@ class AVFAudio { } late final __objc_msgSend_341Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>('objc_msgSend_stret'); + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, ffi.Pointer, ffi.Int32)>>( + _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); late final __objc_msgSend_341 = __objc_msgSend_341Ptr.asFunction< void Function(ffi.Pointer<_NSRange>, ffi.Pointer, ffi.Pointer, ffi.Pointer, int)>(); @@ -9116,14 +9118,15 @@ class AVFAudio { } late final __objc_msgSend_342Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange)>>('objc_msgSend_stret'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange)>>( + _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); late final __objc_msgSend_342 = __objc_msgSend_342Ptr.asFunction< void Function(ffi.Pointer<_NSRange>, ffi.Pointer, ffi.Pointer, ffi.Pointer, int, _NSRange)>(); @@ -9151,15 +9154,16 @@ class AVFAudio { } late final __objc_msgSend_343Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange, - ffi.Pointer)>>('objc_msgSend_stret'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange, + ffi.Pointer)>>( + _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); late final __objc_msgSend_343 = __objc_msgSend_343Ptr.asFunction< void Function( ffi.Pointer<_NSRange>, @@ -9187,12 +9191,10 @@ class AVFAudio { } late final __objc_msgSend_344Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend_stret'); + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>( + _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); late final __objc_msgSend_344 = __objc_msgSend_344Ptr.asFunction< void Function(ffi.Pointer<_NSRange>, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -9216,13 +9218,10 @@ class AVFAudio { } late final __objc_msgSend_345Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>('objc_msgSend_stret'); + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, ffi.Pointer, ffi.Int32)>>( + _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); late final __objc_msgSend_345 = __objc_msgSend_345Ptr.asFunction< void Function(ffi.Pointer<_NSRange>, ffi.Pointer, ffi.Pointer, ffi.Pointer, int)>(); @@ -9248,14 +9247,15 @@ class AVFAudio { } late final __objc_msgSend_346Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange)>>('objc_msgSend_stret'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange)>>( + _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); late final __objc_msgSend_346 = __objc_msgSend_346Ptr.asFunction< void Function(ffi.Pointer<_NSRange>, ffi.Pointer, ffi.Pointer, ffi.Pointer, int, _NSRange)>(); @@ -9277,9 +9277,10 @@ class AVFAudio { } late final __objc_msgSend_347Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend_stret'); + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>( + _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); late final __objc_msgSend_347 = __objc_msgSend_347Ptr.asFunction< void Function(ffi.Pointer<_NSRange>, ffi.Pointer, ffi.Pointer, int)>(); @@ -9301,9 +9302,10 @@ class AVFAudio { } late final __objc_msgSend_348Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, _NSRange)>>('objc_msgSend_stret'); + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, _NSRange)>>( + _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); late final __objc_msgSend_348 = __objc_msgSend_348Ptr.asFunction< void Function(ffi.Pointer<_NSRange>, ffi.Pointer, ffi.Pointer, _NSRange)>(); @@ -21326,9 +21328,10 @@ class AVFAudio { } late final __objc_msgSend_767Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend_stret'); + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, ffi.Int32)>>( + _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); late final __objc_msgSend_767 = __objc_msgSend_767Ptr.asFunction< void Function(ffi.Pointer<_NSRange>, ffi.Pointer, ffi.Pointer, int)>(); @@ -21355,14 +21358,15 @@ class AVFAudio { } late final __objc_msgSend_768Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Int32, - ffi.Pointer)>>('objc_msgSend_stret'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Int32, + ffi.Pointer)>>( + _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); late final __objc_msgSend_768 = __objc_msgSend_768Ptr.asFunction< void Function(ffi.Pointer<_NSRange>, ffi.Pointer, ffi.Pointer, int, int, ffi.Pointer)>(); @@ -26205,11 +26209,10 @@ class AVFAudio { } late final __objc_msgSend_940Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend_stret'); + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>( + _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); late final __objc_msgSend_940 = __objc_msgSend_940Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -26642,14 +26645,15 @@ class AVFAudio { } late final __objc_msgSend_955Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange)>>('objc_msgSend_stret'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange)>>( + _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); late final __objc_msgSend_955 = __objc_msgSend_955Ptr.asFunction< void Function(ffi.Pointer<_NSRange>, ffi.Pointer, ffi.Pointer, ffi.Pointer, int, _NSRange)>(); @@ -33164,9 +33168,10 @@ class AVFAudio { } late final __objc_msgSend_1193Ptr = _lookup< - ffi.NativeFunction< - ffi.Float Function(ffi.Pointer, ffi.Pointer, - ffi.UnsignedLong)>>('objc_msgSend_fpret'); + ffi.NativeFunction< + ffi.Float Function(ffi.Pointer, ffi.Pointer, + ffi.UnsignedLong)>>( + _objc_msgSend_useVariants1 ? 'objc_msgSend_fpret' : 'objc_msgSend'); late final __objc_msgSend_1193 = __objc_msgSend_1193Ptr.asFunction< double Function(ffi.Pointer, ffi.Pointer, int)>(); diff --git a/pkgs/ffigen/example/swift/swift_api_bindings.dart b/pkgs/ffigen/example/swift/swift_api_bindings.dart index ec0c69cdb..38ad96b6d 100644 --- a/pkgs/ffigen/example/swift/swift_api_bindings.dart +++ b/pkgs/ffigen/example/swift/swift_api_bindings.dart @@ -1420,6 +1420,8 @@ class SwiftLibrary { ffi.Pointer, ffi.Pointer, _NSRange)>(); late final _sel_rangeValue1 = _registerName1("rangeValue"); + late final _objc_msgSend_useVariants1 = ffi.Abi.current() == ffi.Abi.iosX64 || + ffi.Abi.current() == ffi.Abi.macosX64; void _objc_msgSend_54( ffi.Pointer<_NSRange> stret, ffi.Pointer obj, @@ -1433,9 +1435,10 @@ class SwiftLibrary { } late final __objc_msgSend_54Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend_stret'); + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer)>>( + _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); late final __objc_msgSend_54 = __objc_msgSend_54Ptr.asFunction< void Function(ffi.Pointer<_NSRange>, ffi.Pointer, ffi.Pointer)>(); @@ -1539,9 +1542,10 @@ class SwiftLibrary { } late final __objc_msgSend_59Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend_stret'); + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>( + _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); late final __objc_msgSend_59 = __objc_msgSend_59Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -1560,9 +1564,10 @@ class SwiftLibrary { } late final __objc_msgSend_60Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend_stret'); + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>( + _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); late final __objc_msgSend_60 = __objc_msgSend_60Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -1581,9 +1586,10 @@ class SwiftLibrary { } late final __objc_msgSend_61Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend_stret'); + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>( + _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); late final __objc_msgSend_61 = __objc_msgSend_61Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -1602,9 +1608,10 @@ class SwiftLibrary { } late final __objc_msgSend_62Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend_stret'); + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>( + _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); late final __objc_msgSend_62 = __objc_msgSend_62Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -4391,9 +4398,10 @@ class SwiftLibrary { } late final __objc_msgSend_165Ptr = _lookup< - ffi.NativeFunction< - ffi.Double Function(ffi.Pointer, - ffi.Pointer)>>('objc_msgSend_fpret'); + ffi.NativeFunction< + ffi.Double Function( + ffi.Pointer, ffi.Pointer)>>( + _objc_msgSend_useVariants1 ? 'objc_msgSend_fpret' : 'objc_msgSend'); late final __objc_msgSend_165 = __objc_msgSend_165Ptr.asFunction< double Function(ffi.Pointer, ffi.Pointer)>(); @@ -4434,9 +4442,10 @@ class SwiftLibrary { } late final __objc_msgSend_167Ptr = _lookup< - ffi.NativeFunction< - ffi.Double Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend_fpret'); + ffi.NativeFunction< + ffi.Double Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>( + _objc_msgSend_useVariants1 ? 'objc_msgSend_fpret' : 'objc_msgSend'); late final __objc_msgSend_167 = __objc_msgSend_167Ptr.asFunction< double Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -6300,9 +6309,10 @@ class SwiftLibrary { } late final __objc_msgSend_239Ptr = _lookup< - ffi.NativeFunction< - ffi.Float Function(ffi.Pointer, - ffi.Pointer)>>('objc_msgSend_fpret'); + ffi.NativeFunction< + ffi.Float Function( + ffi.Pointer, ffi.Pointer)>>( + _objc_msgSend_useVariants1 ? 'objc_msgSend_fpret' : 'objc_msgSend'); late final __objc_msgSend_239 = __objc_msgSend_239Ptr.asFunction< double Function(ffi.Pointer, ffi.Pointer)>(); @@ -7269,14 +7279,15 @@ class SwiftLibrary { } late final __objc_msgSend_271Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange)>>('objc_msgSend_stret'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange)>>( + _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); late final __objc_msgSend_271 = __objc_msgSend_271Ptr.asFunction< void Function(ffi.Pointer<_NSRange>, ffi.Pointer, ffi.Pointer, ffi.Pointer, int, _NSRange)>(); @@ -8194,9 +8205,10 @@ class SwiftLibrary { } late final __objc_msgSend_307Ptr = _lookup< - ffi.NativeFunction< - ffi.Float Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend_fpret'); + ffi.NativeFunction< + ffi.Float Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>( + _objc_msgSend_useVariants1 ? 'objc_msgSend_fpret' : 'objc_msgSend'); late final __objc_msgSend_307 = __objc_msgSend_307Ptr.asFunction< double Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -8215,9 +8227,10 @@ class SwiftLibrary { } late final __objc_msgSend_308Ptr = _lookup< - ffi.NativeFunction< - ffi.Double Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend_fpret'); + ffi.NativeFunction< + ffi.Double Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>( + _objc_msgSend_useVariants1 ? 'objc_msgSend_fpret' : 'objc_msgSend'); late final __objc_msgSend_308 = __objc_msgSend_308Ptr.asFunction< double Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -8769,12 +8782,10 @@ class SwiftLibrary { } late final __objc_msgSend_329Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend_stret'); + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>( + _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); late final __objc_msgSend_329 = __objc_msgSend_329Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -8795,12 +8806,10 @@ class SwiftLibrary { } late final __objc_msgSend_330Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend_stret'); + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>( + _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); late final __objc_msgSend_330 = __objc_msgSend_330Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -8821,12 +8830,10 @@ class SwiftLibrary { } late final __objc_msgSend_331Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend_stret'); + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>( + _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); late final __objc_msgSend_331 = __objc_msgSend_331Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -9059,12 +9066,10 @@ class SwiftLibrary { } late final __objc_msgSend_340Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend_stret'); + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>( + _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); late final __objc_msgSend_340 = __objc_msgSend_340Ptr.asFunction< void Function(ffi.Pointer<_NSRange>, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -9089,13 +9094,10 @@ class SwiftLibrary { } late final __objc_msgSend_341Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>('objc_msgSend_stret'); + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, ffi.Pointer, ffi.Int32)>>( + _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); late final __objc_msgSend_341 = __objc_msgSend_341Ptr.asFunction< void Function(ffi.Pointer<_NSRange>, ffi.Pointer, ffi.Pointer, ffi.Pointer, int)>(); @@ -9121,14 +9123,15 @@ class SwiftLibrary { } late final __objc_msgSend_342Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange)>>('objc_msgSend_stret'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange)>>( + _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); late final __objc_msgSend_342 = __objc_msgSend_342Ptr.asFunction< void Function(ffi.Pointer<_NSRange>, ffi.Pointer, ffi.Pointer, ffi.Pointer, int, _NSRange)>(); @@ -9156,15 +9159,16 @@ class SwiftLibrary { } late final __objc_msgSend_343Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange, - ffi.Pointer)>>('objc_msgSend_stret'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange, + ffi.Pointer)>>( + _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); late final __objc_msgSend_343 = __objc_msgSend_343Ptr.asFunction< void Function( ffi.Pointer<_NSRange>, @@ -9192,12 +9196,10 @@ class SwiftLibrary { } late final __objc_msgSend_344Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend_stret'); + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>( + _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); late final __objc_msgSend_344 = __objc_msgSend_344Ptr.asFunction< void Function(ffi.Pointer<_NSRange>, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -9221,13 +9223,10 @@ class SwiftLibrary { } late final __objc_msgSend_345Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>('objc_msgSend_stret'); + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, ffi.Pointer, ffi.Int32)>>( + _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); late final __objc_msgSend_345 = __objc_msgSend_345Ptr.asFunction< void Function(ffi.Pointer<_NSRange>, ffi.Pointer, ffi.Pointer, ffi.Pointer, int)>(); @@ -9253,14 +9252,15 @@ class SwiftLibrary { } late final __objc_msgSend_346Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange)>>('objc_msgSend_stret'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange)>>( + _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); late final __objc_msgSend_346 = __objc_msgSend_346Ptr.asFunction< void Function(ffi.Pointer<_NSRange>, ffi.Pointer, ffi.Pointer, ffi.Pointer, int, _NSRange)>(); @@ -9282,9 +9282,10 @@ class SwiftLibrary { } late final __objc_msgSend_347Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend_stret'); + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>( + _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); late final __objc_msgSend_347 = __objc_msgSend_347Ptr.asFunction< void Function(ffi.Pointer<_NSRange>, ffi.Pointer, ffi.Pointer, int)>(); @@ -9306,9 +9307,10 @@ class SwiftLibrary { } late final __objc_msgSend_348Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, _NSRange)>>('objc_msgSend_stret'); + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, _NSRange)>>( + _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); late final __objc_msgSend_348 = __objc_msgSend_348Ptr.asFunction< void Function(ffi.Pointer<_NSRange>, ffi.Pointer, ffi.Pointer, _NSRange)>(); @@ -21331,9 +21333,10 @@ class SwiftLibrary { } late final __objc_msgSend_767Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend_stret'); + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, ffi.Int32)>>( + _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); late final __objc_msgSend_767 = __objc_msgSend_767Ptr.asFunction< void Function(ffi.Pointer<_NSRange>, ffi.Pointer, ffi.Pointer, int)>(); @@ -21360,14 +21363,15 @@ class SwiftLibrary { } late final __objc_msgSend_768Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Int32, - ffi.Pointer)>>('objc_msgSend_stret'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Int32, + ffi.Pointer)>>( + _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); late final __objc_msgSend_768 = __objc_msgSend_768Ptr.asFunction< void Function(ffi.Pointer<_NSRange>, ffi.Pointer, ffi.Pointer, int, int, ffi.Pointer)>(); @@ -26210,11 +26214,10 @@ class SwiftLibrary { } late final __objc_msgSend_940Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend_stret'); + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>( + _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); late final __objc_msgSend_940 = __objc_msgSend_940Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -26647,14 +26650,15 @@ class SwiftLibrary { } late final __objc_msgSend_955Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange)>>('objc_msgSend_stret'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange)>>( + _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); late final __objc_msgSend_955 = __objc_msgSend_955Ptr.asFunction< void Function(ffi.Pointer<_NSRange>, ffi.Pointer, ffi.Pointer, ffi.Pointer, int, _NSRange)>(); From b0d81df2dbd540f7c7ab9efc721ed6207e0d6b1f Mon Sep 17 00:00:00 2001 From: Liam Appelbe Date: Tue, 28 Nov 2023 15:20:32 +1300 Subject: [PATCH 3/6] Totally different approach --- .../objective_c/avf_audio_bindings.dart | 1576 +++++++++++++---- .../example/swift/swift_api_bindings.dart | 1463 +++++++++++---- pkgs/ffigen/lib/src/code_generator/func.dart | 15 +- .../objc_built_in_functions.dart | 94 +- .../src/code_generator/objc_interface.dart | 29 +- 5 files changed, 2400 insertions(+), 777 deletions(-) diff --git a/pkgs/ffigen/example/objective_c/avf_audio_bindings.dart b/pkgs/ffigen/example/objective_c/avf_audio_bindings.dart index 1fba9cba2..81abd6957 100644 --- a/pkgs/ffigen/example/objective_c/avf_audio_bindings.dart +++ b/pkgs/ffigen/example/objective_c/avf_audio_bindings.dart @@ -1417,26 +1417,43 @@ class AVFAudio { late final _sel_rangeValue1 = _registerName1("rangeValue"); late final _objc_msgSend_useVariants1 = ffi.Abi.current() == ffi.Abi.iosX64 || ffi.Abi.current() == ffi.Abi.macosX64; - void _objc_msgSend_54( - ffi.Pointer<_NSRange> stret, + _NSRange _objc_msgSend_54( ffi.Pointer obj, ffi.Pointer sel, ) { return __objc_msgSend_54( - stret, obj, sel, ); } late final __objc_msgSend_54Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer)>>( - _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); + ffi.NativeFunction< + _NSRange Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_54 = __objc_msgSend_54Ptr.asFunction< - void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer)>(); + _NSRange Function(ffi.Pointer, ffi.Pointer)>(); + + void _objc_msgSend_54_variant( + ffi.Pointer<_NSRange> stret, + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_54_variant( + stret, + obj, + sel, + ); + } + + late final __objc_msgSend_54_variantPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend_stret'); + late final __objc_msgSend_54_variant = + __objc_msgSend_54_variantPtr.asFunction< + void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer)>(); late final _sel_valueWithPoint_1 = _registerName1("valueWithPoint:"); ffi.Pointer _objc_msgSend_55( @@ -1524,92 +1541,160 @@ class AVFAudio { ffi.Pointer, ffi.Pointer, NSEdgeInsets)>(); late final _sel_pointValue1 = _registerName1("pointValue"); - void _objc_msgSend_59( - ffi.Pointer stret, + CGPoint _objc_msgSend_59( ffi.Pointer obj, ffi.Pointer sel, ) { return __objc_msgSend_59( - stret, obj, sel, ); } late final __objc_msgSend_59Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>( - _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); + ffi.NativeFunction< + CGPoint Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_59 = __objc_msgSend_59Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + CGPoint Function(ffi.Pointer, ffi.Pointer)>(); + + void _objc_msgSend_59_variant( + ffi.Pointer stret, + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_59_variant( + stret, + obj, + sel, + ); + } + + late final __objc_msgSend_59_variantPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend_stret'); + late final __objc_msgSend_59_variant = + __objc_msgSend_59_variantPtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); late final _sel_sizeValue1 = _registerName1("sizeValue"); - void _objc_msgSend_60( - ffi.Pointer stret, + CGSize _objc_msgSend_60( ffi.Pointer obj, ffi.Pointer sel, ) { return __objc_msgSend_60( - stret, obj, sel, ); } late final __objc_msgSend_60Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>( - _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); + ffi.NativeFunction< + CGSize Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_60 = __objc_msgSend_60Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + CGSize Function(ffi.Pointer, ffi.Pointer)>(); + + void _objc_msgSend_60_variant( + ffi.Pointer stret, + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_60_variant( + stret, + obj, + sel, + ); + } + + late final __objc_msgSend_60_variantPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend_stret'); + late final __objc_msgSend_60_variant = + __objc_msgSend_60_variantPtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); late final _sel_rectValue1 = _registerName1("rectValue"); - void _objc_msgSend_61( - ffi.Pointer stret, + CGRect _objc_msgSend_61( ffi.Pointer obj, ffi.Pointer sel, ) { return __objc_msgSend_61( - stret, obj, sel, ); } late final __objc_msgSend_61Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>( - _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); + ffi.NativeFunction< + CGRect Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_61 = __objc_msgSend_61Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + CGRect Function(ffi.Pointer, ffi.Pointer)>(); + + void _objc_msgSend_61_variant( + ffi.Pointer stret, + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_61_variant( + stret, + obj, + sel, + ); + } + + late final __objc_msgSend_61_variantPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend_stret'); + late final __objc_msgSend_61_variant = + __objc_msgSend_61_variantPtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); late final _sel_edgeInsetsValue1 = _registerName1("edgeInsetsValue"); - void _objc_msgSend_62( - ffi.Pointer stret, + NSEdgeInsets _objc_msgSend_62( ffi.Pointer obj, ffi.Pointer sel, ) { return __objc_msgSend_62( - stret, obj, sel, ); } late final __objc_msgSend_62Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>( - _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); + ffi.NativeFunction< + NSEdgeInsets Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_62 = __objc_msgSend_62Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + NSEdgeInsets Function(ffi.Pointer, ffi.Pointer)>(); + + void _objc_msgSend_62_variant( + ffi.Pointer stret, + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_62_variant( + stret, + obj, + sel, + ); + } + + late final __objc_msgSend_62_variantPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend_stret'); + late final __objc_msgSend_62_variant = + __objc_msgSend_62_variantPtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); late final _sel_keyPathsForValuesAffectingValueForKey_1 = _registerName1("keyPathsForValuesAffectingValueForKey:"); @@ -4393,13 +4478,30 @@ class AVFAudio { } late final __objc_msgSend_165Ptr = _lookup< - ffi.NativeFunction< - ffi.Double Function( - ffi.Pointer, ffi.Pointer)>>( - _objc_msgSend_useVariants1 ? 'objc_msgSend_fpret' : 'objc_msgSend'); + ffi.NativeFunction< + ffi.Double Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_165 = __objc_msgSend_165Ptr.asFunction< double Function(ffi.Pointer, ffi.Pointer)>(); + double _objc_msgSend_165_variant( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_165_variant( + obj, + sel, + ); + } + + late final __objc_msgSend_165_variantPtr = _lookup< + ffi.NativeFunction< + ffi.Double Function(ffi.Pointer, + ffi.Pointer)>>('objc_msgSend_fpret'); + late final __objc_msgSend_165_variant = + __objc_msgSend_165_variantPtr.asFunction< + double Function(ffi.Pointer, ffi.Pointer)>(); + late final _sel_initWithTimeIntervalSinceReferenceDate_1 = _registerName1("initWithTimeIntervalSinceReferenceDate:"); instancetype _objc_msgSend_166( @@ -4437,14 +4539,34 @@ class AVFAudio { } late final __objc_msgSend_167Ptr = _lookup< - ffi.NativeFunction< - ffi.Double Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>( - _objc_msgSend_useVariants1 ? 'objc_msgSend_fpret' : 'objc_msgSend'); + ffi.NativeFunction< + ffi.Double Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_167 = __objc_msgSend_167Ptr.asFunction< double Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); + double _objc_msgSend_167_variant( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer anotherDate, + ) { + return __objc_msgSend_167_variant( + obj, + sel, + anotherDate, + ); + } + + late final __objc_msgSend_167_variantPtr = _lookup< + ffi.NativeFunction< + ffi.Double Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend_fpret'); + late final __objc_msgSend_167_variant = + __objc_msgSend_167_variantPtr.asFunction< + double Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + late final _sel_timeIntervalSinceNow1 = _registerName1("timeIntervalSinceNow"); late final _sel_timeIntervalSince19701 = @@ -6304,13 +6426,30 @@ class AVFAudio { } late final __objc_msgSend_239Ptr = _lookup< - ffi.NativeFunction< - ffi.Float Function( - ffi.Pointer, ffi.Pointer)>>( - _objc_msgSend_useVariants1 ? 'objc_msgSend_fpret' : 'objc_msgSend'); + ffi.NativeFunction< + ffi.Float Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_239 = __objc_msgSend_239Ptr.asFunction< double Function(ffi.Pointer, ffi.Pointer)>(); + double _objc_msgSend_239_variant( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_239_variant( + obj, + sel, + ); + } + + late final __objc_msgSend_239_variantPtr = _lookup< + ffi.NativeFunction< + ffi.Float Function(ffi.Pointer, + ffi.Pointer)>>('objc_msgSend_fpret'); + late final __objc_msgSend_239_variant = + __objc_msgSend_239_variantPtr.asFunction< + double Function(ffi.Pointer, ffi.Pointer)>(); + late final _sel_doubleValue1 = _registerName1("doubleValue"); late final _sel_boolValue1 = _registerName1("boolValue"); late final _sel_integerValue1 = _registerName1("integerValue"); @@ -7255,8 +7394,7 @@ class AVFAudio { late final _sel_rangeOfData_options_range_1 = _registerName1("rangeOfData:options:range:"); - void _objc_msgSend_271( - ffi.Pointer<_NSRange> stret, + _NSRange _objc_msgSend_271( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer dataToFind, @@ -7264,7 +7402,6 @@ class AVFAudio { _NSRange searchRange, ) { return __objc_msgSend_271( - stret, obj, sel, dataToFind, @@ -7274,18 +7411,44 @@ class AVFAudio { } late final __objc_msgSend_271Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange)>>( - _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); + ffi.NativeFunction< + _NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32, _NSRange)>>('objc_msgSend'); late final __objc_msgSend_271 = __objc_msgSend_271Ptr.asFunction< - void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, ffi.Pointer, int, _NSRange)>(); + _NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, _NSRange)>(); + + void _objc_msgSend_271_variant( + ffi.Pointer<_NSRange> stret, + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer dataToFind, + int mask, + _NSRange searchRange, + ) { + return __objc_msgSend_271_variant( + stret, + obj, + sel, + dataToFind, + mask, + searchRange, + ); + } + + late final __objc_msgSend_271_variantPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange)>>('objc_msgSend_stret'); + late final __objc_msgSend_271_variant = + __objc_msgSend_271_variantPtr.asFunction< + void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, ffi.Pointer, int, _NSRange)>(); late final _sel_enumerateByteRangesUsingBlock_1 = _registerName1("enumerateByteRangesUsingBlock:"); @@ -8200,14 +8363,34 @@ class AVFAudio { } late final __objc_msgSend_307Ptr = _lookup< - ffi.NativeFunction< - ffi.Float Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>( - _objc_msgSend_useVariants1 ? 'objc_msgSend_fpret' : 'objc_msgSend'); + ffi.NativeFunction< + ffi.Float Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_307 = __objc_msgSend_307Ptr.asFunction< double Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); + double _objc_msgSend_307_variant( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer key, + ) { + return __objc_msgSend_307_variant( + obj, + sel, + key, + ); + } + + late final __objc_msgSend_307_variantPtr = _lookup< + ffi.NativeFunction< + ffi.Float Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend_fpret'); + late final __objc_msgSend_307_variant = + __objc_msgSend_307_variantPtr.asFunction< + double Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + late final _sel_decodeDoubleForKey_1 = _registerName1("decodeDoubleForKey:"); double _objc_msgSend_308( ffi.Pointer obj, @@ -8222,14 +8405,34 @@ class AVFAudio { } late final __objc_msgSend_308Ptr = _lookup< - ffi.NativeFunction< - ffi.Double Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>( - _objc_msgSend_useVariants1 ? 'objc_msgSend_fpret' : 'objc_msgSend'); + ffi.NativeFunction< + ffi.Double Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_308 = __objc_msgSend_308Ptr.asFunction< double Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); + double _objc_msgSend_308_variant( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer key, + ) { + return __objc_msgSend_308_variant( + obj, + sel, + key, + ); + } + + late final __objc_msgSend_308_variantPtr = _lookup< + ffi.NativeFunction< + ffi.Double Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend_fpret'); + late final __objc_msgSend_308_variant = + __objc_msgSend_308_variantPtr.asFunction< + double Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + late final _sel_decodeBytesForKey_returnedLength_1 = _registerName1("decodeBytesForKey:returnedLength:"); ffi.Pointer _objc_msgSend_309( @@ -8762,14 +8965,12 @@ class AVFAudio { ffi.Pointer)>(); late final _sel_decodePointForKey_1 = _registerName1("decodePointForKey:"); - void _objc_msgSend_329( - ffi.Pointer stret, + CGPoint _objc_msgSend_329( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer key, ) { return __objc_msgSend_329( - stret, obj, sel, key, @@ -8777,23 +8978,46 @@ class AVFAudio { } late final __objc_msgSend_329Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>( - _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); + ffi.NativeFunction< + CGPoint Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_329 = __objc_msgSend_329Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + CGPoint Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + void _objc_msgSend_329_variant( + ffi.Pointer stret, + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer key, + ) { + return __objc_msgSend_329_variant( + stret, + obj, + sel, + key, + ); + } + + late final __objc_msgSend_329_variantPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend_stret'); + late final __objc_msgSend_329_variant = + __objc_msgSend_329_variantPtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); late final _sel_decodeSizeForKey_1 = _registerName1("decodeSizeForKey:"); - void _objc_msgSend_330( - ffi.Pointer stret, + CGSize _objc_msgSend_330( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer key, ) { return __objc_msgSend_330( - stret, obj, sel, key, @@ -8801,23 +9025,46 @@ class AVFAudio { } late final __objc_msgSend_330Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>( - _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); + ffi.NativeFunction< + CGSize Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_330 = __objc_msgSend_330Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + CGSize Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + void _objc_msgSend_330_variant( + ffi.Pointer stret, + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer key, + ) { + return __objc_msgSend_330_variant( + stret, + obj, + sel, + key, + ); + } + + late final __objc_msgSend_330_variantPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend_stret'); + late final __objc_msgSend_330_variant = + __objc_msgSend_330_variantPtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); late final _sel_decodeRectForKey_1 = _registerName1("decodeRectForKey:"); - void _objc_msgSend_331( - ffi.Pointer stret, + CGRect _objc_msgSend_331( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer key, ) { return __objc_msgSend_331( - stret, obj, sel, key, @@ -8825,13 +9072,38 @@ class AVFAudio { } late final __objc_msgSend_331Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>( - _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); + ffi.NativeFunction< + CGRect Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_331 = __objc_msgSend_331Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + CGRect Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + void _objc_msgSend_331_variant( + ffi.Pointer stret, + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer key, + ) { + return __objc_msgSend_331_variant( + stret, + obj, + sel, + key, + ); + } + + late final __objc_msgSend_331_variantPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend_stret'); + late final __objc_msgSend_331_variant = + __objc_msgSend_331_variantPtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); late final _sel_substringFromIndex_1 = _registerName1("substringFromIndex:"); ffi.Pointer _objc_msgSend_332( @@ -9046,14 +9318,12 @@ class AVFAudio { _registerName1("localizedStandardContainsString:"); late final _sel_localizedStandardRangeOfString_1 = _registerName1("localizedStandardRangeOfString:"); - void _objc_msgSend_340( - ffi.Pointer<_NSRange> stret, + _NSRange _objc_msgSend_340( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer str, ) { return __objc_msgSend_340( - stret, obj, sel, str, @@ -9061,26 +9331,49 @@ class AVFAudio { } late final __objc_msgSend_340Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>( - _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); + ffi.NativeFunction< + _NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_340 = __objc_msgSend_340Ptr.asFunction< - void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + _NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + void _objc_msgSend_340_variant( + ffi.Pointer<_NSRange> stret, + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer str, + ) { + return __objc_msgSend_340_variant( + stret, + obj, + sel, + str, + ); + } + + late final __objc_msgSend_340_variantPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend_stret'); + late final __objc_msgSend_340_variant = + __objc_msgSend_340_variantPtr.asFunction< + void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); late final _sel_rangeOfString_1 = _registerName1("rangeOfString:"); late final _sel_rangeOfString_options_1 = _registerName1("rangeOfString:options:"); - void _objc_msgSend_341( - ffi.Pointer<_NSRange> stret, + _NSRange _objc_msgSend_341( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer searchString, int mask, ) { return __objc_msgSend_341( - stret, obj, sel, searchString, @@ -9089,18 +9382,45 @@ class AVFAudio { } late final __objc_msgSend_341Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, ffi.Pointer, ffi.Int32)>>( - _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); + ffi.NativeFunction< + _NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32)>>('objc_msgSend'); late final __objc_msgSend_341 = __objc_msgSend_341Ptr.asFunction< - void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, ffi.Pointer, int)>(); + _NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); + + void _objc_msgSend_341_variant( + ffi.Pointer<_NSRange> stret, + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer searchString, + int mask, + ) { + return __objc_msgSend_341_variant( + stret, + obj, + sel, + searchString, + mask, + ); + } + + late final __objc_msgSend_341_variantPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>('objc_msgSend_stret'); + late final __objc_msgSend_341_variant = + __objc_msgSend_341_variantPtr.asFunction< + void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, ffi.Pointer, int)>(); late final _sel_rangeOfString_options_range_1 = _registerName1("rangeOfString:options:range:"); - void _objc_msgSend_342( - ffi.Pointer<_NSRange> stret, + _NSRange _objc_msgSend_342( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer searchString, @@ -9108,7 +9428,6 @@ class AVFAudio { _NSRange rangeOfReceiverToSearch, ) { return __objc_msgSend_342( - stret, obj, sel, searchString, @@ -9118,23 +9437,48 @@ class AVFAudio { } late final __objc_msgSend_342Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange)>>( - _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); + ffi.NativeFunction< + _NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32, _NSRange)>>('objc_msgSend'); late final __objc_msgSend_342 = __objc_msgSend_342Ptr.asFunction< - void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, ffi.Pointer, int, _NSRange)>(); + _NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, _NSRange)>(); + + void _objc_msgSend_342_variant( + ffi.Pointer<_NSRange> stret, + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer searchString, + int mask, + _NSRange rangeOfReceiverToSearch, + ) { + return __objc_msgSend_342_variant( + stret, + obj, + sel, + searchString, + mask, + rangeOfReceiverToSearch, + ); + } + + late final __objc_msgSend_342_variantPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange)>>('objc_msgSend_stret'); + late final __objc_msgSend_342_variant = + __objc_msgSend_342_variantPtr.asFunction< + void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, ffi.Pointer, int, _NSRange)>(); late final _sel_rangeOfString_options_range_locale_1 = _registerName1("rangeOfString:options:range:locale:"); - void _objc_msgSend_343( - ffi.Pointer<_NSRange> stret, + _NSRange _objc_msgSend_343( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer searchString, @@ -9143,7 +9487,6 @@ class AVFAudio { ffi.Pointer locale, ) { return __objc_msgSend_343( - stret, obj, sel, searchString, @@ -9154,36 +9497,67 @@ class AVFAudio { } late final __objc_msgSend_343Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange, - ffi.Pointer)>>( - _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); + ffi.NativeFunction< + _NSRange Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange, + ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_343 = __objc_msgSend_343Ptr.asFunction< - void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - _NSRange, - ffi.Pointer)>(); + _NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, _NSRange, ffi.Pointer)>(); + + void _objc_msgSend_343_variant( + ffi.Pointer<_NSRange> stret, + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer searchString, + int mask, + _NSRange rangeOfReceiverToSearch, + ffi.Pointer locale, + ) { + return __objc_msgSend_343_variant( + stret, + obj, + sel, + searchString, + mask, + rangeOfReceiverToSearch, + locale, + ); + } + + late final __objc_msgSend_343_variantPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange, + ffi.Pointer)>>('objc_msgSend_stret'); + late final __objc_msgSend_343_variant = + __objc_msgSend_343_variantPtr.asFunction< + void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + _NSRange, + ffi.Pointer)>(); late final _sel_rangeOfCharacterFromSet_1 = _registerName1("rangeOfCharacterFromSet:"); - void _objc_msgSend_344( - ffi.Pointer<_NSRange> stret, + _NSRange _objc_msgSend_344( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer searchSet, ) { return __objc_msgSend_344( - stret, obj, sel, searchSet, @@ -9191,25 +9565,48 @@ class AVFAudio { } late final __objc_msgSend_344Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>( - _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); + ffi.NativeFunction< + _NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_344 = __objc_msgSend_344Ptr.asFunction< - void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + _NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + void _objc_msgSend_344_variant( + ffi.Pointer<_NSRange> stret, + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer searchSet, + ) { + return __objc_msgSend_344_variant( + stret, + obj, + sel, + searchSet, + ); + } + + late final __objc_msgSend_344_variantPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend_stret'); + late final __objc_msgSend_344_variant = + __objc_msgSend_344_variantPtr.asFunction< + void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); late final _sel_rangeOfCharacterFromSet_options_1 = _registerName1("rangeOfCharacterFromSet:options:"); - void _objc_msgSend_345( - ffi.Pointer<_NSRange> stret, + _NSRange _objc_msgSend_345( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer searchSet, int mask, ) { return __objc_msgSend_345( - stret, obj, sel, searchSet, @@ -9218,18 +9615,45 @@ class AVFAudio { } late final __objc_msgSend_345Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, ffi.Pointer, ffi.Int32)>>( - _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); + ffi.NativeFunction< + _NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32)>>('objc_msgSend'); late final __objc_msgSend_345 = __objc_msgSend_345Ptr.asFunction< - void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, ffi.Pointer, int)>(); + _NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); + + void _objc_msgSend_345_variant( + ffi.Pointer<_NSRange> stret, + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer searchSet, + int mask, + ) { + return __objc_msgSend_345_variant( + stret, + obj, + sel, + searchSet, + mask, + ); + } + + late final __objc_msgSend_345_variantPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>('objc_msgSend_stret'); + late final __objc_msgSend_345_variant = + __objc_msgSend_345_variantPtr.asFunction< + void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, ffi.Pointer, int)>(); late final _sel_rangeOfCharacterFromSet_options_range_1 = _registerName1("rangeOfCharacterFromSet:options:range:"); - void _objc_msgSend_346( - ffi.Pointer<_NSRange> stret, + _NSRange _objc_msgSend_346( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer searchSet, @@ -9237,7 +9661,6 @@ class AVFAudio { _NSRange rangeOfReceiverToSearch, ) { return __objc_msgSend_346( - stret, obj, sel, searchSet, @@ -9247,29 +9670,53 @@ class AVFAudio { } late final __objc_msgSend_346Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange)>>( - _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); + ffi.NativeFunction< + _NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32, _NSRange)>>('objc_msgSend'); late final __objc_msgSend_346 = __objc_msgSend_346Ptr.asFunction< - void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, ffi.Pointer, int, _NSRange)>(); + _NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, _NSRange)>(); + + void _objc_msgSend_346_variant( + ffi.Pointer<_NSRange> stret, + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer searchSet, + int mask, + _NSRange rangeOfReceiverToSearch, + ) { + return __objc_msgSend_346_variant( + stret, + obj, + sel, + searchSet, + mask, + rangeOfReceiverToSearch, + ); + } + + late final __objc_msgSend_346_variantPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange)>>('objc_msgSend_stret'); + late final __objc_msgSend_346_variant = + __objc_msgSend_346_variantPtr.asFunction< + void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, ffi.Pointer, int, _NSRange)>(); late final _sel_rangeOfComposedCharacterSequenceAtIndex_1 = _registerName1("rangeOfComposedCharacterSequenceAtIndex:"); - void _objc_msgSend_347( - ffi.Pointer<_NSRange> stret, + _NSRange _objc_msgSend_347( ffi.Pointer obj, ffi.Pointer sel, int index, ) { return __objc_msgSend_347( - stret, obj, sel, index, @@ -9277,24 +9724,43 @@ class AVFAudio { } late final __objc_msgSend_347Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>( - _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); + ffi.NativeFunction< + _NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.UnsignedLong)>>('objc_msgSend'); late final __objc_msgSend_347 = __objc_msgSend_347Ptr.asFunction< - void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, int)>(); + _NSRange Function(ffi.Pointer, ffi.Pointer, int)>(); + + void _objc_msgSend_347_variant( + ffi.Pointer<_NSRange> stret, + ffi.Pointer obj, + ffi.Pointer sel, + int index, + ) { + return __objc_msgSend_347_variant( + stret, + obj, + sel, + index, + ); + } + + late final __objc_msgSend_347_variantPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend_stret'); + late final __objc_msgSend_347_variant = + __objc_msgSend_347_variantPtr.asFunction< + void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, int)>(); late final _sel_rangeOfComposedCharacterSequencesForRange_1 = _registerName1("rangeOfComposedCharacterSequencesForRange:"); - void _objc_msgSend_348( - ffi.Pointer<_NSRange> stret, + _NSRange _objc_msgSend_348( ffi.Pointer obj, ffi.Pointer sel, _NSRange range, ) { return __objc_msgSend_348( - stret, obj, sel, range, @@ -9302,13 +9768,35 @@ class AVFAudio { } late final __objc_msgSend_348Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, _NSRange)>>( - _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); + ffi.NativeFunction< + _NSRange Function(ffi.Pointer, ffi.Pointer, + _NSRange)>>('objc_msgSend'); late final __objc_msgSend_348 = __objc_msgSend_348Ptr.asFunction< - void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, _NSRange)>(); + _NSRange Function( + ffi.Pointer, ffi.Pointer, _NSRange)>(); + + void _objc_msgSend_348_variant( + ffi.Pointer<_NSRange> stret, + ffi.Pointer obj, + ffi.Pointer sel, + _NSRange range, + ) { + return __objc_msgSend_348_variant( + stret, + obj, + sel, + range, + ); + } + + late final __objc_msgSend_348_variantPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, _NSRange)>>('objc_msgSend_stret'); + late final __objc_msgSend_348_variant = + __objc_msgSend_348_variantPtr.asFunction< + void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, _NSRange)>(); late final _sel_stringByAppendingString_1 = _registerName1("stringByAppendingString:"); @@ -21313,14 +21801,12 @@ class AVFAudio { late final _sel_AMSymbol1 = _registerName1("AMSymbol"); late final _sel_PMSymbol1 = _registerName1("PMSymbol"); late final _sel_minimumRangeOfUnit_1 = _registerName1("minimumRangeOfUnit:"); - void _objc_msgSend_767( - ffi.Pointer<_NSRange> stret, + _NSRange _objc_msgSend_767( ffi.Pointer obj, ffi.Pointer sel, int unit, ) { return __objc_msgSend_767( - stret, obj, sel, unit, @@ -21328,19 +21814,39 @@ class AVFAudio { } late final __objc_msgSend_767Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, ffi.Int32)>>( - _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); + ffi.NativeFunction< + _NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); late final __objc_msgSend_767 = __objc_msgSend_767Ptr.asFunction< - void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, int)>(); + _NSRange Function(ffi.Pointer, ffi.Pointer, int)>(); + + void _objc_msgSend_767_variant( + ffi.Pointer<_NSRange> stret, + ffi.Pointer obj, + ffi.Pointer sel, + int unit, + ) { + return __objc_msgSend_767_variant( + stret, + obj, + sel, + unit, + ); + } + + late final __objc_msgSend_767_variantPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, ffi.Int32)>>('objc_msgSend_stret'); + late final __objc_msgSend_767_variant = + __objc_msgSend_767_variantPtr.asFunction< + void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, int)>(); late final _sel_maximumRangeOfUnit_1 = _registerName1("maximumRangeOfUnit:"); late final _sel_rangeOfUnit_inUnit_forDate_1 = _registerName1("rangeOfUnit:inUnit:forDate:"); - void _objc_msgSend_768( - ffi.Pointer<_NSRange> stret, + _NSRange _objc_msgSend_768( ffi.Pointer obj, ffi.Pointer sel, int smaller, @@ -21348,7 +21854,6 @@ class AVFAudio { ffi.Pointer date, ) { return __objc_msgSend_768( - stret, obj, sel, smaller, @@ -21358,18 +21863,44 @@ class AVFAudio { } late final __objc_msgSend_768Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Int32, - ffi.Pointer)>>( - _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); + ffi.NativeFunction< + _NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Int32, ffi.Int32, ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_768 = __objc_msgSend_768Ptr.asFunction< - void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, int, int, ffi.Pointer)>(); + _NSRange Function(ffi.Pointer, ffi.Pointer, int, int, + ffi.Pointer)>(); + + void _objc_msgSend_768_variant( + ffi.Pointer<_NSRange> stret, + ffi.Pointer obj, + ffi.Pointer sel, + int smaller, + int larger, + ffi.Pointer date, + ) { + return __objc_msgSend_768_variant( + stret, + obj, + sel, + smaller, + larger, + date, + ); + } + + late final __objc_msgSend_768_variantPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Int32, + ffi.Pointer)>>('objc_msgSend_stret'); + late final __objc_msgSend_768_variant = + __objc_msgSend_768_variantPtr.asFunction< + void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, int, int, ffi.Pointer)>(); late final _sel_ordinalityOfUnit_inUnit_forDate_1 = _registerName1("ordinalityOfUnit:inUnit:forDate:"); @@ -26196,27 +26727,47 @@ class AVFAudio { _registerName1("operatingSystemVersionString"); late final _sel_operatingSystemVersion1 = _registerName1("operatingSystemVersion"); - void _objc_msgSend_940( - ffi.Pointer stret, + NSOperatingSystemVersion _objc_msgSend_940( ffi.Pointer obj, ffi.Pointer sel, ) { return __objc_msgSend_940( - stret, obj, sel, ); } late final __objc_msgSend_940Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>( - _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); + ffi.NativeFunction< + NSOperatingSystemVersion Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_940 = __objc_msgSend_940Ptr.asFunction< - void Function(ffi.Pointer, + NSOperatingSystemVersion Function( ffi.Pointer, ffi.Pointer)>(); + void _objc_msgSend_940_variant( + ffi.Pointer stret, + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_940_variant( + stret, + obj, + sel, + ); + } + + late final __objc_msgSend_940_variantPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend_stret'); + late final __objc_msgSend_940_variant = + __objc_msgSend_940_variantPtr.asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + late final _sel_processorCount1 = _registerName1("processorCount"); late final _sel_activeProcessorCount1 = _registerName1("activeProcessorCount"); @@ -26626,8 +27177,7 @@ class AVFAudio { late final _sel_rangeOfFirstMatchInString_options_range_1 = _registerName1("rangeOfFirstMatchInString:options:range:"); - void _objc_msgSend_955( - ffi.Pointer<_NSRange> stret, + _NSRange _objc_msgSend_955( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer string, @@ -26635,7 +27185,6 @@ class AVFAudio { _NSRange range, ) { return __objc_msgSend_955( - stret, obj, sel, string, @@ -26645,18 +27194,44 @@ class AVFAudio { } late final __objc_msgSend_955Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange)>>( - _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); + ffi.NativeFunction< + _NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32, _NSRange)>>('objc_msgSend'); late final __objc_msgSend_955 = __objc_msgSend_955Ptr.asFunction< - void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, ffi.Pointer, int, _NSRange)>(); + _NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, _NSRange)>(); + + void _objc_msgSend_955_variant( + ffi.Pointer<_NSRange> stret, + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer string, + int options, + _NSRange range, + ) { + return __objc_msgSend_955_variant( + stret, + obj, + sel, + string, + options, + range, + ); + } + + late final __objc_msgSend_955_variantPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange)>>('objc_msgSend_stret'); + late final __objc_msgSend_955_variant = + __objc_msgSend_955_variantPtr.asFunction< + void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, ffi.Pointer, int, _NSRange)>(); late final _sel_stringByReplacingMatchesInString_options_range_withTemplate_1 = _registerName1( @@ -33168,13 +33743,33 @@ class AVFAudio { } late final __objc_msgSend_1193Ptr = _lookup< - ffi.NativeFunction< - ffi.Float Function(ffi.Pointer, ffi.Pointer, - ffi.UnsignedLong)>>( - _objc_msgSend_useVariants1 ? 'objc_msgSend_fpret' : 'objc_msgSend'); + ffi.NativeFunction< + ffi.Float Function(ffi.Pointer, ffi.Pointer, + ffi.UnsignedLong)>>('objc_msgSend'); late final __objc_msgSend_1193 = __objc_msgSend_1193Ptr.asFunction< double Function(ffi.Pointer, ffi.Pointer, int)>(); + double _objc_msgSend_1193_variant( + ffi.Pointer obj, + ffi.Pointer sel, + int channelNumber, + ) { + return __objc_msgSend_1193_variant( + obj, + sel, + channelNumber, + ); + } + + late final __objc_msgSend_1193_variantPtr = _lookup< + ffi.NativeFunction< + ffi.Float Function(ffi.Pointer, ffi.Pointer, + ffi.UnsignedLong)>>('objc_msgSend_fpret'); + late final __objc_msgSend_1193_variant = + __objc_msgSend_1193_variantPtr.asFunction< + double Function( + ffi.Pointer, ffi.Pointer, int)>(); + late final _sel_averagePowerForChannel_1 = _registerName1("averagePowerForChannel:"); late final _sel_channelAssignments1 = _registerName1("channelAssignments"); @@ -35173,25 +35768,46 @@ class NSString extends NSObject { void localizedStandardRangeOfString_( ffi.Pointer<_NSRange> stret, NSString str) { - _lib._objc_msgSend_340( - stret, _id, _lib._sel_localizedStandardRangeOfString_1, str._id); + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_340_variant( + stret, _id, _lib._sel_localizedStandardRangeOfString_1, str._id) + : stret.ref = _lib._objc_msgSend_340( + _id, _lib._sel_localizedStandardRangeOfString_1, str._id); } void rangeOfString_(ffi.Pointer<_NSRange> stret, NSString searchString) { - _lib._objc_msgSend_340( - stret, _id, _lib._sel_rangeOfString_1, searchString._id); + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_340_variant( + stret, _id, _lib._sel_rangeOfString_1, searchString._id) + : stret.ref = _lib._objc_msgSend_340( + _id, _lib._sel_rangeOfString_1, searchString._id); } void rangeOfString_options_( ffi.Pointer<_NSRange> stret, NSString searchString, int mask) { - _lib._objc_msgSend_341( - stret, _id, _lib._sel_rangeOfString_options_1, searchString._id, mask); + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_341_variant(stret, _id, + _lib._sel_rangeOfString_options_1, searchString._id, mask) + : stret.ref = _lib._objc_msgSend_341( + _id, _lib._sel_rangeOfString_options_1, searchString._id, mask); } void rangeOfString_options_range_(ffi.Pointer<_NSRange> stret, NSString searchString, int mask, _NSRange rangeOfReceiverToSearch) { - _lib._objc_msgSend_342(stret, _id, _lib._sel_rangeOfString_options_range_1, - searchString._id, mask, rangeOfReceiverToSearch); + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_342_variant( + stret, + _id, + _lib._sel_rangeOfString_options_range_1, + searchString._id, + mask, + rangeOfReceiverToSearch) + : stret.ref = _lib._objc_msgSend_342( + _id, + _lib._sel_rangeOfString_options_range_1, + searchString._id, + mask, + rangeOfReceiverToSearch); } void rangeOfString_options_range_locale_( @@ -35200,49 +35816,76 @@ class NSString extends NSObject { int mask, _NSRange rangeOfReceiverToSearch, NSLocale? locale) { - _lib._objc_msgSend_343( - stret, - _id, - _lib._sel_rangeOfString_options_range_locale_1, - searchString._id, - mask, - rangeOfReceiverToSearch, - locale?._id ?? ffi.nullptr); + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_343_variant( + stret, + _id, + _lib._sel_rangeOfString_options_range_locale_1, + searchString._id, + mask, + rangeOfReceiverToSearch, + locale?._id ?? ffi.nullptr) + : stret.ref = _lib._objc_msgSend_343( + _id, + _lib._sel_rangeOfString_options_range_locale_1, + searchString._id, + mask, + rangeOfReceiverToSearch, + locale?._id ?? ffi.nullptr); } void rangeOfCharacterFromSet_( ffi.Pointer<_NSRange> stret, NSCharacterSet searchSet) { - _lib._objc_msgSend_344( - stret, _id, _lib._sel_rangeOfCharacterFromSet_1, searchSet._id); + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_344_variant( + stret, _id, _lib._sel_rangeOfCharacterFromSet_1, searchSet._id) + : stret.ref = _lib._objc_msgSend_344( + _id, _lib._sel_rangeOfCharacterFromSet_1, searchSet._id); } void rangeOfCharacterFromSet_options_( ffi.Pointer<_NSRange> stret, NSCharacterSet searchSet, int mask) { - _lib._objc_msgSend_345(stret, _id, - _lib._sel_rangeOfCharacterFromSet_options_1, searchSet._id, mask); + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_345_variant(stret, _id, + _lib._sel_rangeOfCharacterFromSet_options_1, searchSet._id, mask) + : stret.ref = _lib._objc_msgSend_345(_id, + _lib._sel_rangeOfCharacterFromSet_options_1, searchSet._id, mask); } void rangeOfCharacterFromSet_options_range_(ffi.Pointer<_NSRange> stret, NSCharacterSet searchSet, int mask, _NSRange rangeOfReceiverToSearch) { - _lib._objc_msgSend_346( - stret, - _id, - _lib._sel_rangeOfCharacterFromSet_options_range_1, - searchSet._id, - mask, - rangeOfReceiverToSearch); + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_346_variant( + stret, + _id, + _lib._sel_rangeOfCharacterFromSet_options_range_1, + searchSet._id, + mask, + rangeOfReceiverToSearch) + : stret.ref = _lib._objc_msgSend_346( + _id, + _lib._sel_rangeOfCharacterFromSet_options_range_1, + searchSet._id, + mask, + rangeOfReceiverToSearch); } void rangeOfComposedCharacterSequenceAtIndex_( ffi.Pointer<_NSRange> stret, int index) { - _lib._objc_msgSend_347( - stret, _id, _lib._sel_rangeOfComposedCharacterSequenceAtIndex_1, index); + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_347_variant(stret, _id, + _lib._sel_rangeOfComposedCharacterSequenceAtIndex_1, index) + : stret.ref = _lib._objc_msgSend_347( + _id, _lib._sel_rangeOfComposedCharacterSequenceAtIndex_1, index); } void rangeOfComposedCharacterSequencesForRange_( ffi.Pointer<_NSRange> stret, _NSRange range) { - _lib._objc_msgSend_348(stret, _id, - _lib._sel_rangeOfComposedCharacterSequencesForRange_1, range); + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_348_variant(stret, _id, + _lib._sel_rangeOfComposedCharacterSequencesForRange_1, range) + : stret.ref = _lib._objc_msgSend_348( + _id, _lib._sel_rangeOfComposedCharacterSequencesForRange_1, range); } NSString stringByAppendingString_(NSString aString) { @@ -35258,11 +35901,15 @@ class NSString extends NSObject { } double get doubleValue { - return _lib._objc_msgSend_165(_id, _lib._sel_doubleValue1); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_165_variant(_id, _lib._sel_doubleValue1) + : _lib._objc_msgSend_165(_id, _lib._sel_doubleValue1); } double get floatValue { - return _lib._objc_msgSend_239(_id, _lib._sel_floatValue1); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_239_variant(_id, _lib._sel_floatValue1) + : _lib._objc_msgSend_239(_id, _lib._sel_floatValue1); } int get intValue { @@ -35347,7 +35994,11 @@ class NSString extends NSObject { } void lineRangeForRange_(ffi.Pointer<_NSRange> stret, _NSRange range) { - _lib._objc_msgSend_348(stret, _id, _lib._sel_lineRangeForRange_1, range); + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_348_variant( + stret, _id, _lib._sel_lineRangeForRange_1, range) + : stret.ref = + _lib._objc_msgSend_348(_id, _lib._sel_lineRangeForRange_1, range); } void getParagraphStart_end_contentsEnd_forRange_( @@ -35365,8 +36016,11 @@ class NSString extends NSObject { } void paragraphRangeForRange_(ffi.Pointer<_NSRange> stret, _NSRange range) { - _lib._objc_msgSend_348( - stret, _id, _lib._sel_paragraphRangeForRange_1, range); + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_348_variant( + stret, _id, _lib._sel_paragraphRangeForRange_1, range) + : stret.ref = _lib._objc_msgSend_348( + _id, _lib._sel_paragraphRangeForRange_1, range); } void enumerateSubstringsInRange_options_usingBlock_(_NSRange range, int opts, @@ -36656,11 +37310,17 @@ class NSCoder extends NSObject { } double decodeFloatForKey_(NSString key) { - return _lib._objc_msgSend_307(_id, _lib._sel_decodeFloatForKey_1, key._id); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_307_variant( + _id, _lib._sel_decodeFloatForKey_1, key._id) + : _lib._objc_msgSend_307(_id, _lib._sel_decodeFloatForKey_1, key._id); } double decodeDoubleForKey_(NSString key) { - return _lib._objc_msgSend_308(_id, _lib._sel_decodeDoubleForKey_1, key._id); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_308_variant( + _id, _lib._sel_decodeDoubleForKey_1, key._id) + : _lib._objc_msgSend_308(_id, _lib._sel_decodeDoubleForKey_1, key._id); } ffi.Pointer decodeBytesForKey_returnedLength_( @@ -36822,7 +37482,9 @@ class NSCoder extends NSObject { } void decodePoint(ffi.Pointer stret) { - _lib._objc_msgSend_59(stret, _id, _lib._sel_decodePoint1); + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_59_variant(stret, _id, _lib._sel_decodePoint1) + : stret.ref = _lib._objc_msgSend_59(_id, _lib._sel_decodePoint1); } void encodeSize_(CGSize size) { @@ -36830,7 +37492,9 @@ class NSCoder extends NSObject { } void decodeSize(ffi.Pointer stret) { - _lib._objc_msgSend_60(stret, _id, _lib._sel_decodeSize1); + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_60_variant(stret, _id, _lib._sel_decodeSize1) + : stret.ref = _lib._objc_msgSend_60(_id, _lib._sel_decodeSize1); } void encodeRect_(CGRect rect) { @@ -36838,7 +37502,9 @@ class NSCoder extends NSObject { } void decodeRect(ffi.Pointer stret) { - _lib._objc_msgSend_61(stret, _id, _lib._sel_decodeRect1); + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_61_variant(stret, _id, _lib._sel_decodeRect1) + : stret.ref = _lib._objc_msgSend_61(_id, _lib._sel_decodeRect1); } void encodePoint_forKey_(CGPoint point, NSString key) { @@ -36854,15 +37520,27 @@ class NSCoder extends NSObject { } void decodePointForKey_(ffi.Pointer stret, NSString key) { - _lib._objc_msgSend_329(stret, _id, _lib._sel_decodePointForKey_1, key._id); + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_329_variant( + stret, _id, _lib._sel_decodePointForKey_1, key._id) + : stret.ref = + _lib._objc_msgSend_329(_id, _lib._sel_decodePointForKey_1, key._id); } void decodeSizeForKey_(ffi.Pointer stret, NSString key) { - _lib._objc_msgSend_330(stret, _id, _lib._sel_decodeSizeForKey_1, key._id); + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_330_variant( + stret, _id, _lib._sel_decodeSizeForKey_1, key._id) + : stret.ref = + _lib._objc_msgSend_330(_id, _lib._sel_decodeSizeForKey_1, key._id); } void decodeRectForKey_(ffi.Pointer stret, NSString key) { - _lib._objc_msgSend_331(stret, _id, _lib._sel_decodeRectForKey_1, key._id); + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_331_variant( + stret, _id, _lib._sel_decodeRectForKey_1, key._id) + : stret.ref = + _lib._objc_msgSend_331(_id, _lib._sel_decodeRectForKey_1, key._id); } @override @@ -37028,8 +37706,20 @@ class NSData extends NSObject { void rangeOfData_options_range_(ffi.Pointer<_NSRange> stret, NSData dataToFind, int mask, _NSRange searchRange) { - _lib._objc_msgSend_271(stret, _id, _lib._sel_rangeOfData_options_range_1, - dataToFind._id, mask, searchRange); + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_271_variant( + stret, + _id, + _lib._sel_rangeOfData_options_range_1, + dataToFind._id, + mask, + searchRange) + : stret.ref = _lib._objc_msgSend_271( + _id, + _lib._sel_rangeOfData_options_range_1, + dataToFind._id, + mask, + searchRange); } void enumerateByteRangesUsingBlock_( @@ -38320,11 +39010,15 @@ class NSNumber extends NSValue { } double get floatValue { - return _lib._objc_msgSend_239(_id, _lib._sel_floatValue1); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_239_variant(_id, _lib._sel_floatValue1) + : _lib._objc_msgSend_239(_id, _lib._sel_floatValue1); } double get doubleValue { - return _lib._objc_msgSend_165(_id, _lib._sel_doubleValue1); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_165_variant(_id, _lib._sel_doubleValue1) + : _lib._objc_msgSend_165(_id, _lib._sel_doubleValue1); } bool get boolValue { @@ -38699,7 +39393,9 @@ class NSValue extends NSObject { } void getRangeValue(ffi.Pointer<_NSRange> stret) { - _lib._objc_msgSend_54(stret, _id, _lib._sel_rangeValue1); + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_54_variant(stret, _id, _lib._sel_rangeValue1) + : stret.ref = _lib._objc_msgSend_54(_id, _lib._sel_rangeValue1); } static NSValue valueWithPoint_(AVFAudio _lib, CGPoint point) { @@ -38727,19 +39423,27 @@ class NSValue extends NSObject { } void getPointValue(ffi.Pointer stret) { - _lib._objc_msgSend_59(stret, _id, _lib._sel_pointValue1); + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_59_variant(stret, _id, _lib._sel_pointValue1) + : stret.ref = _lib._objc_msgSend_59(_id, _lib._sel_pointValue1); } void getSizeValue(ffi.Pointer stret) { - _lib._objc_msgSend_60(stret, _id, _lib._sel_sizeValue1); + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_60_variant(stret, _id, _lib._sel_sizeValue1) + : stret.ref = _lib._objc_msgSend_60(_id, _lib._sel_sizeValue1); } void getRectValue(ffi.Pointer stret) { - _lib._objc_msgSend_61(stret, _id, _lib._sel_rectValue1); + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_61_variant(stret, _id, _lib._sel_rectValue1) + : stret.ref = _lib._objc_msgSend_61(_id, _lib._sel_rectValue1); } void getEdgeInsetsValue(ffi.Pointer stret) { - _lib._objc_msgSend_62(stret, _id, _lib._sel_edgeInsetsValue1); + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_62_variant(stret, _id, _lib._sel_edgeInsetsValue1) + : stret.ref = _lib._objc_msgSend_62(_id, _lib._sel_edgeInsetsValue1); } @override @@ -42112,8 +42816,11 @@ class NSDate extends NSObject { } double get timeIntervalSinceReferenceDate { - return _lib._objc_msgSend_165( - _id, _lib._sel_timeIntervalSinceReferenceDate1); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_165_variant( + _id, _lib._sel_timeIntervalSinceReferenceDate1) + : _lib._objc_msgSend_165( + _id, _lib._sel_timeIntervalSinceReferenceDate1); } @override @@ -42137,16 +42844,23 @@ class NSDate extends NSObject { } double timeIntervalSinceDate_(NSDate anotherDate) { - return _lib._objc_msgSend_167( - _id, _lib._sel_timeIntervalSinceDate_1, anotherDate._id); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_167_variant( + _id, _lib._sel_timeIntervalSinceDate_1, anotherDate._id) + : _lib._objc_msgSend_167( + _id, _lib._sel_timeIntervalSinceDate_1, anotherDate._id); } double get timeIntervalSinceNow { - return _lib._objc_msgSend_165(_id, _lib._sel_timeIntervalSinceNow1); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_165_variant(_id, _lib._sel_timeIntervalSinceNow1) + : _lib._objc_msgSend_165(_id, _lib._sel_timeIntervalSinceNow1); } double get timeIntervalSince1970 { - return _lib._objc_msgSend_165(_id, _lib._sel_timeIntervalSince19701); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_165_variant(_id, _lib._sel_timeIntervalSince19701) + : _lib._objc_msgSend_165(_id, _lib._sel_timeIntervalSince19701); } NSObject addTimeInterval_(double seconds) { @@ -42899,8 +43613,11 @@ class NSTimeZone extends NSObject { } double daylightSavingTimeOffsetForDate_(NSDate aDate) { - return _lib._objc_msgSend_167( - _id, _lib._sel_daylightSavingTimeOffsetForDate_1, aDate._id); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_167_variant( + _id, _lib._sel_daylightSavingTimeOffsetForDate_1, aDate._id) + : _lib._objc_msgSend_167( + _id, _lib._sel_daylightSavingTimeOffsetForDate_1, aDate._id); } NSDate? nextDaylightSavingTimeTransitionAfterDate_(NSDate aDate) { @@ -42978,7 +43695,10 @@ class NSTimeZone extends NSObject { } double get daylightSavingTimeOffset { - return _lib._objc_msgSend_165(_id, _lib._sel_daylightSavingTimeOffset1); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_165_variant( + _id, _lib._sel_daylightSavingTimeOffset1) + : _lib._objc_msgSend_165(_id, _lib._sel_daylightSavingTimeOffset1); } NSDate? get nextDaylightSavingTimeTransition { @@ -48783,7 +49503,9 @@ class NSThread extends NSObject { } double get threadPriority { - return _lib._objc_msgSend_165(_id, _lib._sel_threadPriority1); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_165_variant(_id, _lib._sel_threadPriority1) + : _lib._objc_msgSend_165(_id, _lib._sel_threadPriority1); } set threadPriority(double value) { @@ -50259,11 +50981,15 @@ class NSTimer extends NSObject { } double get timeInterval { - return _lib._objc_msgSend_165(_id, _lib._sel_timeInterval1); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_165_variant(_id, _lib._sel_timeInterval1) + : _lib._objc_msgSend_165(_id, _lib._sel_timeInterval1); } double get tolerance { - return _lib._objc_msgSend_165(_id, _lib._sel_tolerance1); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_165_variant(_id, _lib._sel_tolerance1) + : _lib._objc_msgSend_165(_id, _lib._sel_tolerance1); } set tolerance(double value) { @@ -50596,7 +51322,9 @@ class NSConnection extends NSObject { } double get requestTimeout { - return _lib._objc_msgSend_165(_id, _lib._sel_requestTimeout1); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_165_variant(_id, _lib._sel_requestTimeout1) + : _lib._objc_msgSend_165(_id, _lib._sel_requestTimeout1); } set requestTimeout(double value) { @@ -50604,7 +51332,9 @@ class NSConnection extends NSObject { } double get replyTimeout { - return _lib._objc_msgSend_165(_id, _lib._sel_replyTimeout1); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_165_variant(_id, _lib._sel_replyTimeout1) + : _lib._objc_msgSend_165(_id, _lib._sel_replyTimeout1); } set replyTimeout(double value) { @@ -51856,7 +52586,9 @@ class NSAppleEventDescriptor extends NSObject { } double get doubleValue { - return _lib._objc_msgSend_165(_id, _lib._sel_doubleValue1); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_165_variant(_id, _lib._sel_doubleValue1) + : _lib._objc_msgSend_165(_id, _lib._sel_doubleValue1); } int get typeCodeValue { @@ -53485,7 +54217,9 @@ class NSProgress extends NSObject { } double get fractionCompleted { - return _lib._objc_msgSend_165(_id, _lib._sel_fractionCompleted1); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_165_variant(_id, _lib._sel_fractionCompleted1) + : _lib._objc_msgSend_165(_id, _lib._sel_fractionCompleted1); } bool get finished { @@ -56145,8 +56879,11 @@ class NSBundle extends NSObject { } double preservationPriorityForTag_(NSString tag) { - return _lib._objc_msgSend_308( - _id, _lib._sel_preservationPriorityForTag_1, tag._id); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_308_variant( + _id, _lib._sel_preservationPriorityForTag_1, tag._id) + : _lib._objc_msgSend_308( + _id, _lib._sel_preservationPriorityForTag_1, tag._id); } @override @@ -58399,17 +59136,28 @@ class NSCalendar extends NSObject { } void minimumRangeOfUnit_(ffi.Pointer<_NSRange> stret, int unit) { - _lib._objc_msgSend_767(stret, _id, _lib._sel_minimumRangeOfUnit_1, unit); + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_767_variant( + stret, _id, _lib._sel_minimumRangeOfUnit_1, unit) + : stret.ref = + _lib._objc_msgSend_767(_id, _lib._sel_minimumRangeOfUnit_1, unit); } void maximumRangeOfUnit_(ffi.Pointer<_NSRange> stret, int unit) { - _lib._objc_msgSend_767(stret, _id, _lib._sel_maximumRangeOfUnit_1, unit); + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_767_variant( + stret, _id, _lib._sel_maximumRangeOfUnit_1, unit) + : stret.ref = + _lib._objc_msgSend_767(_id, _lib._sel_maximumRangeOfUnit_1, unit); } void rangeOfUnit_inUnit_forDate_( ffi.Pointer<_NSRange> stret, int smaller, int larger, NSDate date) { - _lib._objc_msgSend_768(stret, _id, _lib._sel_rangeOfUnit_inUnit_forDate_1, - smaller, larger, date._id); + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_768_variant(stret, _id, + _lib._sel_rangeOfUnit_inUnit_forDate_1, smaller, larger, date._id) + : stret.ref = _lib._objc_msgSend_768(_id, + _lib._sel_rangeOfUnit_inUnit_forDate_1, smaller, larger, date._id); } int ordinalityOfUnit_inUnit_forDate_(int smaller, int larger, NSDate date) { @@ -61822,7 +62570,9 @@ class NSURLSessionTask extends NSObject { } double get priority { - return _lib._objc_msgSend_239(_id, _lib._sel_priority1); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_239_variant(_id, _lib._sel_priority1) + : _lib._objc_msgSend_239(_id, _lib._sel_priority1); } set priority(double value) { @@ -62000,7 +62750,9 @@ class NSURLRequest extends NSObject { } double get timeoutInterval { - return _lib._objc_msgSend_165(_id, _lib._sel_timeoutInterval1); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_165_variant(_id, _lib._sel_timeoutInterval1) + : _lib._objc_msgSend_165(_id, _lib._sel_timeoutInterval1); } NSURL? get mainDocumentURL { @@ -64371,7 +65123,9 @@ class NSOperation extends NSObject { } double get threadPriority { - return _lib._objc_msgSend_165(_id, _lib._sel_threadPriority1); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_165_variant(_id, _lib._sel_threadPriority1) + : _lib._objc_msgSend_165(_id, _lib._sel_threadPriority1); } set threadPriority(double value) { @@ -65068,7 +65822,11 @@ class NSProcessInfo extends NSObject { } void getOperatingSystemVersion(ffi.Pointer stret) { - _lib._objc_msgSend_940(stret, _id, _lib._sel_operatingSystemVersion1); + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_940_variant( + stret, _id, _lib._sel_operatingSystemVersion1) + : stret.ref = + _lib._objc_msgSend_940(_id, _lib._sel_operatingSystemVersion1); } int get processorCount { @@ -65089,7 +65847,9 @@ class NSProcessInfo extends NSObject { } double get systemUptime { - return _lib._objc_msgSend_165(_id, _lib._sel_systemUptime1); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_165_variant(_id, _lib._sel_systemUptime1) + : _lib._objc_msgSend_165(_id, _lib._sel_systemUptime1); } void disableSuddenTermination() { @@ -65417,7 +66177,9 @@ class NSTextCheckingResult extends NSObject { } void getRange(ffi.Pointer<_NSRange> stret) { - _lib._objc_msgSend_54(stret, _id, _lib._sel_range1); + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_54_variant(stret, _id, _lib._sel_range1) + : stret.ref = _lib._objc_msgSend_54(_id, _lib._sel_range1); } NSOrthography? get orthography { @@ -65449,7 +66211,9 @@ class NSTextCheckingResult extends NSObject { } double get duration { - return _lib._objc_msgSend_165(_id, _lib._sel_duration1); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_165_variant(_id, _lib._sel_duration1) + : _lib._objc_msgSend_165(_id, _lib._sel_duration1); } NSDictionary? get components { @@ -65499,11 +66263,19 @@ class NSTextCheckingResult extends NSObject { } void rangeAtIndex_(ffi.Pointer<_NSRange> stret, int idx) { - _lib._objc_msgSend_347(stret, _id, _lib._sel_rangeAtIndex_1, idx); + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_347_variant( + stret, _id, _lib._sel_rangeAtIndex_1, idx) + : stret.ref = + _lib._objc_msgSend_347(_id, _lib._sel_rangeAtIndex_1, idx); } void rangeWithName_(ffi.Pointer<_NSRange> stret, NSString name) { - _lib._objc_msgSend_340(stret, _id, _lib._sel_rangeWithName_1, name._id); + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_340_variant( + stret, _id, _lib._sel_rangeWithName_1, name._id) + : stret.ref = + _lib._objc_msgSend_340(_id, _lib._sel_rangeWithName_1, name._id); } NSTextCheckingResult resultByAdjustingRangesWithOffset_(int offset) { @@ -65892,13 +66664,20 @@ class NSRegularExpression extends NSObject { void rangeOfFirstMatchInString_options_range_(ffi.Pointer<_NSRange> stret, NSString string, int options, _NSRange range) { - _lib._objc_msgSend_955( - stret, - _id, - _lib._sel_rangeOfFirstMatchInString_options_range_1, - string._id, - options, - range); + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_955_variant( + stret, + _id, + _lib._sel_rangeOfFirstMatchInString_options_range_1, + string._id, + options, + range) + : stret.ref = _lib._objc_msgSend_955( + _id, + _lib._sel_rangeOfFirstMatchInString_options_range_1, + string._id, + options, + range); } NSString stringByReplacingMatchesInString_options_range_withTemplate_( @@ -68311,7 +69090,9 @@ class NSMutableURLRequest extends NSURLRequest { @override double get timeoutInterval { - return _lib._objc_msgSend_165(_id, _lib._sel_timeoutInterval1); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_165_variant(_id, _lib._sel_timeoutInterval1) + : _lib._objc_msgSend_165(_id, _lib._sel_timeoutInterval1); } set timeoutInterval(double value) { @@ -69636,7 +70417,10 @@ class NSURLSessionConfiguration extends NSObject { } double get timeoutIntervalForRequest { - return _lib._objc_msgSend_165(_id, _lib._sel_timeoutIntervalForRequest1); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_165_variant( + _id, _lib._sel_timeoutIntervalForRequest1) + : _lib._objc_msgSend_165(_id, _lib._sel_timeoutIntervalForRequest1); } set timeoutIntervalForRequest(double value) { @@ -69645,7 +70429,10 @@ class NSURLSessionConfiguration extends NSObject { } double get timeoutIntervalForResource { - return _lib._objc_msgSend_165(_id, _lib._sel_timeoutIntervalForResource1); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_165_variant( + _id, _lib._sel_timeoutIntervalForResource1) + : _lib._objc_msgSend_165(_id, _lib._sel_timeoutIntervalForResource1); } set timeoutIntervalForResource(double value) { @@ -74671,7 +75458,9 @@ class AVAudioSession extends NSObject { } double get preferredSampleRate { - return _lib._objc_msgSend_165(_id, _lib._sel_preferredSampleRate1); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_165_variant(_id, _lib._sel_preferredSampleRate1) + : _lib._objc_msgSend_165(_id, _lib._sel_preferredSampleRate1); } bool setPreferredIOBufferDuration_error_( @@ -74681,7 +75470,10 @@ class AVAudioSession extends NSObject { } double get preferredIOBufferDuration { - return _lib._objc_msgSend_165(_id, _lib._sel_preferredIOBufferDuration1); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_165_variant( + _id, _lib._sel_preferredIOBufferDuration1) + : _lib._objc_msgSend_165(_id, _lib._sel_preferredIOBufferDuration1); } bool setPreferredInputNumberOfChannels_error_( @@ -74735,7 +75527,9 @@ class AVAudioSession extends NSObject { } double get inputGain { - return _lib._objc_msgSend_239(_id, _lib._sel_inputGain1); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_239_variant(_id, _lib._sel_inputGain1) + : _lib._objc_msgSend_239(_id, _lib._sel_inputGain1); } bool get inputGainSettable { @@ -74791,7 +75585,9 @@ class AVAudioSession extends NSObject { } double get sampleRate { - return _lib._objc_msgSend_165(_id, _lib._sel_sampleRate1); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_165_variant(_id, _lib._sel_sampleRate1) + : _lib._objc_msgSend_165(_id, _lib._sel_sampleRate1); } int get inputNumberOfChannels { @@ -74803,15 +75599,21 @@ class AVAudioSession extends NSObject { } double get inputLatency { - return _lib._objc_msgSend_165(_id, _lib._sel_inputLatency1); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_165_variant(_id, _lib._sel_inputLatency1) + : _lib._objc_msgSend_165(_id, _lib._sel_inputLatency1); } double get outputLatency { - return _lib._objc_msgSend_165(_id, _lib._sel_outputLatency1); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_165_variant(_id, _lib._sel_outputLatency1) + : _lib._objc_msgSend_165(_id, _lib._sel_outputLatency1); } double get IOBufferDuration { - return _lib._objc_msgSend_165(_id, _lib._sel_IOBufferDuration1); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_165_variant(_id, _lib._sel_IOBufferDuration1) + : _lib._objc_msgSend_165(_id, _lib._sel_IOBufferDuration1); } bool get otherAudioPlaying { @@ -74824,7 +75626,9 @@ class AVAudioSession extends NSObject { } double get outputVolume { - return _lib._objc_msgSend_239(_id, _lib._sel_outputVolume1); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_239_variant(_id, _lib._sel_outputVolume1) + : _lib._objc_msgSend_239(_id, _lib._sel_outputVolume1); } int get promptStyle { @@ -74903,7 +75707,10 @@ class AVAudioSession extends NSObject { } double get currentHardwareSampleRate { - return _lib._objc_msgSend_165(_id, _lib._sel_currentHardwareSampleRate1); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_165_variant( + _id, _lib._sel_currentHardwareSampleRate1) + : _lib._objc_msgSend_165(_id, _lib._sel_currentHardwareSampleRate1); } int get currentHardwareInputNumberOfChannels { @@ -74923,7 +75730,10 @@ class AVAudioSession extends NSObject { } double get preferredHardwareSampleRate { - return _lib._objc_msgSend_165(_id, _lib._sel_preferredHardwareSampleRate1); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_165_variant( + _id, _lib._sel_preferredHardwareSampleRate1) + : _lib._objc_msgSend_165(_id, _lib._sel_preferredHardwareSampleRate1); } static AVAudioSession new1(AVFAudio _lib) { @@ -75786,7 +76596,9 @@ class AVAudioPlayer extends NSObject { } double get duration { - return _lib._objc_msgSend_165(_id, _lib._sel_duration1); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_165_variant(_id, _lib._sel_duration1) + : _lib._objc_msgSend_165(_id, _lib._sel_duration1); } NSString? get currentDevice { @@ -75828,7 +76640,9 @@ class AVAudioPlayer extends NSObject { } double get pan { - return _lib._objc_msgSend_239(_id, _lib._sel_pan1); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_239_variant(_id, _lib._sel_pan1) + : _lib._objc_msgSend_239(_id, _lib._sel_pan1); } set pan(double value) { @@ -75836,7 +76650,9 @@ class AVAudioPlayer extends NSObject { } double get volume { - return _lib._objc_msgSend_239(_id, _lib._sel_volume1); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_239_variant(_id, _lib._sel_volume1) + : _lib._objc_msgSend_239(_id, _lib._sel_volume1); } set volume(double value) { @@ -75857,7 +76673,9 @@ class AVAudioPlayer extends NSObject { } double get rate { - return _lib._objc_msgSend_239(_id, _lib._sel_rate1); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_239_variant(_id, _lib._sel_rate1) + : _lib._objc_msgSend_239(_id, _lib._sel_rate1); } set rate(double value) { @@ -75865,7 +76683,9 @@ class AVAudioPlayer extends NSObject { } double get currentTime { - return _lib._objc_msgSend_165(_id, _lib._sel_currentTime1); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_165_variant(_id, _lib._sel_currentTime1) + : _lib._objc_msgSend_165(_id, _lib._sel_currentTime1); } set currentTime(double value) { @@ -75873,7 +76693,9 @@ class AVAudioPlayer extends NSObject { } double get deviceCurrentTime { - return _lib._objc_msgSend_165(_id, _lib._sel_deviceCurrentTime1); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_165_variant(_id, _lib._sel_deviceCurrentTime1) + : _lib._objc_msgSend_165(_id, _lib._sel_deviceCurrentTime1); } int get numberOfLoops { @@ -75907,13 +76729,19 @@ class AVAudioPlayer extends NSObject { } double peakPowerForChannel_(int channelNumber) { - return _lib._objc_msgSend_1193( - _id, _lib._sel_peakPowerForChannel_1, channelNumber); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_1193_variant( + _id, _lib._sel_peakPowerForChannel_1, channelNumber) + : _lib._objc_msgSend_1193( + _id, _lib._sel_peakPowerForChannel_1, channelNumber); } double averagePowerForChannel_(int channelNumber) { - return _lib._objc_msgSend_1193( - _id, _lib._sel_averagePowerForChannel_1, channelNumber); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_1193_variant( + _id, _lib._sel_averagePowerForChannel_1, channelNumber) + : _lib._objc_msgSend_1193( + _id, _lib._sel_averagePowerForChannel_1, channelNumber); } NSArray? get channelAssignments { @@ -76145,7 +76973,9 @@ class AVAudioFormat extends NSObject { } double get sampleRate { - return _lib._objc_msgSend_165(_id, _lib._sel_sampleRate1); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_165_variant(_id, _lib._sel_sampleRate1) + : _lib._objc_msgSend_165(_id, _lib._sel_sampleRate1); } bool get interleaved { diff --git a/pkgs/ffigen/example/swift/swift_api_bindings.dart b/pkgs/ffigen/example/swift/swift_api_bindings.dart index 38ad96b6d..10ba3b505 100644 --- a/pkgs/ffigen/example/swift/swift_api_bindings.dart +++ b/pkgs/ffigen/example/swift/swift_api_bindings.dart @@ -1422,26 +1422,43 @@ class SwiftLibrary { late final _sel_rangeValue1 = _registerName1("rangeValue"); late final _objc_msgSend_useVariants1 = ffi.Abi.current() == ffi.Abi.iosX64 || ffi.Abi.current() == ffi.Abi.macosX64; - void _objc_msgSend_54( - ffi.Pointer<_NSRange> stret, + _NSRange _objc_msgSend_54( ffi.Pointer obj, ffi.Pointer sel, ) { return __objc_msgSend_54( - stret, obj, sel, ); } late final __objc_msgSend_54Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer)>>( - _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); + ffi.NativeFunction< + _NSRange Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_54 = __objc_msgSend_54Ptr.asFunction< - void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer)>(); + _NSRange Function(ffi.Pointer, ffi.Pointer)>(); + + void _objc_msgSend_54_variant( + ffi.Pointer<_NSRange> stret, + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_54_variant( + stret, + obj, + sel, + ); + } + + late final __objc_msgSend_54_variantPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend_stret'); + late final __objc_msgSend_54_variant = + __objc_msgSend_54_variantPtr.asFunction< + void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer)>(); late final _sel_valueWithPoint_1 = _registerName1("valueWithPoint:"); ffi.Pointer _objc_msgSend_55( @@ -1529,92 +1546,160 @@ class SwiftLibrary { ffi.Pointer, ffi.Pointer, NSEdgeInsets)>(); late final _sel_pointValue1 = _registerName1("pointValue"); - void _objc_msgSend_59( - ffi.Pointer stret, + CGPoint _objc_msgSend_59( ffi.Pointer obj, ffi.Pointer sel, ) { return __objc_msgSend_59( - stret, obj, sel, ); } late final __objc_msgSend_59Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>( - _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); + ffi.NativeFunction< + CGPoint Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_59 = __objc_msgSend_59Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + CGPoint Function(ffi.Pointer, ffi.Pointer)>(); + + void _objc_msgSend_59_variant( + ffi.Pointer stret, + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_59_variant( + stret, + obj, + sel, + ); + } + + late final __objc_msgSend_59_variantPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend_stret'); + late final __objc_msgSend_59_variant = + __objc_msgSend_59_variantPtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); late final _sel_sizeValue1 = _registerName1("sizeValue"); - void _objc_msgSend_60( - ffi.Pointer stret, + CGSize _objc_msgSend_60( ffi.Pointer obj, ffi.Pointer sel, ) { return __objc_msgSend_60( - stret, obj, sel, ); } late final __objc_msgSend_60Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>( - _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); + ffi.NativeFunction< + CGSize Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_60 = __objc_msgSend_60Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + CGSize Function(ffi.Pointer, ffi.Pointer)>(); + + void _objc_msgSend_60_variant( + ffi.Pointer stret, + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_60_variant( + stret, + obj, + sel, + ); + } + + late final __objc_msgSend_60_variantPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend_stret'); + late final __objc_msgSend_60_variant = + __objc_msgSend_60_variantPtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); late final _sel_rectValue1 = _registerName1("rectValue"); - void _objc_msgSend_61( - ffi.Pointer stret, + CGRect _objc_msgSend_61( ffi.Pointer obj, ffi.Pointer sel, ) { return __objc_msgSend_61( - stret, obj, sel, ); } late final __objc_msgSend_61Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>( - _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); + ffi.NativeFunction< + CGRect Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_61 = __objc_msgSend_61Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + CGRect Function(ffi.Pointer, ffi.Pointer)>(); + + void _objc_msgSend_61_variant( + ffi.Pointer stret, + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_61_variant( + stret, + obj, + sel, + ); + } + + late final __objc_msgSend_61_variantPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend_stret'); + late final __objc_msgSend_61_variant = + __objc_msgSend_61_variantPtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); late final _sel_edgeInsetsValue1 = _registerName1("edgeInsetsValue"); - void _objc_msgSend_62( - ffi.Pointer stret, + NSEdgeInsets _objc_msgSend_62( ffi.Pointer obj, ffi.Pointer sel, ) { return __objc_msgSend_62( - stret, obj, sel, ); } late final __objc_msgSend_62Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>( - _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); + ffi.NativeFunction< + NSEdgeInsets Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_62 = __objc_msgSend_62Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + NSEdgeInsets Function(ffi.Pointer, ffi.Pointer)>(); + + void _objc_msgSend_62_variant( + ffi.Pointer stret, + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_62_variant( + stret, + obj, + sel, + ); + } + + late final __objc_msgSend_62_variantPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend_stret'); + late final __objc_msgSend_62_variant = + __objc_msgSend_62_variantPtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); late final _sel_keyPathsForValuesAffectingValueForKey_1 = _registerName1("keyPathsForValuesAffectingValueForKey:"); @@ -4398,13 +4483,30 @@ class SwiftLibrary { } late final __objc_msgSend_165Ptr = _lookup< - ffi.NativeFunction< - ffi.Double Function( - ffi.Pointer, ffi.Pointer)>>( - _objc_msgSend_useVariants1 ? 'objc_msgSend_fpret' : 'objc_msgSend'); + ffi.NativeFunction< + ffi.Double Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_165 = __objc_msgSend_165Ptr.asFunction< double Function(ffi.Pointer, ffi.Pointer)>(); + double _objc_msgSend_165_variant( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_165_variant( + obj, + sel, + ); + } + + late final __objc_msgSend_165_variantPtr = _lookup< + ffi.NativeFunction< + ffi.Double Function(ffi.Pointer, + ffi.Pointer)>>('objc_msgSend_fpret'); + late final __objc_msgSend_165_variant = + __objc_msgSend_165_variantPtr.asFunction< + double Function(ffi.Pointer, ffi.Pointer)>(); + late final _sel_initWithTimeIntervalSinceReferenceDate_1 = _registerName1("initWithTimeIntervalSinceReferenceDate:"); instancetype _objc_msgSend_166( @@ -4442,14 +4544,34 @@ class SwiftLibrary { } late final __objc_msgSend_167Ptr = _lookup< - ffi.NativeFunction< - ffi.Double Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>( - _objc_msgSend_useVariants1 ? 'objc_msgSend_fpret' : 'objc_msgSend'); + ffi.NativeFunction< + ffi.Double Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_167 = __objc_msgSend_167Ptr.asFunction< double Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); + double _objc_msgSend_167_variant( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer anotherDate, + ) { + return __objc_msgSend_167_variant( + obj, + sel, + anotherDate, + ); + } + + late final __objc_msgSend_167_variantPtr = _lookup< + ffi.NativeFunction< + ffi.Double Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend_fpret'); + late final __objc_msgSend_167_variant = + __objc_msgSend_167_variantPtr.asFunction< + double Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + late final _sel_timeIntervalSinceNow1 = _registerName1("timeIntervalSinceNow"); late final _sel_timeIntervalSince19701 = @@ -6309,13 +6431,30 @@ class SwiftLibrary { } late final __objc_msgSend_239Ptr = _lookup< - ffi.NativeFunction< - ffi.Float Function( - ffi.Pointer, ffi.Pointer)>>( - _objc_msgSend_useVariants1 ? 'objc_msgSend_fpret' : 'objc_msgSend'); + ffi.NativeFunction< + ffi.Float Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_239 = __objc_msgSend_239Ptr.asFunction< double Function(ffi.Pointer, ffi.Pointer)>(); + double _objc_msgSend_239_variant( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_239_variant( + obj, + sel, + ); + } + + late final __objc_msgSend_239_variantPtr = _lookup< + ffi.NativeFunction< + ffi.Float Function(ffi.Pointer, + ffi.Pointer)>>('objc_msgSend_fpret'); + late final __objc_msgSend_239_variant = + __objc_msgSend_239_variantPtr.asFunction< + double Function(ffi.Pointer, ffi.Pointer)>(); + late final _sel_doubleValue1 = _registerName1("doubleValue"); late final _sel_boolValue1 = _registerName1("boolValue"); late final _sel_integerValue1 = _registerName1("integerValue"); @@ -7260,8 +7399,7 @@ class SwiftLibrary { late final _sel_rangeOfData_options_range_1 = _registerName1("rangeOfData:options:range:"); - void _objc_msgSend_271( - ffi.Pointer<_NSRange> stret, + _NSRange _objc_msgSend_271( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer dataToFind, @@ -7269,7 +7407,6 @@ class SwiftLibrary { _NSRange searchRange, ) { return __objc_msgSend_271( - stret, obj, sel, dataToFind, @@ -7279,18 +7416,44 @@ class SwiftLibrary { } late final __objc_msgSend_271Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange)>>( - _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); + ffi.NativeFunction< + _NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32, _NSRange)>>('objc_msgSend'); late final __objc_msgSend_271 = __objc_msgSend_271Ptr.asFunction< - void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, ffi.Pointer, int, _NSRange)>(); + _NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, _NSRange)>(); + + void _objc_msgSend_271_variant( + ffi.Pointer<_NSRange> stret, + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer dataToFind, + int mask, + _NSRange searchRange, + ) { + return __objc_msgSend_271_variant( + stret, + obj, + sel, + dataToFind, + mask, + searchRange, + ); + } + + late final __objc_msgSend_271_variantPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange)>>('objc_msgSend_stret'); + late final __objc_msgSend_271_variant = + __objc_msgSend_271_variantPtr.asFunction< + void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, ffi.Pointer, int, _NSRange)>(); late final _sel_enumerateByteRangesUsingBlock_1 = _registerName1("enumerateByteRangesUsingBlock:"); @@ -8205,14 +8368,34 @@ class SwiftLibrary { } late final __objc_msgSend_307Ptr = _lookup< - ffi.NativeFunction< - ffi.Float Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>( - _objc_msgSend_useVariants1 ? 'objc_msgSend_fpret' : 'objc_msgSend'); + ffi.NativeFunction< + ffi.Float Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_307 = __objc_msgSend_307Ptr.asFunction< double Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); + double _objc_msgSend_307_variant( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer key, + ) { + return __objc_msgSend_307_variant( + obj, + sel, + key, + ); + } + + late final __objc_msgSend_307_variantPtr = _lookup< + ffi.NativeFunction< + ffi.Float Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend_fpret'); + late final __objc_msgSend_307_variant = + __objc_msgSend_307_variantPtr.asFunction< + double Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + late final _sel_decodeDoubleForKey_1 = _registerName1("decodeDoubleForKey:"); double _objc_msgSend_308( ffi.Pointer obj, @@ -8227,14 +8410,34 @@ class SwiftLibrary { } late final __objc_msgSend_308Ptr = _lookup< - ffi.NativeFunction< - ffi.Double Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>( - _objc_msgSend_useVariants1 ? 'objc_msgSend_fpret' : 'objc_msgSend'); + ffi.NativeFunction< + ffi.Double Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_308 = __objc_msgSend_308Ptr.asFunction< double Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); + double _objc_msgSend_308_variant( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer key, + ) { + return __objc_msgSend_308_variant( + obj, + sel, + key, + ); + } + + late final __objc_msgSend_308_variantPtr = _lookup< + ffi.NativeFunction< + ffi.Double Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend_fpret'); + late final __objc_msgSend_308_variant = + __objc_msgSend_308_variantPtr.asFunction< + double Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + late final _sel_decodeBytesForKey_returnedLength_1 = _registerName1("decodeBytesForKey:returnedLength:"); ffi.Pointer _objc_msgSend_309( @@ -8767,14 +8970,12 @@ class SwiftLibrary { ffi.Pointer)>(); late final _sel_decodePointForKey_1 = _registerName1("decodePointForKey:"); - void _objc_msgSend_329( - ffi.Pointer stret, + CGPoint _objc_msgSend_329( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer key, ) { return __objc_msgSend_329( - stret, obj, sel, key, @@ -8782,23 +8983,46 @@ class SwiftLibrary { } late final __objc_msgSend_329Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>( - _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); + ffi.NativeFunction< + CGPoint Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_329 = __objc_msgSend_329Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + CGPoint Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + void _objc_msgSend_329_variant( + ffi.Pointer stret, + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer key, + ) { + return __objc_msgSend_329_variant( + stret, + obj, + sel, + key, + ); + } + + late final __objc_msgSend_329_variantPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend_stret'); + late final __objc_msgSend_329_variant = + __objc_msgSend_329_variantPtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); late final _sel_decodeSizeForKey_1 = _registerName1("decodeSizeForKey:"); - void _objc_msgSend_330( - ffi.Pointer stret, + CGSize _objc_msgSend_330( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer key, ) { return __objc_msgSend_330( - stret, obj, sel, key, @@ -8806,23 +9030,46 @@ class SwiftLibrary { } late final __objc_msgSend_330Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>( - _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); + ffi.NativeFunction< + CGSize Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_330 = __objc_msgSend_330Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + CGSize Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + void _objc_msgSend_330_variant( + ffi.Pointer stret, + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer key, + ) { + return __objc_msgSend_330_variant( + stret, + obj, + sel, + key, + ); + } + + late final __objc_msgSend_330_variantPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend_stret'); + late final __objc_msgSend_330_variant = + __objc_msgSend_330_variantPtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); late final _sel_decodeRectForKey_1 = _registerName1("decodeRectForKey:"); - void _objc_msgSend_331( - ffi.Pointer stret, + CGRect _objc_msgSend_331( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer key, ) { return __objc_msgSend_331( - stret, obj, sel, key, @@ -8830,13 +9077,38 @@ class SwiftLibrary { } late final __objc_msgSend_331Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>( - _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); + ffi.NativeFunction< + CGRect Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_331 = __objc_msgSend_331Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + CGRect Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + void _objc_msgSend_331_variant( + ffi.Pointer stret, + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer key, + ) { + return __objc_msgSend_331_variant( + stret, + obj, + sel, + key, + ); + } + + late final __objc_msgSend_331_variantPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend_stret'); + late final __objc_msgSend_331_variant = + __objc_msgSend_331_variantPtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); late final _sel_substringFromIndex_1 = _registerName1("substringFromIndex:"); ffi.Pointer _objc_msgSend_332( @@ -9051,14 +9323,12 @@ class SwiftLibrary { _registerName1("localizedStandardContainsString:"); late final _sel_localizedStandardRangeOfString_1 = _registerName1("localizedStandardRangeOfString:"); - void _objc_msgSend_340( - ffi.Pointer<_NSRange> stret, + _NSRange _objc_msgSend_340( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer str, ) { return __objc_msgSend_340( - stret, obj, sel, str, @@ -9066,26 +9336,49 @@ class SwiftLibrary { } late final __objc_msgSend_340Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>( - _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); + ffi.NativeFunction< + _NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_340 = __objc_msgSend_340Ptr.asFunction< - void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + _NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + void _objc_msgSend_340_variant( + ffi.Pointer<_NSRange> stret, + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer str, + ) { + return __objc_msgSend_340_variant( + stret, + obj, + sel, + str, + ); + } + + late final __objc_msgSend_340_variantPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend_stret'); + late final __objc_msgSend_340_variant = + __objc_msgSend_340_variantPtr.asFunction< + void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); late final _sel_rangeOfString_1 = _registerName1("rangeOfString:"); late final _sel_rangeOfString_options_1 = _registerName1("rangeOfString:options:"); - void _objc_msgSend_341( - ffi.Pointer<_NSRange> stret, + _NSRange _objc_msgSend_341( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer searchString, int mask, ) { return __objc_msgSend_341( - stret, obj, sel, searchString, @@ -9094,18 +9387,45 @@ class SwiftLibrary { } late final __objc_msgSend_341Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, ffi.Pointer, ffi.Int32)>>( - _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); + ffi.NativeFunction< + _NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32)>>('objc_msgSend'); late final __objc_msgSend_341 = __objc_msgSend_341Ptr.asFunction< - void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, ffi.Pointer, int)>(); + _NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); + + void _objc_msgSend_341_variant( + ffi.Pointer<_NSRange> stret, + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer searchString, + int mask, + ) { + return __objc_msgSend_341_variant( + stret, + obj, + sel, + searchString, + mask, + ); + } + + late final __objc_msgSend_341_variantPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>('objc_msgSend_stret'); + late final __objc_msgSend_341_variant = + __objc_msgSend_341_variantPtr.asFunction< + void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, ffi.Pointer, int)>(); late final _sel_rangeOfString_options_range_1 = _registerName1("rangeOfString:options:range:"); - void _objc_msgSend_342( - ffi.Pointer<_NSRange> stret, + _NSRange _objc_msgSend_342( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer searchString, @@ -9113,7 +9433,6 @@ class SwiftLibrary { _NSRange rangeOfReceiverToSearch, ) { return __objc_msgSend_342( - stret, obj, sel, searchString, @@ -9123,23 +9442,48 @@ class SwiftLibrary { } late final __objc_msgSend_342Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange)>>( - _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); + ffi.NativeFunction< + _NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32, _NSRange)>>('objc_msgSend'); late final __objc_msgSend_342 = __objc_msgSend_342Ptr.asFunction< - void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, ffi.Pointer, int, _NSRange)>(); + _NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, _NSRange)>(); + + void _objc_msgSend_342_variant( + ffi.Pointer<_NSRange> stret, + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer searchString, + int mask, + _NSRange rangeOfReceiverToSearch, + ) { + return __objc_msgSend_342_variant( + stret, + obj, + sel, + searchString, + mask, + rangeOfReceiverToSearch, + ); + } + + late final __objc_msgSend_342_variantPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange)>>('objc_msgSend_stret'); + late final __objc_msgSend_342_variant = + __objc_msgSend_342_variantPtr.asFunction< + void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, ffi.Pointer, int, _NSRange)>(); late final _sel_rangeOfString_options_range_locale_1 = _registerName1("rangeOfString:options:range:locale:"); - void _objc_msgSend_343( - ffi.Pointer<_NSRange> stret, + _NSRange _objc_msgSend_343( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer searchString, @@ -9148,7 +9492,6 @@ class SwiftLibrary { ffi.Pointer locale, ) { return __objc_msgSend_343( - stret, obj, sel, searchString, @@ -9159,36 +9502,67 @@ class SwiftLibrary { } late final __objc_msgSend_343Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange, - ffi.Pointer)>>( - _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); + ffi.NativeFunction< + _NSRange Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange, + ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_343 = __objc_msgSend_343Ptr.asFunction< - void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - _NSRange, - ffi.Pointer)>(); + _NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, _NSRange, ffi.Pointer)>(); + + void _objc_msgSend_343_variant( + ffi.Pointer<_NSRange> stret, + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer searchString, + int mask, + _NSRange rangeOfReceiverToSearch, + ffi.Pointer locale, + ) { + return __objc_msgSend_343_variant( + stret, + obj, + sel, + searchString, + mask, + rangeOfReceiverToSearch, + locale, + ); + } + + late final __objc_msgSend_343_variantPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange, + ffi.Pointer)>>('objc_msgSend_stret'); + late final __objc_msgSend_343_variant = + __objc_msgSend_343_variantPtr.asFunction< + void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + _NSRange, + ffi.Pointer)>(); late final _sel_rangeOfCharacterFromSet_1 = _registerName1("rangeOfCharacterFromSet:"); - void _objc_msgSend_344( - ffi.Pointer<_NSRange> stret, + _NSRange _objc_msgSend_344( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer searchSet, ) { return __objc_msgSend_344( - stret, obj, sel, searchSet, @@ -9196,25 +9570,48 @@ class SwiftLibrary { } late final __objc_msgSend_344Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>( - _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); + ffi.NativeFunction< + _NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_344 = __objc_msgSend_344Ptr.asFunction< - void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + _NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + void _objc_msgSend_344_variant( + ffi.Pointer<_NSRange> stret, + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer searchSet, + ) { + return __objc_msgSend_344_variant( + stret, + obj, + sel, + searchSet, + ); + } + + late final __objc_msgSend_344_variantPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend_stret'); + late final __objc_msgSend_344_variant = + __objc_msgSend_344_variantPtr.asFunction< + void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); late final _sel_rangeOfCharacterFromSet_options_1 = _registerName1("rangeOfCharacterFromSet:options:"); - void _objc_msgSend_345( - ffi.Pointer<_NSRange> stret, + _NSRange _objc_msgSend_345( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer searchSet, int mask, ) { return __objc_msgSend_345( - stret, obj, sel, searchSet, @@ -9223,18 +9620,45 @@ class SwiftLibrary { } late final __objc_msgSend_345Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, ffi.Pointer, ffi.Int32)>>( - _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); + ffi.NativeFunction< + _NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32)>>('objc_msgSend'); late final __objc_msgSend_345 = __objc_msgSend_345Ptr.asFunction< - void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, ffi.Pointer, int)>(); + _NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); + + void _objc_msgSend_345_variant( + ffi.Pointer<_NSRange> stret, + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer searchSet, + int mask, + ) { + return __objc_msgSend_345_variant( + stret, + obj, + sel, + searchSet, + mask, + ); + } + + late final __objc_msgSend_345_variantPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>('objc_msgSend_stret'); + late final __objc_msgSend_345_variant = + __objc_msgSend_345_variantPtr.asFunction< + void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, ffi.Pointer, int)>(); late final _sel_rangeOfCharacterFromSet_options_range_1 = _registerName1("rangeOfCharacterFromSet:options:range:"); - void _objc_msgSend_346( - ffi.Pointer<_NSRange> stret, + _NSRange _objc_msgSend_346( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer searchSet, @@ -9242,7 +9666,6 @@ class SwiftLibrary { _NSRange rangeOfReceiverToSearch, ) { return __objc_msgSend_346( - stret, obj, sel, searchSet, @@ -9252,29 +9675,53 @@ class SwiftLibrary { } late final __objc_msgSend_346Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange)>>( - _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); + ffi.NativeFunction< + _NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32, _NSRange)>>('objc_msgSend'); late final __objc_msgSend_346 = __objc_msgSend_346Ptr.asFunction< - void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, ffi.Pointer, int, _NSRange)>(); + _NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, _NSRange)>(); + + void _objc_msgSend_346_variant( + ffi.Pointer<_NSRange> stret, + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer searchSet, + int mask, + _NSRange rangeOfReceiverToSearch, + ) { + return __objc_msgSend_346_variant( + stret, + obj, + sel, + searchSet, + mask, + rangeOfReceiverToSearch, + ); + } + + late final __objc_msgSend_346_variantPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange)>>('objc_msgSend_stret'); + late final __objc_msgSend_346_variant = + __objc_msgSend_346_variantPtr.asFunction< + void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, ffi.Pointer, int, _NSRange)>(); late final _sel_rangeOfComposedCharacterSequenceAtIndex_1 = _registerName1("rangeOfComposedCharacterSequenceAtIndex:"); - void _objc_msgSend_347( - ffi.Pointer<_NSRange> stret, + _NSRange _objc_msgSend_347( ffi.Pointer obj, ffi.Pointer sel, int index, ) { return __objc_msgSend_347( - stret, obj, sel, index, @@ -9282,24 +9729,43 @@ class SwiftLibrary { } late final __objc_msgSend_347Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>( - _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); + ffi.NativeFunction< + _NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.UnsignedLong)>>('objc_msgSend'); late final __objc_msgSend_347 = __objc_msgSend_347Ptr.asFunction< - void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, int)>(); + _NSRange Function(ffi.Pointer, ffi.Pointer, int)>(); + + void _objc_msgSend_347_variant( + ffi.Pointer<_NSRange> stret, + ffi.Pointer obj, + ffi.Pointer sel, + int index, + ) { + return __objc_msgSend_347_variant( + stret, + obj, + sel, + index, + ); + } + + late final __objc_msgSend_347_variantPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend_stret'); + late final __objc_msgSend_347_variant = + __objc_msgSend_347_variantPtr.asFunction< + void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, int)>(); late final _sel_rangeOfComposedCharacterSequencesForRange_1 = _registerName1("rangeOfComposedCharacterSequencesForRange:"); - void _objc_msgSend_348( - ffi.Pointer<_NSRange> stret, + _NSRange _objc_msgSend_348( ffi.Pointer obj, ffi.Pointer sel, _NSRange range, ) { return __objc_msgSend_348( - stret, obj, sel, range, @@ -9307,13 +9773,35 @@ class SwiftLibrary { } late final __objc_msgSend_348Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, _NSRange)>>( - _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); + ffi.NativeFunction< + _NSRange Function(ffi.Pointer, ffi.Pointer, + _NSRange)>>('objc_msgSend'); late final __objc_msgSend_348 = __objc_msgSend_348Ptr.asFunction< - void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, _NSRange)>(); + _NSRange Function( + ffi.Pointer, ffi.Pointer, _NSRange)>(); + + void _objc_msgSend_348_variant( + ffi.Pointer<_NSRange> stret, + ffi.Pointer obj, + ffi.Pointer sel, + _NSRange range, + ) { + return __objc_msgSend_348_variant( + stret, + obj, + sel, + range, + ); + } + + late final __objc_msgSend_348_variantPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, _NSRange)>>('objc_msgSend_stret'); + late final __objc_msgSend_348_variant = + __objc_msgSend_348_variantPtr.asFunction< + void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, _NSRange)>(); late final _sel_stringByAppendingString_1 = _registerName1("stringByAppendingString:"); @@ -21318,14 +21806,12 @@ class SwiftLibrary { late final _sel_AMSymbol1 = _registerName1("AMSymbol"); late final _sel_PMSymbol1 = _registerName1("PMSymbol"); late final _sel_minimumRangeOfUnit_1 = _registerName1("minimumRangeOfUnit:"); - void _objc_msgSend_767( - ffi.Pointer<_NSRange> stret, + _NSRange _objc_msgSend_767( ffi.Pointer obj, ffi.Pointer sel, int unit, ) { return __objc_msgSend_767( - stret, obj, sel, unit, @@ -21333,19 +21819,39 @@ class SwiftLibrary { } late final __objc_msgSend_767Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, ffi.Int32)>>( - _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); + ffi.NativeFunction< + _NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); late final __objc_msgSend_767 = __objc_msgSend_767Ptr.asFunction< - void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, int)>(); + _NSRange Function(ffi.Pointer, ffi.Pointer, int)>(); + + void _objc_msgSend_767_variant( + ffi.Pointer<_NSRange> stret, + ffi.Pointer obj, + ffi.Pointer sel, + int unit, + ) { + return __objc_msgSend_767_variant( + stret, + obj, + sel, + unit, + ); + } + + late final __objc_msgSend_767_variantPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, ffi.Int32)>>('objc_msgSend_stret'); + late final __objc_msgSend_767_variant = + __objc_msgSend_767_variantPtr.asFunction< + void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, int)>(); late final _sel_maximumRangeOfUnit_1 = _registerName1("maximumRangeOfUnit:"); late final _sel_rangeOfUnit_inUnit_forDate_1 = _registerName1("rangeOfUnit:inUnit:forDate:"); - void _objc_msgSend_768( - ffi.Pointer<_NSRange> stret, + _NSRange _objc_msgSend_768( ffi.Pointer obj, ffi.Pointer sel, int smaller, @@ -21353,7 +21859,6 @@ class SwiftLibrary { ffi.Pointer date, ) { return __objc_msgSend_768( - stret, obj, sel, smaller, @@ -21363,18 +21868,44 @@ class SwiftLibrary { } late final __objc_msgSend_768Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Int32, - ffi.Pointer)>>( - _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); + ffi.NativeFunction< + _NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Int32, ffi.Int32, ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_768 = __objc_msgSend_768Ptr.asFunction< - void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, int, int, ffi.Pointer)>(); + _NSRange Function(ffi.Pointer, ffi.Pointer, int, int, + ffi.Pointer)>(); + + void _objc_msgSend_768_variant( + ffi.Pointer<_NSRange> stret, + ffi.Pointer obj, + ffi.Pointer sel, + int smaller, + int larger, + ffi.Pointer date, + ) { + return __objc_msgSend_768_variant( + stret, + obj, + sel, + smaller, + larger, + date, + ); + } + + late final __objc_msgSend_768_variantPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Int32, + ffi.Pointer)>>('objc_msgSend_stret'); + late final __objc_msgSend_768_variant = + __objc_msgSend_768_variantPtr.asFunction< + void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, int, int, ffi.Pointer)>(); late final _sel_ordinalityOfUnit_inUnit_forDate_1 = _registerName1("ordinalityOfUnit:inUnit:forDate:"); @@ -26201,27 +26732,47 @@ class SwiftLibrary { _registerName1("operatingSystemVersionString"); late final _sel_operatingSystemVersion1 = _registerName1("operatingSystemVersion"); - void _objc_msgSend_940( - ffi.Pointer stret, + NSOperatingSystemVersion _objc_msgSend_940( ffi.Pointer obj, ffi.Pointer sel, ) { return __objc_msgSend_940( - stret, obj, sel, ); } late final __objc_msgSend_940Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>( - _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); + ffi.NativeFunction< + NSOperatingSystemVersion Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_940 = __objc_msgSend_940Ptr.asFunction< - void Function(ffi.Pointer, + NSOperatingSystemVersion Function( ffi.Pointer, ffi.Pointer)>(); + void _objc_msgSend_940_variant( + ffi.Pointer stret, + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_940_variant( + stret, + obj, + sel, + ); + } + + late final __objc_msgSend_940_variantPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend_stret'); + late final __objc_msgSend_940_variant = + __objc_msgSend_940_variantPtr.asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + late final _sel_processorCount1 = _registerName1("processorCount"); late final _sel_activeProcessorCount1 = _registerName1("activeProcessorCount"); @@ -26631,8 +27182,7 @@ class SwiftLibrary { late final _sel_rangeOfFirstMatchInString_options_range_1 = _registerName1("rangeOfFirstMatchInString:options:range:"); - void _objc_msgSend_955( - ffi.Pointer<_NSRange> stret, + _NSRange _objc_msgSend_955( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer string, @@ -26640,7 +27190,6 @@ class SwiftLibrary { _NSRange range, ) { return __objc_msgSend_955( - stret, obj, sel, string, @@ -26650,18 +27199,44 @@ class SwiftLibrary { } late final __objc_msgSend_955Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange)>>( - _objc_msgSend_useVariants1 ? 'objc_msgSend_stret' : 'objc_msgSend'); + ffi.NativeFunction< + _NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32, _NSRange)>>('objc_msgSend'); late final __objc_msgSend_955 = __objc_msgSend_955Ptr.asFunction< - void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, ffi.Pointer, int, _NSRange)>(); + _NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, _NSRange)>(); + + void _objc_msgSend_955_variant( + ffi.Pointer<_NSRange> stret, + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer string, + int options, + _NSRange range, + ) { + return __objc_msgSend_955_variant( + stret, + obj, + sel, + string, + options, + range, + ); + } + + late final __objc_msgSend_955_variantPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange)>>('objc_msgSend_stret'); + late final __objc_msgSend_955_variant = + __objc_msgSend_955_variantPtr.asFunction< + void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, ffi.Pointer, int, _NSRange)>(); late final _sel_stringByReplacingMatchesInString_options_range_withTemplate_1 = _registerName1( @@ -33862,25 +34437,46 @@ class NSString extends NSObject { void localizedStandardRangeOfString_( ffi.Pointer<_NSRange> stret, NSString str) { - _lib._objc_msgSend_340( - stret, _id, _lib._sel_localizedStandardRangeOfString_1, str._id); + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_340_variant( + stret, _id, _lib._sel_localizedStandardRangeOfString_1, str._id) + : stret.ref = _lib._objc_msgSend_340( + _id, _lib._sel_localizedStandardRangeOfString_1, str._id); } void rangeOfString_(ffi.Pointer<_NSRange> stret, NSString searchString) { - _lib._objc_msgSend_340( - stret, _id, _lib._sel_rangeOfString_1, searchString._id); + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_340_variant( + stret, _id, _lib._sel_rangeOfString_1, searchString._id) + : stret.ref = _lib._objc_msgSend_340( + _id, _lib._sel_rangeOfString_1, searchString._id); } void rangeOfString_options_( ffi.Pointer<_NSRange> stret, NSString searchString, int mask) { - _lib._objc_msgSend_341( - stret, _id, _lib._sel_rangeOfString_options_1, searchString._id, mask); + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_341_variant(stret, _id, + _lib._sel_rangeOfString_options_1, searchString._id, mask) + : stret.ref = _lib._objc_msgSend_341( + _id, _lib._sel_rangeOfString_options_1, searchString._id, mask); } void rangeOfString_options_range_(ffi.Pointer<_NSRange> stret, NSString searchString, int mask, _NSRange rangeOfReceiverToSearch) { - _lib._objc_msgSend_342(stret, _id, _lib._sel_rangeOfString_options_range_1, - searchString._id, mask, rangeOfReceiverToSearch); + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_342_variant( + stret, + _id, + _lib._sel_rangeOfString_options_range_1, + searchString._id, + mask, + rangeOfReceiverToSearch) + : stret.ref = _lib._objc_msgSend_342( + _id, + _lib._sel_rangeOfString_options_range_1, + searchString._id, + mask, + rangeOfReceiverToSearch); } void rangeOfString_options_range_locale_( @@ -33889,49 +34485,76 @@ class NSString extends NSObject { int mask, _NSRange rangeOfReceiverToSearch, NSLocale? locale) { - _lib._objc_msgSend_343( - stret, - _id, - _lib._sel_rangeOfString_options_range_locale_1, - searchString._id, - mask, - rangeOfReceiverToSearch, - locale?._id ?? ffi.nullptr); + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_343_variant( + stret, + _id, + _lib._sel_rangeOfString_options_range_locale_1, + searchString._id, + mask, + rangeOfReceiverToSearch, + locale?._id ?? ffi.nullptr) + : stret.ref = _lib._objc_msgSend_343( + _id, + _lib._sel_rangeOfString_options_range_locale_1, + searchString._id, + mask, + rangeOfReceiverToSearch, + locale?._id ?? ffi.nullptr); } void rangeOfCharacterFromSet_( ffi.Pointer<_NSRange> stret, NSCharacterSet searchSet) { - _lib._objc_msgSend_344( - stret, _id, _lib._sel_rangeOfCharacterFromSet_1, searchSet._id); + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_344_variant( + stret, _id, _lib._sel_rangeOfCharacterFromSet_1, searchSet._id) + : stret.ref = _lib._objc_msgSend_344( + _id, _lib._sel_rangeOfCharacterFromSet_1, searchSet._id); } void rangeOfCharacterFromSet_options_( ffi.Pointer<_NSRange> stret, NSCharacterSet searchSet, int mask) { - _lib._objc_msgSend_345(stret, _id, - _lib._sel_rangeOfCharacterFromSet_options_1, searchSet._id, mask); + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_345_variant(stret, _id, + _lib._sel_rangeOfCharacterFromSet_options_1, searchSet._id, mask) + : stret.ref = _lib._objc_msgSend_345(_id, + _lib._sel_rangeOfCharacterFromSet_options_1, searchSet._id, mask); } void rangeOfCharacterFromSet_options_range_(ffi.Pointer<_NSRange> stret, NSCharacterSet searchSet, int mask, _NSRange rangeOfReceiverToSearch) { - _lib._objc_msgSend_346( - stret, - _id, - _lib._sel_rangeOfCharacterFromSet_options_range_1, - searchSet._id, - mask, - rangeOfReceiverToSearch); + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_346_variant( + stret, + _id, + _lib._sel_rangeOfCharacterFromSet_options_range_1, + searchSet._id, + mask, + rangeOfReceiverToSearch) + : stret.ref = _lib._objc_msgSend_346( + _id, + _lib._sel_rangeOfCharacterFromSet_options_range_1, + searchSet._id, + mask, + rangeOfReceiverToSearch); } void rangeOfComposedCharacterSequenceAtIndex_( ffi.Pointer<_NSRange> stret, int index) { - _lib._objc_msgSend_347( - stret, _id, _lib._sel_rangeOfComposedCharacterSequenceAtIndex_1, index); + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_347_variant(stret, _id, + _lib._sel_rangeOfComposedCharacterSequenceAtIndex_1, index) + : stret.ref = _lib._objc_msgSend_347( + _id, _lib._sel_rangeOfComposedCharacterSequenceAtIndex_1, index); } void rangeOfComposedCharacterSequencesForRange_( ffi.Pointer<_NSRange> stret, _NSRange range) { - _lib._objc_msgSend_348(stret, _id, - _lib._sel_rangeOfComposedCharacterSequencesForRange_1, range); + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_348_variant(stret, _id, + _lib._sel_rangeOfComposedCharacterSequencesForRange_1, range) + : stret.ref = _lib._objc_msgSend_348( + _id, _lib._sel_rangeOfComposedCharacterSequencesForRange_1, range); } NSString stringByAppendingString_(NSString aString) { @@ -33947,11 +34570,15 @@ class NSString extends NSObject { } double get doubleValue { - return _lib._objc_msgSend_165(_id, _lib._sel_doubleValue1); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_165_variant(_id, _lib._sel_doubleValue1) + : _lib._objc_msgSend_165(_id, _lib._sel_doubleValue1); } double get floatValue { - return _lib._objc_msgSend_239(_id, _lib._sel_floatValue1); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_239_variant(_id, _lib._sel_floatValue1) + : _lib._objc_msgSend_239(_id, _lib._sel_floatValue1); } int get intValue { @@ -34036,7 +34663,11 @@ class NSString extends NSObject { } void lineRangeForRange_(ffi.Pointer<_NSRange> stret, _NSRange range) { - _lib._objc_msgSend_348(stret, _id, _lib._sel_lineRangeForRange_1, range); + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_348_variant( + stret, _id, _lib._sel_lineRangeForRange_1, range) + : stret.ref = + _lib._objc_msgSend_348(_id, _lib._sel_lineRangeForRange_1, range); } void getParagraphStart_end_contentsEnd_forRange_( @@ -34054,8 +34685,11 @@ class NSString extends NSObject { } void paragraphRangeForRange_(ffi.Pointer<_NSRange> stret, _NSRange range) { - _lib._objc_msgSend_348( - stret, _id, _lib._sel_paragraphRangeForRange_1, range); + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_348_variant( + stret, _id, _lib._sel_paragraphRangeForRange_1, range) + : stret.ref = _lib._objc_msgSend_348( + _id, _lib._sel_paragraphRangeForRange_1, range); } void enumerateSubstringsInRange_options_usingBlock_(_NSRange range, int opts, @@ -35348,11 +35982,17 @@ class NSCoder extends NSObject { } double decodeFloatForKey_(NSString key) { - return _lib._objc_msgSend_307(_id, _lib._sel_decodeFloatForKey_1, key._id); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_307_variant( + _id, _lib._sel_decodeFloatForKey_1, key._id) + : _lib._objc_msgSend_307(_id, _lib._sel_decodeFloatForKey_1, key._id); } double decodeDoubleForKey_(NSString key) { - return _lib._objc_msgSend_308(_id, _lib._sel_decodeDoubleForKey_1, key._id); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_308_variant( + _id, _lib._sel_decodeDoubleForKey_1, key._id) + : _lib._objc_msgSend_308(_id, _lib._sel_decodeDoubleForKey_1, key._id); } ffi.Pointer decodeBytesForKey_returnedLength_( @@ -35514,7 +36154,9 @@ class NSCoder extends NSObject { } void decodePoint(ffi.Pointer stret) { - _lib._objc_msgSend_59(stret, _id, _lib._sel_decodePoint1); + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_59_variant(stret, _id, _lib._sel_decodePoint1) + : stret.ref = _lib._objc_msgSend_59(_id, _lib._sel_decodePoint1); } void encodeSize_(CGSize size) { @@ -35522,7 +36164,9 @@ class NSCoder extends NSObject { } void decodeSize(ffi.Pointer stret) { - _lib._objc_msgSend_60(stret, _id, _lib._sel_decodeSize1); + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_60_variant(stret, _id, _lib._sel_decodeSize1) + : stret.ref = _lib._objc_msgSend_60(_id, _lib._sel_decodeSize1); } void encodeRect_(CGRect rect) { @@ -35530,7 +36174,9 @@ class NSCoder extends NSObject { } void decodeRect(ffi.Pointer stret) { - _lib._objc_msgSend_61(stret, _id, _lib._sel_decodeRect1); + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_61_variant(stret, _id, _lib._sel_decodeRect1) + : stret.ref = _lib._objc_msgSend_61(_id, _lib._sel_decodeRect1); } void encodePoint_forKey_(CGPoint point, NSString key) { @@ -35546,15 +36192,27 @@ class NSCoder extends NSObject { } void decodePointForKey_(ffi.Pointer stret, NSString key) { - _lib._objc_msgSend_329(stret, _id, _lib._sel_decodePointForKey_1, key._id); + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_329_variant( + stret, _id, _lib._sel_decodePointForKey_1, key._id) + : stret.ref = + _lib._objc_msgSend_329(_id, _lib._sel_decodePointForKey_1, key._id); } void decodeSizeForKey_(ffi.Pointer stret, NSString key) { - _lib._objc_msgSend_330(stret, _id, _lib._sel_decodeSizeForKey_1, key._id); + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_330_variant( + stret, _id, _lib._sel_decodeSizeForKey_1, key._id) + : stret.ref = + _lib._objc_msgSend_330(_id, _lib._sel_decodeSizeForKey_1, key._id); } void decodeRectForKey_(ffi.Pointer stret, NSString key) { - _lib._objc_msgSend_331(stret, _id, _lib._sel_decodeRectForKey_1, key._id); + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_331_variant( + stret, _id, _lib._sel_decodeRectForKey_1, key._id) + : stret.ref = + _lib._objc_msgSend_331(_id, _lib._sel_decodeRectForKey_1, key._id); } @override @@ -35720,8 +36378,20 @@ class NSData extends NSObject { void rangeOfData_options_range_(ffi.Pointer<_NSRange> stret, NSData dataToFind, int mask, _NSRange searchRange) { - _lib._objc_msgSend_271(stret, _id, _lib._sel_rangeOfData_options_range_1, - dataToFind._id, mask, searchRange); + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_271_variant( + stret, + _id, + _lib._sel_rangeOfData_options_range_1, + dataToFind._id, + mask, + searchRange) + : stret.ref = _lib._objc_msgSend_271( + _id, + _lib._sel_rangeOfData_options_range_1, + dataToFind._id, + mask, + searchRange); } void enumerateByteRangesUsingBlock_( @@ -37021,11 +37691,15 @@ class NSNumber extends NSValue { } double get floatValue { - return _lib._objc_msgSend_239(_id, _lib._sel_floatValue1); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_239_variant(_id, _lib._sel_floatValue1) + : _lib._objc_msgSend_239(_id, _lib._sel_floatValue1); } double get doubleValue { - return _lib._objc_msgSend_165(_id, _lib._sel_doubleValue1); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_165_variant(_id, _lib._sel_doubleValue1) + : _lib._objc_msgSend_165(_id, _lib._sel_doubleValue1); } bool get boolValue { @@ -37401,7 +38075,9 @@ class NSValue extends NSObject { } void getRangeValue(ffi.Pointer<_NSRange> stret) { - _lib._objc_msgSend_54(stret, _id, _lib._sel_rangeValue1); + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_54_variant(stret, _id, _lib._sel_rangeValue1) + : stret.ref = _lib._objc_msgSend_54(_id, _lib._sel_rangeValue1); } static NSValue valueWithPoint_(SwiftLibrary _lib, CGPoint point) { @@ -37429,19 +38105,27 @@ class NSValue extends NSObject { } void getPointValue(ffi.Pointer stret) { - _lib._objc_msgSend_59(stret, _id, _lib._sel_pointValue1); + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_59_variant(stret, _id, _lib._sel_pointValue1) + : stret.ref = _lib._objc_msgSend_59(_id, _lib._sel_pointValue1); } void getSizeValue(ffi.Pointer stret) { - _lib._objc_msgSend_60(stret, _id, _lib._sel_sizeValue1); + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_60_variant(stret, _id, _lib._sel_sizeValue1) + : stret.ref = _lib._objc_msgSend_60(_id, _lib._sel_sizeValue1); } void getRectValue(ffi.Pointer stret) { - _lib._objc_msgSend_61(stret, _id, _lib._sel_rectValue1); + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_61_variant(stret, _id, _lib._sel_rectValue1) + : stret.ref = _lib._objc_msgSend_61(_id, _lib._sel_rectValue1); } void getEdgeInsetsValue(ffi.Pointer stret) { - _lib._objc_msgSend_62(stret, _id, _lib._sel_edgeInsetsValue1); + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_62_variant(stret, _id, _lib._sel_edgeInsetsValue1) + : stret.ref = _lib._objc_msgSend_62(_id, _lib._sel_edgeInsetsValue1); } @override @@ -40826,8 +41510,11 @@ class NSDate extends NSObject { } double get timeIntervalSinceReferenceDate { - return _lib._objc_msgSend_165( - _id, _lib._sel_timeIntervalSinceReferenceDate1); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_165_variant( + _id, _lib._sel_timeIntervalSinceReferenceDate1) + : _lib._objc_msgSend_165( + _id, _lib._sel_timeIntervalSinceReferenceDate1); } @override @@ -40851,16 +41538,23 @@ class NSDate extends NSObject { } double timeIntervalSinceDate_(NSDate anotherDate) { - return _lib._objc_msgSend_167( - _id, _lib._sel_timeIntervalSinceDate_1, anotherDate._id); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_167_variant( + _id, _lib._sel_timeIntervalSinceDate_1, anotherDate._id) + : _lib._objc_msgSend_167( + _id, _lib._sel_timeIntervalSinceDate_1, anotherDate._id); } double get timeIntervalSinceNow { - return _lib._objc_msgSend_165(_id, _lib._sel_timeIntervalSinceNow1); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_165_variant(_id, _lib._sel_timeIntervalSinceNow1) + : _lib._objc_msgSend_165(_id, _lib._sel_timeIntervalSinceNow1); } double get timeIntervalSince1970 { - return _lib._objc_msgSend_165(_id, _lib._sel_timeIntervalSince19701); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_165_variant(_id, _lib._sel_timeIntervalSince19701) + : _lib._objc_msgSend_165(_id, _lib._sel_timeIntervalSince19701); } NSObject addTimeInterval_(double seconds) { @@ -41614,8 +42308,11 @@ class NSTimeZone extends NSObject { } double daylightSavingTimeOffsetForDate_(NSDate aDate) { - return _lib._objc_msgSend_167( - _id, _lib._sel_daylightSavingTimeOffsetForDate_1, aDate._id); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_167_variant( + _id, _lib._sel_daylightSavingTimeOffsetForDate_1, aDate._id) + : _lib._objc_msgSend_167( + _id, _lib._sel_daylightSavingTimeOffsetForDate_1, aDate._id); } NSDate? nextDaylightSavingTimeTransitionAfterDate_(NSDate aDate) { @@ -41693,7 +42390,10 @@ class NSTimeZone extends NSObject { } double get daylightSavingTimeOffset { - return _lib._objc_msgSend_165(_id, _lib._sel_daylightSavingTimeOffset1); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_165_variant( + _id, _lib._sel_daylightSavingTimeOffset1) + : _lib._objc_msgSend_165(_id, _lib._sel_daylightSavingTimeOffset1); } NSDate? get nextDaylightSavingTimeTransition { @@ -47520,7 +48220,9 @@ class NSThread extends NSObject { } double get threadPriority { - return _lib._objc_msgSend_165(_id, _lib._sel_threadPriority1); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_165_variant(_id, _lib._sel_threadPriority1) + : _lib._objc_msgSend_165(_id, _lib._sel_threadPriority1); } set threadPriority(double value) { @@ -49005,11 +49707,15 @@ class NSTimer extends NSObject { } double get timeInterval { - return _lib._objc_msgSend_165(_id, _lib._sel_timeInterval1); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_165_variant(_id, _lib._sel_timeInterval1) + : _lib._objc_msgSend_165(_id, _lib._sel_timeInterval1); } double get tolerance { - return _lib._objc_msgSend_165(_id, _lib._sel_tolerance1); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_165_variant(_id, _lib._sel_tolerance1) + : _lib._objc_msgSend_165(_id, _lib._sel_tolerance1); } set tolerance(double value) { @@ -49347,7 +50053,9 @@ class NSConnection extends NSObject { } double get requestTimeout { - return _lib._objc_msgSend_165(_id, _lib._sel_requestTimeout1); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_165_variant(_id, _lib._sel_requestTimeout1) + : _lib._objc_msgSend_165(_id, _lib._sel_requestTimeout1); } set requestTimeout(double value) { @@ -49355,7 +50063,9 @@ class NSConnection extends NSObject { } double get replyTimeout { - return _lib._objc_msgSend_165(_id, _lib._sel_replyTimeout1); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_165_variant(_id, _lib._sel_replyTimeout1) + : _lib._objc_msgSend_165(_id, _lib._sel_replyTimeout1); } set replyTimeout(double value) { @@ -50609,7 +51319,9 @@ class NSAppleEventDescriptor extends NSObject { } double get doubleValue { - return _lib._objc_msgSend_165(_id, _lib._sel_doubleValue1); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_165_variant(_id, _lib._sel_doubleValue1) + : _lib._objc_msgSend_165(_id, _lib._sel_doubleValue1); } int get typeCodeValue { @@ -52240,7 +52952,9 @@ class NSProgress extends NSObject { } double get fractionCompleted { - return _lib._objc_msgSend_165(_id, _lib._sel_fractionCompleted1); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_165_variant(_id, _lib._sel_fractionCompleted1) + : _lib._objc_msgSend_165(_id, _lib._sel_fractionCompleted1); } bool get finished { @@ -54911,8 +55625,11 @@ class NSBundle extends NSObject { } double preservationPriorityForTag_(NSString tag) { - return _lib._objc_msgSend_308( - _id, _lib._sel_preservationPriorityForTag_1, tag._id); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_308_variant( + _id, _lib._sel_preservationPriorityForTag_1, tag._id) + : _lib._objc_msgSend_308( + _id, _lib._sel_preservationPriorityForTag_1, tag._id); } @override @@ -57167,17 +57884,28 @@ class NSCalendar extends NSObject { } void minimumRangeOfUnit_(ffi.Pointer<_NSRange> stret, int unit) { - _lib._objc_msgSend_767(stret, _id, _lib._sel_minimumRangeOfUnit_1, unit); + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_767_variant( + stret, _id, _lib._sel_minimumRangeOfUnit_1, unit) + : stret.ref = + _lib._objc_msgSend_767(_id, _lib._sel_minimumRangeOfUnit_1, unit); } void maximumRangeOfUnit_(ffi.Pointer<_NSRange> stret, int unit) { - _lib._objc_msgSend_767(stret, _id, _lib._sel_maximumRangeOfUnit_1, unit); + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_767_variant( + stret, _id, _lib._sel_maximumRangeOfUnit_1, unit) + : stret.ref = + _lib._objc_msgSend_767(_id, _lib._sel_maximumRangeOfUnit_1, unit); } void rangeOfUnit_inUnit_forDate_( ffi.Pointer<_NSRange> stret, int smaller, int larger, NSDate date) { - _lib._objc_msgSend_768(stret, _id, _lib._sel_rangeOfUnit_inUnit_forDate_1, - smaller, larger, date._id); + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_768_variant(stret, _id, + _lib._sel_rangeOfUnit_inUnit_forDate_1, smaller, larger, date._id) + : stret.ref = _lib._objc_msgSend_768(_id, + _lib._sel_rangeOfUnit_inUnit_forDate_1, smaller, larger, date._id); } int ordinalityOfUnit_inUnit_forDate_(int smaller, int larger, NSDate date) { @@ -60600,7 +61328,9 @@ class NSURLSessionTask extends NSObject { } double get priority { - return _lib._objc_msgSend_239(_id, _lib._sel_priority1); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_239_variant(_id, _lib._sel_priority1) + : _lib._objc_msgSend_239(_id, _lib._sel_priority1); } set priority(double value) { @@ -60778,7 +61508,9 @@ class NSURLRequest extends NSObject { } double get timeoutInterval { - return _lib._objc_msgSend_165(_id, _lib._sel_timeoutInterval1); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_165_variant(_id, _lib._sel_timeoutInterval1) + : _lib._objc_msgSend_165(_id, _lib._sel_timeoutInterval1); } NSURL? get mainDocumentURL { @@ -63156,7 +63888,9 @@ class NSOperation extends NSObject { } double get threadPriority { - return _lib._objc_msgSend_165(_id, _lib._sel_threadPriority1); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_165_variant(_id, _lib._sel_threadPriority1) + : _lib._objc_msgSend_165(_id, _lib._sel_threadPriority1); } set threadPriority(double value) { @@ -63855,7 +64589,11 @@ class NSProcessInfo extends NSObject { } void getOperatingSystemVersion(ffi.Pointer stret) { - _lib._objc_msgSend_940(stret, _id, _lib._sel_operatingSystemVersion1); + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_940_variant( + stret, _id, _lib._sel_operatingSystemVersion1) + : stret.ref = + _lib._objc_msgSend_940(_id, _lib._sel_operatingSystemVersion1); } int get processorCount { @@ -63876,7 +64614,9 @@ class NSProcessInfo extends NSObject { } double get systemUptime { - return _lib._objc_msgSend_165(_id, _lib._sel_systemUptime1); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_165_variant(_id, _lib._sel_systemUptime1) + : _lib._objc_msgSend_165(_id, _lib._sel_systemUptime1); } void disableSuddenTermination() { @@ -64204,7 +64944,9 @@ class NSTextCheckingResult extends NSObject { } void getRange(ffi.Pointer<_NSRange> stret) { - _lib._objc_msgSend_54(stret, _id, _lib._sel_range1); + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_54_variant(stret, _id, _lib._sel_range1) + : stret.ref = _lib._objc_msgSend_54(_id, _lib._sel_range1); } NSOrthography? get orthography { @@ -64236,7 +64978,9 @@ class NSTextCheckingResult extends NSObject { } double get duration { - return _lib._objc_msgSend_165(_id, _lib._sel_duration1); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_165_variant(_id, _lib._sel_duration1) + : _lib._objc_msgSend_165(_id, _lib._sel_duration1); } NSDictionary? get components { @@ -64286,11 +65030,19 @@ class NSTextCheckingResult extends NSObject { } void rangeAtIndex_(ffi.Pointer<_NSRange> stret, int idx) { - _lib._objc_msgSend_347(stret, _id, _lib._sel_rangeAtIndex_1, idx); + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_347_variant( + stret, _id, _lib._sel_rangeAtIndex_1, idx) + : stret.ref = + _lib._objc_msgSend_347(_id, _lib._sel_rangeAtIndex_1, idx); } void rangeWithName_(ffi.Pointer<_NSRange> stret, NSString name) { - _lib._objc_msgSend_340(stret, _id, _lib._sel_rangeWithName_1, name._id); + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_340_variant( + stret, _id, _lib._sel_rangeWithName_1, name._id) + : stret.ref = + _lib._objc_msgSend_340(_id, _lib._sel_rangeWithName_1, name._id); } NSTextCheckingResult resultByAdjustingRangesWithOffset_(int offset) { @@ -64679,13 +65431,20 @@ class NSRegularExpression extends NSObject { void rangeOfFirstMatchInString_options_range_(ffi.Pointer<_NSRange> stret, NSString string, int options, _NSRange range) { - _lib._objc_msgSend_955( - stret, - _id, - _lib._sel_rangeOfFirstMatchInString_options_range_1, - string._id, - options, - range); + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_955_variant( + stret, + _id, + _lib._sel_rangeOfFirstMatchInString_options_range_1, + string._id, + options, + range) + : stret.ref = _lib._objc_msgSend_955( + _id, + _lib._sel_rangeOfFirstMatchInString_options_range_1, + string._id, + options, + range); } NSString stringByReplacingMatchesInString_options_range_withTemplate_( @@ -67102,7 +67861,9 @@ class NSMutableURLRequest extends NSURLRequest { @override double get timeoutInterval { - return _lib._objc_msgSend_165(_id, _lib._sel_timeoutInterval1); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_165_variant(_id, _lib._sel_timeoutInterval1) + : _lib._objc_msgSend_165(_id, _lib._sel_timeoutInterval1); } set timeoutInterval(double value) { @@ -68429,7 +69190,10 @@ class NSURLSessionConfiguration extends NSObject { } double get timeoutIntervalForRequest { - return _lib._objc_msgSend_165(_id, _lib._sel_timeoutIntervalForRequest1); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_165_variant( + _id, _lib._sel_timeoutIntervalForRequest1) + : _lib._objc_msgSend_165(_id, _lib._sel_timeoutIntervalForRequest1); } set timeoutIntervalForRequest(double value) { @@ -68438,7 +69202,10 @@ class NSURLSessionConfiguration extends NSObject { } double get timeoutIntervalForResource { - return _lib._objc_msgSend_165(_id, _lib._sel_timeoutIntervalForResource1); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_165_variant( + _id, _lib._sel_timeoutIntervalForResource1) + : _lib._objc_msgSend_165(_id, _lib._sel_timeoutIntervalForResource1); } set timeoutIntervalForResource(double value) { diff --git a/pkgs/ffigen/lib/src/code_generator/func.dart b/pkgs/ffigen/lib/src/code_generator/func.dart index 576e9b0c2..766cc289e 100644 --- a/pkgs/ffigen/lib/src/code_generator/func.dart +++ b/pkgs/ffigen/lib/src/code_generator/func.dart @@ -95,7 +95,6 @@ class Func extends LookUpBinding { BindingString toBindingString(Writer w) { final s = StringBuffer(); final enclosingFuncName = name; - final useFfiNative = ffiNativeConfig.enabled && nameExpressionIsConst; if (dartDoc != null) { s.write(makeDartDoc(dartDoc!)); @@ -135,7 +134,7 @@ class Func extends LookUpBinding { funcImplCall = functionType.returnType.convertFfiDartTypeToDartType( w, '$funcVarName($argString)', - useFfiNative ? 'lib' : 'this', + ffiNativeConfig.enabled ? 'lib' : 'this', objCRetain: !objCReturnsRetained, ); } else { @@ -146,13 +145,13 @@ class Func extends LookUpBinding { funcImplCall = '$funcVarName($argString)'; } - if (useFfiNative) { + if (ffiNativeConfig.enabled) { final assetString = ffiNativeConfig.assetId != null ? ", assetId: '${ffiNativeConfig.assetId}'" : ''; final nativeFuncName = needsWrapper ? funcVarName : enclosingFuncName; s.write(''' -@${w.ffiLibraryPrefix}.Native<$cType>(symbol: $nameExpression$assetString$isLeafString) +@${w.ffiLibraryPrefix}.Native<$cType>(symbol: '$originalName'$assetString$isLeafString) external $ffiReturnType $nativeFuncName($ffiArgDeclString); '''); @@ -189,7 +188,7 @@ $dartReturnType $enclosingFuncName($dartArgDeclString) { // Write function pointer. s.write(''' late final $funcPointerName = ${w.lookupFuncIdentifier}< - ${w.ffiLibraryPrefix}.NativeFunction<$cType>>($nameExpression); + ${w.ffiLibraryPrefix}.NativeFunction<$cType>>('$originalName'); late final $funcVarName = $funcPointerName.asFunction<$dartType>($isLeafString); '''); @@ -198,12 +197,6 @@ late final $funcVarName = $funcPointerName.asFunction<$dartType>($isLeafString); return BindingString(type: BindingStringType.func, string: s.toString()); } - // Returns the expression used to construct the function name that is used to - // look up the native function. If the expression is not const, this function - // cannot be loaded using a @Native style function lookup. - String get nameExpression => "'$originalName'"; - bool get nameExpressionIsConst => true; - @override void addDependencies(Set dependencies) { if (dependencies.contains(this)) return; diff --git a/pkgs/ffigen/lib/src/code_generator/objc_built_in_functions.dart b/pkgs/ffigen/lib/src/code_generator/objc_built_in_functions.dart index 70f6a5259..48e3ce99c 100644 --- a/pkgs/ffigen/lib/src/code_generator/objc_built_in_functions.dart +++ b/pkgs/ffigen/lib/src/code_generator/objc_built_in_functions.dart @@ -425,31 +425,43 @@ enum ObjCMsgSendVariant { } /// A wrapper around the objc_msgSend function, or the stret or fpret variants. -class ObjCMsgSendFunc extends Func { +class ObjCMsgSendFunc { final ObjCMsgSendVariant variant; final ObjCInternalGlobal useVariants; + late final Func normalFunc; + late final Func? variantFunc; ObjCMsgSendFunc(String name, Type returnType, List params, - ObjCInternalGlobal useVariants) - : this._(name, returnType, params, useVariants, - ObjCMsgSendVariant.fromReturnType(returnType)); - - ObjCMsgSendFunc._(String name, Type returnType, List params, - this.useVariants, this.variant) - : super( - name: name, - originalName: variant.name, - returnType: - variant == ObjCMsgSendVariant.stret ? voidType : returnType, - parameters: [ - if (variant == ObjCMsgSendVariant.stret) - Parameter(name: 'stret', type: PointerType(returnType)), - Parameter(name: 'obj', type: PointerType(objCObjectType)), - Parameter(name: 'sel', type: PointerType(objCSelType)), - for (final p in params) Parameter(name: p.name, type: p.type), - ], - isInternal: true, - ); + this.useVariants) + : variant = ObjCMsgSendVariant.fromReturnType(returnType) { + normalFunc = Func( + name: name, + originalName: ObjCMsgSendVariant.normal.name, + returnType: returnType, + parameters: _params(params), + isInternal: true, + ); + variantFunc = isNormal + ? null + : Func( + name: '${name}_variant', + originalName: variant.name, + returnType: isStret ? voidType : returnType, + parameters: _params(params, + stretType: isStret ? PointerType(returnType) : null), + isInternal: true, + ); + } + + static List _params(List params, + {Type? stretType}) { + return [ + if (stretType != null) Parameter(name: 'stret', type: stretType), + Parameter(name: 'obj', type: PointerType(objCObjectType)), + Parameter(name: 'sel', type: PointerType(objCSelType)), + for (final p in params) Parameter(name: p.name, type: p.type), + ]; + } bool get isStret => variant == ObjCMsgSendVariant.stret; bool get isNormal => variant == ObjCMsgSendVariant.normal; @@ -459,16 +471,38 @@ class ObjCMsgSendFunc extends Func { if (!isNormal) { useVariants.addDependencies(dependencies); } - super.addDependencies(dependencies); + normalFunc.addDependencies(dependencies); + variantFunc?.addDependencies(dependencies); } - @override - String get nameExpression => isNormal - ? "'${variant.name}'" - : ''' -${useVariants.name} ? '${variant.name}' : '${ObjCMsgSendVariant.normal.name}' -'''; + String invoke(String lib, String target, String sel, Iterable params, + {String? stret}) { + final normalCall = _invoke(normalFunc.name, lib, target, sel, params); + if (isStret) { + final stretCall = + _invoke(variantFunc!.name, lib, target, sel, params, stret: stret); + return '$lib.${useVariants.name} ? $stretCall : $stret.ref = $normalCall'; + } else if (variantFunc != null) { + final variantCall = _invoke(variantFunc!.name, lib, target, sel, params); + return '$lib.${useVariants.name} ? $variantCall : $normalCall'; + } else { + return normalCall; + } + } - @override - bool get nameExpressionIsConst => isNormal; + static String _invoke( + String name, + String lib, + String target, + String sel, + Iterable params, { + String? stret, + }) { + return '''$lib.$name(${[ + if (stret != null) stret, + target, + sel, + ...params, + ].join(', ')})'''; + } } diff --git a/pkgs/ffigen/lib/src/code_generator/objc_interface.dart b/pkgs/ffigen/lib/src/code_generator/objc_interface.dart index 495cdf18b..d76cdd7ab 100644 --- a/pkgs/ffigen/lib/src/code_generator/objc_interface.dart +++ b/pkgs/ffigen/lib/src/code_generator/objc_interface.dart @@ -109,9 +109,12 @@ class $name extends ${superType?.name ?? '_ObjCWrapper'} { /// Returns whether [obj] is an instance of [$name]. static bool isInstance(_ObjCWrapper obj) { - return obj._lib.${_isKindOfClassMsgSend.name}( - obj._id, obj._lib.${_isKindOfClass.name}, - obj._lib.${_classObject.name}); + return ${_isKindOfClassMsgSend.invoke( + 'obj._lib', + 'obj._id', + 'obj._lib.${_isKindOfClass.name}', + ['obj._lib.${_classObject.name}'], + )}; } '''); @@ -200,18 +203,14 @@ class $name extends ${superType?.name ?? '_ObjCWrapper'} { if (returnType != voidType) { s.write(' ${convertReturn ? 'final _ret = ' : 'return '}'); } - s.write('_lib.${m.msgSend!.name}('); - if (isStret) { - s.write('stret, '); - } - s.write(isStatic ? '_lib.${_classObject.name}' : '_id'); - s.write(', _lib.${m.selObject!.name}'); - for (final p in m.params) { - final convertedParam = - p.type.convertDartTypeToFfiDartType(w, p.name, objCRetain: false); - s.write(', $convertedParam'); - } - s.write(');\n'); + s.write(m.msgSend!.invoke( + '_lib', + isStatic ? '_lib.${_classObject.name}' : '_id', + '_lib.${m.selObject!.name}', + m.params.map((p) => p.type + .convertDartTypeToFfiDartType(w, p.name, objCRetain: false)), + stret: 'stret')); + s.write(';\n'); if (convertReturn) { final result = returnType.convertFfiDartTypeToDartType( w, From 292b74cbfed77f1e065e655596735acfb14ca1df Mon Sep 17 00:00:00 2001 From: Liam Appelbe Date: Tue, 28 Nov 2023 15:45:57 +1300 Subject: [PATCH 4/6] Fix analysis --- pkgs/ffigen/lib/src/code_generator/objc_built_in_functions.dart | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/ffigen/lib/src/code_generator/objc_built_in_functions.dart b/pkgs/ffigen/lib/src/code_generator/objc_built_in_functions.dart index 48e3ce99c..3bbfd35c0 100644 --- a/pkgs/ffigen/lib/src/code_generator/objc_built_in_functions.dart +++ b/pkgs/ffigen/lib/src/code_generator/objc_built_in_functions.dart @@ -466,7 +466,6 @@ class ObjCMsgSendFunc { bool get isStret => variant == ObjCMsgSendVariant.stret; bool get isNormal => variant == ObjCMsgSendVariant.normal; - @override void addDependencies(Set dependencies) { if (!isNormal) { useVariants.addDependencies(dependencies); From d991f31d91c4b157202e2204152c72ff3d9af273 Mon Sep 17 00:00:00 2001 From: Liam Appelbe Date: Tue, 28 Nov 2023 20:59:02 +1300 Subject: [PATCH 5/6] CHANGELOG entry --- pkgs/ffigen/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/ffigen/CHANGELOG.md b/pkgs/ffigen/CHANGELOG.md index 178656d27..ac8e9a4ef 100644 --- a/pkgs/ffigen/CHANGELOG.md +++ b/pkgs/ffigen/CHANGELOG.md @@ -5,6 +5,7 @@ bindings to **not** be generated by default, since it may result in invalid bindings if the compiler makes a wrong guess. A flag `--ignore-source-errors` (or yaml config `ignore-source-errors: true`) must be passed to change this behaviour. - __Breaking change__: Stop generating setters for global variables marked `const` in C. +- Fix objc_msgSend being used on arm64 platforms where it's not available. ## 10.0.0 From 53a6975a5df837be4f3dbda31fd9a7126040dede Mon Sep 17 00:00:00 2001 From: Liam Appelbe Date: Wed, 29 Nov 2023 09:41:54 +1300 Subject: [PATCH 6/6] Daco's comments --- .../objc_built_in_functions.dart | 79 +++++++++++++------ .../src/code_generator/objc_interface.dart | 2 +- 2 files changed, 54 insertions(+), 27 deletions(-) diff --git a/pkgs/ffigen/lib/src/code_generator/objc_built_in_functions.dart b/pkgs/ffigen/lib/src/code_generator/objc_built_in_functions.dart index 3bbfd35c0..7b066f1a5 100644 --- a/pkgs/ffigen/lib/src/code_generator/objc_built_in_functions.dart +++ b/pkgs/ffigen/lib/src/code_generator/objc_built_in_functions.dart @@ -425,9 +425,25 @@ enum ObjCMsgSendVariant { } /// A wrapper around the objc_msgSend function, or the stret or fpret variants. +/// +/// The [variant] is based purely on the return type of the method. +/// +/// For the stret and fpret variants, we may need to fall back to the normal +/// objc_msgSend function at runtime, depending on the ABI. So we emit both the +/// variant function and the normal function, and decide which to use at runtime +/// based on the ABI. The result of the ABI check is stored in [useVariants]. +/// +/// This runtime check is complicated by the fact that objc_msgSend_stret has +/// a different signature than objc_msgSend has for the same method. This is +/// because objc_msgSend_stret takes a pointer to the return type as its first +/// arg. class ObjCMsgSendFunc { final ObjCMsgSendVariant variant; final ObjCInternalGlobal useVariants; + + // [normalFunc] is always a reference to the normal objc_msgSend function. If + // the [variant] is fpret or stret, then [variantFunc] is a reference to the + // corresponding variant of the objc_msgSend function, otherwise it's null. late final Func normalFunc; late final Func? variantFunc; @@ -441,22 +457,32 @@ class ObjCMsgSendFunc { parameters: _params(params), isInternal: true, ); - variantFunc = isNormal - ? null - : Func( - name: '${name}_variant', - originalName: variant.name, - returnType: isStret ? voidType : returnType, - parameters: _params(params, - stretType: isStret ? PointerType(returnType) : null), - isInternal: true, - ); + switch (variant) { + case ObjCMsgSendVariant.normal: + variantFunc = null; + case ObjCMsgSendVariant.fpret: + variantFunc = Func( + name: '${name}_fpret', + originalName: variant.name, + returnType: returnType, + parameters: _params(params), + isInternal: true, + ); + case ObjCMsgSendVariant.stret: + variantFunc = Func( + name: '${name}_stret', + originalName: variant.name, + returnType: voidType, + parameters: _params(params, structRetPtr: PointerType(returnType)), + isInternal: true, + ); + } } static List _params(List params, - {Type? stretType}) { + {Type? structRetPtr}) { return [ - if (stretType != null) Parameter(name: 'stret', type: stretType), + if (structRetPtr != null) Parameter(name: 'stret', type: structRetPtr), Parameter(name: 'obj', type: PointerType(objCObjectType)), Parameter(name: 'sel', type: PointerType(objCSelType)), for (final p in params) Parameter(name: p.name, type: p.type), @@ -464,10 +490,9 @@ class ObjCMsgSendFunc { } bool get isStret => variant == ObjCMsgSendVariant.stret; - bool get isNormal => variant == ObjCMsgSendVariant.normal; void addDependencies(Set dependencies) { - if (!isNormal) { + if (variant != ObjCMsgSendVariant.normal) { useVariants.addDependencies(dependencies); } normalFunc.addDependencies(dependencies); @@ -475,17 +500,19 @@ class ObjCMsgSendFunc { } String invoke(String lib, String target, String sel, Iterable params, - {String? stret}) { + {String? structRetPtr}) { final normalCall = _invoke(normalFunc.name, lib, target, sel, params); - if (isStret) { - final stretCall = - _invoke(variantFunc!.name, lib, target, sel, params, stret: stret); - return '$lib.${useVariants.name} ? $stretCall : $stret.ref = $normalCall'; - } else if (variantFunc != null) { - final variantCall = _invoke(variantFunc!.name, lib, target, sel, params); - return '$lib.${useVariants.name} ? $variantCall : $normalCall'; - } else { - return normalCall; + switch (variant) { + case ObjCMsgSendVariant.normal: + return normalCall; + case ObjCMsgSendVariant.fpret: + final fpretCall = _invoke(variantFunc!.name, lib, target, sel, params); + return '$lib.${useVariants.name} ? $fpretCall : $normalCall'; + case ObjCMsgSendVariant.stret: + final stretCall = _invoke(variantFunc!.name, lib, target, sel, params, + structRetPtr: structRetPtr); + return '$lib.${useVariants.name} ? $stretCall : ' + '$structRetPtr.ref = $normalCall'; } } @@ -495,10 +522,10 @@ class ObjCMsgSendFunc { String target, String sel, Iterable params, { - String? stret, + String? structRetPtr, }) { return '''$lib.$name(${[ - if (stret != null) stret, + if (structRetPtr != null) structRetPtr, target, sel, ...params, diff --git a/pkgs/ffigen/lib/src/code_generator/objc_interface.dart b/pkgs/ffigen/lib/src/code_generator/objc_interface.dart index d76cdd7ab..5ec93d37c 100644 --- a/pkgs/ffigen/lib/src/code_generator/objc_interface.dart +++ b/pkgs/ffigen/lib/src/code_generator/objc_interface.dart @@ -209,7 +209,7 @@ class $name extends ${superType?.name ?? '_ObjCWrapper'} { '_lib.${m.selObject!.name}', m.params.map((p) => p.type .convertDartTypeToFfiDartType(w, p.name, objCRetain: false)), - stret: 'stret')); + structRetPtr: 'stret')); s.write(';\n'); if (convertReturn) { final result = returnType.convertFfiDartTypeToDartType(