From 0a6e7769bf3c14df54178f22304a0987f7cd9470 Mon Sep 17 00:00:00 2001 From: Liam Appelbe Date: Tue, 7 Jan 2025 12:18:45 +1100 Subject: [PATCH 1/7] [ffigen] Experiment to remove synth blocks --- .../lib/src/code_generator/objc_block.dart | 150 +- .../objc_built_in_functions.dart | 54 +- .../lib/src/code_generator/pointer.dart | 2 +- .../test/native_objc_test/block_test.dart | 110 +- pkgs/objective_c/ffigen_c.yaml | 5 - .../lib/src/c_bindings_generated.dart | 61 +- pkgs/objective_c/lib/src/internal.dart | 17 +- .../src/objective_c_bindings_generated.dart | 2186 +++++++---------- pkgs/objective_c/src/objective_c.c | 24 +- .../src/objective_c_bindings_generated.m | 198 +- pkgs/objective_c/src/objective_c_runtime.h | 30 +- 11 files changed, 1329 insertions(+), 1508 deletions(-) diff --git a/pkgs/ffigen/lib/src/code_generator/objc_block.dart b/pkgs/ffigen/lib/src/code_generator/objc_block.dart index d46c3d913..41c8104a6 100644 --- a/pkgs/ffigen/lib/src/code_generator/objc_block.dart +++ b/pkgs/ffigen/lib/src/code_generator/objc_block.dart @@ -14,7 +14,7 @@ class ObjCBlock extends BindingType { final Type returnType; final List params; final bool returnsRetained; - ObjCBlockWrapperFuncs? _blockWrappers; + late final ObjCBlockWrapperFuncs _blockWrappers; factory ObjCBlock({ required Type returnType, @@ -59,9 +59,7 @@ class ObjCBlock extends BindingType { required this.returnsRetained, required this.builtInFunctions, }) : super(originalName: name) { - if (hasListener) { - _blockWrappers = builtInFunctions.getBlockTrampolines(this); - } + _blockWrappers = builtInFunctions.getBlockTrampolines(this); } // Generates a human readable name for the block based on the args and return @@ -138,8 +136,10 @@ class ObjCBlock extends BindingType { final callExtension = w.topLevelUniqueNamer.makeUnique('${name}_CallExtension'); - final newPointerBlock = ObjCBuiltInFunctions.newPointerBlock.gen(w); - final newClosureBlock = ObjCBuiltInFunctions.newClosureBlock.gen(w); + final newPointerBlock = 'todo';//ObjCBuiltInFunctions.newPointerBlock.gen(w); + // final newClosureBlock = ObjCBuiltInFunctions.newClosureBlock.gen(w); + final newClosureBlock = _blockWrappers.newClosureBlock.name; + final registerBlockClosure = ObjCBuiltInFunctions.registerBlockClosure.gen(w); final getBlockClosure = ObjCBuiltInFunctions.getBlockClosure.gen(w); final releaseFn = ObjCBuiltInFunctions.objectRelease.gen(w); final wrapBlockingBlockFn = ObjCBuiltInFunctions.wrapBlockingBlock.gen(w); @@ -154,40 +154,40 @@ class ObjCBlock extends BindingType { // Write the function pointer based trampoline function. s.write(''' $returnFfiDartType $funcPtrTrampoline( - $blockCType block, ${func.paramsFfiDartType}) => - block.ref.target.cast<${func.natFnFfiDartType}>() + $voidPtrCType target, ${func.paramsFfiDartType}) => + target.cast<${func.natFnFfiDartType}>() .asFunction<${func.ffiDartType}>()(${func.paramsNameOnly}); -$voidPtrCType $funcPtrCallable = ${w.ffiLibraryPrefix}.Pointer.fromFunction< - ${func.trampCType}>($funcPtrTrampoline $exceptionalReturn).cast(); +final $funcPtrCallable = ${w.ffiLibraryPrefix}.Pointer.fromFunction< + ${func.trampCType}>($funcPtrTrampoline $exceptionalReturn); '''); // Write the closure based trampoline function. s.write(''' $returnFfiDartType $closureTrampoline( - $blockCType block, ${func.paramsFfiDartType}) => - ($getBlockClosure(block) as ${func.ffiDartType})(${func.paramsNameOnly}); -$voidPtrCType $closureCallable = ${w.ffiLibraryPrefix}.Pointer.fromFunction< - ${func.trampCType}>($closureTrampoline $exceptionalReturn).cast(); + $voidPtrCType target, ${func.paramsFfiDartType}) => + ($getBlockClosure(target.address) as ${func.ffiDartType})(${func.paramsNameOnly}); +final $closureCallable = ${w.ffiLibraryPrefix}.Pointer.fromFunction< + ${func.trampCType}>($closureTrampoline $exceptionalReturn); '''); if (hasListener) { // Write the listener trampoline function. s.write(''' $returnFfiDartType $listenerTrampoline( - $blockCType block, ${func.paramsFfiDartType}) { - ($getBlockClosure(block) as ${func.ffiDartType})(${func.paramsNameOnly}); - $releaseFn(block.cast()); + $voidPtrCType target, ${func.paramsFfiDartType}) { + ($getBlockClosure(target.address) as ${func.ffiDartType})(${func.paramsNameOnly}); + // $releaseFn(block.cast()); } ${func.trampNatCallType} $listenerCallable = ${func.trampNatCallType}.listener( $listenerTrampoline $exceptionalReturn)..keepIsolateAlive = false; $returnFfiDartType $blockingTrampoline( - $blockCType block, ${blockingFunc.paramsFfiDartType}) { + $voidPtrCType target, ${blockingFunc.paramsFfiDartType}) { try { - ($getBlockClosure(block) as ${func.ffiDartType})(${func.paramsNameOnly}); + ($getBlockClosure(target.address) as ${func.ffiDartType})(${func.paramsNameOnly}); } catch (e) { } finally { $signalWaiterFn(waiter); - $releaseFn(block.cast()); + // $releaseFn(block.cast()); } } ${blockingFunc.trampNatCallType} $blockingCallable = @@ -231,9 +231,9 @@ abstract final class $name { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static $blockType fromFunctionPointer(${func.natFnPtrCType} ptr) => - $blockType($newPointerBlock($funcPtrCallable, ptr.cast()), - retain: false, release: true); + // static $blockType fromFunctionPointer(${func.natFnPtrCType} ptr) => + // $blockType($newPointerBlock($funcPtrCallable, ptr.cast()), + // retain: false, release: true); /// Creates a block from a Dart function. /// @@ -241,8 +241,9 @@ abstract final class $name { /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. static $blockType fromFunction(${func.dartType} fn) => - $blockType($newClosureBlock($closureCallable, $convFn), - retain: false, release: true); + $blockType($newClosureBlock( + $closureCallable, $registerBlockClosure($convFn)), + retain: false, release: true); '''); // Listener block constructor is only available for void blocks. @@ -262,8 +263,8 @@ abstract final class $name { ); final listenerConvFn = '(${func.paramsFfiDartType}) => $listenerConvFnInvocation'; - final wrapListenerFn = _blockWrappers!.listenerWrapper.name; - final wrapBlockingFn = _blockWrappers!.blockingWrapper.name; + final wrapListenerFn = _blockWrappers.listenerWrapper!.name; + final wrapBlockingFn = _blockWrappers.blockingWrapper!.name; s.write(''' @@ -278,7 +279,7 @@ abstract final class $name { /// blocks do not keep the isolate alive. static $blockType listener(${func.dartType} fn) { final raw = $newClosureBlock( - $listenerCallable.nativeFunction.cast(), $listenerConvFn); + $listenerCallable.nativeFunction.cast(), $registerBlockClosure($listenerConvFn)); final wrapper = $wrapListenerFn(raw); $releaseFn(raw.cast()); return $blockType(wrapper, retain: false, release: true); @@ -295,9 +296,9 @@ abstract final class $name { /// indefinitely, or have other undefined behavior. static $blockType blocking(${func.dartType} fn) { final raw = $newClosureBlock( - $blockingCallable.nativeFunction.cast(), $listenerConvFn); + $blockingCallable.nativeFunction.cast(), $registerBlockClosure($listenerConvFn)); final rawListener = $newClosureBlock( - $blockingListenerCallable.nativeFunction.cast(), $listenerConvFn); + $blockingListenerCallable.nativeFunction.cast(), $registerBlockClosure($listenerConvFn)); final wrapper = $wrapBlockingBlockFn($wrapBlockingFn, raw, rawListener); $releaseFn(raw.cast()); $releaseFn(rawListener.cast()); @@ -308,30 +309,30 @@ abstract final class $name { s.write('}\n\n'); // Call operator extension method. - s.write(''' -/// Call operator for `$blockType`. -extension $callExtension on $blockType { - ${returnType.getDartType(w)} call(${func.paramsDartType}) =>'''); - final callMethodArgs = params - .map((p) => p.type.convertDartTypeToFfiDartType( - w, - p.name, - objCRetain: p.objCConsumed, - objCAutorelease: false, - )) - .join(', '); - final callMethodInvocation = ''' -ref.pointer.ref.invoke.cast<${func.trampNatFnCType}>() - .asFunction<${func.trampFfiDartType}>()( - ref.pointer, $callMethodArgs)'''; - s.write(returnType.convertFfiDartTypeToDartType( - w, - callMethodInvocation, - objCRetain: !returnsRetained, - )); - s.write(';\n'); - - s.write('}\n\n'); +// s.write(''' +// /// Call operator for `$blockType`. +// extension $callExtension on $blockType { +// ${returnType.getDartType(w)} call(${func.paramsDartType}) =>'''); +// final callMethodArgs = params +// .map((p) => p.type.convertDartTypeToFfiDartType( +// w, +// p.name, +// objCRetain: p.objCConsumed, +// objCAutorelease: false, +// )) +// .join(', '); +// final callMethodInvocation = ''' +// ref.pointer.ref.invoke.cast<${func.trampNatFnCType}>() +// .asFunction<${func.trampFfiDartType}>()( +// ref.pointer, $callMethodArgs)'''; +// s.write(returnType.convertFfiDartTypeToDartType( +// w, +// callMethodInvocation, +// objCRetain: !returnsRetained, +// )); +// s.write(';\n'); + +// s.write('}\n\n'); return BindingString( type: BindingStringType.objcBlock, string: s.toString()); } @@ -343,9 +344,11 @@ ref.pointer.ref.invoke.cast<${func.trampNatFnCType}>() final argsReceived = []; final retains = []; + final noRetains = []; for (var i = 0; i < params.length; ++i) { final param = params[i]; final argName = 'arg$i'; + noRetains.add(argName); argsReceived.add(param.getNativeType(varName: argName)); retains.add(param.type.generateRetain(argName) ?? argName); } @@ -360,28 +363,46 @@ ref.pointer.ref.invoke.cast<${func.trampNatFnCType}>() ...argsReceived, ].join(', '); - final listenerWrapper = _blockWrappers!.listenerWrapper.name; - final blockingWrapper = _blockWrappers!.blockingWrapper.name; - final listenerName = - w.objCLevelUniqueNamer.makeUnique('_ListenerTrampoline'); + final returnNativeType = returnType.getNativeType(); + + final newClosureBlock = _blockWrappers.newClosureBlock.name; + final blockTypeName = + w.objCLevelUniqueNamer.makeUnique('_BlockType'); final blockingName = w.objCLevelUniqueNamer.makeUnique('_BlockingTrampoline'); + final trampolineArg = + _blockWrappers.trampolineType.getNativeType(varName: 'trampoline'); final s = StringBuffer(); s.write(''' -typedef ${returnType.getNativeType()} (^$listenerName)($argStr); +typedef $returnNativeType (^$blockTypeName)($argStr); __attribute__((visibility("default"))) __attribute__((used)) -$listenerName $listenerWrapper($listenerName block) NS_RETURNS_RETAINED { +$blockTypeName $newClosureBlock( + $trampolineArg, void* target) NS_RETURNS_RETAINED { + return ^$returnNativeType($argStr) { + return trampoline(${['target', ...noRetains].join(', ')}); + }; +} +'''); + + if (hasListener) { + final listenerWrapper = _blockWrappers.listenerWrapper!.name; + final blockingWrapper = _blockWrappers.blockingWrapper!.name; + + s.write(''' + +__attribute__((visibility("default"))) __attribute__((used)) +$blockTypeName $listenerWrapper($blockTypeName block) NS_RETURNS_RETAINED { return ^void($argStr) { ${generateRetain('block')}; block(${retains.join(', ')}); }; } -typedef ${returnType.getNativeType()} (^$blockingName)($blockingArgStr); +typedef $returnNativeType (^$blockingName)($blockingArgStr); __attribute__((visibility("default"))) __attribute__((used)) -$listenerName $blockingWrapper( +$blockTypeName $blockingWrapper( $blockingName block, $blockingName listenerBlock, void* (*newWaiter)(), void (*awaitWaiter)(void*)) NS_RETURNS_RETAINED { NSThread *targetThread = [NSThread currentThread]; @@ -398,6 +419,7 @@ $listenerName $blockingWrapper( }; } '''); + } return BindingString( type: BindingStringType.objcBlock, string: s.toString()); } @@ -500,8 +522,8 @@ class _FnHelper { returnType: returnType, parameters: [ Parameter( - type: PointerType(objCBlockType), - name: 'block', + type: PointerType(voidType), + name: 'target', objCConsumed: false), ...params, ], 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 8306d1d7c..f5f212f1d 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 @@ -26,8 +26,7 @@ class ObjCBuiltInFunctions { static const msgSendStretPointer = ObjCImport('msgSendStretPointer'); static const useMsgSendVariants = ObjCImport('useMsgSendVariants'); static const respondsToSelector = ObjCImport('respondsToSelector'); - static const newPointerBlock = ObjCImport('newPointerBlock'); - static const newClosureBlock = ObjCImport('newClosureBlock'); + static const registerBlockClosure = ObjCImport('registerBlockClosure'); static const getBlockClosure = ObjCImport('getBlockClosure'); static const getProtocolMethodSignature = ObjCImport('getProtocolMethodSignature'); @@ -210,13 +209,44 @@ class ObjCBuiltInFunctions { .toList(); final _blockTrampolines = {}; - ObjCBlockWrapperFuncs? getBlockTrampolines(ObjCBlock block) { + ObjCBlockWrapperFuncs getBlockTrampolines(ObjCBlock block) { final id = _methodSigId(block.returnType, block.params); final idHash = fnvHash32(id).toRadixString(36); + final trampolineType = FunctionType( + returnType: block.returnType, + parameters: [ + Parameter( + type: PointerType(voidType), + name: 'target', + objCConsumed: false), + ...block.params, + ], + ); return _blockTrampolines[id] ??= ObjCBlockWrapperFuncs( - _blockTrampolineFunc('_${wrapperName}_wrapListenerBlock_$idHash'), - _blockTrampolineFunc('_${wrapperName}_wrapBlockingBlock_$idHash', - blocking: true), + trampolineType, + Func( + name: '_${wrapperName}_newClosureBlock_$idHash', + returnType: PointerType(objCBlockType), + parameters: [ + Parameter( + name: 'trampoline', + type: PointerType(NativeFunc(trampolineType)), + objCConsumed: false), + Parameter( + type: PointerType(voidType), + name: 'target', + objCConsumed: false), + ], + objCReturnsRetained: true, + isLeaf: true, + isInternal: true, + useNameForLookup: true, + ffiNativeConfig: const FfiNativeConfig(enabled: true), + ), + // TODO: wrap*Block should become new*Block. + block.hasListener ? _blockTrampolineFunc('_${wrapperName}_wrapListenerBlock_$idHash') : null, + block.hasListener ? _blockTrampolineFunc('_${wrapperName}_wrapBlockingBlock_$idHash', + blocking: true) : null, ); } @@ -263,15 +293,21 @@ class ObjCBuiltInFunctions { /// A native trampoline function for a listener block. class ObjCBlockWrapperFuncs extends AstNode { - final Func listenerWrapper; - final Func blockingWrapper; + final FunctionType trampolineType; + final Func newClosureBlock; + final Func? listenerWrapper; + final Func? blockingWrapper; bool objCBindingsGenerated = false; - ObjCBlockWrapperFuncs(this.listenerWrapper, this.blockingWrapper); + ObjCBlockWrapperFuncs( + this.trampolineType, + this.newClosureBlock, this.listenerWrapper, this.blockingWrapper); @override void visitChildren(Visitor visitor) { super.visitChildren(visitor); + visitor.visit(trampolineType); + visitor.visit(newClosureBlock); visitor.visit(listenerWrapper); visitor.visit(blockingWrapper); } diff --git a/pkgs/ffigen/lib/src/code_generator/pointer.dart b/pkgs/ffigen/lib/src/code_generator/pointer.dart index 4df2e867c..f64873a45 100644 --- a/pkgs/ffigen/lib/src/code_generator/pointer.dart +++ b/pkgs/ffigen/lib/src/code_generator/pointer.dart @@ -105,7 +105,7 @@ class IncompleteArray extends PointerType { @override String getNativeType({String varName = ''}) => - '${child.getNativeType()} $varName[]'; + '${child.getNativeType()}* $varName'; @override String toString() => '$child[]'; diff --git a/pkgs/ffigen/test/native_objc_test/block_test.dart b/pkgs/ffigen/test/native_objc_test/block_test.dart index 5da273c5d..557e0256b 100644 --- a/pkgs/ffigen/test/native_objc_test/block_test.dart +++ b/pkgs/ffigen/test/native_objc_test/block_test.dart @@ -65,14 +65,14 @@ void main() { expect(blockTester2.call_(456), 4560); }); - test('Block from function pointer', () { + /*test('Block from function pointer', () { final block = IntBlock.fromFunctionPointer(Pointer.fromFunction(_add100, 999)); final blockTester = BlockTester.newFromBlock_(block); blockTester.pokeBlock(); expect(blockTester.call_(123), 223); expect(block(123), 223); - }); + });*/ int Function(int) makeAdder(int addTo) { return (int x) => addTo + x; @@ -83,7 +83,7 @@ void main() { final blockTester = BlockTester.newFromBlock_(block); blockTester.pokeBlock(); expect(blockTester.call_(123), 4123); - expect(block(123), 4123); + // expect(block(123), 4123); }); test('Listener block same thread', () async { @@ -169,7 +169,7 @@ void main() { expect(await resultCompleter.future, 123456); }); - test('Blocking block manual invocation', () { + /*test('Blocking block manual invocation', () { int value = 0; final block = VoidBlock.blocking(() { waitSync(Duration(milliseconds: 100)); @@ -177,13 +177,13 @@ void main() { }); block(); expect(value, 123); - }); + });*/ test('Float block', () { final block = FloatBlock.fromFunction((double x) { return x + 4.56; }); - expect(block(1.23), closeTo(5.79, 1e-6)); + // expect(block(1.23), closeTo(5.79, 1e-6)); expect(BlockTester.callFloatBlock_(block), closeTo(5.79, 1e-6)); }); @@ -191,7 +191,7 @@ void main() { final block = DoubleBlock.fromFunction((double x) { return x + 4.56; }); - expect(block(1.23), closeTo(5.79, 1e-6)); + // expect(block(1.23), closeTo(5.79, 1e-6)); expect(BlockTester.callDoubleBlock_(block), closeTo(5.79, 1e-6)); }); @@ -215,11 +215,11 @@ void main() { return temp; }); - final result1 = block(input); - expect(result1.x, 3.4); - expect(result1.y, 5.6); - expect(result1.z, 7.8); - expect(result1.w, 1.2); + // final result1 = block(input); + // expect(result1.x, 3.4); + // expect(result1.y, 5.6); + // expect(result1.z, 7.8); + // expect(result1.w, 1.2); final result2 = BlockTester.callVec4Block_(block); expect(result2.x, 3.4); @@ -235,8 +235,8 @@ void main() { sel = x.toDartString(); }); - block('Hello'.toSelector()); - expect(sel, 'Hello'); + // block('Hello'.toSelector()); + // expect(sel, 'Hello'); BlockTester.callSelectorBlock_(block); expect(sel, 'Select'); @@ -249,14 +249,14 @@ void main() { return x; }); - final obj = DummyObject.new1(); - final result1 = block(obj); - expect(result1, obj); - expect(isCalled, isTrue); + // final obj = DummyObject.new1(); + // final result1 = block(obj); + // expect(result1, obj); + // expect(isCalled, isTrue); isCalled = false; final result2 = BlockTester.callObjectBlock_(block); - expect(result2, isNot(obj)); + // expect(result2, isNot(obj)); expect(result2.ref.pointer, isNot(nullptr)); expect(isCalled, isTrue); }); @@ -268,15 +268,15 @@ void main() { return x; }); - final obj = DummyObject.new1(); - final result1 = block(obj); - expect(result1, obj); - expect(isCalled, isTrue); + // final obj = DummyObject.new1(); + // final result1 = block(obj); + // expect(result1, obj); + // expect(isCalled, isTrue); - isCalled = false; - final result2 = block(null); - expect(result2, isNull); - expect(isCalled, isTrue); + // isCalled = false; + // final result2 = block(null); + // expect(result2, isNull); + // expect(isCalled, isTrue); isCalled = false; final result3 = BlockTester.callNullableObjectBlock_(block); @@ -289,11 +289,11 @@ void main() { final block = NullableStringBlock.fromFunction( (NSString? x) => '$x Cat'.toNSString()); - final result1 = block('Dog'.toNSString()); - expect(result1.toString(), 'Dog Cat'); + // final result1 = block('Dog'.toNSString()); + // expect(result1.toString(), 'Dog Cat'); - final result2 = block(null); - expect(result2.toString(), 'null Cat'); + // final result2 = block(null); + // expect(result2.toString(), 'null Cat'); final result3 = BlockTester.callNullableStringBlock_(block); expect(result3.toString(), 'Lizard Cat'); @@ -373,7 +373,7 @@ void main() { await hasRun.future; }); - test('Block block', () { + /*test('Block block', () { final blockBlock = BlockBlock.fromFunction((ObjCBlock intBlock) { return IntBlock.fromFunction((int x) { @@ -402,9 +402,9 @@ void main() { final result2 = BlockTester.newBlock_withMult_(blockBlock, 2); expect(result2(1), 14); - }); + });*/ - Pointer funcPointerBlockRefCountTest() { + /*Pointer funcPointerBlockRefCountTest() { final block = IntBlock.fromFunctionPointer(Pointer.fromFunction(_add100, 999)); expect(internal_for_testing.blockHasRegisteredClosure(block.ref.pointer), @@ -417,9 +417,9 @@ void main() { final rawBlock = funcPointerBlockRefCountTest(); doGC(); expect(blockRetainCount(rawBlock), 0); - }, skip: !canDoGC); + }, skip: !canDoGC);*/ - Pointer funcBlockRefCountTest() { + /*Pointer funcBlockRefCountTest() { final block = IntBlock.fromFunction(makeAdder(4000)); expect(internal_for_testing.blockHasRegisteredClosure(block.ref.pointer), true); @@ -444,9 +444,9 @@ void main() { final rawBlock = block.ref.retainAndReturnPointer(); expect(blockRetainCount(rawBlock), 2); return rawBlock; - } + }*/ - int blockManualRetainRefCountTest2(Pointer rawBlock) { + /*int blockManualRetainRefCountTest2(Pointer rawBlock) { final block = IntBlock.castFromPointer(rawBlock.cast(), retain: false, release: true); return blockRetainCount(block.ref.pointer); @@ -462,9 +462,9 @@ void main() { expect(blockRetainCount(rawBlock), 0); expect(internal_for_testing.blockHasRegisteredClosure(rawBlock.cast()), false); - }, skip: !canDoGC); + }, skip: !canDoGC);*/ - (Pointer, Pointer, Pointer) + /*(Pointer, Pointer, Pointer) blockBlockDartCallRefCountTest() { final pool = lib.objc_autoreleasePoolPush(); final inputBlock = IntBlock.fromFunction((int x) { @@ -523,9 +523,9 @@ void main() { expect(blockRetainCount(outputBlock), 0); expect(internal_for_testing.blockHasRegisteredClosure(outputBlock.cast()), false); - }, skip: !canDoGC); + }, skip: !canDoGC);*/ - (Pointer, Pointer, Pointer) + /*(Pointer, Pointer, Pointer) blockBlockObjCCallRefCountTest() { final pool = lib.objc_autoreleasePoolPush(); late Pointer inputBlock; @@ -574,9 +574,9 @@ void main() { expect(blockRetainCount(outputBlock), 0); expect(internal_for_testing.blockHasRegisteredClosure(outputBlock.cast()), false); - }, skip: !canDoGC); + }, skip: !canDoGC);*/ - (Pointer, Pointer, Pointer) + /*(Pointer, Pointer, Pointer) nativeBlockBlockDartCallRefCountTest() { final pool = lib.objc_autoreleasePoolPush(); final inputBlock = IntBlock.fromFunction((int x) { @@ -608,13 +608,13 @@ void main() { expect(blockRetainCount(inputBlock), 0); expect(blockRetainCount(blockBlock), 0); expect(blockRetainCount(outputBlock), 0); - }, skip: !canDoGC); + }, skip: !canDoGC);*/ (Pointer, Pointer) nativeBlockBlockObjCCallRefCountTest() { final blockBlock = BlockTester.newBlockBlock_(7); final outputBlock = BlockTester.newBlock_withMult_(blockBlock, 2); - expect(outputBlock(1), 14); + expect(BlockTester.newFromBlock_(outputBlock).call_(1), 14); doGC(); expect(blockRetainCount(blockBlock.ref.pointer), 1); @@ -629,7 +629,7 @@ void main() { expect(blockRetainCount(outputBlock), 0); }, skip: !canDoGC); - (Pointer, Pointer) objectBlockRefCountTest(Allocator alloc) { + /*(Pointer, Pointer) objectBlockRefCountTest(Allocator alloc) { final pool = lib.objc_autoreleasePoolPush(); final inputCounter = alloc(); final outputCounter = alloc(); @@ -656,7 +656,7 @@ void main() { expect(inputCounter.value, 0); expect(outputCounter.value, 0); }); - }, skip: !canDoGC); + }, skip: !canDoGC);*/ (Pointer, Pointer) objectNativeBlockRefCountTest( Allocator alloc) { @@ -709,7 +709,7 @@ void main() { thread.start(); await hasRun.future; - expect(inputBlock(123), 12300); + expect(BlockTester.newFromBlock_(inputBlock).call_(123), 12300); thread.ref.release(); doGC(); @@ -726,7 +726,7 @@ void main() { await Future.delayed(Duration.zero); // Let dispose message arrive. doGC(); - expect(blockRetainCount(inputBlock), 0); + // expect(blockRetainCount(inputBlock), 0); expect(blockRetainCount(blockBlock), 0); }, skip: !canDoGC); @@ -759,7 +759,7 @@ void main() { expect(objectRetainCount(rawDummyObject), 0); }, skip: !canDoGC); - test('Blocking block ref counting new thread', () async { + /*test('Blocking block ref counting new thread', () async { final completer = Completer(); DummyObject? dummyObject = DummyObject.new1(); DartObjectListenerBlock? block = @@ -790,9 +790,9 @@ void main() { expect(blockRetainCount(rawBlock), 0); expect(objectRetainCount(rawDummyObject), 0); - }, skip: !canDoGC); + }, skip: !canDoGC);*/ - test('Block fields have sensible values', () { + /*test('Block fields have sensible values', () { final block = IntBlock.fromFunction(makeAdder(4000)); final blockPtr = block.ref.pointer; expect(blockPtr.ref.isa, isNot(0)); @@ -806,7 +806,7 @@ void main() { expect(descPtr.ref.copy_helper, nullptr); expect(descPtr.ref.dispose_helper, isNot(nullptr)); expect(descPtr.ref.signature, nullptr); - }); + });*/ test('Block trampoline args converted to id', () { final objCBindings = @@ -860,7 +860,7 @@ void main() { await flutterDoGC(); expect(blockRetainCount(blockPtr), 0); - expect(objectRetainCount(objectPtr), 0); + // expect(objectRetainCount(objectPtr), 0); } }); }); diff --git a/pkgs/objective_c/ffigen_c.yaml b/pkgs/objective_c/ffigen_c.yaml index a1a733118..d83764bed 100644 --- a/pkgs/objective_c/ffigen_c.yaml +++ b/pkgs/objective_c/ffigen_c.yaml @@ -57,11 +57,6 @@ functions: 'objc_getProtocol': 'getProtocol' 'protocol_getMethodDescription': 'getMethodDescription' 'protocol_getName': 'getProtocolName' -globals: - include: - - '_NSConcrete.*Block' - rename: - '_(.*)': '$1' typedefs: include: - 'ObjC.*' diff --git a/pkgs/objective_c/lib/src/c_bindings_generated.dart b/pkgs/objective_c/lib/src/c_bindings_generated.dart index be88ca160..618529460 100644 --- a/pkgs/objective_c/lib/src/c_bindings_generated.dart +++ b/pkgs/objective_c/lib/src/c_bindings_generated.dart @@ -47,27 +47,6 @@ external int Dart_InitializeApiDL( ffi.Pointer data, ); -@ffi.Array.multi([32]) -@ffi.Native>>(symbol: "_NSConcreteAutoBlock") -external ffi.Array> NSConcreteAutoBlock; - -@ffi.Array.multi([32]) -@ffi.Native>>( - symbol: "_NSConcreteFinalizingBlock") -external ffi.Array> NSConcreteFinalizingBlock; - -@ffi.Array.multi([32]) -@ffi.Native>>(symbol: "_NSConcreteGlobalBlock") -external ffi.Array> NSConcreteGlobalBlock; - -@ffi.Array.multi([32]) -@ffi.Native>>(symbol: "_NSConcreteMallocBlock") -external ffi.Array> NSConcreteMallocBlock; - -@ffi.Array.multi([32]) -@ffi.Native>>(symbol: "_NSConcreteStackBlock") -external ffi.Array> NSConcreteStackBlock; - @ffi.Native)>( symbol: "DOBJC_awaitWaiter") external void awaitWaiter( @@ -208,7 +187,6 @@ external void signalWaiter( ); typedef Dart_FinalizableHandle = ffi.Pointer<_Dart_FinalizableHandle>; -typedef ObjCBlockDesc = _ObjCBlockDesc; typedef ObjCBlockImpl = _ObjCBlockImpl; typedef ObjCMethodDesc = _ObjCMethodDesc; typedef ObjCObject = _ObjCObject; @@ -217,44 +195,7 @@ typedef ObjCSelector = _ObjCSelector; final class _Dart_FinalizableHandle extends ffi.Opaque {} -final class _ObjCBlockDesc extends ffi.Struct { - @ffi.UnsignedLong() - external int reserved; - - @ffi.UnsignedLong() - external int size; - - external ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer dst, ffi.Pointer src)>> - copy_helper; - - external ffi - .Pointer src)>> - dispose_helper; - - external ffi.Pointer signature; -} - -final class _ObjCBlockImpl extends ffi.Struct { - external ffi.Pointer isa; - - @ffi.Int() - external int flags; - - @ffi.Int() - external int reserved; - - external ffi.Pointer invoke; - - external ffi.Pointer descriptor; - - external ffi.Pointer target; - - @ffi.Int64() - external int dispose_port; -} +final class _ObjCBlockImpl extends ffi.Opaque {} final class _ObjCMethodDesc extends ffi.Struct { external ffi.Pointer name; diff --git a/pkgs/objective_c/lib/src/internal.dart b/pkgs/objective_c/lib/src/internal.dart index af40dad25..5e8528770 100644 --- a/pkgs/objective_c/lib/src/internal.dart +++ b/pkgs/objective_c/lib/src/internal.dart @@ -345,7 +345,7 @@ class ObjCBlockBase extends _ObjCRefHolder { : super(_ObjCBlockRef(ptr, retain: retain, release: release)); } -Pointer _newBlockDesc( +/*Pointer _newBlockDesc( Pointer> disposeHelper) { final desc = calloc.allocate(sizeOf()); desc.ref.reserved = 0; @@ -392,13 +392,13 @@ BlockPtr newClosureBlock(VoidPtr invoke, Function fn) => _newBlock( /// Only for use by ffigen bindings. BlockPtr newPointerBlock(VoidPtr invoke, VoidPtr target) => - _newBlock(invoke, target, _pointerBlockDesc, 0, 0); + _newBlock(invoke, target, _pointerBlockDesc, 0, 0);*/ final _blockClosureRegistry = {}; int _blockClosureRegistryLastId = 0; -final _blockClosureDisposer = () { +/*final _blockClosureDisposer = () { _ensureDartAPI(); return RawReceivePort((dynamic msg) { final id = msg as int; @@ -406,9 +406,9 @@ final _blockClosureDisposer = () { _blockClosureRegistry.remove(id); }, 'ObjCBlockClosureDisposer') ..keepIsolateAlive = false; -}(); +}();*/ -VoidPtr _registerBlockClosure(Function closure) { +VoidPtr registerBlockClosure(Function closure) { ++_blockClosureRegistryLastId; assert(!_blockClosureRegistry.containsKey(_blockClosureRegistryLastId)); _blockClosureRegistry[_blockClosureRegistryLastId] = closure; @@ -416,8 +416,7 @@ VoidPtr _registerBlockClosure(Function closure) { } /// Only for use by ffigen bindings. -Function getBlockClosure(BlockPtr block) { - var id = block.ref.target.address; +Function getBlockClosure(int id) { assert(_blockClosureRegistry.containsKey(id)); return _blockClosureRegistry[id]!; } @@ -438,8 +437,8 @@ BlockPtr wrapBlockingBlock( ); // Not exported by ../objective_c.dart, because they're only for testing. -bool blockHasRegisteredClosure(BlockPtr block) => - _blockClosureRegistry.containsKey(block.ref.target.address); +bool blockHasRegisteredClosure(int id) => + _blockClosureRegistry.containsKey(id); bool isValidBlock(BlockPtr block) => c.isValidBlock(block); bool isValidClass(ObjectPtr clazz) => _isValidClass(clazz); bool isValidObject(ObjectPtr object) => _isValidObject(object); diff --git a/pkgs/objective_c/lib/src/objective_c_bindings_generated.dart b/pkgs/objective_c/lib/src/objective_c_bindings_generated.dart index 767000c3e..36b235003 100644 --- a/pkgs/objective_c/lib/src/objective_c_bindings_generated.dart +++ b/pkgs/objective_c/lib/src/objective_c_bindings_generated.dart @@ -36,6 +36,361 @@ set NSLocalizedDescriptionKey(NSString value) { _NSLocalizedDescriptionKey = value.ref.retainAndReturnPointer(); } +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer target, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer> arg2, + ffi.UnsignedLong arg3)>>, + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer + _ObjectiveCBindings_newClosureBlock_17ap02x( + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer target, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer> arg2, + ffi.UnsignedLong arg3)>> + trampoline, + ffi.Pointer target, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer target, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.UnsignedLong arg2)>>, + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer + _ObjectiveCBindings_newClosureBlock_18d6mda( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer target, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.UnsignedLong arg2)>> + trampoline, + ffi.Pointer target, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer<_NSZone> Function( + ffi.Pointer target, ffi.Pointer arg0)>>, + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer + _ObjectiveCBindings_newClosureBlock_1a8cl66( + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer<_NSZone> Function( + ffi.Pointer target, ffi.Pointer arg0)>> + trampoline, + ffi.Pointer target, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer target, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>, + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer + _ObjectiveCBindings_newClosureBlock_1c0c70u( + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer target, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>> + trampoline, + ffi.Pointer target, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer target, ffi.Pointer arg0)>>, + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer + _ObjectiveCBindings_newClosureBlock_1ckyi24( + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer target, ffi.Pointer arg0)>> + trampoline, + ffi.Pointer target, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer target, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>, + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer + _ObjectiveCBindings_newClosureBlock_1j2nt86( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer target, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>> + trampoline, + ffi.Pointer target, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer target, + ffi.Pointer arg0, + ffi.Pointer arg1)>>, + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer + _ObjectiveCBindings_newClosureBlock_1m9h2n( + ffi.Pointer< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer target, + ffi.Pointer arg0, + ffi.Pointer arg1)>> + trampoline, + ffi.Pointer target, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer target, ffi.Pointer arg0)>>, + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer + _ObjectiveCBindings_newClosureBlock_1yesha9( + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer target, ffi.Pointer arg0)>> + trampoline, + ffi.Pointer target, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer target, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer> arg3)>>, + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer + _ObjectiveCBindings_newClosureBlock_e2pkq8( + ffi.Pointer< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer target, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer> arg3)>> + trampoline, + ffi.Pointer target, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer target, ffi.Pointer arg0)>>, + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer + _ObjectiveCBindings_newClosureBlock_e3qsqz( + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer target, ffi.Pointer arg0)>> + trampoline, + ffi.Pointer target, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer target, ffi.Pointer arg0)>>, + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer + _ObjectiveCBindings_newClosureBlock_ovsamd( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer target, ffi.Pointer arg0)>> + trampoline, + ffi.Pointer target, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer target, + ffi.Pointer arg0, + ffi.Pointer arg1)>>, + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer + _ObjectiveCBindings_newClosureBlock_ozkafd( + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer target, + ffi.Pointer arg0, + ffi.Pointer arg1)>> + trampoline, + ffi.Pointer target, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer target, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3)>>, + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer + _ObjectiveCBindings_newClosureBlock_u8b97m( + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer target, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3)>> + trampoline, + ffi.Pointer target, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer target, + ffi.Pointer arg0, + ffi.Pointer arg1)>>, + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer + _ObjectiveCBindings_newClosureBlock_w1e3k0( + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer target, + ffi.Pointer arg0, + ffi.Pointer arg1)>> + trampoline, + ffi.Pointer target, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer target, + ffi.Pointer arg0, + ffi.Pointer arg1)>>, + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer + _ObjectiveCBindings_newClosureBlock_wjovn7( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer target, + ffi.Pointer arg0, + ffi.Pointer arg1)>> + trampoline, + ffi.Pointer target, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer target, + ffi.Pointer arg0, + ffi.Pointer arg1)>>, + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer + _ObjectiveCBindings_newClosureBlock_wjvic9( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer target, + ffi.Pointer arg0, + ffi.Pointer arg1)>> + trampoline, + ffi.Pointer target, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer target, + ffi.Pointer arg0, + ffi.Pointer arg1)>>, + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer + _ObjectiveCBindings_newClosureBlock_ykn0t6( + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer target, + ffi.Pointer arg0, + ffi.Pointer arg1)>> + trampoline, + ffi.Pointer target, +); + @ffi.Native< ffi.Pointer Function( ffi.Pointer, @@ -8622,8 +8977,8 @@ class NSValue extends NSObject { } ffi.Pointer _ObjCBlock_NSString_ffiVoid_fnPtrTrampoline( - ffi.Pointer block, ffi.Pointer arg0) => - block.ref.target + ffi.Pointer target, ffi.Pointer arg0) => + target .cast< ffi.NativeFunction< ffi.Pointer Function( @@ -8631,22 +8986,16 @@ ffi.Pointer _ObjCBlock_NSString_ffiVoid_fnPtrTrampoline( .asFunction< ffi.Pointer Function( ffi.Pointer)>()(arg0); -ffi.Pointer _ObjCBlock_NSString_ffiVoid_fnPtrCallable = - ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_NSString_ffiVoid_fnPtrTrampoline) - .cast(); +final _ObjCBlock_NSString_ffiVoid_fnPtrCallable = ffi.Pointer.fromFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>(_ObjCBlock_NSString_ffiVoid_fnPtrTrampoline); ffi.Pointer _ObjCBlock_NSString_ffiVoid_closureTrampoline( - ffi.Pointer block, ffi.Pointer arg0) => - (objc.getBlockClosure(block) as ffi.Pointer Function( - ffi.Pointer))(arg0); -ffi.Pointer _ObjCBlock_NSString_ffiVoid_closureCallable = - ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_NSString_ffiVoid_closureTrampoline) - .cast(); + ffi.Pointer target, ffi.Pointer arg0) => + (objc.getBlockClosure(target.address) as ffi.Pointer + Function(ffi.Pointer))(arg0); +final _ObjCBlock_NSString_ffiVoid_closureCallable = ffi.Pointer.fromFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>(_ObjCBlock_NSString_ffiVoid_closureTrampoline); /// Construction methods for `objc.ObjCBlock)>`. abstract final class ObjCBlock_NSString_ffiVoid { @@ -8662,17 +9011,9 @@ abstract final class ObjCBlock_NSString_ffiVoid { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock)> fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer arg0)>> - ptr) => - objc.ObjCBlock)>( - objc.newPointerBlock( - _ObjCBlock_NSString_ffiVoid_fnPtrCallable, ptr.cast()), - retain: false, - release: true); + // static objc.ObjCBlock)> fromFunctionPointer(ffi.Pointer Function(ffi.Pointer arg0)>> ptr) => + // objc.ObjCBlock)>(todo(_ObjCBlock_NSString_ffiVoid_fnPtrCallable, ptr.cast()), + // retain: false, release: true); /// Creates a block from a Dart function. /// @@ -8682,54 +9023,33 @@ abstract final class ObjCBlock_NSString_ffiVoid { static objc.ObjCBlock)> fromFunction( NSString Function(ffi.Pointer) fn) => objc.ObjCBlock)>( - objc.newClosureBlock( + _ObjectiveCBindings_newClosureBlock_1yesha9( _ObjCBlock_NSString_ffiVoid_closureCallable, - (ffi.Pointer arg0) => - fn(arg0).ref.retainAndAutorelease()), + objc.registerBlockClosure((ffi.Pointer arg0) => + fn(arg0).ref.retainAndAutorelease())), retain: false, release: true); } -/// Call operator for `objc.ObjCBlock)>`. -extension ObjCBlock_NSString_ffiVoid_CallExtension - on objc.ObjCBlock)> { - NSString call(ffi.Pointer arg0) => NSString.castFromPointer( - ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer block, - ffi.Pointer arg0)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer)>()(ref.pointer, arg0), - retain: true, - release: true); -} - int _ObjCBlock_NSUInteger_ffiVoid_fnPtrTrampoline( - ffi.Pointer block, ffi.Pointer arg0) => - block.ref.target + ffi.Pointer target, ffi.Pointer arg0) => + target .cast< ffi.NativeFunction< ffi.UnsignedLong Function(ffi.Pointer arg0)>>() .asFunction)>()(arg0); -ffi.Pointer _ObjCBlock_NSUInteger_ffiVoid_fnPtrCallable = - ffi.Pointer.fromFunction< - ffi.UnsignedLong Function( - ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_NSUInteger_ffiVoid_fnPtrTrampoline, 0) - .cast(); +final _ObjCBlock_NSUInteger_ffiVoid_fnPtrCallable = ffi.Pointer.fromFunction< + ffi.UnsignedLong Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_NSUInteger_ffiVoid_fnPtrTrampoline, 0); int _ObjCBlock_NSUInteger_ffiVoid_closureTrampoline( - ffi.Pointer block, ffi.Pointer arg0) => - (objc.getBlockClosure(block) as int Function(ffi.Pointer))(arg0); -ffi.Pointer _ObjCBlock_NSUInteger_ffiVoid_closureCallable = - ffi.Pointer.fromFunction< - ffi.UnsignedLong Function( - ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_NSUInteger_ffiVoid_closureTrampoline, 0) - .cast(); + ffi.Pointer target, ffi.Pointer arg0) => + (objc.getBlockClosure(target.address) as int Function( + ffi.Pointer))(arg0); +final _ObjCBlock_NSUInteger_ffiVoid_closureCallable = ffi.Pointer.fromFunction< + ffi.UnsignedLong Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_NSUInteger_ffiVoid_closureTrampoline, 0); /// Construction methods for `objc.ObjCBlock)>`. abstract final class ObjCBlock_NSUInteger_ffiVoid { @@ -8747,17 +9067,9 @@ abstract final class ObjCBlock_NSUInteger_ffiVoid { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock)> - fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer arg0)>> - ptr) => - objc.ObjCBlock)>( - objc.newPointerBlock(_ObjCBlock_NSUInteger_ffiVoid_fnPtrCallable, ptr.cast()), - retain: false, - release: true); + // static objc.ObjCBlock)> fromFunctionPointer(ffi.Pointer arg0)>> ptr) => + // objc.ObjCBlock)>(todo(_ObjCBlock_NSUInteger_ffiVoid_fnPtrCallable, ptr.cast()), + // retain: false, release: true); /// Creates a block from a Dart function. /// @@ -8767,33 +9079,21 @@ abstract final class ObjCBlock_NSUInteger_ffiVoid { static objc.ObjCBlock)> fromFunction(int Function(ffi.Pointer) fn) => objc.ObjCBlock)>( - objc.newClosureBlock( + _ObjectiveCBindings_newClosureBlock_1ckyi24( _ObjCBlock_NSUInteger_ffiVoid_closureCallable, - (ffi.Pointer arg0) => fn(arg0)), + objc.registerBlockClosure( + (ffi.Pointer arg0) => fn(arg0))), retain: false, release: true); } -/// Call operator for `objc.ObjCBlock)>`. -extension ObjCBlock_NSUInteger_ffiVoid_CallExtension - on objc.ObjCBlock)> { - int call(ffi.Pointer arg0) => ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer block, - ffi.Pointer arg0)>>() - .asFunction< - int Function(ffi.Pointer, - ffi.Pointer)>()(ref.pointer, arg0); -} - int _ObjCBlock_NSUInteger_ffiVoid_NSFastEnumerationState_objcObjCObject_NSUInteger_fnPtrTrampoline( - ffi.Pointer block, + ffi.Pointer target, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer> arg2, int arg3) => - block.ref.target + target .cast< ffi.NativeFunction< ffi.UnsignedLong Function( @@ -8807,41 +9107,37 @@ int _ObjCBlock_NSUInteger_ffiVoid_NSFastEnumerationState_objcObjCObject_NSUInteg ffi.Pointer, ffi.Pointer>, int)>()(arg0, arg1, arg2, arg3); -ffi.Pointer - _ObjCBlock_NSUInteger_ffiVoid_NSFastEnumerationState_objcObjCObject_NSUInteger_fnPtrCallable = +final _ObjCBlock_NSUInteger_ffiVoid_NSFastEnumerationState_objcObjCObject_NSUInteger_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.UnsignedLong)>( - _ObjCBlock_NSUInteger_ffiVoid_NSFastEnumerationState_objcObjCObject_NSUInteger_fnPtrTrampoline, - 0) - .cast(); + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.UnsignedLong)>( + _ObjCBlock_NSUInteger_ffiVoid_NSFastEnumerationState_objcObjCObject_NSUInteger_fnPtrTrampoline, + 0); int _ObjCBlock_NSUInteger_ffiVoid_NSFastEnumerationState_objcObjCObject_NSUInteger_closureTrampoline( - ffi.Pointer block, + ffi.Pointer target, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer> arg2, int arg3) => - (objc.getBlockClosure(block) as int Function( + (objc.getBlockClosure(target.address) as int Function( ffi.Pointer, ffi.Pointer, ffi.Pointer>, int))(arg0, arg1, arg2, arg3); -ffi.Pointer - _ObjCBlock_NSUInteger_ffiVoid_NSFastEnumerationState_objcObjCObject_NSUInteger_closureCallable = +final _ObjCBlock_NSUInteger_ffiVoid_NSFastEnumerationState_objcObjCObject_NSUInteger_closureCallable = ffi.Pointer.fromFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.UnsignedLong)>( - _ObjCBlock_NSUInteger_ffiVoid_NSFastEnumerationState_objcObjCObject_NSUInteger_closureTrampoline, - 0) - .cast(); + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.UnsignedLong)>( + _ObjCBlock_NSUInteger_ffiVoid_NSFastEnumerationState_objcObjCObject_NSUInteger_closureTrampoline, + 0); /// Construction methods for `objc.ObjCBlock, ffi.Pointer, ffi.Pointer>, ffi.UnsignedLong)>`. abstract final class ObjCBlock_NSUInteger_ffiVoid_NSFastEnumerationState_objcObjCObject_NSUInteger { @@ -8866,95 +9162,47 @@ abstract final class ObjCBlock_NSUInteger_ffiVoid_NSFastEnumerationState_objcObj /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.UnsignedLong)> - fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer> arg2, ffi.UnsignedLong arg3)>> ptr) => - objc.ObjCBlock< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.UnsignedLong)>( - objc.newPointerBlock(_ObjCBlock_NSUInteger_ffiVoid_NSFastEnumerationState_objcObjCObject_NSUInteger_fnPtrCallable, ptr.cast()), - retain: false, - release: true); + // static objc.ObjCBlock, ffi.Pointer, ffi.Pointer>, ffi.UnsignedLong)> fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer> arg2, ffi.UnsignedLong arg3)>> ptr) => + // objc.ObjCBlock, ffi.Pointer, ffi.Pointer>, ffi.UnsignedLong)>(todo(_ObjCBlock_NSUInteger_ffiVoid_NSFastEnumerationState_objcObjCObject_NSUInteger_fnPtrCallable, ptr.cast()), + // retain: false, release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.UnsignedLong)> fromFunction(int Function(ffi.Pointer, ffi.Pointer, ffi.Pointer>, int) fn) => - objc.ObjCBlock, ffi.Pointer, ffi.Pointer>, ffi.UnsignedLong)>( - objc.newClosureBlock( - _ObjCBlock_NSUInteger_ffiVoid_NSFastEnumerationState_objcObjCObject_NSUInteger_closureCallable, - (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer> arg2, int arg3) => - fn(arg0, arg1, arg2, arg3)), - retain: false, - release: true); -} - -/// Call operator for `objc.ObjCBlock, ffi.Pointer, ffi.Pointer>, ffi.UnsignedLong)>`. -extension ObjCBlock_NSUInteger_ffiVoid_NSFastEnumerationState_objcObjCObject_NSUInteger_CallExtension - on objc.ObjCBlock< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.UnsignedLong)> { - int call(ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer> arg2, int arg3) => - ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer> arg2, - ffi.UnsignedLong arg3)>>() - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - int)>()(ref.pointer, arg0, arg1, arg2, arg3); + static objc.ObjCBlock, ffi.Pointer, ffi.Pointer>, ffi.UnsignedLong)> + fromFunction(int Function(ffi.Pointer, ffi.Pointer, ffi.Pointer>, int) fn) => + objc.ObjCBlock, ffi.Pointer, ffi.Pointer>, ffi.UnsignedLong)>( + _ObjectiveCBindings_newClosureBlock_17ap02x( + _ObjCBlock_NSUInteger_ffiVoid_NSFastEnumerationState_objcObjCObject_NSUInteger_closureCallable, + objc.registerBlockClosure((ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer> arg2, + int arg3) => + fn(arg0, arg1, arg2, arg3))), + retain: false, + release: true); } ffi.Pointer<_NSZone> _ObjCBlock_NSZone_ffiVoid_fnPtrTrampoline( - ffi.Pointer block, ffi.Pointer arg0) => - block.ref.target + ffi.Pointer target, ffi.Pointer arg0) => + target .cast< ffi.NativeFunction< ffi.Pointer<_NSZone> Function(ffi.Pointer arg0)>>() .asFunction< ffi.Pointer<_NSZone> Function(ffi.Pointer)>()(arg0); -ffi.Pointer _ObjCBlock_NSZone_ffiVoid_fnPtrCallable = - ffi.Pointer.fromFunction< - ffi.Pointer<_NSZone> Function( - ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_NSZone_ffiVoid_fnPtrTrampoline) - .cast(); +final _ObjCBlock_NSZone_ffiVoid_fnPtrCallable = ffi.Pointer.fromFunction< + ffi.Pointer<_NSZone> Function(ffi.Pointer, + ffi.Pointer)>(_ObjCBlock_NSZone_ffiVoid_fnPtrTrampoline); ffi.Pointer<_NSZone> _ObjCBlock_NSZone_ffiVoid_closureTrampoline( - ffi.Pointer block, ffi.Pointer arg0) => - (objc.getBlockClosure(block) as ffi.Pointer<_NSZone> Function( + ffi.Pointer target, ffi.Pointer arg0) => + (objc.getBlockClosure(target.address) as ffi.Pointer<_NSZone> Function( ffi.Pointer))(arg0); -ffi.Pointer _ObjCBlock_NSZone_ffiVoid_closureCallable = - ffi.Pointer.fromFunction< - ffi.Pointer<_NSZone> Function( - ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_NSZone_ffiVoid_closureTrampoline) - .cast(); +final _ObjCBlock_NSZone_ffiVoid_closureCallable = ffi.Pointer.fromFunction< + ffi.Pointer<_NSZone> Function(ffi.Pointer, + ffi.Pointer)>(_ObjCBlock_NSZone_ffiVoid_closureTrampoline); /// Construction methods for `objc.ObjCBlock Function(ffi.Pointer)>`. abstract final class ObjCBlock_NSZone_ffiVoid { @@ -8972,17 +9220,9 @@ abstract final class ObjCBlock_NSZone_ffiVoid { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock Function(ffi.Pointer)> - fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer<_NSZone> Function( - ffi.Pointer arg0)>> - ptr) => - objc.ObjCBlock Function(ffi.Pointer)>( - objc.newPointerBlock(_ObjCBlock_NSZone_ffiVoid_fnPtrCallable, ptr.cast()), - retain: false, - release: true); + // static objc.ObjCBlock Function(ffi.Pointer)> fromFunctionPointer(ffi.Pointer Function(ffi.Pointer arg0)>> ptr) => + // objc.ObjCBlock Function(ffi.Pointer)>(todo(_ObjCBlock_NSZone_ffiVoid_fnPtrCallable, ptr.cast()), + // retain: false, release: true); /// Creates a block from a Dart function. /// @@ -8992,48 +9232,30 @@ abstract final class ObjCBlock_NSZone_ffiVoid { static objc.ObjCBlock Function(ffi.Pointer)> fromFunction(ffi.Pointer<_NSZone> Function(ffi.Pointer) fn) => objc.ObjCBlock Function(ffi.Pointer)>( - objc.newClosureBlock(_ObjCBlock_NSZone_ffiVoid_closureCallable, - (ffi.Pointer arg0) => fn(arg0)), + _ObjectiveCBindings_newClosureBlock_1a8cl66( + _ObjCBlock_NSZone_ffiVoid_closureCallable, + objc.registerBlockClosure( + (ffi.Pointer arg0) => fn(arg0))), retain: false, release: true); } -/// Call operator for `objc.ObjCBlock Function(ffi.Pointer)>`. -extension ObjCBlock_NSZone_ffiVoid_CallExtension - on objc.ObjCBlock Function(ffi.Pointer)> { - ffi.Pointer<_NSZone> call(ffi.Pointer arg0) => - ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Pointer<_NSZone> Function( - ffi.Pointer block, - ffi.Pointer arg0)>>() - .asFunction< - ffi.Pointer<_NSZone> Function(ffi.Pointer, - ffi.Pointer)>()(ref.pointer, arg0); -} - bool _ObjCBlock_bool_ffiVoid_fnPtrTrampoline( - ffi.Pointer block, ffi.Pointer arg0) => - block.ref.target + ffi.Pointer target, ffi.Pointer arg0) => + target .cast< ffi.NativeFunction arg0)>>() .asFunction)>()(arg0); -ffi.Pointer _ObjCBlock_bool_ffiVoid_fnPtrCallable = - ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_bool_ffiVoid_fnPtrTrampoline, false) - .cast(); +final _ObjCBlock_bool_ffiVoid_fnPtrCallable = ffi.Pointer.fromFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_bool_ffiVoid_fnPtrTrampoline, false); bool _ObjCBlock_bool_ffiVoid_closureTrampoline( - ffi.Pointer block, ffi.Pointer arg0) => - (objc.getBlockClosure(block) as bool Function(ffi.Pointer))(arg0); -ffi.Pointer _ObjCBlock_bool_ffiVoid_closureCallable = - ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_bool_ffiVoid_closureTrampoline, false) - .cast(); + ffi.Pointer target, ffi.Pointer arg0) => + (objc.getBlockClosure(target.address) as bool Function( + ffi.Pointer))(arg0); +final _ObjCBlock_bool_ffiVoid_closureCallable = ffi.Pointer.fromFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_bool_ffiVoid_closureTrampoline, false); /// Construction methods for `objc.ObjCBlock)>`. abstract final class ObjCBlock_bool_ffiVoid { @@ -9049,16 +9271,9 @@ abstract final class ObjCBlock_bool_ffiVoid { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock)> - fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer arg0)>> - ptr) => - objc.ObjCBlock)>( - objc.newPointerBlock(_ObjCBlock_bool_ffiVoid_fnPtrCallable, ptr.cast()), - retain: false, - release: true); + // static objc.ObjCBlock)> fromFunctionPointer(ffi.Pointer arg0)>> ptr) => + // objc.ObjCBlock)>(todo(_ObjCBlock_bool_ffiVoid_fnPtrCallable, ptr.cast()), + // retain: false, release: true); /// Creates a block from a Dart function. /// @@ -9068,30 +9283,19 @@ abstract final class ObjCBlock_bool_ffiVoid { static objc.ObjCBlock)> fromFunction( bool Function(ffi.Pointer) fn) => objc.ObjCBlock)>( - objc.newClosureBlock(_ObjCBlock_bool_ffiVoid_closureCallable, - (ffi.Pointer arg0) => fn(arg0)), + _ObjectiveCBindings_newClosureBlock_e3qsqz( + _ObjCBlock_bool_ffiVoid_closureCallable, + objc.registerBlockClosure( + (ffi.Pointer arg0) => fn(arg0))), retain: false, release: true); } -/// Call operator for `objc.ObjCBlock)>`. -extension ObjCBlock_bool_ffiVoid_CallExtension - on objc.ObjCBlock)> { - bool call(ffi.Pointer arg0) => ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer block, - ffi.Pointer arg0)>>() - .asFunction< - bool Function(ffi.Pointer, - ffi.Pointer)>()(ref.pointer, arg0); -} - bool _ObjCBlock_bool_ffiVoid_Protocol_fnPtrTrampoline( - ffi.Pointer block, + ffi.Pointer target, ffi.Pointer arg0, ffi.Pointer arg1) => - block.ref.target + target .cast< ffi.NativeFunction< ffi.Bool Function(ffi.Pointer arg0, @@ -9099,24 +9303,21 @@ bool _ObjCBlock_bool_ffiVoid_Protocol_fnPtrTrampoline( .asFunction< bool Function(ffi.Pointer, ffi.Pointer)>()(arg0, arg1); -ffi.Pointer _ObjCBlock_bool_ffiVoid_Protocol_fnPtrCallable = - ffi.Pointer.fromFunction< - ffi.Bool Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_bool_ffiVoid_Protocol_fnPtrTrampoline, false) - .cast(); +final _ObjCBlock_bool_ffiVoid_Protocol_fnPtrCallable = ffi.Pointer.fromFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_bool_ffiVoid_Protocol_fnPtrTrampoline, false); bool _ObjCBlock_bool_ffiVoid_Protocol_closureTrampoline( - ffi.Pointer block, + ffi.Pointer target, ffi.Pointer arg0, ffi.Pointer arg1) => - (objc.getBlockClosure(block) as bool Function( + (objc.getBlockClosure(target.address) as bool Function( ffi.Pointer, ffi.Pointer))(arg0, arg1); -ffi.Pointer _ObjCBlock_bool_ffiVoid_Protocol_closureCallable = +final _ObjCBlock_bool_ffiVoid_Protocol_closureCallable = ffi.Pointer.fromFunction< - ffi.Bool Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_bool_ffiVoid_Protocol_closureTrampoline, false) - .cast(); + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_bool_ffiVoid_Protocol_closureTrampoline, false); /// Construction methods for `objc.ObjCBlock, Protocol)>`. abstract final class ObjCBlock_bool_ffiVoid_Protocol { @@ -9134,58 +9335,33 @@ abstract final class ObjCBlock_bool_ffiVoid_Protocol { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock, Protocol)> - fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) => - objc.ObjCBlock, Protocol)>( - objc.newPointerBlock(_ObjCBlock_bool_ffiVoid_Protocol_fnPtrCallable, ptr.cast()), - retain: false, - release: true); + // static objc.ObjCBlock, Protocol)> fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1)>> ptr) => + // objc.ObjCBlock, Protocol)>(todo(_ObjCBlock_bool_ffiVoid_Protocol_fnPtrCallable, ptr.cast()), + // retain: false, release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock, Protocol)> - fromFunction(bool Function(ffi.Pointer, Protocol) fn) => - objc.ObjCBlock, Protocol)>( - objc.newClosureBlock( - _ObjCBlock_bool_ffiVoid_Protocol_closureCallable, - (ffi.Pointer arg0, ffi.Pointer arg1) => - fn( - arg0, - Protocol.castFromPointer(arg1, - retain: true, release: true))), - retain: false, - release: true); -} - -/// Call operator for `objc.ObjCBlock, Protocol)>`. -extension ObjCBlock_bool_ffiVoid_Protocol_CallExtension - on objc.ObjCBlock, Protocol)> { - bool call(ffi.Pointer arg0, Protocol arg1) => ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - bool Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>()( - ref.pointer, arg0, arg1.ref.pointer); + static objc.ObjCBlock< + ffi.Bool Function(ffi.Pointer, Protocol)> fromFunction( + bool Function(ffi.Pointer, Protocol) fn) => + objc.ObjCBlock, Protocol)>( + _ObjectiveCBindings_newClosureBlock_ozkafd( + _ObjCBlock_bool_ffiVoid_Protocol_closureCallable, + objc.registerBlockClosure((ffi.Pointer arg0, + ffi.Pointer arg1) => + fn(arg0, Protocol.castFromPointer(arg1, retain: true, release: true)))), + retain: false, + release: true); } bool _ObjCBlock_bool_ffiVoid_objcObjCObject_fnPtrTrampoline( - ffi.Pointer block, + ffi.Pointer target, ffi.Pointer arg0, ffi.Pointer arg1) => - block.ref.target + target .cast< ffi.NativeFunction< ffi.Bool Function(ffi.Pointer arg0, @@ -9193,24 +9369,22 @@ bool _ObjCBlock_bool_ffiVoid_objcObjCObject_fnPtrTrampoline( .asFunction< bool Function(ffi.Pointer, ffi.Pointer)>()(arg0, arg1); -ffi.Pointer _ObjCBlock_bool_ffiVoid_objcObjCObject_fnPtrCallable = +final _ObjCBlock_bool_ffiVoid_objcObjCObject_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Bool Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_bool_ffiVoid_objcObjCObject_fnPtrTrampoline, false) - .cast(); + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_bool_ffiVoid_objcObjCObject_fnPtrTrampoline, false); bool _ObjCBlock_bool_ffiVoid_objcObjCObject_closureTrampoline( - ffi.Pointer block, + ffi.Pointer target, ffi.Pointer arg0, ffi.Pointer arg1) => - (objc.getBlockClosure(block) as bool Function( + (objc.getBlockClosure(target.address) as bool Function( ffi.Pointer, ffi.Pointer))(arg0, arg1); -ffi.Pointer _ObjCBlock_bool_ffiVoid_objcObjCObject_closureCallable = +final _ObjCBlock_bool_ffiVoid_objcObjCObject_closureCallable = ffi.Pointer.fromFunction< - ffi.Bool Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_bool_ffiVoid_objcObjCObject_closureTrampoline, false) - .cast(); + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_bool_ffiVoid_objcObjCObject_closureTrampoline, false); /// Construction methods for `objc.ObjCBlock, ffi.Pointer)>`. abstract final class ObjCBlock_bool_ffiVoid_objcObjCObject { @@ -9232,16 +9406,9 @@ abstract final class ObjCBlock_bool_ffiVoid_objcObjCObject { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock, ffi.Pointer)> fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) => - objc.ObjCBlock, ffi.Pointer)>( - objc.newPointerBlock(_ObjCBlock_bool_ffiVoid_objcObjCObject_fnPtrCallable, ptr.cast()), - retain: false, - release: true); + // static objc.ObjCBlock, ffi.Pointer)> fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1)>> ptr) => + // objc.ObjCBlock, ffi.Pointer)>(todo(_ObjCBlock_bool_ffiVoid_objcObjCObject_fnPtrCallable, ptr.cast()), + // retain: false, release: true); /// Creates a block from a Dart function. /// @@ -9251,39 +9418,21 @@ abstract final class ObjCBlock_bool_ffiVoid_objcObjCObject { static objc.ObjCBlock, ffi.Pointer)> fromFunction( bool Function(ffi.Pointer, objc.ObjCObjectBase) fn) => - objc.ObjCBlock< - ffi.Bool Function( - ffi.Pointer, ffi.Pointer)>( - objc.newClosureBlock( + objc.ObjCBlock, ffi.Pointer)>( + _ObjectiveCBindings_newClosureBlock_ozkafd( _ObjCBlock_bool_ffiVoid_objcObjCObject_closureCallable, - (ffi.Pointer arg0, ffi.Pointer arg1) => - fn(arg0, objc.ObjCObjectBase(arg1, retain: true, release: true))), + objc.registerBlockClosure((ffi.Pointer arg0, + ffi.Pointer arg1) => + fn(arg0, objc.ObjCObjectBase(arg1, retain: true, release: true)))), retain: false, release: true); } -/// Call operator for `objc.ObjCBlock, ffi.Pointer)>`. -extension ObjCBlock_bool_ffiVoid_objcObjCObject_CallExtension on objc.ObjCBlock< - ffi.Bool Function(ffi.Pointer, ffi.Pointer)> { - bool call(ffi.Pointer arg0, objc.ObjCObjectBase arg1) => - ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - bool Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>()( - ref.pointer, arg0, arg1.ref.pointer); -} - bool _ObjCBlock_bool_ffiVoid_objcObjCSelector_fnPtrTrampoline( - ffi.Pointer block, + ffi.Pointer target, ffi.Pointer arg0, ffi.Pointer arg1) => - block.ref.target + target .cast< ffi.NativeFunction< ffi.Bool Function(ffi.Pointer arg0, @@ -9291,24 +9440,22 @@ bool _ObjCBlock_bool_ffiVoid_objcObjCSelector_fnPtrTrampoline( .asFunction< bool Function(ffi.Pointer, ffi.Pointer)>()(arg0, arg1); -ffi.Pointer _ObjCBlock_bool_ffiVoid_objcObjCSelector_fnPtrCallable = +final _ObjCBlock_bool_ffiVoid_objcObjCSelector_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Bool Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_bool_ffiVoid_objcObjCSelector_fnPtrTrampoline, false) - .cast(); + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_bool_ffiVoid_objcObjCSelector_fnPtrTrampoline, false); bool _ObjCBlock_bool_ffiVoid_objcObjCSelector_closureTrampoline( - ffi.Pointer block, + ffi.Pointer target, ffi.Pointer arg0, ffi.Pointer arg1) => - (objc.getBlockClosure(block) as bool Function( + (objc.getBlockClosure(target.address) as bool Function( ffi.Pointer, ffi.Pointer))(arg0, arg1); -ffi.Pointer _ObjCBlock_bool_ffiVoid_objcObjCSelector_closureCallable = +final _ObjCBlock_bool_ffiVoid_objcObjCSelector_closureCallable = ffi.Pointer.fromFunction< - ffi.Bool Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_bool_ffiVoid_objcObjCSelector_closureTrampoline, false) - .cast(); + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_bool_ffiVoid_objcObjCSelector_closureTrampoline, false); /// Construction methods for `objc.ObjCBlock, ffi.Pointer)>`. abstract final class ObjCBlock_bool_ffiVoid_objcObjCSelector { @@ -9330,63 +9477,34 @@ abstract final class ObjCBlock_bool_ffiVoid_objcObjCSelector { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock, ffi.Pointer)> fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) => - objc.ObjCBlock, ffi.Pointer)>( - objc.newPointerBlock(_ObjCBlock_bool_ffiVoid_objcObjCSelector_fnPtrCallable, ptr.cast()), - retain: false, - release: true); + // static objc.ObjCBlock, ffi.Pointer)> fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1)>> ptr) => + // objc.ObjCBlock, ffi.Pointer)>(todo(_ObjCBlock_bool_ffiVoid_objcObjCSelector_fnPtrCallable, ptr.cast()), + // retain: false, release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc - .ObjCBlock, ffi.Pointer)> + static objc.ObjCBlock, ffi.Pointer)> fromFunction(bool Function(ffi.Pointer, ffi.Pointer) fn) => - objc.ObjCBlock< - ffi.Bool Function( - ffi.Pointer, ffi.Pointer)>( - objc.newClosureBlock( + objc.ObjCBlock, ffi.Pointer)>( + _ObjectiveCBindings_newClosureBlock_w1e3k0( _ObjCBlock_bool_ffiVoid_objcObjCSelector_closureCallable, - (ffi.Pointer arg0, ffi.Pointer arg1) => - fn(arg0, arg1)), + objc.registerBlockClosure((ffi.Pointer arg0, + ffi.Pointer arg1) => + fn(arg0, arg1))), retain: false, release: true); } -/// Call operator for `objc.ObjCBlock, ffi.Pointer)>`. -extension ObjCBlock_bool_ffiVoid_objcObjCSelector_CallExtension - on objc.ObjCBlock< - ffi.Bool Function( - ffi.Pointer, ffi.Pointer)> { - bool call(ffi.Pointer arg0, ffi.Pointer arg1) => - ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()(ref.pointer, arg0, arg1); -} - void _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObject_NSDictionary_fnPtrTrampoline( - ffi.Pointer block, + ffi.Pointer target, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => - block.ref.target + target .cast< ffi.NativeFunction< ffi.Void Function( @@ -9398,59 +9516,55 @@ void ffi.Pointer, ffi.Pointer, ffi.Pointer)>()(arg0, arg1, arg2); -ffi.Pointer - _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObject_NSDictionary_fnPtrCallable = +final _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObject_NSDictionary_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObject_NSDictionary_fnPtrTrampoline) - .cast(); + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObject_NSDictionary_fnPtrTrampoline); void _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObject_NSDictionary_closureTrampoline( - ffi.Pointer block, + ffi.Pointer target, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => - (objc.getBlockClosure(block) as void Function( + (objc.getBlockClosure(target.address) as void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer))(arg0, arg1, arg2); -ffi.Pointer - _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObject_NSDictionary_closureCallable = +final _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObject_NSDictionary_closureCallable = ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObject_NSDictionary_closureTrampoline) - .cast(); + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObject_NSDictionary_closureTrampoline); void _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObject_NSDictionary_listenerTrampoline( - ffi.Pointer block, + ffi.Pointer target, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) { - (objc.getBlockClosure(block) as void Function( + (objc.getBlockClosure(target.address) as void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer))(arg0, arg1, arg2); - objc.objectRelease(block.cast()); + // objc.objectRelease(block.cast()); } ffi.NativeCallable< ffi.Void Function( - ffi.Pointer, + ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)> _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObject_NSDictionary_listenerCallable = ffi.NativeCallable< ffi.Void Function( - ffi.Pointer, + ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>.listener( @@ -9458,26 +9572,26 @@ ffi.NativeCallable< ..keepIsolateAlive = false; void _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObject_NSDictionary_blockingTrampoline( - ffi.Pointer block, + ffi.Pointer target, ffi.Pointer waiter, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) { try { - (objc.getBlockClosure(block) as void Function( + (objc.getBlockClosure(target.address) as void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer))(arg0, arg1, arg2); } catch (e) { } finally { objc.signalWaiter(waiter); - objc.objectRelease(block.cast()); + // objc.objectRelease(block.cast()); } } ffi.NativeCallable< ffi.Void Function( - ffi.Pointer, + ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, @@ -9485,7 +9599,7 @@ ffi.NativeCallable< _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObject_NSDictionary_blockingCallable = ffi.NativeCallable< ffi.Void Function( - ffi.Pointer, + ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, @@ -9494,7 +9608,7 @@ ffi.NativeCallable< ..keepIsolateAlive = false; ffi.NativeCallable< ffi.Void Function( - ffi.Pointer, + ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, @@ -9502,7 +9616,7 @@ ffi.NativeCallable< _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObject_NSDictionary_blockingListenerCallable = ffi.NativeCallable< ffi.Void Function( - ffi.Pointer, + ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, @@ -9531,18 +9645,9 @@ abstract final class ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCO /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock< - ffi.Void Function( - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError)>, - ffi.Pointer, - NSDictionary)> - fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2)>> ptr) => - objc.ObjCBlock< - ffi.Void Function( - objc.ObjCBlock?, NSError)>, - ffi.Pointer, - NSDictionary)>(objc.newPointerBlock(_ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObject_NSDictionary_fnPtrCallable, ptr.cast()), retain: false, release: true); + // static objc.ObjCBlock?, NSError)>, ffi.Pointer, NSDictionary)> fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2)>> ptr) => + // objc.ObjCBlock?, NSError)>, ffi.Pointer, NSDictionary)>(todo(_ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObject_NSDictionary_fnPtrCallable, ptr.cast()), + // retain: false, release: true); /// Creates a block from a Dart function. /// @@ -9552,15 +9657,12 @@ abstract final class ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCO static objc.ObjCBlock?, NSError)>, ffi.Pointer, NSDictionary)> fromFunction(void Function(objc.ObjCBlock?, NSError)>, objc.ObjCObjectBase, NSDictionary) fn) => objc.ObjCBlock?, NSError)>, ffi.Pointer, NSDictionary)>( - objc.newClosureBlock( + _ObjectiveCBindings_newClosureBlock_1j2nt86( _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObject_NSDictionary_closureCallable, - (ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - fn( - ObjCBlock_ffiVoid_objcObjCObject_NSError.castFromPointer(arg0, retain: true, release: true), - objc.ObjCObjectBase(arg1, retain: true, release: true), - NSDictionary.castFromPointer(arg2, retain: true, release: true))), + objc.registerBlockClosure((ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => fn( + ObjCBlock_ffiVoid_objcObjCObject_NSError.castFromPointer(arg0, retain: true, release: true), + objc.ObjCObjectBase(arg1, retain: true, release: true), + NSDictionary.castFromPointer(arg2, retain: true, release: true)))), retain: false, release: true); @@ -9585,11 +9687,11 @@ abstract final class ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCO objc.ObjCObjectBase, NSDictionary) fn) { - final raw = objc.newClosureBlock( + final raw = _ObjectiveCBindings_newClosureBlock_1j2nt86( _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObject_NSDictionary_listenerCallable .nativeFunction .cast(), - (ffi.Pointer arg0, + objc.registerBlockClosure((ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => fn( @@ -9597,7 +9699,7 @@ abstract final class ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCO retain: false, release: true), objc.ObjCObjectBase(arg1, retain: false, release: true), NSDictionary.castFromPointer(arg2, - retain: false, release: true))); + retain: false, release: true)))); final wrapper = _ObjectiveCBindings_wrapListenerBlock_1j2nt86(raw); objc.objectRelease(raw.cast()); return objc.ObjCBlock< @@ -9629,11 +9731,11 @@ abstract final class ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCO objc.ObjCObjectBase, NSDictionary) fn) { - final raw = objc.newClosureBlock( + final raw = _ObjectiveCBindings_newClosureBlock_1j2nt86( _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObject_NSDictionary_blockingCallable .nativeFunction .cast(), - (ffi.Pointer arg0, + objc.registerBlockClosure((ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => fn( @@ -9641,12 +9743,12 @@ abstract final class ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCO retain: false, release: true), objc.ObjCObjectBase(arg1, retain: false, release: true), NSDictionary.castFromPointer(arg2, - retain: false, release: true))); - final rawListener = objc.newClosureBlock( + retain: false, release: true)))); + final rawListener = _ObjectiveCBindings_newClosureBlock_1j2nt86( _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObject_NSDictionary_blockingListenerCallable .nativeFunction .cast(), - (ffi.Pointer arg0, + objc.registerBlockClosure((ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => fn( @@ -9654,7 +9756,7 @@ abstract final class ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCO retain: false, release: true), objc.ObjCObjectBase(arg1, retain: false, release: true), NSDictionary.castFromPointer(arg2, - retain: false, release: true))); + retain: false, release: true)))); final wrapper = objc.wrapBlockingBlock( _ObjectiveCBindings_wrapBlockingBlock_1j2nt86, raw, rawListener); objc.objectRelease(raw.cast()); @@ -9668,98 +9770,62 @@ abstract final class ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCO } } -/// Call operator for `objc.ObjCBlock?, NSError)>, ffi.Pointer, NSDictionary)>`. -extension ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObject_NSDictionary_CallExtension - on objc.ObjCBlock< - ffi.Void Function( - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError)>, - ffi.Pointer, - NSDictionary)> { - void call( - objc.ObjCBlock?, NSError)> - arg0, - objc.ObjCObjectBase arg1, - NSDictionary arg2) => - ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()( - ref.pointer, arg0.ref.pointer, arg1.ref.pointer, arg2.ref.pointer); -} - void _ObjCBlock_ffiVoid_ffiVoid_fnPtrTrampoline( - ffi.Pointer block, ffi.Pointer arg0) => - block.ref.target + ffi.Pointer target, ffi.Pointer arg0) => + target .cast< ffi.NativeFunction arg0)>>() .asFunction)>()(arg0); -ffi.Pointer _ObjCBlock_ffiVoid_ffiVoid_fnPtrCallable = - ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_ffiVoid_ffiVoid_fnPtrTrampoline) - .cast(); +final _ObjCBlock_ffiVoid_ffiVoid_fnPtrCallable = ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>(_ObjCBlock_ffiVoid_ffiVoid_fnPtrTrampoline); void _ObjCBlock_ffiVoid_ffiVoid_closureTrampoline( - ffi.Pointer block, ffi.Pointer arg0) => - (objc.getBlockClosure(block) as void Function(ffi.Pointer))(arg0); -ffi.Pointer _ObjCBlock_ffiVoid_ffiVoid_closureCallable = - ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_ffiVoid_ffiVoid_closureTrampoline) - .cast(); + ffi.Pointer target, ffi.Pointer arg0) => + (objc.getBlockClosure(target.address) as void Function( + ffi.Pointer))(arg0); +final _ObjCBlock_ffiVoid_ffiVoid_closureCallable = ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>(_ObjCBlock_ffiVoid_ffiVoid_closureTrampoline); void _ObjCBlock_ffiVoid_ffiVoid_listenerTrampoline( - ffi.Pointer block, ffi.Pointer arg0) { - (objc.getBlockClosure(block) as void Function(ffi.Pointer))(arg0); - objc.objectRelease(block.cast()); + ffi.Pointer target, ffi.Pointer arg0) { + (objc.getBlockClosure(target.address) as void Function( + ffi.Pointer))(arg0); + // objc.objectRelease(block.cast()); } ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, ffi.Pointer)> + ffi.Void Function(ffi.Pointer, ffi.Pointer)> _ObjCBlock_ffiVoid_ffiVoid_listenerCallable = ffi.NativeCallable< - ffi.Void Function(ffi.Pointer, - ffi.Pointer)>.listener( + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>.listener( _ObjCBlock_ffiVoid_ffiVoid_listenerTrampoline) ..keepIsolateAlive = false; -void _ObjCBlock_ffiVoid_ffiVoid_blockingTrampoline( - ffi.Pointer block, - ffi.Pointer waiter, - ffi.Pointer arg0) { +void _ObjCBlock_ffiVoid_ffiVoid_blockingTrampoline(ffi.Pointer target, + ffi.Pointer waiter, ffi.Pointer arg0) { try { - (objc.getBlockClosure(block) as void Function(ffi.Pointer))(arg0); + (objc.getBlockClosure(target.address) as void Function( + ffi.Pointer))(arg0); } catch (e) { } finally { objc.signalWaiter(waiter); - objc.objectRelease(block.cast()); + // objc.objectRelease(block.cast()); } } ffi.NativeCallable< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)> + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)> _ObjCBlock_ffiVoid_ffiVoid_blockingCallable = ffi.NativeCallable< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>.isolateLocal( + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>.isolateLocal( _ObjCBlock_ffiVoid_ffiVoid_blockingTrampoline) ..keepIsolateAlive = false; ffi.NativeCallable< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)> + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)> _ObjCBlock_ffiVoid_ffiVoid_blockingListenerCallable = ffi.NativeCallable< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>.listener( + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>.listener( _ObjCBlock_ffiVoid_ffiVoid_blockingTrampoline) ..keepIsolateAlive = false; @@ -9777,16 +9843,9 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock)> fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0)>> - ptr) => - objc.ObjCBlock)>( - objc.newPointerBlock( - _ObjCBlock_ffiVoid_ffiVoid_fnPtrCallable, ptr.cast()), - retain: false, - release: true); + // static objc.ObjCBlock)> fromFunctionPointer(ffi.Pointer arg0)>> ptr) => + // objc.ObjCBlock)>(todo(_ObjCBlock_ffiVoid_ffiVoid_fnPtrCallable, ptr.cast()), + // retain: false, release: true); /// Creates a block from a Dart function. /// @@ -9796,8 +9855,10 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid { static objc.ObjCBlock)> fromFunction( void Function(ffi.Pointer) fn) => objc.ObjCBlock)>( - objc.newClosureBlock(_ObjCBlock_ffiVoid_ffiVoid_closureCallable, - (ffi.Pointer arg0) => fn(arg0)), + _ObjectiveCBindings_newClosureBlock_ovsamd( + _ObjCBlock_ffiVoid_ffiVoid_closureCallable, + objc.registerBlockClosure( + (ffi.Pointer arg0) => fn(arg0))), retain: false, release: true); @@ -9812,9 +9873,9 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid { /// blocks do not keep the isolate alive. static objc.ObjCBlock)> listener( void Function(ffi.Pointer) fn) { - final raw = objc.newClosureBlock( + final raw = _ObjectiveCBindings_newClosureBlock_ovsamd( _ObjCBlock_ffiVoid_ffiVoid_listenerCallable.nativeFunction.cast(), - (ffi.Pointer arg0) => fn(arg0)); + objc.registerBlockClosure((ffi.Pointer arg0) => fn(arg0))); final wrapper = _ObjectiveCBindings_wrapListenerBlock_ovsamd(raw); objc.objectRelease(raw.cast()); return objc.ObjCBlock)>(wrapper, @@ -9832,13 +9893,13 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid { /// indefinitely, or have other undefined behavior. static objc.ObjCBlock)> blocking( void Function(ffi.Pointer) fn) { - final raw = objc.newClosureBlock( + final raw = _ObjectiveCBindings_newClosureBlock_ovsamd( _ObjCBlock_ffiVoid_ffiVoid_blockingCallable.nativeFunction.cast(), - (ffi.Pointer arg0) => fn(arg0)); - final rawListener = objc.newClosureBlock( + objc.registerBlockClosure((ffi.Pointer arg0) => fn(arg0))); + final rawListener = _ObjectiveCBindings_newClosureBlock_ovsamd( _ObjCBlock_ffiVoid_ffiVoid_blockingListenerCallable.nativeFunction .cast(), - (ffi.Pointer arg0) => fn(arg0)); + objc.registerBlockClosure((ffi.Pointer arg0) => fn(arg0))); final wrapper = objc.wrapBlockingBlock( _ObjectiveCBindings_wrapBlockingBlock_ovsamd, raw, rawListener); objc.objectRelease(raw.cast()); @@ -9848,24 +9909,11 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid { } } -/// Call operator for `objc.ObjCBlock)>`. -extension ObjCBlock_ffiVoid_ffiVoid_CallExtension - on objc.ObjCBlock)> { - void call(ffi.Pointer arg0) => ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer block, - ffi.Pointer arg0)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer)>()(ref.pointer, arg0); -} - void _ObjCBlock_ffiVoid_ffiVoid_NSCoder_fnPtrTrampoline( - ffi.Pointer block, + ffi.Pointer target, ffi.Pointer arg0, ffi.Pointer arg1) => - block.ref.target + target .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer arg0, @@ -9873,83 +9921,72 @@ void _ObjCBlock_ffiVoid_ffiVoid_NSCoder_fnPtrTrampoline( .asFunction< void Function(ffi.Pointer, ffi.Pointer)>()(arg0, arg1); -ffi.Pointer _ObjCBlock_ffiVoid_ffiVoid_NSCoder_fnPtrCallable = +final _ObjCBlock_ffiVoid_ffiVoid_NSCoder_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_ffiVoid_ffiVoid_NSCoder_fnPtrTrampoline) - .cast(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSCoder_fnPtrTrampoline); void _ObjCBlock_ffiVoid_ffiVoid_NSCoder_closureTrampoline( - ffi.Pointer block, + ffi.Pointer target, ffi.Pointer arg0, ffi.Pointer arg1) => - (objc.getBlockClosure(block) as void Function( + (objc.getBlockClosure(target.address) as void Function( ffi.Pointer, ffi.Pointer))(arg0, arg1); -ffi.Pointer _ObjCBlock_ffiVoid_ffiVoid_NSCoder_closureCallable = +final _ObjCBlock_ffiVoid_ffiVoid_NSCoder_closureCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_ffiVoid_ffiVoid_NSCoder_closureTrampoline) - .cast(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSCoder_closureTrampoline); void _ObjCBlock_ffiVoid_ffiVoid_NSCoder_listenerTrampoline( - ffi.Pointer block, + ffi.Pointer target, ffi.Pointer arg0, ffi.Pointer arg1) { - (objc.getBlockClosure(block) as void Function( + (objc.getBlockClosure(target.address) as void Function( ffi.Pointer, ffi.Pointer))(arg0, arg1); - objc.objectRelease(block.cast()); + // objc.objectRelease(block.cast()); } ffi.NativeCallable< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)> + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)> _ObjCBlock_ffiVoid_ffiVoid_NSCoder_listenerCallable = ffi.NativeCallable< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>.listener( + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>.listener( _ObjCBlock_ffiVoid_ffiVoid_NSCoder_listenerTrampoline) ..keepIsolateAlive = false; void _ObjCBlock_ffiVoid_ffiVoid_NSCoder_blockingTrampoline( - ffi.Pointer block, + ffi.Pointer target, ffi.Pointer waiter, ffi.Pointer arg0, ffi.Pointer arg1) { try { - (objc.getBlockClosure(block) as void Function( + (objc.getBlockClosure(target.address) as void Function( ffi.Pointer, ffi.Pointer))(arg0, arg1); } catch (e) { } finally { objc.signalWaiter(waiter); - objc.objectRelease(block.cast()); + // objc.objectRelease(block.cast()); } } ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)> + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)> _ObjCBlock_ffiVoid_ffiVoid_NSCoder_blockingCallable = ffi.NativeCallable< ffi.Void Function( - ffi.Pointer, + ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>.isolateLocal( _ObjCBlock_ffiVoid_ffiVoid_NSCoder_blockingTrampoline) ..keepIsolateAlive = false; ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)> + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)> _ObjCBlock_ffiVoid_ffiVoid_NSCoder_blockingListenerCallable = ffi .NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>.listener( + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>.listener( _ObjCBlock_ffiVoid_ffiVoid_NSCoder_blockingTrampoline) ..keepIsolateAlive = false; @@ -9969,17 +10006,9 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSCoder { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock, NSCoder)> - fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) => - objc.ObjCBlock, NSCoder)>( - objc.newPointerBlock(_ObjCBlock_ffiVoid_ffiVoid_NSCoder_fnPtrCallable, ptr.cast()), - retain: false, - release: true); + // static objc.ObjCBlock, NSCoder)> fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1)>> ptr) => + // objc.ObjCBlock, NSCoder)>(todo(_ObjCBlock_ffiVoid_ffiVoid_NSCoder_fnPtrCallable, ptr.cast()), + // retain: false, release: true); /// Creates a block from a Dart function. /// @@ -9990,11 +10019,11 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSCoder { ffi.Void Function(ffi.Pointer, NSCoder)> fromFunction( void Function(ffi.Pointer, NSCoder) fn) => objc.ObjCBlock, NSCoder)>( - objc.newClosureBlock( + _ObjectiveCBindings_newClosureBlock_wjovn7( _ObjCBlock_ffiVoid_ffiVoid_NSCoder_closureCallable, - (ffi.Pointer arg0, ffi.Pointer arg1) => fn( - arg0, - NSCoder.castFromPointer(arg1, retain: true, release: true))), + objc.registerBlockClosure((ffi.Pointer arg0, + ffi.Pointer arg1) => + fn(arg0, NSCoder.castFromPointer(arg1, retain: true, release: true)))), retain: false, release: true); @@ -10009,11 +10038,13 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSCoder { /// blocks do not keep the isolate alive. static objc.ObjCBlock, NSCoder)> listener(void Function(ffi.Pointer, NSCoder) fn) { - final raw = objc.newClosureBlock( + final raw = _ObjectiveCBindings_newClosureBlock_wjovn7( _ObjCBlock_ffiVoid_ffiVoid_NSCoder_listenerCallable.nativeFunction .cast(), - (ffi.Pointer arg0, ffi.Pointer arg1) => fn( - arg0, NSCoder.castFromPointer(arg1, retain: false, release: true))); + objc.registerBlockClosure((ffi.Pointer arg0, + ffi.Pointer arg1) => + fn(arg0, + NSCoder.castFromPointer(arg1, retain: false, release: true)))); final wrapper = _ObjectiveCBindings_wrapListenerBlock_wjovn7(raw); objc.objectRelease(raw.cast()); return objc.ObjCBlock, NSCoder)>( @@ -10033,17 +10064,21 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSCoder { /// indefinitely, or have other undefined behavior. static objc.ObjCBlock, NSCoder)> blocking(void Function(ffi.Pointer, NSCoder) fn) { - final raw = objc.newClosureBlock( + final raw = _ObjectiveCBindings_newClosureBlock_wjovn7( _ObjCBlock_ffiVoid_ffiVoid_NSCoder_blockingCallable.nativeFunction .cast(), - (ffi.Pointer arg0, ffi.Pointer arg1) => fn( - arg0, NSCoder.castFromPointer(arg1, retain: false, release: true))); - final rawListener = objc.newClosureBlock( + objc.registerBlockClosure((ffi.Pointer arg0, + ffi.Pointer arg1) => + fn(arg0, + NSCoder.castFromPointer(arg1, retain: false, release: true)))); + final rawListener = _ObjectiveCBindings_newClosureBlock_wjovn7( _ObjCBlock_ffiVoid_ffiVoid_NSCoder_blockingListenerCallable .nativeFunction .cast(), - (ffi.Pointer arg0, ffi.Pointer arg1) => fn( - arg0, NSCoder.castFromPointer(arg1, retain: false, release: true))); + objc.registerBlockClosure((ffi.Pointer arg0, + ffi.Pointer arg1) => + fn(arg0, + NSCoder.castFromPointer(arg1, retain: false, release: true)))); final wrapper = objc.wrapBlockingBlock( _ObjectiveCBindings_wrapBlockingBlock_wjovn7, raw, rawListener); objc.objectRelease(raw.cast()); @@ -10055,28 +10090,12 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSCoder { } } -/// Call operator for `objc.ObjCBlock, NSCoder)>`. -extension ObjCBlock_ffiVoid_ffiVoid_NSCoder_CallExtension - on objc.ObjCBlock, NSCoder)> { - void call(ffi.Pointer arg0, NSCoder arg1) => ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>()( - ref.pointer, arg0, arg1.ref.pointer); -} - void _ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent_fnPtrTrampoline( - ffi.Pointer block, + ffi.Pointer target, ffi.Pointer arg0, ffi.Pointer arg1, int arg2) => - block.ref.target + target .cast< ffi.NativeFunction< ffi.Void Function( @@ -10086,85 +10105,73 @@ void _ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent_fnPtrTrampoline( .asFunction< void Function(ffi.Pointer, ffi.Pointer, int)>()(arg0, arg1, arg2); -ffi.Pointer - _ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent_fnPtrCallable = +final _ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong)>( - _ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent_fnPtrTrampoline) - .cast(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>( + _ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent_fnPtrTrampoline); void _ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent_closureTrampoline( - ffi.Pointer block, + ffi.Pointer target, ffi.Pointer arg0, ffi.Pointer arg1, int arg2) => - (objc.getBlockClosure(block) as void Function(ffi.Pointer, - ffi.Pointer, int))(arg0, arg1, arg2); -ffi.Pointer - _ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent_closureCallable = + (objc.getBlockClosure(target.address) as void Function( + ffi.Pointer, + ffi.Pointer, + int))(arg0, arg1, arg2); +final _ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent_closureCallable = ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong)>( - _ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent_closureTrampoline) - .cast(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>( + _ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent_closureTrampoline); void _ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent_listenerTrampoline( - ffi.Pointer block, + ffi.Pointer target, ffi.Pointer arg0, ffi.Pointer arg1, int arg2) { - (objc.getBlockClosure(block) as void Function(ffi.Pointer, + (objc.getBlockClosure(target.address) as void Function(ffi.Pointer, ffi.Pointer, int))(arg0, arg1, arg2); - objc.objectRelease(block.cast()); + // objc.objectRelease(block.cast()); } ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong)> + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)> _ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent_listenerCallable = ffi .NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong)>.listener( + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>.listener( _ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent_listenerTrampoline) ..keepIsolateAlive = false; void _ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent_blockingTrampoline( - ffi.Pointer block, + ffi.Pointer target, ffi.Pointer waiter, ffi.Pointer arg0, ffi.Pointer arg1, int arg2) { try { - (objc.getBlockClosure(block) as void Function(ffi.Pointer, - ffi.Pointer, int))(arg0, arg1, arg2); + (objc.getBlockClosure(target.address) as void Function( + ffi.Pointer, + ffi.Pointer, + int))(arg0, arg1, arg2); } catch (e) { } finally { objc.signalWaiter(waiter); - objc.objectRelease(block.cast()); + // objc.objectRelease(block.cast()); } } ffi.NativeCallable< ffi.Void Function( - ffi.Pointer, + ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.UnsignedLong)> - _ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent_blockingCallable = - ffi.NativeCallable< + _ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent_blockingCallable = ffi + .NativeCallable< ffi.Void Function( - ffi.Pointer, + ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, @@ -10173,7 +10180,7 @@ ffi.NativeCallable< ..keepIsolateAlive = false; ffi.NativeCallable< ffi.Void Function( - ffi.Pointer, + ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, @@ -10181,7 +10188,7 @@ ffi.NativeCallable< _ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent_blockingListenerCallable = ffi.NativeCallable< ffi.Void Function( - ffi.Pointer, + ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, @@ -10205,17 +10212,9 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc - .ObjCBlock, NSStream, ffi.UnsignedLong)> - fromFunctionPointer( - ffi.Pointer arg0, ffi.Pointer arg1, ffi.UnsignedLong arg2)>> - ptr) => - objc.ObjCBlock, NSStream, ffi.UnsignedLong)>( - objc.newPointerBlock( - _ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent_fnPtrCallable, - ptr.cast()), - retain: false, - release: true); + // static objc.ObjCBlock, NSStream, ffi.UnsignedLong)> fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.UnsignedLong arg2)>> ptr) => + // objc.ObjCBlock, NSStream, ffi.UnsignedLong)>(todo(_ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent_fnPtrCallable, ptr.cast()), + // retain: false, release: true); /// Creates a block from a Dart function. /// @@ -10225,14 +10224,11 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent { static objc.ObjCBlock, NSStream, ffi.UnsignedLong)> fromFunction( void Function(ffi.Pointer, NSStream, NSStreamEvent) fn) => objc.ObjCBlock, NSStream, ffi.UnsignedLong)>( - objc.newClosureBlock( + _ObjectiveCBindings_newClosureBlock_18d6mda( _ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent_closureCallable, - (ffi.Pointer arg0, ffi.Pointer arg1, - int arg2) => - fn( - arg0, - NSStream.castFromPointer(arg1, retain: true, release: true), - NSStreamEvent.fromValue(arg2))), + objc.registerBlockClosure((ffi.Pointer arg0, + ffi.Pointer arg1, int arg2) => + fn(arg0, NSStream.castFromPointer(arg1, retain: true, release: true), NSStreamEvent.fromValue(arg2)))), retain: false, release: true); @@ -10249,16 +10245,16 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent { ffi.Void Function(ffi.Pointer, NSStream, ffi.UnsignedLong)> listener( void Function(ffi.Pointer, NSStream, NSStreamEvent) fn) { - final raw = objc.newClosureBlock( + final raw = _ObjectiveCBindings_newClosureBlock_18d6mda( _ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent_listenerCallable .nativeFunction .cast(), - (ffi.Pointer arg0, ffi.Pointer arg1, - int arg2) => + objc.registerBlockClosure((ffi.Pointer arg0, + ffi.Pointer arg1, int arg2) => fn( arg0, NSStream.castFromPointer(arg1, retain: false, release: true), - NSStreamEvent.fromValue(arg2))); + NSStreamEvent.fromValue(arg2)))); final wrapper = _ObjectiveCBindings_wrapListenerBlock_18d6mda(raw); objc.objectRelease(raw.cast()); return objc.ObjCBlock< @@ -10279,26 +10275,26 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent { ffi.Void Function(ffi.Pointer, NSStream, ffi.UnsignedLong)> blocking( void Function(ffi.Pointer, NSStream, NSStreamEvent) fn) { - final raw = objc.newClosureBlock( + final raw = _ObjectiveCBindings_newClosureBlock_18d6mda( _ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent_blockingCallable .nativeFunction .cast(), - (ffi.Pointer arg0, ffi.Pointer arg1, - int arg2) => + objc.registerBlockClosure((ffi.Pointer arg0, + ffi.Pointer arg1, int arg2) => fn( arg0, NSStream.castFromPointer(arg1, retain: false, release: true), - NSStreamEvent.fromValue(arg2))); - final rawListener = objc.newClosureBlock( + NSStreamEvent.fromValue(arg2)))); + final rawListener = _ObjectiveCBindings_newClosureBlock_18d6mda( _ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent_blockingListenerCallable .nativeFunction .cast(), - (ffi.Pointer arg0, ffi.Pointer arg1, - int arg2) => + objc.registerBlockClosure((ffi.Pointer arg0, + ffi.Pointer arg1, int arg2) => fn( arg0, NSStream.castFromPointer(arg1, retain: false, release: true), - NSStreamEvent.fromValue(arg2))); + NSStreamEvent.fromValue(arg2)))); final wrapper = objc.wrapBlockingBlock( _ObjectiveCBindings_wrapBlockingBlock_18d6mda, raw, rawListener); objc.objectRelease(raw.cast()); @@ -10309,32 +10305,11 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent { } } -/// Call operator for `objc.ObjCBlock, NSStream, ffi.UnsignedLong)>`. -extension ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent_CallExtension - on objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSStream, ffi.UnsignedLong)> { - void call(ffi.Pointer arg0, NSStream arg1, NSStreamEvent arg2) => - ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.UnsignedLong arg2)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>()(ref.pointer, arg0, arg1.ref.pointer, arg2.value); -} - void _ObjCBlock_ffiVoid_objcObjCObject_NSError_fnPtrTrampoline( - ffi.Pointer block, + ffi.Pointer target, ffi.Pointer arg0, ffi.Pointer arg1) => - block.ref.target + target .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer arg0, @@ -10342,89 +10317,78 @@ void _ObjCBlock_ffiVoid_objcObjCObject_NSError_fnPtrTrampoline( .asFunction< void Function(ffi.Pointer, ffi.Pointer)>()(arg0, arg1); -ffi.Pointer _ObjCBlock_ffiVoid_objcObjCObject_NSError_fnPtrCallable = +final _ObjCBlock_ffiVoid_objcObjCObject_NSError_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_objcObjCObject_NSError_fnPtrTrampoline) - .cast(); + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_objcObjCObject_NSError_fnPtrTrampoline); void _ObjCBlock_ffiVoid_objcObjCObject_NSError_closureTrampoline( - ffi.Pointer block, + ffi.Pointer target, ffi.Pointer arg0, ffi.Pointer arg1) => - (objc.getBlockClosure(block) as void Function(ffi.Pointer, + (objc.getBlockClosure(target.address) as void Function( + ffi.Pointer, ffi.Pointer))(arg0, arg1); -ffi.Pointer - _ObjCBlock_ffiVoid_objcObjCObject_NSError_closureCallable = +final _ObjCBlock_ffiVoid_objcObjCObject_NSError_closureCallable = ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_objcObjCObject_NSError_closureTrampoline) - .cast(); + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_objcObjCObject_NSError_closureTrampoline); void _ObjCBlock_ffiVoid_objcObjCObject_NSError_listenerTrampoline( - ffi.Pointer block, + ffi.Pointer target, ffi.Pointer arg0, ffi.Pointer arg1) { - (objc.getBlockClosure(block) as void Function( + (objc.getBlockClosure(target.address) as void Function( ffi.Pointer, ffi.Pointer))(arg0, arg1); - objc.objectRelease(block.cast()); + // objc.objectRelease(block.cast()); } ffi.NativeCallable< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)> + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)> _ObjCBlock_ffiVoid_objcObjCObject_NSError_listenerCallable = ffi .NativeCallable< ffi.Void Function( - ffi.Pointer, + ffi.Pointer, ffi.Pointer, ffi.Pointer)>.listener( _ObjCBlock_ffiVoid_objcObjCObject_NSError_listenerTrampoline) ..keepIsolateAlive = false; void _ObjCBlock_ffiVoid_objcObjCObject_NSError_blockingTrampoline( - ffi.Pointer block, + ffi.Pointer target, ffi.Pointer waiter, ffi.Pointer arg0, ffi.Pointer arg1) { try { - (objc.getBlockClosure(block) as void Function(ffi.Pointer, + (objc.getBlockClosure(target.address) as void Function( + ffi.Pointer, ffi.Pointer))(arg0, arg1); } catch (e) { } finally { objc.signalWaiter(waiter); - objc.objectRelease(block.cast()); + // objc.objectRelease(block.cast()); } } ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)> + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)> _ObjCBlock_ffiVoid_objcObjCObject_NSError_blockingCallable = ffi .NativeCallable< ffi.Void Function( - ffi.Pointer, + ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>.isolateLocal( _ObjCBlock_ffiVoid_objcObjCObject_NSError_blockingTrampoline) ..keepIsolateAlive = false; ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)> + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)> _ObjCBlock_ffiVoid_objcObjCObject_NSError_blockingListenerCallable = ffi .NativeCallable< ffi.Void Function( - ffi.Pointer, + ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>.listener( @@ -10447,16 +10411,9 @@ abstract final class ObjCBlock_ffiVoid_objcObjCObject_NSError { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock?, NSError)> fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) => - objc.ObjCBlock?, NSError)>( - objc.newPointerBlock(_ObjCBlock_ffiVoid_objcObjCObject_NSError_fnPtrCallable, ptr.cast()), - retain: false, - release: true); + // static objc.ObjCBlock?, NSError)> fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1)>> ptr) => + // objc.ObjCBlock?, NSError)>(todo(_ObjCBlock_ffiVoid_objcObjCObject_NSError_fnPtrCallable, ptr.cast()), + // retain: false, release: true); /// Creates a block from a Dart function. /// @@ -10466,15 +10423,13 @@ abstract final class ObjCBlock_ffiVoid_objcObjCObject_NSError { static objc.ObjCBlock?, NSError)> fromFunction( void Function(objc.ObjCObjectBase?, NSError) fn) => objc.ObjCBlock?, NSError)>( - objc.newClosureBlock( + _ObjectiveCBindings_newClosureBlock_wjvic9( _ObjCBlock_ffiVoid_objcObjCObject_NSError_closureCallable, - (ffi.Pointer arg0, - ffi.Pointer arg1) => - fn( - arg0.address == 0 - ? null - : objc.ObjCObjectBase(arg0, retain: true, release: true), - NSError.castFromPointer(arg1, retain: true, release: true))), + objc.registerBlockClosure((ffi.Pointer arg0, ffi.Pointer arg1) => fn( + arg0.address == 0 + ? null + : objc.ObjCObjectBase(arg0, retain: true, release: true), + NSError.castFromPointer(arg1, retain: true, release: true)))), retain: false, release: true); @@ -10490,17 +10445,17 @@ abstract final class ObjCBlock_ffiVoid_objcObjCObject_NSError { static objc .ObjCBlock?, NSError)> listener(void Function(objc.ObjCObjectBase?, NSError) fn) { - final raw = objc.newClosureBlock( + final raw = _ObjectiveCBindings_newClosureBlock_wjvic9( _ObjCBlock_ffiVoid_objcObjCObject_NSError_listenerCallable .nativeFunction .cast(), - (ffi.Pointer arg0, + objc.registerBlockClosure((ffi.Pointer arg0, ffi.Pointer arg1) => fn( arg0.address == 0 ? null : objc.ObjCObjectBase(arg0, retain: false, release: true), - NSError.castFromPointer(arg1, retain: false, release: true))); + NSError.castFromPointer(arg1, retain: false, release: true)))); final wrapper = _ObjectiveCBindings_wrapListenerBlock_wjvic9(raw); objc.objectRelease(raw.cast()); return objc.ObjCBlock< @@ -10520,28 +10475,28 @@ abstract final class ObjCBlock_ffiVoid_objcObjCObject_NSError { static objc .ObjCBlock?, NSError)> blocking(void Function(objc.ObjCObjectBase?, NSError) fn) { - final raw = objc.newClosureBlock( + final raw = _ObjectiveCBindings_newClosureBlock_wjvic9( _ObjCBlock_ffiVoid_objcObjCObject_NSError_blockingCallable .nativeFunction .cast(), - (ffi.Pointer arg0, + objc.registerBlockClosure((ffi.Pointer arg0, ffi.Pointer arg1) => fn( arg0.address == 0 ? null : objc.ObjCObjectBase(arg0, retain: false, release: true), - NSError.castFromPointer(arg1, retain: false, release: true))); - final rawListener = objc.newClosureBlock( + NSError.castFromPointer(arg1, retain: false, release: true)))); + final rawListener = _ObjectiveCBindings_newClosureBlock_wjvic9( _ObjCBlock_ffiVoid_objcObjCObject_NSError_blockingListenerCallable .nativeFunction .cast(), - (ffi.Pointer arg0, + objc.registerBlockClosure((ffi.Pointer arg0, ffi.Pointer arg1) => fn( arg0.address == 0 ? null : objc.ObjCObjectBase(arg0, retain: false, release: true), - NSError.castFromPointer(arg1, retain: false, release: true))); + NSError.castFromPointer(arg1, retain: false, release: true)))); final wrapper = objc.wrapBlockingBlock( _ObjectiveCBindings_wrapBlockingBlock_wjvic9, raw, rawListener); objc.objectRelease(raw.cast()); @@ -10552,29 +10507,11 @@ abstract final class ObjCBlock_ffiVoid_objcObjCObject_NSError { } } -/// Call operator for `objc.ObjCBlock?, NSError)>`. -extension ObjCBlock_ffiVoid_objcObjCObject_NSError_CallExtension on objc - .ObjCBlock?, NSError)> { - void call(objc.ObjCObjectBase? arg0, NSError arg1) => ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()( - ref.pointer, arg0?.ref.pointer ?? ffi.nullptr, arg1.ref.pointer); -} - instancetype _ObjCBlock_instancetype_ffiVoid_NSCoder_fnPtrTrampoline( - ffi.Pointer block, + ffi.Pointer target, ffi.Pointer arg0, ffi.Pointer arg1) => - block.ref.target + target .cast< ffi.NativeFunction< instancetype Function(ffi.Pointer arg0, @@ -10582,24 +10519,22 @@ instancetype _ObjCBlock_instancetype_ffiVoid_NSCoder_fnPtrTrampoline( .asFunction< instancetype Function(ffi.Pointer, ffi.Pointer)>()(arg0, arg1); -ffi.Pointer _ObjCBlock_instancetype_ffiVoid_NSCoder_fnPtrCallable = +final _ObjCBlock_instancetype_ffiVoid_NSCoder_fnPtrCallable = ffi.Pointer.fromFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_instancetype_ffiVoid_NSCoder_fnPtrTrampoline) - .cast(); + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_instancetype_ffiVoid_NSCoder_fnPtrTrampoline); instancetype _ObjCBlock_instancetype_ffiVoid_NSCoder_closureTrampoline( - ffi.Pointer block, + ffi.Pointer target, ffi.Pointer arg0, ffi.Pointer arg1) => - (objc.getBlockClosure(block) as instancetype Function( + (objc.getBlockClosure(target.address) as instancetype Function( ffi.Pointer, ffi.Pointer))(arg0, arg1); -ffi.Pointer _ObjCBlock_instancetype_ffiVoid_NSCoder_closureCallable = +final _ObjCBlock_instancetype_ffiVoid_NSCoder_closureCallable = ffi.Pointer.fromFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_instancetype_ffiVoid_NSCoder_closureTrampoline) - .cast(); + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_instancetype_ffiVoid_NSCoder_closureTrampoline); /// Construction methods for `objc.ObjCBlock?> Function(ffi.Pointer, NSCoder)>`. abstract final class ObjCBlock_instancetype_ffiVoid_NSCoder { @@ -10619,73 +10554,37 @@ abstract final class ObjCBlock_instancetype_ffiVoid_NSCoder { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock< - objc.Retained?> Function( - ffi.Pointer, NSCoder)> - fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1)>> ptr) => - objc.ObjCBlock< - objc.Retained?> Function( - ffi.Pointer, NSCoder)>( - objc.newPointerBlock( - _ObjCBlock_instancetype_ffiVoid_NSCoder_fnPtrCallable, ptr.cast()), - retain: false, - release: true); + // static objc.ObjCBlock?> Function(ffi.Pointer, NSCoder)> fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1)>> ptr) => + // objc.ObjCBlock?> Function(ffi.Pointer, NSCoder)>(todo(_ObjCBlock_instancetype_ffiVoid_NSCoder_fnPtrCallable, ptr.cast()), + // retain: false, release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc - .ObjCBlock?> Function(ffi.Pointer, NSCoder)> - fromFunction( - Dartinstancetype? Function(ffi.Pointer, NSCoder) fn) => - objc.ObjCBlock?> Function(ffi.Pointer, NSCoder)>( - objc.newClosureBlock( - _ObjCBlock_instancetype_ffiVoid_NSCoder_closureCallable, - (ffi.Pointer arg0, ffi.Pointer arg1) => - fn(arg0, NSCoder.castFromPointer(arg1, retain: true, release: true)) - ?.ref - .retainAndReturnPointer() ?? - ffi.nullptr), - retain: false, - release: true); -} - -/// Call operator for `objc.ObjCBlock?> Function(ffi.Pointer, NSCoder)>`. -extension ObjCBlock_instancetype_ffiVoid_NSCoder_CallExtension - on objc.ObjCBlock< - objc.Retained?> Function( - ffi.Pointer, NSCoder)> { - Dartinstancetype? call(ffi.Pointer arg0, NSCoder arg1) => ref - .pointer.ref.invoke - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction, ffi.Pointer, ffi.Pointer)>() - (ref.pointer, arg0, arg1.ref.pointer) - .address == - 0 - ? null - : objc.ObjCObjectBase( - ref.pointer.ref.invoke - .cast block, ffi.Pointer arg0, ffi.Pointer arg1)>>() - .asFunction, ffi.Pointer, ffi.Pointer)>()(ref.pointer, arg0, arg1.ref.pointer), + static objc.ObjCBlock?> Function(ffi.Pointer, NSCoder)> fromFunction( + Dartinstancetype? Function(ffi.Pointer, NSCoder) fn) => + objc.ObjCBlock?> Function(ffi.Pointer, NSCoder)>( + _ObjectiveCBindings_newClosureBlock_1m9h2n( + _ObjCBlock_instancetype_ffiVoid_NSCoder_closureCallable, + objc.registerBlockClosure((ffi.Pointer arg0, ffi.Pointer arg1) => + fn(arg0, NSCoder.castFromPointer(arg1, retain: true, release: true)) + ?.ref + .retainAndReturnPointer() ?? + ffi.nullptr)), retain: false, release: true); } instancetype _ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError_fnPtrTrampoline( - ffi.Pointer block, + ffi.Pointer target, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer> arg3) => - block.ref.target + target .cast< ffi.NativeFunction< instancetype Function( @@ -10700,40 +10599,36 @@ instancetype ffi.Pointer, ffi.Pointer>)>()( arg0, arg1, arg2, arg3); -ffi.Pointer - _ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError_fnPtrCallable = +final _ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError_fnPtrCallable = ffi.Pointer.fromFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>( - _ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError_fnPtrTrampoline) - .cast(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>( + _ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError_fnPtrTrampoline); instancetype _ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError_closureTrampoline( - ffi.Pointer block, + ffi.Pointer target, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer> arg3) => - (objc.getBlockClosure(block) as instancetype Function( + (objc.getBlockClosure(target.address) as instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer>))(arg0, arg1, arg2, arg3); -ffi.Pointer - _ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError_closureCallable = +final _ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError_closureCallable = ffi.Pointer.fromFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>( - _ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError_closureTrampoline) - .cast(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>( + _ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError_closureTrampoline); /// Construction methods for `objc.ObjCBlock? Function(ffi.Pointer, NSData, NSString, ffi.Pointer>)>`. abstract final class ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError { @@ -10756,19 +10651,9 @@ abstract final class ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock< - ffi.Pointer? Function(ffi.Pointer, NSData, - NSString, ffi.Pointer>)> - fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer> arg3)>> ptr) => - objc.ObjCBlock< - ffi.Pointer? Function( - ffi.Pointer, - NSData, - NSString, - ffi.Pointer>)>( - objc.newPointerBlock(_ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError_fnPtrCallable, ptr.cast()), - retain: false, - release: true); + // static objc.ObjCBlock? Function(ffi.Pointer, NSData, NSString, ffi.Pointer>)> fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer> arg3)>> ptr) => + // objc.ObjCBlock? Function(ffi.Pointer, NSData, NSString, ffi.Pointer>)>(todo(_ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError_fnPtrCallable, ptr.cast()), + // retain: false, release: true); /// Creates a block from a Dart function. /// @@ -10778,53 +10663,20 @@ abstract final class ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError { static objc.ObjCBlock? Function(ffi.Pointer, NSData, NSString, ffi.Pointer>)> fromFunction(Dartinstancetype? Function(ffi.Pointer, NSData, NSString, ffi.Pointer>) fn) => objc.ObjCBlock? Function(ffi.Pointer, NSData, NSString, ffi.Pointer>)>( - objc.newClosureBlock( + _ObjectiveCBindings_newClosureBlock_e2pkq8( _ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError_closureCallable, - (ffi.Pointer arg0, + objc.registerBlockClosure((ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer> arg3) => - fn(arg0, NSData.castFromPointer(arg1, retain: true, release: true), NSString.castFromPointer(arg2, retain: true, release: true), arg3)?.ref.retainAndAutorelease() ?? - ffi.nullptr), + fn(arg0, NSData.castFromPointer(arg1, retain: true, release: true), NSString.castFromPointer(arg2, retain: true, release: true), arg3)?.ref.retainAndAutorelease() ?? ffi.nullptr)), retain: false, release: true); } -/// Call operator for `objc.ObjCBlock? Function(ffi.Pointer, NSData, NSString, ffi.Pointer>)>`. -extension ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError_CallExtension - on objc.ObjCBlock< - ffi.Pointer? Function(ffi.Pointer, NSData, - NSString, ffi.Pointer>)> { - Dartinstancetype? call(ffi.Pointer arg0, NSData arg1, NSString arg2, ffi.Pointer> arg3) => ref - .pointer.ref.invoke - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer> arg3)>>() - .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>() - (ref.pointer, arg0, arg1.ref.pointer, arg2.ref.pointer, arg3) - .address == - 0 - ? null - : objc.ObjCObjectBase( - ref.pointer.ref.invoke.cast block, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer> arg3)>>().asFunction, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer>)>()(ref.pointer, arg0, arg1.ref.pointer, arg2.ref.pointer, arg3), - retain: true, - release: true); -} - ffi.Pointer _ObjCBlock_objcObjCObject_ffiVoid_fnPtrTrampoline( - ffi.Pointer block, ffi.Pointer arg0) => - block.ref.target + ffi.Pointer target, ffi.Pointer arg0) => + target .cast< ffi.NativeFunction< ffi.Pointer Function( @@ -10832,24 +10684,21 @@ ffi.Pointer _ObjCBlock_objcObjCObject_ffiVoid_fnPtrTrampoline( .asFunction< ffi.Pointer Function( ffi.Pointer)>()(arg0); -ffi.Pointer _ObjCBlock_objcObjCObject_ffiVoid_fnPtrCallable = +final _ObjCBlock_objcObjCObject_ffiVoid_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_objcObjCObject_ffiVoid_fnPtrTrampoline) - .cast(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_objcObjCObject_ffiVoid_fnPtrTrampoline); ffi.Pointer _ObjCBlock_objcObjCObject_ffiVoid_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0) => - (objc.getBlockClosure(block) as ffi.Pointer Function( - ffi.Pointer))(arg0); -ffi.Pointer _ObjCBlock_objcObjCObject_ffiVoid_closureCallable = + ffi.Pointer target, ffi.Pointer arg0) => + (objc.getBlockClosure(target.address) as ffi.Pointer + Function(ffi.Pointer))(arg0); +final _ObjCBlock_objcObjCObject_ffiVoid_closureCallable = ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_objcObjCObject_ffiVoid_closureTrampoline) - .cast(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_objcObjCObject_ffiVoid_closureTrampoline); /// Construction methods for `objc.ObjCBlock Function(ffi.Pointer)>`. abstract final class ObjCBlock_objcObjCObject_ffiVoid { @@ -10869,60 +10718,33 @@ abstract final class ObjCBlock_objcObjCObject_ffiVoid { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock Function(ffi.Pointer)> - fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer arg0)>> - ptr) => - objc.ObjCBlock Function(ffi.Pointer)>( - objc.newPointerBlock(_ObjCBlock_objcObjCObject_ffiVoid_fnPtrCallable, ptr.cast()), - retain: false, - release: true); + // static objc.ObjCBlock Function(ffi.Pointer)> fromFunctionPointer(ffi.Pointer Function(ffi.Pointer arg0)>> ptr) => + // objc.ObjCBlock Function(ffi.Pointer)>(todo(_ObjCBlock_objcObjCObject_ffiVoid_fnPtrCallable, ptr.cast()), + // retain: false, release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc - .ObjCBlock Function(ffi.Pointer)> - fromFunction(objc.ObjCObjectBase Function(ffi.Pointer) fn) => - objc.ObjCBlock< - ffi.Pointer Function(ffi.Pointer)>( - objc.newClosureBlock( - _ObjCBlock_objcObjCObject_ffiVoid_closureCallable, - (ffi.Pointer arg0) => - fn(arg0).ref.retainAndAutorelease()), - retain: false, - release: true); -} - -/// Call operator for `objc.ObjCBlock Function(ffi.Pointer)>`. -extension ObjCBlock_objcObjCObject_ffiVoid_CallExtension on objc - .ObjCBlock Function(ffi.Pointer)> { - objc.ObjCObjectBase call(ffi.Pointer arg0) => objc.ObjCObjectBase( - ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer block, - ffi.Pointer arg0)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer)>()(ref.pointer, arg0), - retain: true, - release: true); + static objc.ObjCBlock< + ffi.Pointer Function(ffi.Pointer)> fromFunction( + objc.ObjCObjectBase Function(ffi.Pointer) fn) => + objc.ObjCBlock Function(ffi.Pointer)>( + _ObjectiveCBindings_newClosureBlock_1yesha9( + _ObjCBlock_objcObjCObject_ffiVoid_closureCallable, + objc.registerBlockClosure((ffi.Pointer arg0) => + fn(arg0).ref.retainAndAutorelease())), + retain: false, + release: true); } ffi.Pointer _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_fnPtrTrampoline( - ffi.Pointer block, + ffi.Pointer target, ffi.Pointer arg0, ffi.Pointer arg1) => - block.ref.target + target .cast< ffi.NativeFunction< ffi.Pointer Function( @@ -10931,31 +10753,24 @@ ffi.Pointer .asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>()(arg0, arg1); -ffi.Pointer - _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_fnPtrCallable = +final _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_fnPtrTrampoline) - .cast(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_fnPtrTrampoline); ffi.Pointer _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_closureTrampoline( - ffi.Pointer block, + ffi.Pointer target, ffi.Pointer arg0, ffi.Pointer arg1) => - (objc.getBlockClosure(block) as ffi.Pointer Function( - ffi.Pointer, ffi.Pointer))(arg0, arg1); -ffi.Pointer - _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_closureCallable = + (objc.getBlockClosure(target.address) + as ffi.Pointer Function(ffi.Pointer, + ffi.Pointer))(arg0, arg1); +final _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_closureCallable = ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_closureTrampoline) - .cast(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_closureTrampoline); /// Construction methods for `objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer)>`. abstract final class ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector { @@ -10977,16 +10792,9 @@ abstract final class ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)> - fromFunctionPointer(ffi.Pointer Function(ffi.Pointer arg0, ffi.Pointer arg1)>> ptr) => - objc.ObjCBlock< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>( - objc.newPointerBlock(_ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_fnPtrCallable, ptr.cast()), - retain: false, - release: true); + // static objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer)> fromFunctionPointer(ffi.Pointer Function(ffi.Pointer arg0, ffi.Pointer arg1)>> ptr) => + // objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer)>(todo(_ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_fnPtrCallable, ptr.cast()), + // retain: false, release: true); /// Creates a block from a Dart function. /// @@ -10995,49 +10803,23 @@ abstract final class ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector { /// will result in a crash. static objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer)> fromFunction(objc.ObjCObjectBase Function(ffi.Pointer, ffi.Pointer) fn) => - objc.ObjCBlock< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>( - objc.newClosureBlock( + objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer)>( + _ObjectiveCBindings_newClosureBlock_ykn0t6( _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_closureCallable, - (ffi.Pointer arg0, ffi.Pointer arg1) => - fn(arg0, arg1).ref.retainAndAutorelease()), + objc.registerBlockClosure((ffi.Pointer arg0, + ffi.Pointer arg1) => + fn(arg0, arg1).ref.retainAndAutorelease())), retain: false, release: true); } -/// Call operator for `objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer)>`. -extension ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_CallExtension - on objc.ObjCBlock< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)> { - objc.ObjCObjectBase call( - ffi.Pointer arg0, ffi.Pointer arg1) => - objc.ObjCObjectBase( - ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()( - ref.pointer, arg0, arg1), - retain: true, - release: true); -} - ffi.Pointer _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_fnPtrTrampoline( - ffi.Pointer block, + ffi.Pointer target, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => - block.ref.target + target .cast< ffi.NativeFunction< ffi.Pointer Function( @@ -11049,36 +10831,33 @@ ffi.Pointer ffi.Pointer, ffi.Pointer, ffi.Pointer)>()(arg0, arg1, arg2); -ffi.Pointer - _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_fnPtrCallable = +final _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_fnPtrTrampoline) - .cast(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_fnPtrTrampoline); ffi.Pointer _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_closureTrampoline( - ffi.Pointer block, + ffi.Pointer target, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => - (objc.getBlockClosure(block) as ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer))(arg0, arg1, arg2); -ffi.Pointer - _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_closureCallable = + (objc.getBlockClosure(target.address) + as ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2); +final _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_closureCallable = ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_closureTrampoline) - .cast(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_closureTrampoline); /// Construction methods for `objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>`. abstract final class ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject { @@ -11100,18 +10879,9 @@ abstract final class ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCO /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)> - fromFunctionPointer(ffi.Pointer Function(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2)>> ptr) => - objc.ObjCBlock< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - objc.newPointerBlock(_ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_fnPtrCallable, ptr.cast()), - retain: false, - release: true); + // static objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)> fromFunctionPointer(ffi.Pointer Function(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2)>> ptr) => + // objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(todo(_ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_fnPtrCallable, ptr.cast()), + // retain: false, release: true); /// Creates a block from a Dart function. /// @@ -11121,53 +10891,24 @@ abstract final class ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCO static objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)> fromFunction(objc.ObjCObjectBase Function(ffi.Pointer, ffi.Pointer, objc.ObjCObjectBase) fn) => objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>( - objc.newClosureBlock( + _ObjectiveCBindings_newClosureBlock_1c0c70u( _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_closureCallable, - (ffi.Pointer arg0, + objc.registerBlockClosure((ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => - fn(arg0, arg1, objc.ObjCObjectBase(arg2, retain: true, release: true)) - .ref - .retainAndAutorelease()), + fn(arg0, arg1, objc.ObjCObjectBase(arg2, retain: true, release: true)).ref.retainAndAutorelease())), retain: false, release: true); } -/// Call operator for `objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>`. -extension ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_CallExtension - on objc.ObjCBlock< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)> { - objc.ObjCObjectBase call(ffi.Pointer arg0, - ffi.Pointer arg1, objc.ObjCObjectBase arg2) => - objc.ObjCObjectBase( - ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()( - ref.pointer, arg0, arg1, arg2.ref.pointer), - retain: true, - release: true); -} - ffi.Pointer _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_fnPtrTrampoline( - ffi.Pointer block, + ffi.Pointer target, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer arg3) => - block.ref.target + target .cast< ffi.NativeFunction< ffi.Pointer Function( @@ -11181,40 +10922,37 @@ ffi.Pointer ffi.Pointer, ffi.Pointer, ffi.Pointer)>()(arg0, arg1, arg2, arg3); -ffi.Pointer - _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_fnPtrCallable = +final _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_fnPtrTrampoline) - .cast(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_fnPtrTrampoline); ffi.Pointer _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_closureTrampoline( - ffi.Pointer block, + ffi.Pointer target, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer arg3) => - (objc.getBlockClosure(block) as ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer))(arg0, arg1, arg2, arg3); -ffi.Pointer - _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_closureCallable = + (objc.getBlockClosure(target.address) + as ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2, arg3); +final _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_closureCallable = ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_closureTrampoline) - .cast(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_closureTrampoline); /// Construction methods for `objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>`. abstract final class ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject { @@ -11239,75 +10977,25 @@ abstract final class ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCO /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)> - fromFunctionPointer(ffi.Pointer Function(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer arg3)>> ptr) => - objc.ObjCBlock< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - objc.newPointerBlock(_ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_fnPtrCallable, ptr.cast()), - retain: false, - release: true); + // static objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)> fromFunctionPointer(ffi.Pointer Function(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer arg3)>> ptr) => + // objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(todo(_ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_fnPtrCallable, ptr.cast()), + // retain: false, release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)> - fromFunction(objc.ObjCObjectBase Function(ffi.Pointer, ffi.Pointer, objc.ObjCObjectBase, objc.ObjCObjectBase) fn) => - objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>( - objc.newClosureBlock( - _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_closureCallable, - (ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3) => - fn(arg0, arg1, objc.ObjCObjectBase(arg2, retain: true, release: true), objc.ObjCObjectBase(arg3, retain: true, release: true)) - .ref - .retainAndAutorelease()), - retain: false, - release: true); -} - -/// Call operator for `objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>`. -extension ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_CallExtension - on objc.ObjCBlock< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)> { - objc.ObjCObjectBase call( - ffi.Pointer arg0, - ffi.Pointer arg1, - objc.ObjCObjectBase arg2, - objc.ObjCObjectBase arg3) => - objc.ObjCObjectBase( - ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()(ref.pointer, arg0, arg1, arg2.ref.pointer, arg3.ref.pointer), - retain: true, + static objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)> fromFunction(objc.ObjCObjectBase Function(ffi.Pointer, ffi.Pointer, objc.ObjCObjectBase, objc.ObjCObjectBase) fn) => + objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>( + _ObjectiveCBindings_newClosureBlock_u8b97m( + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_closureCallable, + objc.registerBlockClosure((ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + fn(arg0, arg1, objc.ObjCObjectBase(arg2, retain: true, release: true), objc.ObjCObjectBase(arg3, retain: true, release: true)).ref.retainAndAutorelease())), + retain: false, release: true); } diff --git a/pkgs/objective_c/src/objective_c.c b/pkgs/objective_c/src/objective_c.c index 29ccd3244..5ac45e685 100644 --- a/pkgs/objective_c/src/objective_c.c +++ b/pkgs/objective_c/src/objective_c.c @@ -10,15 +10,35 @@ #include "include/dart_api_dl.h" #include "objective_c_runtime.h" +typedef struct _ObjCBlockInternal { + void *isa; + int flags; + int reserved; + void *invoke; + void *descriptor; + void *target; + Dart_Port dispose_port; +} ObjCBlockInternal; + +// https://opensource.apple.com/source/libclosure/libclosure-38/Block_private.h +extern void *_NSConcreteStackBlock[32]; +extern void *_NSConcreteMallocBlock[32]; +extern void *_NSConcreteAutoBlock[32]; +extern void *_NSConcreteFinalizingBlock[32]; +extern void *_NSConcreteGlobalBlock[32]; +extern void *_NSConcreteWeakBlockVariable[32]; + // Dispose helper for ObjC blocks that wrap a Dart closure. For these blocks, // the target is an int ID, and the dispose_port is listening for these IDs. void DOBJC_disposeObjCBlockWithClosure(ObjCBlockImpl* block) { - Dart_PostInteger_DL(block->dispose_port, (int64_t)block->target); + ObjCBlockInternal* blk = (ObjCBlockInternal*)block; + Dart_PostInteger_DL(blk->dispose_port, (int64_t)blk->target); } bool DOBJC_isValidBlock(ObjCBlockImpl* block) { if (block == NULL) return false; - void* isa = block->isa; + ObjCBlockInternal* blk = (ObjCBlockInternal*)block; + void* isa = blk->isa; return isa == &_NSConcreteStackBlock || isa == &_NSConcreteMallocBlock || isa == &_NSConcreteAutoBlock || isa == &_NSConcreteFinalizingBlock || isa == &_NSConcreteGlobalBlock || isa == &_NSConcreteWeakBlockVariable; diff --git a/pkgs/objective_c/src/objective_c_bindings_generated.m b/pkgs/objective_c/src/objective_c_bindings_generated.m index 951871d0c..0bbfac8e7 100644 --- a/pkgs/objective_c/src/objective_c_bindings_generated.m +++ b/pkgs/objective_c/src/objective_c_bindings_generated.m @@ -13,19 +13,90 @@ Protocol* _ObjectiveCBindings_NSStreamDelegate(void) { return @protocol(NSStreamDelegate); } -typedef void (^_ListenerTrampoline)(id arg0, id arg1, id arg2); +typedef id (^_BlockType)(void * arg0); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline _ObjectiveCBindings_wrapListenerBlock_1j2nt86(_ListenerTrampoline block) NS_RETURNS_RETAINED { +_BlockType _ObjectiveCBindings_newClosureBlock_1yesha9( + id (*trampoline)(void * , void * ), void* target) NS_RETURNS_RETAINED { + return ^id (void * arg0) { + return trampoline(target, arg0); + }; +} + +typedef unsigned long (^_BlockType1)(void * arg0); +__attribute__((visibility("default"))) __attribute__((used)) +_BlockType1 _ObjectiveCBindings_newClosureBlock_1ckyi24( + unsigned long (*trampoline)(void * , void * ), void* target) NS_RETURNS_RETAINED { + return ^unsigned long (void * arg0) { + return trampoline(target, arg0); + }; +} + +typedef unsigned long (^_BlockType2)(void * arg0, NSFastEnumerationState * arg1, id * arg2, unsigned long arg3); +__attribute__((visibility("default"))) __attribute__((used)) +_BlockType2 _ObjectiveCBindings_newClosureBlock_17ap02x( + unsigned long (*trampoline)(void * , void * , NSFastEnumerationState * , id * , unsigned long ), void* target) NS_RETURNS_RETAINED { + return ^unsigned long (void * arg0, NSFastEnumerationState * arg1, id * arg2, unsigned long arg3) { + return trampoline(target, arg0, arg1, arg2, arg3); + }; +} + +typedef struct _NSZone * (^_BlockType3)(void * arg0); +__attribute__((visibility("default"))) __attribute__((used)) +_BlockType3 _ObjectiveCBindings_newClosureBlock_1a8cl66( + struct _NSZone * (*trampoline)(void * , void * ), void* target) NS_RETURNS_RETAINED { + return ^struct _NSZone * (void * arg0) { + return trampoline(target, arg0); + }; +} + +typedef BOOL (^_BlockType4)(void * arg0); +__attribute__((visibility("default"))) __attribute__((used)) +_BlockType4 _ObjectiveCBindings_newClosureBlock_e3qsqz( + BOOL (*trampoline)(void * , void * ), void* target) NS_RETURNS_RETAINED { + return ^BOOL (void * arg0) { + return trampoline(target, arg0); + }; +} + +typedef BOOL (^_BlockType5)(void * arg0, id arg1); +__attribute__((visibility("default"))) __attribute__((used)) +_BlockType5 _ObjectiveCBindings_newClosureBlock_ozkafd( + BOOL (*trampoline)(void * , void * , id ), void* target) NS_RETURNS_RETAINED { + return ^BOOL (void * arg0, id arg1) { + return trampoline(target, arg0, arg1); + }; +} + +typedef BOOL (^_BlockType6)(void * arg0, struct objc_selector * arg1); +__attribute__((visibility("default"))) __attribute__((used)) +_BlockType6 _ObjectiveCBindings_newClosureBlock_w1e3k0( + BOOL (*trampoline)(void * , void * , struct objc_selector * ), void* target) NS_RETURNS_RETAINED { + return ^BOOL (void * arg0, struct objc_selector * arg1) { + return trampoline(target, arg0, arg1); + }; +} + +typedef void (^_BlockType7)(id arg0, id arg1, id arg2); +__attribute__((visibility("default"))) __attribute__((used)) +_BlockType7 _ObjectiveCBindings_newClosureBlock_1j2nt86( + void (*trampoline)(void * , id , id , id ), void* target) NS_RETURNS_RETAINED { + return ^void (id arg0, id arg1, id arg2) { + return trampoline(target, arg0, arg1, arg2); + }; +} + +__attribute__((visibility("default"))) __attribute__((used)) +_BlockType7 _ObjectiveCBindings_wrapListenerBlock_1j2nt86(_BlockType7 block) NS_RETURNS_RETAINED { return ^void(id arg0, id arg1, id arg2) { objc_retainBlock(block); block(objc_retainBlock(arg0), objc_retain(arg1), objc_retain(arg2)); }; } -typedef void (^_BlockingTrampoline)(void * waiter, id arg0, id arg1, id arg2); +typedef void (^_BlockingTrampoline7)(void * waiter, id arg0, id arg1, id arg2); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline _ObjectiveCBindings_wrapBlockingBlock_1j2nt86( - _BlockingTrampoline block, _BlockingTrampoline listenerBlock, +_BlockType7 _ObjectiveCBindings_wrapBlockingBlock_1j2nt86( + _BlockingTrampoline7 block, _BlockingTrampoline7 listenerBlock, void* (*newWaiter)(), void (*awaitWaiter)(void*)) NS_RETURNS_RETAINED { NSThread *targetThread = [NSThread currentThread]; return ^void(id arg0, id arg1, id arg2) { @@ -41,19 +112,27 @@ _ListenerTrampoline _ObjectiveCBindings_wrapBlockingBlock_1j2nt86( }; } -typedef void (^_ListenerTrampoline1)(void * arg0); +typedef void (^_BlockType8)(void * arg0); +__attribute__((visibility("default"))) __attribute__((used)) +_BlockType8 _ObjectiveCBindings_newClosureBlock_ovsamd( + void (*trampoline)(void * , void * ), void* target) NS_RETURNS_RETAINED { + return ^void (void * arg0) { + return trampoline(target, arg0); + }; +} + __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline1 _ObjectiveCBindings_wrapListenerBlock_ovsamd(_ListenerTrampoline1 block) NS_RETURNS_RETAINED { +_BlockType8 _ObjectiveCBindings_wrapListenerBlock_ovsamd(_BlockType8 block) NS_RETURNS_RETAINED { return ^void(void * arg0) { objc_retainBlock(block); block(arg0); }; } -typedef void (^_BlockingTrampoline1)(void * waiter, void * arg0); +typedef void (^_BlockingTrampoline8)(void * waiter, void * arg0); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline1 _ObjectiveCBindings_wrapBlockingBlock_ovsamd( - _BlockingTrampoline1 block, _BlockingTrampoline1 listenerBlock, +_BlockType8 _ObjectiveCBindings_wrapBlockingBlock_ovsamd( + _BlockingTrampoline8 block, _BlockingTrampoline8 listenerBlock, void* (*newWaiter)(), void (*awaitWaiter)(void*)) NS_RETURNS_RETAINED { NSThread *targetThread = [NSThread currentThread]; return ^void(void * arg0) { @@ -69,19 +148,27 @@ _ListenerTrampoline1 _ObjectiveCBindings_wrapBlockingBlock_ovsamd( }; } -typedef void (^_ListenerTrampoline2)(void * arg0, id arg1); +typedef void (^_BlockType9)(void * arg0, id arg1); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline2 _ObjectiveCBindings_wrapListenerBlock_wjovn7(_ListenerTrampoline2 block) NS_RETURNS_RETAINED { +_BlockType9 _ObjectiveCBindings_newClosureBlock_wjovn7( + void (*trampoline)(void * , void * , id ), void* target) NS_RETURNS_RETAINED { + return ^void (void * arg0, id arg1) { + return trampoline(target, arg0, arg1); + }; +} + +__attribute__((visibility("default"))) __attribute__((used)) +_BlockType9 _ObjectiveCBindings_wrapListenerBlock_wjovn7(_BlockType9 block) NS_RETURNS_RETAINED { return ^void(void * arg0, id arg1) { objc_retainBlock(block); block(arg0, objc_retain(arg1)); }; } -typedef void (^_BlockingTrampoline2)(void * waiter, void * arg0, id arg1); +typedef void (^_BlockingTrampoline9)(void * waiter, void * arg0, id arg1); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline2 _ObjectiveCBindings_wrapBlockingBlock_wjovn7( - _BlockingTrampoline2 block, _BlockingTrampoline2 listenerBlock, +_BlockType9 _ObjectiveCBindings_wrapBlockingBlock_wjovn7( + _BlockingTrampoline9 block, _BlockingTrampoline9 listenerBlock, void* (*newWaiter)(), void (*awaitWaiter)(void*)) NS_RETURNS_RETAINED { NSThread *targetThread = [NSThread currentThread]; return ^void(void * arg0, id arg1) { @@ -97,19 +184,27 @@ _ListenerTrampoline2 _ObjectiveCBindings_wrapBlockingBlock_wjovn7( }; } -typedef void (^_ListenerTrampoline3)(void * arg0, id arg1, NSStreamEvent arg2); +typedef void (^_BlockType10)(void * arg0, id arg1, NSStreamEvent arg2); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline3 _ObjectiveCBindings_wrapListenerBlock_18d6mda(_ListenerTrampoline3 block) NS_RETURNS_RETAINED { +_BlockType10 _ObjectiveCBindings_newClosureBlock_18d6mda( + void (*trampoline)(void * , void * , id , NSStreamEvent ), void* target) NS_RETURNS_RETAINED { + return ^void (void * arg0, id arg1, NSStreamEvent arg2) { + return trampoline(target, arg0, arg1, arg2); + }; +} + +__attribute__((visibility("default"))) __attribute__((used)) +_BlockType10 _ObjectiveCBindings_wrapListenerBlock_18d6mda(_BlockType10 block) NS_RETURNS_RETAINED { return ^void(void * arg0, id arg1, NSStreamEvent arg2) { objc_retainBlock(block); block(arg0, objc_retain(arg1), arg2); }; } -typedef void (^_BlockingTrampoline3)(void * waiter, void * arg0, id arg1, NSStreamEvent arg2); +typedef void (^_BlockingTrampoline10)(void * waiter, void * arg0, id arg1, NSStreamEvent arg2); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline3 _ObjectiveCBindings_wrapBlockingBlock_18d6mda( - _BlockingTrampoline3 block, _BlockingTrampoline3 listenerBlock, +_BlockType10 _ObjectiveCBindings_wrapBlockingBlock_18d6mda( + _BlockingTrampoline10 block, _BlockingTrampoline10 listenerBlock, void* (*newWaiter)(), void (*awaitWaiter)(void*)) NS_RETURNS_RETAINED { NSThread *targetThread = [NSThread currentThread]; return ^void(void * arg0, id arg1, NSStreamEvent arg2) { @@ -125,19 +220,27 @@ _ListenerTrampoline3 _ObjectiveCBindings_wrapBlockingBlock_18d6mda( }; } -typedef void (^_ListenerTrampoline4)(id arg0, id arg1); +typedef void (^_BlockType11)(id arg0, id arg1); +__attribute__((visibility("default"))) __attribute__((used)) +_BlockType11 _ObjectiveCBindings_newClosureBlock_wjvic9( + void (*trampoline)(void * , id , id ), void* target) NS_RETURNS_RETAINED { + return ^void (id arg0, id arg1) { + return trampoline(target, arg0, arg1); + }; +} + __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline4 _ObjectiveCBindings_wrapListenerBlock_wjvic9(_ListenerTrampoline4 block) NS_RETURNS_RETAINED { +_BlockType11 _ObjectiveCBindings_wrapListenerBlock_wjvic9(_BlockType11 block) NS_RETURNS_RETAINED { return ^void(id arg0, id arg1) { objc_retainBlock(block); block(objc_retain(arg0), objc_retain(arg1)); }; } -typedef void (^_BlockingTrampoline4)(void * waiter, id arg0, id arg1); +typedef void (^_BlockingTrampoline11)(void * waiter, id arg0, id arg1); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline4 _ObjectiveCBindings_wrapBlockingBlock_wjvic9( - _BlockingTrampoline4 block, _BlockingTrampoline4 listenerBlock, +_BlockType11 _ObjectiveCBindings_wrapBlockingBlock_wjvic9( + _BlockingTrampoline11 block, _BlockingTrampoline11 listenerBlock, void* (*newWaiter)(), void (*awaitWaiter)(void*)) NS_RETURNS_RETAINED { NSThread *targetThread = [NSThread currentThread]; return ^void(id arg0, id arg1) { @@ -152,3 +255,48 @@ _ListenerTrampoline4 _ObjectiveCBindings_wrapBlockingBlock_wjvic9( } }; } + +typedef id (^_BlockType12)(void * arg0, id arg1); +__attribute__((visibility("default"))) __attribute__((used)) +_BlockType12 _ObjectiveCBindings_newClosureBlock_1m9h2n( + id (*trampoline)(void * , void * , id ), void* target) NS_RETURNS_RETAINED { + return ^id (void * arg0, id arg1) { + return trampoline(target, arg0, arg1); + }; +} + +typedef id (^_BlockType13)(void * arg0, id arg1, id arg2, id * arg3); +__attribute__((visibility("default"))) __attribute__((used)) +_BlockType13 _ObjectiveCBindings_newClosureBlock_e2pkq8( + id (*trampoline)(void * , void * , id , id , id * ), void* target) NS_RETURNS_RETAINED { + return ^id (void * arg0, id arg1, id arg2, id * arg3) { + return trampoline(target, arg0, arg1, arg2, arg3); + }; +} + +typedef id (^_BlockType14)(void * arg0, struct objc_selector * arg1); +__attribute__((visibility("default"))) __attribute__((used)) +_BlockType14 _ObjectiveCBindings_newClosureBlock_ykn0t6( + id (*trampoline)(void * , void * , struct objc_selector * ), void* target) NS_RETURNS_RETAINED { + return ^id (void * arg0, struct objc_selector * arg1) { + return trampoline(target, arg0, arg1); + }; +} + +typedef id (^_BlockType15)(void * arg0, struct objc_selector * arg1, id arg2); +__attribute__((visibility("default"))) __attribute__((used)) +_BlockType15 _ObjectiveCBindings_newClosureBlock_1c0c70u( + id (*trampoline)(void * , void * , struct objc_selector * , id ), void* target) NS_RETURNS_RETAINED { + return ^id (void * arg0, struct objc_selector * arg1, id arg2) { + return trampoline(target, arg0, arg1, arg2); + }; +} + +typedef id (^_BlockType16)(void * arg0, struct objc_selector * arg1, id arg2, id arg3); +__attribute__((visibility("default"))) __attribute__((used)) +_BlockType16 _ObjectiveCBindings_newClosureBlock_u8b97m( + id (*trampoline)(void * , void * , struct objc_selector * , id , id ), void* target) NS_RETURNS_RETAINED { + return ^id (void * arg0, struct objc_selector * arg1, id arg2, id arg3) { + return trampoline(target, arg0, arg1, arg2, arg3); + }; +} diff --git a/pkgs/objective_c/src/objective_c_runtime.h b/pkgs/objective_c/src/objective_c_runtime.h index f911c549f..4e1824373 100644 --- a/pkgs/objective_c/src/objective_c_runtime.h +++ b/pkgs/objective_c/src/objective_c_runtime.h @@ -13,6 +13,7 @@ typedef struct _ObjCSelector ObjCSelector; typedef struct _ObjCObject ObjCObject; +typedef struct _ObjCBlockImpl ObjCBlockImpl; typedef struct _ObjCProtocol ObjCProtocol; ObjCSelector *sel_registerName(const char *name); @@ -31,35 +32,6 @@ void objc_msgSend(void); void objc_msgSend_fpret(void); void objc_msgSend_stret(void); -// See https://clang.llvm.org/docs/Block-ABI-Apple.html -typedef struct _ObjCBlockDesc { - unsigned long int reserved; - unsigned long int size; // sizeof(ObjCBlockImpl) - void (*copy_helper)(void *dst, void *src); - void (*dispose_helper)(void *src); - const char *signature; -} ObjCBlockDesc; - -typedef struct _ObjCBlockImpl { - void *isa; // _NSConcreteGlobalBlock - int flags; - int reserved; - void *invoke; // RET (*invoke)(ObjCBlockImpl *, ARGS...); - ObjCBlockDesc *descriptor; - - // Captured variables follow. These are specific to our use case. - void *target; - Dart_Port dispose_port; -} ObjCBlockImpl; - -// https://opensource.apple.com/source/libclosure/libclosure-38/Block_private.h -extern void *_NSConcreteStackBlock[32]; -extern void *_NSConcreteMallocBlock[32]; -extern void *_NSConcreteAutoBlock[32]; -extern void *_NSConcreteFinalizingBlock[32]; -extern void *_NSConcreteGlobalBlock[32]; -extern void *_NSConcreteWeakBlockVariable[32]; - typedef struct _ObjCMethodDesc { ObjCSelector* name; const char* types; From 4e74ba91acdaba332c84fe558d8cf7a6f765d33c Mon Sep 17 00:00:00 2001 From: Liam Appelbe Date: Tue, 7 Jan 2025 12:38:20 +1100 Subject: [PATCH 2/7] Fix analysis --- .../lib/src/code_generator/objc_block.dart | 21 ++++++++--------- .../objc_built_in_functions.dart | 23 +++++++++---------- pkgs/objective_c/lib/src/internal.dart | 4 +--- 3 files changed, 22 insertions(+), 26 deletions(-) diff --git a/pkgs/ffigen/lib/src/code_generator/objc_block.dart b/pkgs/ffigen/lib/src/code_generator/objc_block.dart index 41c8104a6..3d427428f 100644 --- a/pkgs/ffigen/lib/src/code_generator/objc_block.dart +++ b/pkgs/ffigen/lib/src/code_generator/objc_block.dart @@ -133,13 +133,15 @@ class ObjCBlock extends BindingType { w.topLevelUniqueNamer.makeUnique('_${name}_blockingCallable'); final blockingListenerCallable = w.topLevelUniqueNamer.makeUnique('_${name}_blockingListenerCallable'); - final callExtension = - w.topLevelUniqueNamer.makeUnique('${name}_CallExtension'); + // final callExtension = + // w.topLevelUniqueNamer.makeUnique('${name}_CallExtension'); - final newPointerBlock = 'todo';//ObjCBuiltInFunctions.newPointerBlock.gen(w); + final newPointerBlock = + 'todo'; //ObjCBuiltInFunctions.newPointerBlock.gen(w); // final newClosureBlock = ObjCBuiltInFunctions.newClosureBlock.gen(w); final newClosureBlock = _blockWrappers.newClosureBlock.name; - final registerBlockClosure = ObjCBuiltInFunctions.registerBlockClosure.gen(w); + final registerBlockClosure = + ObjCBuiltInFunctions.registerBlockClosure.gen(w); final getBlockClosure = ObjCBuiltInFunctions.getBlockClosure.gen(w); final releaseFn = ObjCBuiltInFunctions.objectRelease.gen(w); final wrapBlockingBlockFn = ObjCBuiltInFunctions.wrapBlockingBlock.gen(w); @@ -339,8 +341,8 @@ abstract final class $name { @override BindingString? toObjCBindingString(Writer w) { - if (_blockWrappers?.objCBindingsGenerated ?? true) return null; - _blockWrappers!.objCBindingsGenerated = true; + if (_blockWrappers.objCBindingsGenerated) return null; + _blockWrappers.objCBindingsGenerated = true; final argsReceived = []; final retains = []; @@ -366,8 +368,7 @@ abstract final class $name { final returnNativeType = returnType.getNativeType(); final newClosureBlock = _blockWrappers.newClosureBlock.name; - final blockTypeName = - w.objCLevelUniqueNamer.makeUnique('_BlockType'); + final blockTypeName = w.objCLevelUniqueNamer.makeUnique('_BlockType'); final blockingName = w.objCLevelUniqueNamer.makeUnique('_BlockingTrampoline'); final trampolineArg = @@ -522,9 +523,7 @@ class _FnHelper { returnType: returnType, parameters: [ Parameter( - type: PointerType(voidType), - name: 'target', - objCConsumed: false), + type: PointerType(voidType), name: 'target', objCConsumed: false), ...params, ], ); 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 f5f212f1d..fad51a670 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 @@ -216,9 +216,7 @@ class ObjCBuiltInFunctions { returnType: block.returnType, parameters: [ Parameter( - type: PointerType(voidType), - name: 'target', - objCConsumed: false), + type: PointerType(voidType), name: 'target', objCConsumed: false), ...block.params, ], ); @@ -233,9 +231,7 @@ class ObjCBuiltInFunctions { type: PointerType(NativeFunc(trampolineType)), objCConsumed: false), Parameter( - type: PointerType(voidType), - name: 'target', - objCConsumed: false), + type: PointerType(voidType), name: 'target', objCConsumed: false), ], objCReturnsRetained: true, isLeaf: true, @@ -244,9 +240,13 @@ class ObjCBuiltInFunctions { ffiNativeConfig: const FfiNativeConfig(enabled: true), ), // TODO: wrap*Block should become new*Block. - block.hasListener ? _blockTrampolineFunc('_${wrapperName}_wrapListenerBlock_$idHash') : null, - block.hasListener ? _blockTrampolineFunc('_${wrapperName}_wrapBlockingBlock_$idHash', - blocking: true) : null, + block.hasListener + ? _blockTrampolineFunc('_${wrapperName}_wrapListenerBlock_$idHash') + : null, + block.hasListener + ? _blockTrampolineFunc('_${wrapperName}_wrapBlockingBlock_$idHash', + blocking: true) + : null, ); } @@ -299,9 +299,8 @@ class ObjCBlockWrapperFuncs extends AstNode { final Func? blockingWrapper; bool objCBindingsGenerated = false; - ObjCBlockWrapperFuncs( - this.trampolineType, - this.newClosureBlock, this.listenerWrapper, this.blockingWrapper); + ObjCBlockWrapperFuncs(this.trampolineType, this.newClosureBlock, + this.listenerWrapper, this.blockingWrapper); @override void visitChildren(Visitor visitor) { diff --git a/pkgs/objective_c/lib/src/internal.dart b/pkgs/objective_c/lib/src/internal.dart index 5e8528770..220ee8369 100644 --- a/pkgs/objective_c/lib/src/internal.dart +++ b/pkgs/objective_c/lib/src/internal.dart @@ -3,7 +3,6 @@ // BSD-style license that can be found in the LICENSE file. import 'dart:ffi'; -import 'dart:isolate'; import 'package:ffi/ffi.dart'; @@ -437,8 +436,7 @@ BlockPtr wrapBlockingBlock( ); // Not exported by ../objective_c.dart, because they're only for testing. -bool blockHasRegisteredClosure(int id) => - _blockClosureRegistry.containsKey(id); +bool blockHasRegisteredClosure(int id) => _blockClosureRegistry.containsKey(id); bool isValidBlock(BlockPtr block) => c.isValidBlock(block); bool isValidClass(ObjectPtr clazz) => _isValidClass(clazz); bool isValidObject(ObjectPtr object) => _isValidObject(object); From 27176d847b003c1085e71b5b9e68c8b77f11c078 Mon Sep 17 00:00:00 2001 From: Liam Appelbe Date: Wed, 8 Jan 2025 11:53:34 +1100 Subject: [PATCH 3/7] Support invoking blocks from Dart --- .../lib/src/code_generator/objc_block.dart | 59 +++--- .../objc_built_in_functions.dart | 22 ++- .../test/native_objc_test/block_test.dart | 174 +++++++++--------- 3 files changed, 139 insertions(+), 116 deletions(-) diff --git a/pkgs/ffigen/lib/src/code_generator/objc_block.dart b/pkgs/ffigen/lib/src/code_generator/objc_block.dart index 3d427428f..4e3facb56 100644 --- a/pkgs/ffigen/lib/src/code_generator/objc_block.dart +++ b/pkgs/ffigen/lib/src/code_generator/objc_block.dart @@ -133,13 +133,13 @@ class ObjCBlock extends BindingType { w.topLevelUniqueNamer.makeUnique('_${name}_blockingCallable'); final blockingListenerCallable = w.topLevelUniqueNamer.makeUnique('_${name}_blockingListenerCallable'); - // final callExtension = - // w.topLevelUniqueNamer.makeUnique('${name}_CallExtension'); + final callExtension = + w.topLevelUniqueNamer.makeUnique('${name}_CallExtension'); final newPointerBlock = 'todo'; //ObjCBuiltInFunctions.newPointerBlock.gen(w); - // final newClosureBlock = ObjCBuiltInFunctions.newClosureBlock.gen(w); final newClosureBlock = _blockWrappers.newClosureBlock.name; + final invokeBlock = _blockWrappers.invokeBlock.name; final registerBlockClosure = ObjCBuiltInFunctions.registerBlockClosure.gen(w); final getBlockClosure = ObjCBuiltInFunctions.getBlockClosure.gen(w); @@ -311,30 +311,27 @@ abstract final class $name { s.write('}\n\n'); // Call operator extension method. -// s.write(''' -// /// Call operator for `$blockType`. -// extension $callExtension on $blockType { -// ${returnType.getDartType(w)} call(${func.paramsDartType}) =>'''); -// final callMethodArgs = params -// .map((p) => p.type.convertDartTypeToFfiDartType( -// w, -// p.name, -// objCRetain: p.objCConsumed, -// objCAutorelease: false, -// )) -// .join(', '); -// final callMethodInvocation = ''' -// ref.pointer.ref.invoke.cast<${func.trampNatFnCType}>() -// .asFunction<${func.trampFfiDartType}>()( -// ref.pointer, $callMethodArgs)'''; -// s.write(returnType.convertFfiDartTypeToDartType( -// w, -// callMethodInvocation, -// objCRetain: !returnsRetained, -// )); -// s.write(';\n'); - -// s.write('}\n\n'); + final callMethodArgs = params + .map((p) => p.type.convertDartTypeToFfiDartType( + w, + p.name, + objCRetain: p.objCConsumed, + objCAutorelease: false, + )) + .join(', '); + final callMethod = returnType.convertFfiDartTypeToDartType( + w, + '$invokeBlock(ref.pointer, $callMethodArgs)', + objCRetain: !returnsRetained, + ); + s.write(''' +/// Call operator for `$blockType`. +extension $callExtension on $blockType { + ${returnType.getDartType(w)} call(${func.paramsDartType}) => $callMethod; +} + +'''); + return BindingString( type: BindingStringType.objcBlock, string: s.toString()); } @@ -368,16 +365,24 @@ abstract final class $name { final returnNativeType = returnType.getNativeType(); final newClosureBlock = _blockWrappers.newClosureBlock.name; + final invokeBlock = _blockWrappers.invokeBlock.name; final blockTypeName = w.objCLevelUniqueNamer.makeUnique('_BlockType'); final blockingName = w.objCLevelUniqueNamer.makeUnique('_BlockingTrampoline'); final trampolineArg = _blockWrappers.trampolineType.getNativeType(varName: 'trampoline'); + final retainStr = returnsRetained ? 'NS_RETURNS_RETAINED' : ''; final s = StringBuffer(); s.write(''' typedef $returnNativeType (^$blockTypeName)($argStr); +__attribute__((visibility("default"))) __attribute__((used)) +$returnNativeType $invokeBlock( + ${['$blockTypeName block', ...argsReceived].join(', ')}) $retainStr { + return block(${noRetains.join(', ')}); +} + __attribute__((visibility("default"))) __attribute__((used)) $blockTypeName $newClosureBlock( $trampolineArg, void* target) NS_RETURNS_RETAINED { 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 fad51a670..b1f258cd6 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 @@ -222,6 +222,22 @@ class ObjCBuiltInFunctions { ); return _blockTrampolines[id] ??= ObjCBlockWrapperFuncs( trampolineType, + Func( + name: '_${wrapperName}_invokeBlock_$idHash', + returnType: block.returnType, + parameters: [ + Parameter( + name: 'block', + type: PointerType(objCBlockType), + objCConsumed: false), + ...block.params, + ], + objCReturnsRetained: block.returnsRetained, + isLeaf: false, + isInternal: true, + useNameForLookup: true, + ffiNativeConfig: const FfiNativeConfig(enabled: true), + ), Func( name: '_${wrapperName}_newClosureBlock_$idHash', returnType: PointerType(objCBlockType), @@ -294,18 +310,20 @@ class ObjCBuiltInFunctions { /// A native trampoline function for a listener block. class ObjCBlockWrapperFuncs extends AstNode { final FunctionType trampolineType; + final Func invokeBlock; final Func newClosureBlock; final Func? listenerWrapper; final Func? blockingWrapper; bool objCBindingsGenerated = false; - ObjCBlockWrapperFuncs(this.trampolineType, this.newClosureBlock, - this.listenerWrapper, this.blockingWrapper); + ObjCBlockWrapperFuncs(this.trampolineType, this.invokeBlock, + this.newClosureBlock, this.listenerWrapper, this.blockingWrapper); @override void visitChildren(Visitor visitor) { super.visitChildren(visitor); visitor.visit(trampolineType); + visitor.visit(invokeBlock); visitor.visit(newClosureBlock); visitor.visit(listenerWrapper); visitor.visit(blockingWrapper); diff --git a/pkgs/ffigen/test/native_objc_test/block_test.dart b/pkgs/ffigen/test/native_objc_test/block_test.dart index 557e0256b..475df9506 100644 --- a/pkgs/ffigen/test/native_objc_test/block_test.dart +++ b/pkgs/ffigen/test/native_objc_test/block_test.dart @@ -83,7 +83,7 @@ void main() { final blockTester = BlockTester.newFromBlock_(block); blockTester.pokeBlock(); expect(blockTester.call_(123), 4123); - // expect(block(123), 4123); + expect(block(123), 4123); }); test('Listener block same thread', () async { @@ -169,7 +169,7 @@ void main() { expect(await resultCompleter.future, 123456); }); - /*test('Blocking block manual invocation', () { + test('Blocking block manual invocation', () { int value = 0; final block = VoidBlock.blocking(() { waitSync(Duration(milliseconds: 100)); @@ -177,13 +177,13 @@ void main() { }); block(); expect(value, 123); - });*/ + }); test('Float block', () { final block = FloatBlock.fromFunction((double x) { return x + 4.56; }); - // expect(block(1.23), closeTo(5.79, 1e-6)); + expect(block(1.23), closeTo(5.79, 1e-6)); expect(BlockTester.callFloatBlock_(block), closeTo(5.79, 1e-6)); }); @@ -191,7 +191,7 @@ void main() { final block = DoubleBlock.fromFunction((double x) { return x + 4.56; }); - // expect(block(1.23), closeTo(5.79, 1e-6)); + expect(block(1.23), closeTo(5.79, 1e-6)); expect(BlockTester.callDoubleBlock_(block), closeTo(5.79, 1e-6)); }); @@ -215,11 +215,11 @@ void main() { return temp; }); - // final result1 = block(input); - // expect(result1.x, 3.4); - // expect(result1.y, 5.6); - // expect(result1.z, 7.8); - // expect(result1.w, 1.2); + final result1 = block(input); + expect(result1.x, 3.4); + expect(result1.y, 5.6); + expect(result1.z, 7.8); + expect(result1.w, 1.2); final result2 = BlockTester.callVec4Block_(block); expect(result2.x, 3.4); @@ -235,8 +235,8 @@ void main() { sel = x.toDartString(); }); - // block('Hello'.toSelector()); - // expect(sel, 'Hello'); + block('Hello'.toSelector()); + expect(sel, 'Hello'); BlockTester.callSelectorBlock_(block); expect(sel, 'Select'); @@ -249,14 +249,14 @@ void main() { return x; }); - // final obj = DummyObject.new1(); - // final result1 = block(obj); - // expect(result1, obj); - // expect(isCalled, isTrue); + final obj = DummyObject.new1(); + final result1 = block(obj); + expect(result1, obj); + expect(isCalled, isTrue); isCalled = false; final result2 = BlockTester.callObjectBlock_(block); - // expect(result2, isNot(obj)); + expect(result2, isNot(obj)); expect(result2.ref.pointer, isNot(nullptr)); expect(isCalled, isTrue); }); @@ -268,15 +268,15 @@ void main() { return x; }); - // final obj = DummyObject.new1(); - // final result1 = block(obj); - // expect(result1, obj); - // expect(isCalled, isTrue); + final obj = DummyObject.new1(); + final result1 = block(obj); + expect(result1, obj); + expect(isCalled, isTrue); - // isCalled = false; - // final result2 = block(null); - // expect(result2, isNull); - // expect(isCalled, isTrue); + isCalled = false; + final result2 = block(null); + expect(result2, isNull); + expect(isCalled, isTrue); isCalled = false; final result3 = BlockTester.callNullableObjectBlock_(block); @@ -289,11 +289,11 @@ void main() { final block = NullableStringBlock.fromFunction( (NSString? x) => '$x Cat'.toNSString()); - // final result1 = block('Dog'.toNSString()); - // expect(result1.toString(), 'Dog Cat'); + final result1 = block('Dog'.toNSString()); + expect(result1.toString(), 'Dog Cat'); - // final result2 = block(null); - // expect(result2.toString(), 'null Cat'); + final result2 = block(null); + expect(result2.toString(), 'null Cat'); final result3 = BlockTester.callNullableStringBlock_(block); expect(result3.toString(), 'Lizard Cat'); @@ -373,7 +373,7 @@ void main() { await hasRun.future; }); - /*test('Block block', () { + test('Block block', () { final blockBlock = BlockBlock.fromFunction((ObjCBlock intBlock) { return IntBlock.fromFunction((int x) { @@ -402,7 +402,7 @@ void main() { final result2 = BlockTester.newBlock_withMult_(blockBlock, 2); expect(result2(1), 14); - });*/ + }); /*Pointer funcPointerBlockRefCountTest() { final block = @@ -419,10 +419,10 @@ void main() { expect(blockRetainCount(rawBlock), 0); }, skip: !canDoGC);*/ - /*Pointer funcBlockRefCountTest() { + Pointer funcBlockRefCountTest() { final block = IntBlock.fromFunction(makeAdder(4000)); - expect(internal_for_testing.blockHasRegisteredClosure(block.ref.pointer), - true); + // expect(internal_for_testing.blockHasRegisteredClosure(block.ref.pointer), + // true); expect(blockRetainCount(block.ref.pointer), 1); return block.ref.pointer; } @@ -432,21 +432,21 @@ void main() { doGC(); await Future.delayed(Duration.zero); // Let dispose message arrive. expect(blockRetainCount(rawBlock), 0); - expect(internal_for_testing.blockHasRegisteredClosure(rawBlock.cast()), - false); + // expect(internal_for_testing.blockHasRegisteredClosure(rawBlock.cast()), + // false); }, skip: !canDoGC); Pointer blockManualRetainRefCountTest() { final block = IntBlock.fromFunction(makeAdder(4000)); - expect(internal_for_testing.blockHasRegisteredClosure(block.ref.pointer), - true); + // expect(internal_for_testing.blockHasRegisteredClosure(block.ref.pointer), + // true); expect(blockRetainCount(block.ref.pointer), 1); final rawBlock = block.ref.retainAndReturnPointer(); expect(blockRetainCount(rawBlock), 2); return rawBlock; - }*/ + } - /*int blockManualRetainRefCountTest2(Pointer rawBlock) { + int blockManualRetainRefCountTest2(Pointer rawBlock) { final block = IntBlock.castFromPointer(rawBlock.cast(), retain: false, release: true); return blockRetainCount(block.ref.pointer); @@ -460,11 +460,11 @@ void main() { doGC(); await Future.delayed(Duration.zero); // Let dispose message arrive. expect(blockRetainCount(rawBlock), 0); - expect(internal_for_testing.blockHasRegisteredClosure(rawBlock.cast()), - false); - }, skip: !canDoGC);*/ + // expect(internal_for_testing.blockHasRegisteredClosure(rawBlock.cast()), + // false); + }, skip: !canDoGC); - /*(Pointer, Pointer, Pointer) + (Pointer, Pointer, Pointer) blockBlockDartCallRefCountTest() { final pool = lib.objc_autoreleasePoolPush(); final inputBlock = IntBlock.fromFunction((int x) { @@ -484,21 +484,21 @@ void main() { // One reference held by inputBlock object, another bound to the // outputBlock lambda. expect(blockRetainCount(inputBlock.ref.pointer), 2); - expect( - internal_for_testing - .blockHasRegisteredClosure(inputBlock.ref.pointer.cast()), - true); + // expect( + // internal_for_testing + // .blockHasRegisteredClosure(inputBlock.ref.pointer.cast()), + // true); expect(blockRetainCount(blockBlock.ref.pointer), 1); - expect( - internal_for_testing - .blockHasRegisteredClosure(blockBlock.ref.pointer.cast()), - true); + // expect( + // internal_for_testing + // .blockHasRegisteredClosure(blockBlock.ref.pointer.cast()), + // true); expect(blockRetainCount(outputBlock.ref.pointer), 1); - expect( - internal_for_testing - .blockHasRegisteredClosure(outputBlock.ref.pointer.cast()), - true); + // expect( + // internal_for_testing + // .blockHasRegisteredClosure(outputBlock.ref.pointer.cast()), + // true); return ( inputBlock.ref.pointer, blockBlock.ref.pointer, @@ -514,18 +514,18 @@ void main() { doGC(); await Future.delayed(Duration.zero); // Let dispose message arrive. - expect(blockRetainCount(inputBlock), 0); - expect(internal_for_testing.blockHasRegisteredClosure(inputBlock.cast()), - false); + // expect(blockRetainCount(inputBlock), 0); + // expect(internal_for_testing.blockHasRegisteredClosure(inputBlock.cast()), + // false); expect(blockRetainCount(blockBlock), 0); - expect(internal_for_testing.blockHasRegisteredClosure(blockBlock.cast()), - false); + // expect(internal_for_testing.blockHasRegisteredClosure(blockBlock.cast()), + // false); expect(blockRetainCount(outputBlock), 0); - expect(internal_for_testing.blockHasRegisteredClosure(outputBlock.cast()), - false); - }, skip: !canDoGC);*/ + // expect(internal_for_testing.blockHasRegisteredClosure(outputBlock.cast()), + // false); + }, skip: !canDoGC); - /*(Pointer, Pointer, Pointer) + (Pointer, Pointer, Pointer) blockBlockObjCCallRefCountTest() { final pool = lib.objc_autoreleasePoolPush(); late Pointer inputBlock; @@ -542,18 +542,18 @@ void main() { doGC(); expect(blockRetainCount(inputBlock), 1); - expect(internal_for_testing.blockHasRegisteredClosure(inputBlock.cast()), - false); + // expect(internal_for_testing.blockHasRegisteredClosure(inputBlock.cast()), + // false); expect(blockRetainCount(blockBlock.ref.pointer), 1); - expect( - internal_for_testing - .blockHasRegisteredClosure(blockBlock.ref.pointer.cast()), - true); + // expect( + // internal_for_testing + // .blockHasRegisteredClosure(blockBlock.ref.pointer.cast()), + // true); expect(blockRetainCount(outputBlock.ref.pointer), 1); - expect( - internal_for_testing - .blockHasRegisteredClosure(outputBlock.ref.pointer.cast()), - true); + // expect( + // internal_for_testing + // .blockHasRegisteredClosure(outputBlock.ref.pointer.cast()), + // true); return (inputBlock, blockBlock.ref.pointer, outputBlock.ref.pointer); } @@ -565,18 +565,18 @@ void main() { doGC(); await Future.delayed(Duration.zero); // Let dispose message arrive. - expect(blockRetainCount(inputBlock), 0); - expect(internal_for_testing.blockHasRegisteredClosure(inputBlock.cast()), - false); + // expect(blockRetainCount(inputBlock), 0); + // expect(internal_for_testing.blockHasRegisteredClosure(inputBlock.cast()), + // false); expect(blockRetainCount(blockBlock), 0); - expect(internal_for_testing.blockHasRegisteredClosure(blockBlock.cast()), - false); + // expect(internal_for_testing.blockHasRegisteredClosure(blockBlock.cast()), + // false); expect(blockRetainCount(outputBlock), 0); - expect(internal_for_testing.blockHasRegisteredClosure(outputBlock.cast()), - false); - }, skip: !canDoGC);*/ + // expect(internal_for_testing.blockHasRegisteredClosure(outputBlock.cast()), + // false); + }, skip: !canDoGC); - /*(Pointer, Pointer, Pointer) + (Pointer, Pointer, Pointer) nativeBlockBlockDartCallRefCountTest() { final pool = lib.objc_autoreleasePoolPush(); final inputBlock = IntBlock.fromFunction((int x) { @@ -608,7 +608,7 @@ void main() { expect(blockRetainCount(inputBlock), 0); expect(blockRetainCount(blockBlock), 0); expect(blockRetainCount(outputBlock), 0); - }, skip: !canDoGC);*/ + }, skip: !canDoGC); (Pointer, Pointer) nativeBlockBlockObjCCallRefCountTest() { @@ -629,7 +629,7 @@ void main() { expect(blockRetainCount(outputBlock), 0); }, skip: !canDoGC); - /*(Pointer, Pointer) objectBlockRefCountTest(Allocator alloc) { + (Pointer, Pointer) objectBlockRefCountTest(Allocator alloc) { final pool = lib.objc_autoreleasePoolPush(); final inputCounter = alloc(); final outputCounter = alloc(); @@ -656,7 +656,7 @@ void main() { expect(inputCounter.value, 0); expect(outputCounter.value, 0); }); - }, skip: !canDoGC);*/ + }, skip: !canDoGC); (Pointer, Pointer) objectNativeBlockRefCountTest( Allocator alloc) { From 5c311cab0b2a51bac7af102ee69ca9ce4e67d262 Mon Sep 17 00:00:00 2001 From: Liam Appelbe Date: Thu, 9 Jan 2025 13:34:16 +1100 Subject: [PATCH 4/7] Fix memory management --- .../lib/src/code_generator/objc_block.dart | 62 +- .../objc_built_in_functions.dart | 36 +- .../ffigen/lib/src/code_generator/writer.dart | 10 + .../test/native_objc_test/block_test.dart | 144 +- pkgs/objective_c/lib/objective_c.dart | 5 +- .../lib/src/c_bindings_generated.dart | 5 +- pkgs/objective_c/lib/src/internal.dart | 70 +- .../src/objective_c_bindings_generated.dart | 1630 ++++++++++++----- pkgs/objective_c/src/objective_c.c | 10 +- pkgs/objective_c/src/objective_c.h | 2 +- .../src/objective_c_bindings_generated.m | 350 +++- pkgs/objective_c/test/main.c | 9 +- pkgs/objective_c/test/setup.dart | 2 +- 13 files changed, 1681 insertions(+), 654 deletions(-) diff --git a/pkgs/ffigen/lib/src/code_generator/objc_block.dart b/pkgs/ffigen/lib/src/code_generator/objc_block.dart index 4e3facb56..81bba4ab9 100644 --- a/pkgs/ffigen/lib/src/code_generator/objc_block.dart +++ b/pkgs/ffigen/lib/src/code_generator/objc_block.dart @@ -146,8 +146,13 @@ class ObjCBlock extends BindingType { final releaseFn = ObjCBuiltInFunctions.objectRelease.gen(w); final wrapBlockingBlockFn = ObjCBuiltInFunctions.wrapBlockingBlock.gen(w); final signalWaiterFn = ObjCBuiltInFunctions.signalWaiter.gen(w); + final blockClosureDisposePort = + ObjCBuiltInFunctions.blockClosureDisposePort.gen(w); + final disposeObjCBlockWithClosure = + ObjCBuiltInFunctions.disposeObjCBlockWithClosure.gen(w); final returnFfiDartType = returnType.getFfiDartType(w); final voidPtrCType = voidPtr.getCType(w); + final int64Type = NativeType(SupportedNativeType.int64).getCType(w); final blockCType = blockPtr.getCType(w); final blockType = _blockType(w); final defaultValue = returnType.getDefaultValue(w); @@ -156,8 +161,8 @@ class ObjCBlock extends BindingType { // Write the function pointer based trampoline function. s.write(''' $returnFfiDartType $funcPtrTrampoline( - $voidPtrCType target, ${func.paramsFfiDartType}) => - target.cast<${func.natFnFfiDartType}>() + $blockCType block, int closureId, ${func.paramsFfiDartType}) => + ${w.ffiLibraryPrefix}.Pointer<${func.natFnFfiDartType}>.fromAddress(closureId) .asFunction<${func.ffiDartType}>()(${func.paramsNameOnly}); final $funcPtrCallable = ${w.ffiLibraryPrefix}.Pointer.fromFunction< ${func.trampCType}>($funcPtrTrampoline $exceptionalReturn); @@ -166,8 +171,8 @@ final $funcPtrCallable = ${w.ffiLibraryPrefix}.Pointer.fromFunction< // Write the closure based trampoline function. s.write(''' $returnFfiDartType $closureTrampoline( - $voidPtrCType target, ${func.paramsFfiDartType}) => - ($getBlockClosure(target.address) as ${func.ffiDartType})(${func.paramsNameOnly}); + $blockCType block, int closureId, ${func.paramsFfiDartType}) => + ($getBlockClosure(closureId) as ${func.ffiDartType})(${func.paramsNameOnly}); final $closureCallable = ${w.ffiLibraryPrefix}.Pointer.fromFunction< ${func.trampCType}>($closureTrampoline $exceptionalReturn); '''); @@ -176,20 +181,20 @@ final $closureCallable = ${w.ffiLibraryPrefix}.Pointer.fromFunction< // Write the listener trampoline function. s.write(''' $returnFfiDartType $listenerTrampoline( - $voidPtrCType target, ${func.paramsFfiDartType}) { - ($getBlockClosure(target.address) as ${func.ffiDartType})(${func.paramsNameOnly}); - // $releaseFn(block.cast()); + $blockCType block, int closureId, ${func.paramsFfiDartType}) { + ($getBlockClosure(closureId) as ${func.ffiDartType})(${func.paramsNameOnly}); + $releaseFn(block.cast()); } ${func.trampNatCallType} $listenerCallable = ${func.trampNatCallType}.listener( $listenerTrampoline $exceptionalReturn)..keepIsolateAlive = false; $returnFfiDartType $blockingTrampoline( - $voidPtrCType target, ${blockingFunc.paramsFfiDartType}) { + $blockCType block, int closureId, ${blockingFunc.paramsFfiDartType}) { try { - ($getBlockClosure(target.address) as ${func.ffiDartType})(${func.paramsNameOnly}); + ($getBlockClosure(closureId) as ${func.ffiDartType})(${func.paramsNameOnly}); } catch (e) { } finally { $signalWaiterFn(waiter); - // $releaseFn(block.cast()); + $releaseFn(block.cast()); } } ${blockingFunc.trampNatCallType} $blockingCallable = @@ -244,7 +249,8 @@ abstract final class $name { /// will result in a crash. static $blockType fromFunction(${func.dartType} fn) => $blockType($newClosureBlock( - $closureCallable, $registerBlockClosure($convFn)), + $closureCallable, $registerBlockClosure($convFn), + $blockClosureDisposePort, $disposeObjCBlockWithClosure), retain: false, release: true); '''); @@ -281,7 +287,9 @@ abstract final class $name { /// blocks do not keep the isolate alive. static $blockType listener(${func.dartType} fn) { final raw = $newClosureBlock( - $listenerCallable.nativeFunction.cast(), $registerBlockClosure($listenerConvFn)); + $listenerCallable.nativeFunction.cast(), + $registerBlockClosure($listenerConvFn), + $blockClosureDisposePort, $disposeObjCBlockWithClosure); final wrapper = $wrapListenerFn(raw); $releaseFn(raw.cast()); return $blockType(wrapper, retain: false, release: true); @@ -298,9 +306,13 @@ abstract final class $name { /// indefinitely, or have other undefined behavior. static $blockType blocking(${func.dartType} fn) { final raw = $newClosureBlock( - $blockingCallable.nativeFunction.cast(), $registerBlockClosure($listenerConvFn)); + $blockingCallable.nativeFunction.cast(), + $registerBlockClosure($listenerConvFn), + $blockClosureDisposePort, $disposeObjCBlockWithClosure); final rawListener = $newClosureBlock( - $blockingListenerCallable.nativeFunction.cast(), $registerBlockClosure($listenerConvFn)); + $blockingListenerCallable.nativeFunction.cast(), + $registerBlockClosure($listenerConvFn), + $blockClosureDisposePort, $disposeObjCBlockWithClosure); final wrapper = $wrapBlockingBlockFn($wrapBlockingFn, raw, rawListener); $releaseFn(raw.cast()); $releaseFn(rawListener.cast()); @@ -372,6 +384,7 @@ extension $callExtension on $blockType { final trampolineArg = _blockWrappers.trampolineType.getNativeType(varName: 'trampoline'); final retainStr = returnsRetained ? 'NS_RETURNS_RETAINED' : ''; + final dtorClass = '_${w.className}_BlockDestroyer'; final s = StringBuffer(); s.write(''' @@ -385,10 +398,18 @@ $returnNativeType $invokeBlock( __attribute__((visibility("default"))) __attribute__((used)) $blockTypeName $newClosureBlock( - $trampolineArg, void* target) NS_RETURNS_RETAINED { - return ^$returnNativeType($argStr) { - return trampoline(${['target', ...noRetains].join(', ')}); + $trampolineArg, int64_t closure_id, int64_t dispose_port, + void (*dtor)(int64_t, int64_t)) NS_RETURNS_RETAINED { + $dtorClass* obj = [[$dtorClass alloc] init]; + obj.closure_id = closure_id; + obj.dispose_port = dispose_port; + obj.dtor = dtor; + __weak __block $blockTypeName weakBlk; + $blockTypeName blk = ^$returnNativeType($argStr) { + return trampoline(weakBlk, ${['obj.closure_id', ...noRetains].join(', ')}); }; + weakBlk = blk; + return blk; } '''); @@ -528,7 +549,12 @@ class _FnHelper { returnType: returnType, parameters: [ Parameter( - type: PointerType(voidType), name: 'target', objCConsumed: false), + type: PointerType(objCBlockType), + name: 'block', + objCConsumed: false), + Parameter( + type: NativeType(SupportedNativeType.int64), + name: 'closure_id', objCConsumed: false), ...params, ], ); 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 b1f258cd6..48c771d90 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 @@ -34,6 +34,9 @@ class ObjCBuiltInFunctions { static const objectRelease = ObjCImport('objectRelease'); static const signalWaiter = ObjCImport('signalWaiter'); static const wrapBlockingBlock = ObjCImport('wrapBlockingBlock'); + static const blockClosureDisposePort = ObjCImport('blockClosureDisposePort'); + static const disposeObjCBlockWithClosure = + ObjCImport('disposeObjCBlockWithClosure'); static const objectBase = ObjCImport('ObjCObjectBase'); static const blockType = ObjCImport('ObjCBlock'); static const consumedType = ObjCImport('Consumed'); @@ -216,10 +219,29 @@ class ObjCBuiltInFunctions { returnType: block.returnType, parameters: [ Parameter( - type: PointerType(voidType), name: 'target', objCConsumed: false), + type: PointerType(objCBlockType), + name: 'block', + objCConsumed: false), + Parameter( + type: NativeType(SupportedNativeType.int64), + name: 'closure_id', + objCConsumed: false), ...block.params, ], ); + final dtorType = FunctionType( + returnType: voidType, + parameters: [ + Parameter( + type: NativeType(SupportedNativeType.int64), + name: 'dispose_port', + objCConsumed: false), + Parameter( + type: NativeType(SupportedNativeType.int64), + name: 'closure_id', + objCConsumed: false), + ], + ); return _blockTrampolines[id] ??= ObjCBlockWrapperFuncs( trampolineType, Func( @@ -247,7 +269,17 @@ class ObjCBuiltInFunctions { type: PointerType(NativeFunc(trampolineType)), objCConsumed: false), Parameter( - type: PointerType(voidType), name: 'target', objCConsumed: false), + type: NativeType(SupportedNativeType.int64), + name: 'closure_id', + objCConsumed: false), + Parameter( + type: NativeType(SupportedNativeType.int64), + name: 'dispose_port', + objCConsumed: false), + Parameter( + name: 'dtor', + type: PointerType(NativeFunc(dtorType)), + objCConsumed: false), ], objCReturnsRetained: true, isLeaf: true, diff --git a/pkgs/ffigen/lib/src/code_generator/writer.dart b/pkgs/ffigen/lib/src/code_generator/writer.dart index 556126632..d313cfa8d 100644 --- a/pkgs/ffigen/lib/src/code_generator/writer.dart +++ b/pkgs/ffigen/lib/src/code_generator/writer.dart @@ -446,6 +446,16 @@ class Writer { id objc_retain(id); id objc_retainBlock(id); + +@interface _${className}_BlockDestroyer : NSObject {} +@property int64_t closure_id; +@property int64_t dispose_port; +@property void (*dtor)(int64_t, int64_t); +- (void)dealloc; +@end +@implementation _${className}_BlockDestroyer +- (void)dealloc { self.dtor(self.dispose_port, self.closure_id); } +@end '''); var empty = true; diff --git a/pkgs/ffigen/test/native_objc_test/block_test.dart b/pkgs/ffigen/test/native_objc_test/block_test.dart index 475df9506..4f7912e51 100644 --- a/pkgs/ffigen/test/native_objc_test/block_test.dart +++ b/pkgs/ffigen/test/native_objc_test/block_test.dart @@ -14,7 +14,7 @@ import 'dart:io'; import 'package:ffi/ffi.dart'; import 'package:objective_c/objective_c.dart'; import 'package:objective_c/src/internal.dart' as internal_for_testing - show blockHasRegisteredClosure; + show isClosureOfBlock, lastClosureRegistryId; import 'package:test/test.dart'; import '../test_utils.dart'; @@ -123,7 +123,7 @@ void main() { } } - test('Blocking block same thread', () { + /*test('Blocking block same thread', () { int value = 0; final block = VoidBlock.blocking(() { waitSync(Duration(milliseconds: 100)); @@ -177,7 +177,7 @@ void main() { }); block(); expect(value, 123); - }); + });*/ test('Float block', () { final block = FloatBlock.fromFunction((double x) { @@ -407,7 +407,7 @@ void main() { /*Pointer funcPointerBlockRefCountTest() { final block = IntBlock.fromFunctionPointer(Pointer.fromFunction(_add100, 999)); - expect(internal_for_testing.blockHasRegisteredClosure(block.ref.pointer), + expect(internal_for_testing.isClosureOfBlock(closureId), false); expect(blockRetainCount(block.ref.pointer), 1); return block.ref.pointer; @@ -419,31 +419,30 @@ void main() { expect(blockRetainCount(rawBlock), 0); }, skip: !canDoGC);*/ - Pointer funcBlockRefCountTest() { + (Pointer, int) funcBlockRefCountTest() { final block = IntBlock.fromFunction(makeAdder(4000)); - // expect(internal_for_testing.blockHasRegisteredClosure(block.ref.pointer), - // true); + final closureId = internal_for_testing.lastClosureRegistryId; + expect(internal_for_testing.isClosureOfBlock(closureId), true); expect(blockRetainCount(block.ref.pointer), 1); - return block.ref.pointer; + return (block.ref.pointer, closureId); } test('Function block ref counting', () async { - final rawBlock = funcBlockRefCountTest(); + final (rawBlock, closureId) = funcBlockRefCountTest(); doGC(); await Future.delayed(Duration.zero); // Let dispose message arrive. expect(blockRetainCount(rawBlock), 0); - // expect(internal_for_testing.blockHasRegisteredClosure(rawBlock.cast()), - // false); + expect(internal_for_testing.isClosureOfBlock(closureId), false); }, skip: !canDoGC); - Pointer blockManualRetainRefCountTest() { + (Pointer, int) blockManualRetainRefCountTest() { final block = IntBlock.fromFunction(makeAdder(4000)); - // expect(internal_for_testing.blockHasRegisteredClosure(block.ref.pointer), - // true); + final closureId = internal_for_testing.lastClosureRegistryId; + expect(internal_for_testing.isClosureOfBlock(closureId), true); expect(blockRetainCount(block.ref.pointer), 1); final rawBlock = block.ref.retainAndReturnPointer(); expect(blockRetainCount(rawBlock), 2); - return rawBlock; + return (rawBlock, closureId); } int blockManualRetainRefCountTest2(Pointer rawBlock) { @@ -453,30 +452,35 @@ void main() { } test('Block ref counting with manual retain and release', () async { - final rawBlock = blockManualRetainRefCountTest(); + final (rawBlock, closureId) = blockManualRetainRefCountTest(); doGC(); expect(blockRetainCount(rawBlock), 1); expect(blockManualRetainRefCountTest2(rawBlock), 1); doGC(); await Future.delayed(Duration.zero); // Let dispose message arrive. expect(blockRetainCount(rawBlock), 0); - // expect(internal_for_testing.blockHasRegisteredClosure(rawBlock.cast()), - // false); + expect(internal_for_testing.isClosureOfBlock(closureId), false); }, skip: !canDoGC); - (Pointer, Pointer, Pointer) + (Pointer, Pointer, Pointer, int, int, int) blockBlockDartCallRefCountTest() { final pool = lib.objc_autoreleasePoolPush(); final inputBlock = IntBlock.fromFunction((int x) { return 5 * x; }); + final inputBlockId = internal_for_testing.lastClosureRegistryId; final blockBlock = BlockBlock.fromFunction((ObjCBlock intBlock) { return IntBlock.fromFunction((int x) { return 3 * intBlock(x); }); }); + final blockBlockId = internal_for_testing.lastClosureRegistryId; + expect(blockBlockId, isNot(inputBlockId)); final outputBlock = blockBlock(inputBlock); + final outputBlockId = internal_for_testing.lastClosureRegistryId; + expect(outputBlockId, isNot(inputBlockId)); + expect(outputBlockId, isNot(blockBlockId)); expect(outputBlock(1), 15); lib.objc_autoreleasePoolPop(pool); doGC(); @@ -484,48 +488,51 @@ void main() { // One reference held by inputBlock object, another bound to the // outputBlock lambda. expect(blockRetainCount(inputBlock.ref.pointer), 2); - // expect( - // internal_for_testing - // .blockHasRegisteredClosure(inputBlock.ref.pointer.cast()), - // true); + expect( + internal_for_testing + .isClosureOfBlock(inputBlockId), + true); expect(blockRetainCount(blockBlock.ref.pointer), 1); - // expect( - // internal_for_testing - // .blockHasRegisteredClosure(blockBlock.ref.pointer.cast()), - // true); + expect( + internal_for_testing + .isClosureOfBlock(blockBlockId), + true); expect(blockRetainCount(outputBlock.ref.pointer), 1); - // expect( - // internal_for_testing - // .blockHasRegisteredClosure(outputBlock.ref.pointer.cast()), - // true); + expect( + internal_for_testing + .isClosureOfBlock(outputBlockId), + true); return ( inputBlock.ref.pointer, blockBlock.ref.pointer, - outputBlock.ref.pointer + outputBlock.ref.pointer, + inputBlockId, + blockBlockId, + outputBlockId, ); } test('Calling a block block from Dart has correct ref counting', () async { - final (inputBlock, blockBlock, outputBlock) = + final (inputBlock, blockBlock, outputBlock, inputBlockId, blockBlockId, outputBlockId) = blockBlockDartCallRefCountTest(); doGC(); await Future.delayed(Duration.zero); // Let dispose message arrive. doGC(); await Future.delayed(Duration.zero); // Let dispose message arrive. - // expect(blockRetainCount(inputBlock), 0); - // expect(internal_for_testing.blockHasRegisteredClosure(inputBlock.cast()), - // false); + expect(blockRetainCount(inputBlock), 0); + expect(internal_for_testing.isClosureOfBlock(inputBlockId), + false); expect(blockRetainCount(blockBlock), 0); - // expect(internal_for_testing.blockHasRegisteredClosure(blockBlock.cast()), - // false); + expect(internal_for_testing.isClosureOfBlock(blockBlockId), + false); expect(blockRetainCount(outputBlock), 0); - // expect(internal_for_testing.blockHasRegisteredClosure(outputBlock.cast()), - // false); + expect(internal_for_testing.isClosureOfBlock(outputBlockId), + false); }, skip: !canDoGC); - (Pointer, Pointer, Pointer) + (Pointer, Pointer, Pointer, int, int) blockBlockObjCCallRefCountTest() { final pool = lib.objc_autoreleasePoolPush(); late Pointer inputBlock; @@ -536,44 +543,41 @@ void main() { return 3 * intBlock(x); }); }); + final blockBlockId = internal_for_testing.lastClosureRegistryId; final outputBlock = BlockTester.newBlock_withMult_(blockBlock, 2); + final outputBlockId = internal_for_testing.lastClosureRegistryId; + expect(outputBlockId, isNot(blockBlockId)); expect(outputBlock(1), 6); lib.objc_autoreleasePoolPop(pool); doGC(); expect(blockRetainCount(inputBlock), 1); - // expect(internal_for_testing.blockHasRegisteredClosure(inputBlock.cast()), - // false); expect(blockRetainCount(blockBlock.ref.pointer), 1); - // expect( - // internal_for_testing - // .blockHasRegisteredClosure(blockBlock.ref.pointer.cast()), - // true); + expect( + internal_for_testing + .isClosureOfBlock(blockBlockId), + true); expect(blockRetainCount(outputBlock.ref.pointer), 1); - // expect( - // internal_for_testing - // .blockHasRegisteredClosure(outputBlock.ref.pointer.cast()), - // true); - return (inputBlock, blockBlock.ref.pointer, outputBlock.ref.pointer); + expect( + internal_for_testing + .isClosureOfBlock(outputBlockId), + true); + return (inputBlock, blockBlock.ref.pointer, outputBlock.ref.pointer, blockBlockId, outputBlockId); } test('Calling a block block from ObjC has correct ref counting', () async { - final (inputBlock, blockBlock, outputBlock) = + final (inputBlock, blockBlock, outputBlock, blockBlockId, outputBlockId) = blockBlockObjCCallRefCountTest(); doGC(); await Future.delayed(Duration.zero); // Let dispose message arrive. doGC(); await Future.delayed(Duration.zero); // Let dispose message arrive. - // expect(blockRetainCount(inputBlock), 0); - // expect(internal_for_testing.blockHasRegisteredClosure(inputBlock.cast()), - // false); + expect(blockRetainCount(inputBlock), 0); expect(blockRetainCount(blockBlock), 0); - // expect(internal_for_testing.blockHasRegisteredClosure(blockBlock.cast()), - // false); + expect(internal_for_testing.isClosureOfBlock(blockBlockId), false); expect(blockRetainCount(outputBlock), 0); - // expect(internal_for_testing.blockHasRegisteredClosure(outputBlock.cast()), - // false); + expect(internal_for_testing.isClosureOfBlock(outputBlockId), false); }, skip: !canDoGC); (Pointer, Pointer, Pointer) @@ -792,28 +796,12 @@ void main() { expect(objectRetainCount(rawDummyObject), 0); }, skip: !canDoGC);*/ - /*test('Block fields have sensible values', () { - final block = IntBlock.fromFunction(makeAdder(4000)); - final blockPtr = block.ref.pointer; - expect(blockPtr.ref.isa, isNot(0)); - expect(blockPtr.ref.flags, isNot(0)); // Set by Block_copy. - expect(blockPtr.ref.reserved, 0); - expect(blockPtr.ref.invoke, isNot(0)); - expect(blockPtr.ref.target, isNot(0)); - final descPtr = blockPtr.ref.descriptor; - expect(descPtr.ref.reserved, 0); - expect(descPtr.ref.size, isNot(0)); - expect(descPtr.ref.copy_helper, nullptr); - expect(descPtr.ref.dispose_helper, isNot(nullptr)); - expect(descPtr.ref.signature, nullptr); - });*/ - test('Block trampoline args converted to id', () { final objCBindings = File('test/native_objc_test/block_bindings.m').readAsStringSync(); // Objects are converted to id. - expect(objCBindings, isNot(contains('NSObject'))); + expect(objCBindings, isNot(contains('DummyObject'))); expect(objCBindings, isNot(contains('NSString'))); expect(objCBindings, contains('id')); @@ -860,7 +848,7 @@ void main() { await flutterDoGC(); expect(blockRetainCount(blockPtr), 0); - // expect(objectRetainCount(objectPtr), 0); + expect(objectRetainCount(objectPtr), 0); } }); }); diff --git a/pkgs/objective_c/lib/objective_c.dart b/pkgs/objective_c/lib/objective_c.dart index 08c246795..70adb248b 100644 --- a/pkgs/objective_c/lib/objective_c.dart +++ b/pkgs/objective_c/lib/objective_c.dart @@ -15,10 +15,11 @@ export 'src/c_bindings_generated.dart' export 'src/internal.dart' hide ObjCBlockBase, - blockHasRegisteredClosure, + isClosureOfBlock, isValidBlock, isValidClass, - isValidObject; + isValidObject, + lastClosureRegistryId; export 'src/ns_data.dart'; export 'src/ns_input_stream.dart'; export 'src/ns_mutable_data.dart'; diff --git a/pkgs/objective_c/lib/src/c_bindings_generated.dart b/pkgs/objective_c/lib/src/c_bindings_generated.dart index 618529460..871d6d9ac 100644 --- a/pkgs/objective_c/lib/src/c_bindings_generated.dart +++ b/pkgs/objective_c/lib/src/c_bindings_generated.dart @@ -74,10 +74,11 @@ external void deleteFinalizableHandle( Object owner, ); -@ffi.Native)>( +@ffi.Native( symbol: "DOBJC_disposeObjCBlockWithClosure") external void disposeObjCBlockWithClosure( - ffi.Pointer block, + int dispose_port, + int closure_id, ); @ffi.Native Function(ffi.Pointer)>( diff --git a/pkgs/objective_c/lib/src/internal.dart b/pkgs/objective_c/lib/src/internal.dart index 220ee8369..dcfb52ad4 100644 --- a/pkgs/objective_c/lib/src/internal.dart +++ b/pkgs/objective_c/lib/src/internal.dart @@ -3,6 +3,7 @@ // BSD-style license that can be found in the LICENSE file. import 'dart:ffi'; +import 'dart:isolate'; import 'package:ffi/ffi.dart'; @@ -344,60 +345,11 @@ class ObjCBlockBase extends _ObjCRefHolder { : super(_ObjCBlockRef(ptr, retain: retain, release: release)); } -/*Pointer _newBlockDesc( - Pointer> disposeHelper) { - final desc = calloc.allocate(sizeOf()); - desc.ref.reserved = 0; - desc.ref.size = sizeOf(); - desc.ref.copy_helper = nullptr; - desc.ref.dispose_helper = disposeHelper.cast(); - desc.ref.signature = nullptr; - return desc; -} - -final _pointerBlockDesc = _newBlockDesc(nullptr); -final _closureBlockDesc = _newBlockDesc( - Native.addressOf>( - c.disposeObjCBlockWithClosure)); - -BlockPtr _newBlock(VoidPtr invoke, VoidPtr target, - Pointer descriptor, int disposePort, int flags) { - final b = calloc.allocate(sizeOf()); - b.ref.isa = Native.addressOf>(c.NSConcreteGlobalBlock).cast(); - b.ref.flags = flags; - b.ref.reserved = 0; - b.ref.invoke = invoke; - b.ref.target = target; - b.ref.dispose_port = disposePort; - b.ref.descriptor = descriptor; - assert(c.isValidBlock(b)); - final copy = c.blockRetain(b.cast()).cast(); - calloc.free(b); - assert(copy.ref.isa == - Native.addressOf>(c.NSConcreteMallocBlock).cast()); - assert(c.isValidBlock(copy)); - return copy; -} - -const int _blockHasCopyDispose = 1 << 25; - -/// Only for use by ffigen bindings. -BlockPtr newClosureBlock(VoidPtr invoke, Function fn) => _newBlock( - invoke, - _registerBlockClosure(fn), - _closureBlockDesc, - _blockClosureDisposer.sendPort.nativePort, - _blockHasCopyDispose); - -/// Only for use by ffigen bindings. -BlockPtr newPointerBlock(VoidPtr invoke, VoidPtr target) => - _newBlock(invoke, target, _pointerBlockDesc, 0, 0);*/ - final _blockClosureRegistry = {}; int _blockClosureRegistryLastId = 0; -/*final _blockClosureDisposer = () { +final _blockClosureDisposer = () { _ensureDartAPI(); return RawReceivePort((dynamic msg) { final id = msg as int; @@ -405,15 +357,24 @@ int _blockClosureRegistryLastId = 0; _blockClosureRegistry.remove(id); }, 'ObjCBlockClosureDisposer') ..keepIsolateAlive = false; -}();*/ +}(); + +/// Only for use by ffigen bindings. +int get blockClosureDisposePort => _blockClosureDisposer.sendPort.nativePort; -VoidPtr registerBlockClosure(Function closure) { +/// Only for use by ffigen bindings. +int registerBlockClosure(Function closure) { ++_blockClosureRegistryLastId; assert(!_blockClosureRegistry.containsKey(_blockClosureRegistryLastId)); _blockClosureRegistry[_blockClosureRegistryLastId] = closure; - return VoidPtr.fromAddress(_blockClosureRegistryLastId); + return _blockClosureRegistryLastId; } +/// Only for use by ffigen bindings. +typedef DisposeBlockFn = NativeFunction; +Pointer get disposeObjCBlockWithClosure => + Native.addressOf(c.disposeObjCBlockWithClosure); + /// Only for use by ffigen bindings. Function getBlockClosure(int id) { assert(_blockClosureRegistry.containsKey(id)); @@ -436,7 +397,8 @@ BlockPtr wrapBlockingBlock( ); // Not exported by ../objective_c.dart, because they're only for testing. -bool blockHasRegisteredClosure(int id) => _blockClosureRegistry.containsKey(id); +int get lastClosureRegistryId => _blockClosureRegistryLastId; +bool isClosureOfBlock(int id) => _blockClosureRegistry.containsKey(id); bool isValidBlock(BlockPtr block) => c.isValidBlock(block); bool isValidClass(ObjectPtr clazz) => _isValidClass(clazz); bool isValidObject(ObjectPtr object) => _isValidObject(object); diff --git a/pkgs/objective_c/lib/src/objective_c_bindings_generated.dart b/pkgs/objective_c/lib/src/objective_c_bindings_generated.dart index 36b235003..14cdf0217 100644 --- a/pkgs/objective_c/lib/src/objective_c_bindings_generated.dart +++ b/pkgs/objective_c/lib/src/objective_c_bindings_generated.dart @@ -36,29 +36,214 @@ set NSLocalizedDescriptionKey(NSString value) { _NSLocalizedDescriptionKey = value.ref.retainAndReturnPointer(); } +@ffi.Native< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.UnsignedLong)>() +external int _ObjectiveCBindings_invokeBlock_17ap02x( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer> arg2, + int arg3, +); + +@ffi.Native< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>() +external void _ObjectiveCBindings_invokeBlock_18d6mda( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, +); + +@ffi.Native< + ffi.Pointer<_NSZone> Function( + ffi.Pointer, ffi.Pointer)>() +external ffi.Pointer<_NSZone> _ObjectiveCBindings_invokeBlock_1a8cl66( + ffi.Pointer block, + ffi.Pointer arg0, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>() +external ffi.Pointer _ObjectiveCBindings_invokeBlock_1c0c70u( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, +); + +@ffi.Native< + ffi.UnsignedLong Function( + ffi.Pointer, ffi.Pointer)>() +external int _ObjectiveCBindings_invokeBlock_1ckyi24( + ffi.Pointer block, + ffi.Pointer arg0, +); + +@ffi.Native< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>() +external void _ObjectiveCBindings_invokeBlock_1j2nt86( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, +); + +@ffi.Native< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>() +external instancetype _ObjectiveCBindings_invokeBlock_1m9h2n( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>() +external ffi.Pointer _ObjectiveCBindings_invokeBlock_1yesha9( + ffi.Pointer block, + ffi.Pointer arg0, +); + +@ffi.Native< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>() +external instancetype _ObjectiveCBindings_invokeBlock_e2pkq8( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer> arg3, +); + +@ffi.Native< + ffi.Bool Function(ffi.Pointer, ffi.Pointer)>() +external bool _ObjectiveCBindings_invokeBlock_e3qsqz( + ffi.Pointer block, + ffi.Pointer arg0, +); + +@ffi.Native< + ffi.Void Function(ffi.Pointer, ffi.Pointer)>() +external void _ObjectiveCBindings_invokeBlock_ovsamd( + ffi.Pointer block, + ffi.Pointer arg0, +); + +@ffi.Native< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>() +external bool _ObjectiveCBindings_invokeBlock_ozkafd( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>() +external ffi.Pointer _ObjectiveCBindings_invokeBlock_u8b97m( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, +); + +@ffi.Native< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>() +external bool _ObjectiveCBindings_invokeBlock_w1e3k0( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, +); + +@ffi.Native< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>() +external void _ObjectiveCBindings_invokeBlock_wjovn7( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, +); + +@ffi.Native< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>() +external void _ObjectiveCBindings_invokeBlock_wjvic9( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, +); + +@ffi.Native< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>() +external ffi.Pointer _ObjectiveCBindings_invokeBlock_ykn0t6( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, +); + @ffi.Native< ffi.Pointer Function( ffi.Pointer< ffi.NativeFunction< ffi.UnsignedLong Function( - ffi.Pointer target, + ffi.Pointer block, + ffi.Int64 closure_id, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer> arg2, ffi.UnsignedLong arg3)>>, - ffi.Pointer)>(isLeaf: true) + ffi.Int64, + ffi.Int64, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64 dispose_port, + ffi.Int64 closure_id)>>)>(isLeaf: true) external ffi.Pointer _ObjectiveCBindings_newClosureBlock_17ap02x( ffi.Pointer< ffi.NativeFunction< ffi.UnsignedLong Function( - ffi.Pointer target, + ffi.Pointer block, + ffi.Int64 closure_id, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer> arg2, ffi.UnsignedLong arg3)>> trampoline, - ffi.Pointer target, + int closure_id, + int dispose_port, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64 dispose_port, ffi.Int64 closure_id)>> + dtor, ); @ffi.Native< @@ -66,22 +251,34 @@ external ffi.Pointer ffi.Pointer< ffi.NativeFunction< ffi.Void Function( - ffi.Pointer target, + ffi.Pointer block, + ffi.Int64 closure_id, ffi.Pointer arg0, ffi.Pointer arg1, ffi.UnsignedLong arg2)>>, - ffi.Pointer)>(isLeaf: true) + ffi.Int64, + ffi.Int64, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64 dispose_port, + ffi.Int64 closure_id)>>)>(isLeaf: true) external ffi.Pointer _ObjectiveCBindings_newClosureBlock_18d6mda( ffi.Pointer< ffi.NativeFunction< ffi.Void Function( - ffi.Pointer target, + ffi.Pointer block, + ffi.Int64 closure_id, ffi.Pointer arg0, ffi.Pointer arg1, ffi.UnsignedLong arg2)>> trampoline, - ffi.Pointer target, + int closure_id, + int dispose_port, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64 dispose_port, ffi.Int64 closure_id)>> + dtor, ); @ffi.Native< @@ -89,16 +286,30 @@ external ffi.Pointer ffi.Pointer< ffi.NativeFunction< ffi.Pointer<_NSZone> Function( - ffi.Pointer target, ffi.Pointer arg0)>>, - ffi.Pointer)>(isLeaf: true) + ffi.Pointer block, + ffi.Int64 closure_id, + ffi.Pointer arg0)>>, + ffi.Int64, + ffi.Int64, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64 dispose_port, + ffi.Int64 closure_id)>>)>(isLeaf: true) external ffi.Pointer _ObjectiveCBindings_newClosureBlock_1a8cl66( ffi.Pointer< ffi.NativeFunction< ffi.Pointer<_NSZone> Function( - ffi.Pointer target, ffi.Pointer arg0)>> + ffi.Pointer block, + ffi.Int64 closure_id, + ffi.Pointer arg0)>> trampoline, - ffi.Pointer target, + int closure_id, + int dispose_port, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64 dispose_port, ffi.Int64 closure_id)>> + dtor, ); @ffi.Native< @@ -106,39 +317,61 @@ external ffi.Pointer ffi.Pointer< ffi.NativeFunction< ffi.Pointer Function( - ffi.Pointer target, + ffi.Pointer block, + ffi.Int64 closure_id, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2)>>, - ffi.Pointer)>(isLeaf: true) + ffi.Int64, + ffi.Int64, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64 dispose_port, + ffi.Int64 closure_id)>>)>(isLeaf: true) external ffi.Pointer _ObjectiveCBindings_newClosureBlock_1c0c70u( ffi.Pointer< ffi.NativeFunction< ffi.Pointer Function( - ffi.Pointer target, + ffi.Pointer block, + ffi.Int64 closure_id, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2)>> trampoline, - ffi.Pointer target, + int closure_id, + int dispose_port, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64 dispose_port, ffi.Int64 closure_id)>> + dtor, ); @ffi.Native< ffi.Pointer Function( ffi.Pointer< ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer target, ffi.Pointer arg0)>>, - ffi.Pointer)>(isLeaf: true) + ffi.UnsignedLong Function(ffi.Pointer block, + ffi.Int64 closure_id, ffi.Pointer arg0)>>, + ffi.Int64, + ffi.Int64, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64 dispose_port, + ffi.Int64 closure_id)>>)>(isLeaf: true) external ffi.Pointer _ObjectiveCBindings_newClosureBlock_1ckyi24( ffi.Pointer< ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer target, ffi.Pointer arg0)>> + ffi.UnsignedLong Function(ffi.Pointer block, + ffi.Int64 closure_id, ffi.Pointer arg0)>> trampoline, - ffi.Pointer target, + int closure_id, + int dispose_port, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64 dispose_port, ffi.Int64 closure_id)>> + dtor, ); @ffi.Native< @@ -146,22 +379,34 @@ external ffi.Pointer ffi.Pointer< ffi.NativeFunction< ffi.Void Function( - ffi.Pointer target, + ffi.Pointer block, + ffi.Int64 closure_id, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2)>>, - ffi.Pointer)>(isLeaf: true) + ffi.Int64, + ffi.Int64, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64 dispose_port, + ffi.Int64 closure_id)>>)>(isLeaf: true) external ffi.Pointer _ObjectiveCBindings_newClosureBlock_1j2nt86( ffi.Pointer< ffi.NativeFunction< ffi.Void Function( - ffi.Pointer target, + ffi.Pointer block, + ffi.Int64 closure_id, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2)>> trampoline, - ffi.Pointer target, + int closure_id, + int dispose_port, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64 dispose_port, ffi.Int64 closure_id)>> + dtor, ); @ffi.Native< @@ -169,20 +414,32 @@ external ffi.Pointer ffi.Pointer< ffi.NativeFunction< instancetype Function( - ffi.Pointer target, + ffi.Pointer block, + ffi.Int64 closure_id, ffi.Pointer arg0, ffi.Pointer arg1)>>, - ffi.Pointer)>(isLeaf: true) + ffi.Int64, + ffi.Int64, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64 dispose_port, + ffi.Int64 closure_id)>>)>(isLeaf: true) external ffi.Pointer _ObjectiveCBindings_newClosureBlock_1m9h2n( ffi.Pointer< ffi.NativeFunction< instancetype Function( - ffi.Pointer target, + ffi.Pointer block, + ffi.Int64 closure_id, ffi.Pointer arg0, ffi.Pointer arg1)>> trampoline, - ffi.Pointer target, + int closure_id, + int dispose_port, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64 dispose_port, ffi.Int64 closure_id)>> + dtor, ); @ffi.Native< @@ -190,16 +447,30 @@ external ffi.Pointer ffi.Pointer< ffi.NativeFunction< ffi.Pointer Function( - ffi.Pointer target, ffi.Pointer arg0)>>, - ffi.Pointer)>(isLeaf: true) + ffi.Pointer block, + ffi.Int64 closure_id, + ffi.Pointer arg0)>>, + ffi.Int64, + ffi.Int64, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64 dispose_port, + ffi.Int64 closure_id)>>)>(isLeaf: true) external ffi.Pointer _ObjectiveCBindings_newClosureBlock_1yesha9( ffi.Pointer< ffi.NativeFunction< ffi.Pointer Function( - ffi.Pointer target, ffi.Pointer arg0)>> + ffi.Pointer block, + ffi.Int64 closure_id, + ffi.Pointer arg0)>> trampoline, - ffi.Pointer target, + int closure_id, + int dispose_port, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64 dispose_port, ffi.Int64 closure_id)>> + dtor, ); @ffi.Native< @@ -207,58 +478,90 @@ external ffi.Pointer ffi.Pointer< ffi.NativeFunction< instancetype Function( - ffi.Pointer target, + ffi.Pointer block, + ffi.Int64 closure_id, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer> arg3)>>, - ffi.Pointer)>(isLeaf: true) + ffi.Int64, + ffi.Int64, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64 dispose_port, + ffi.Int64 closure_id)>>)>(isLeaf: true) external ffi.Pointer _ObjectiveCBindings_newClosureBlock_e2pkq8( ffi.Pointer< ffi.NativeFunction< instancetype Function( - ffi.Pointer target, + ffi.Pointer block, + ffi.Int64 closure_id, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer> arg3)>> trampoline, - ffi.Pointer target, + int closure_id, + int dispose_port, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64 dispose_port, ffi.Int64 closure_id)>> + dtor, ); @ffi.Native< ffi.Pointer Function( ffi.Pointer< ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer target, ffi.Pointer arg0)>>, - ffi.Pointer)>(isLeaf: true) + ffi.Bool Function(ffi.Pointer block, + ffi.Int64 closure_id, ffi.Pointer arg0)>>, + ffi.Int64, + ffi.Int64, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64 dispose_port, + ffi.Int64 closure_id)>>)>(isLeaf: true) external ffi.Pointer _ObjectiveCBindings_newClosureBlock_e3qsqz( ffi.Pointer< ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer target, ffi.Pointer arg0)>> + ffi.Bool Function(ffi.Pointer block, + ffi.Int64 closure_id, ffi.Pointer arg0)>> trampoline, - ffi.Pointer target, + int closure_id, + int dispose_port, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64 dispose_port, ffi.Int64 closure_id)>> + dtor, ); @ffi.Native< ffi.Pointer Function( ffi.Pointer< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer target, ffi.Pointer arg0)>>, - ffi.Pointer)>(isLeaf: true) + ffi.Void Function(ffi.Pointer block, + ffi.Int64 closure_id, ffi.Pointer arg0)>>, + ffi.Int64, + ffi.Int64, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64 dispose_port, + ffi.Int64 closure_id)>>)>(isLeaf: true) external ffi.Pointer _ObjectiveCBindings_newClosureBlock_ovsamd( ffi.Pointer< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer target, ffi.Pointer arg0)>> + ffi.Void Function(ffi.Pointer block, + ffi.Int64 closure_id, ffi.Pointer arg0)>> trampoline, - ffi.Pointer target, + int closure_id, + int dispose_port, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64 dispose_port, ffi.Int64 closure_id)>> + dtor, ); @ffi.Native< @@ -266,20 +569,32 @@ external ffi.Pointer ffi.Pointer< ffi.NativeFunction< ffi.Bool Function( - ffi.Pointer target, + ffi.Pointer block, + ffi.Int64 closure_id, ffi.Pointer arg0, ffi.Pointer arg1)>>, - ffi.Pointer)>(isLeaf: true) + ffi.Int64, + ffi.Int64, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64 dispose_port, + ffi.Int64 closure_id)>>)>(isLeaf: true) external ffi.Pointer _ObjectiveCBindings_newClosureBlock_ozkafd( ffi.Pointer< ffi.NativeFunction< ffi.Bool Function( - ffi.Pointer target, + ffi.Pointer block, + ffi.Int64 closure_id, ffi.Pointer arg0, ffi.Pointer arg1)>> trampoline, - ffi.Pointer target, + int closure_id, + int dispose_port, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64 dispose_port, ffi.Int64 closure_id)>> + dtor, ); @ffi.Native< @@ -287,24 +602,36 @@ external ffi.Pointer ffi.Pointer< ffi.NativeFunction< ffi.Pointer Function( - ffi.Pointer target, + ffi.Pointer block, + ffi.Int64 closure_id, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer arg3)>>, - ffi.Pointer)>(isLeaf: true) + ffi.Int64, + ffi.Int64, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64 dispose_port, + ffi.Int64 closure_id)>>)>(isLeaf: true) external ffi.Pointer _ObjectiveCBindings_newClosureBlock_u8b97m( ffi.Pointer< ffi.NativeFunction< ffi.Pointer Function( - ffi.Pointer target, + ffi.Pointer block, + ffi.Int64 closure_id, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer arg3)>> trampoline, - ffi.Pointer target, + int closure_id, + int dispose_port, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64 dispose_port, ffi.Int64 closure_id)>> + dtor, ); @ffi.Native< @@ -312,20 +639,32 @@ external ffi.Pointer ffi.Pointer< ffi.NativeFunction< ffi.Bool Function( - ffi.Pointer target, + ffi.Pointer block, + ffi.Int64 closure_id, ffi.Pointer arg0, ffi.Pointer arg1)>>, - ffi.Pointer)>(isLeaf: true) + ffi.Int64, + ffi.Int64, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64 dispose_port, + ffi.Int64 closure_id)>>)>(isLeaf: true) external ffi.Pointer _ObjectiveCBindings_newClosureBlock_w1e3k0( ffi.Pointer< ffi.NativeFunction< ffi.Bool Function( - ffi.Pointer target, + ffi.Pointer block, + ffi.Int64 closure_id, ffi.Pointer arg0, ffi.Pointer arg1)>> trampoline, - ffi.Pointer target, + int closure_id, + int dispose_port, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64 dispose_port, ffi.Int64 closure_id)>> + dtor, ); @ffi.Native< @@ -333,20 +672,32 @@ external ffi.Pointer ffi.Pointer< ffi.NativeFunction< ffi.Void Function( - ffi.Pointer target, + ffi.Pointer block, + ffi.Int64 closure_id, ffi.Pointer arg0, ffi.Pointer arg1)>>, - ffi.Pointer)>(isLeaf: true) + ffi.Int64, + ffi.Int64, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64 dispose_port, + ffi.Int64 closure_id)>>)>(isLeaf: true) external ffi.Pointer _ObjectiveCBindings_newClosureBlock_wjovn7( ffi.Pointer< ffi.NativeFunction< ffi.Void Function( - ffi.Pointer target, + ffi.Pointer block, + ffi.Int64 closure_id, ffi.Pointer arg0, ffi.Pointer arg1)>> trampoline, - ffi.Pointer target, + int closure_id, + int dispose_port, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64 dispose_port, ffi.Int64 closure_id)>> + dtor, ); @ffi.Native< @@ -354,20 +705,32 @@ external ffi.Pointer ffi.Pointer< ffi.NativeFunction< ffi.Void Function( - ffi.Pointer target, + ffi.Pointer block, + ffi.Int64 closure_id, ffi.Pointer arg0, ffi.Pointer arg1)>>, - ffi.Pointer)>(isLeaf: true) + ffi.Int64, + ffi.Int64, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64 dispose_port, + ffi.Int64 closure_id)>>)>(isLeaf: true) external ffi.Pointer _ObjectiveCBindings_newClosureBlock_wjvic9( ffi.Pointer< ffi.NativeFunction< ffi.Void Function( - ffi.Pointer target, + ffi.Pointer block, + ffi.Int64 closure_id, ffi.Pointer arg0, ffi.Pointer arg1)>> trampoline, - ffi.Pointer target, + int closure_id, + int dispose_port, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64 dispose_port, ffi.Int64 closure_id)>> + dtor, ); @ffi.Native< @@ -375,20 +738,32 @@ external ffi.Pointer ffi.Pointer< ffi.NativeFunction< ffi.Pointer Function( - ffi.Pointer target, + ffi.Pointer block, + ffi.Int64 closure_id, ffi.Pointer arg0, ffi.Pointer arg1)>>, - ffi.Pointer)>(isLeaf: true) + ffi.Int64, + ffi.Int64, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64 dispose_port, + ffi.Int64 closure_id)>>)>(isLeaf: true) external ffi.Pointer _ObjectiveCBindings_newClosureBlock_ykn0t6( ffi.Pointer< ffi.NativeFunction< ffi.Pointer Function( - ffi.Pointer target, + ffi.Pointer block, + ffi.Int64 closure_id, ffi.Pointer arg0, ffi.Pointer arg1)>> trampoline, - ffi.Pointer target, + int closure_id, + int dispose_port, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64 dispose_port, ffi.Int64 closure_id)>> + dtor, ); @ffi.Native< @@ -8977,24 +9352,31 @@ class NSValue extends NSObject { } ffi.Pointer _ObjCBlock_NSString_ffiVoid_fnPtrTrampoline( - ffi.Pointer target, ffi.Pointer arg0) => - target - .cast< + ffi.Pointer block, + int closureId, + ffi.Pointer arg0) => + ffi.Pointer< ffi.NativeFunction< ffi.Pointer Function( - ffi.Pointer arg0)>>() + ffi.Pointer arg0)>>.fromAddress(closureId) .asFunction< ffi.Pointer Function( ffi.Pointer)>()(arg0); final _ObjCBlock_NSString_ffiVoid_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Pointer Function(ffi.Pointer, + ffi.Pointer Function( + ffi.Pointer, + ffi.Int64, ffi.Pointer)>(_ObjCBlock_NSString_ffiVoid_fnPtrTrampoline); ffi.Pointer _ObjCBlock_NSString_ffiVoid_closureTrampoline( - ffi.Pointer target, ffi.Pointer arg0) => - (objc.getBlockClosure(target.address) as ffi.Pointer - Function(ffi.Pointer))(arg0); + ffi.Pointer block, + int closureId, + ffi.Pointer arg0) => + (objc.getBlockClosure(closureId) as ffi.Pointer Function( + ffi.Pointer))(arg0); final _ObjCBlock_NSString_ffiVoid_closureCallable = ffi.Pointer.fromFunction< - ffi.Pointer Function(ffi.Pointer, + ffi.Pointer Function( + ffi.Pointer, + ffi.Int64, ffi.Pointer)>(_ObjCBlock_NSString_ffiVoid_closureTrampoline); /// Construction methods for `objc.ObjCBlock)>`. @@ -9026,29 +9408,44 @@ abstract final class ObjCBlock_NSString_ffiVoid { _ObjectiveCBindings_newClosureBlock_1yesha9( _ObjCBlock_NSString_ffiVoid_closureCallable, objc.registerBlockClosure((ffi.Pointer arg0) => - fn(arg0).ref.retainAndAutorelease())), + fn(arg0).ref.retainAndAutorelease()), + objc.blockClosureDisposePort, + objc.disposeObjCBlockWithClosure), retain: false, release: true); } +/// Call operator for `objc.ObjCBlock)>`. +extension ObjCBlock_NSString_ffiVoid_CallExtension + on objc.ObjCBlock)> { + NSString call(ffi.Pointer arg0) => NSString.castFromPointer( + _ObjectiveCBindings_invokeBlock_1yesha9(ref.pointer, arg0), + retain: true, + release: true); +} + int _ObjCBlock_NSUInteger_ffiVoid_fnPtrTrampoline( - ffi.Pointer target, ffi.Pointer arg0) => - target - .cast< + ffi.Pointer block, + int closureId, + ffi.Pointer arg0) => + ffi.Pointer< ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer arg0)>>() + ffi.UnsignedLong Function( + ffi.Pointer arg0)>>.fromAddress(closureId) .asFunction)>()(arg0); final _ObjCBlock_NSUInteger_ffiVoid_fnPtrCallable = ffi.Pointer.fromFunction< ffi.UnsignedLong Function( - ffi.Pointer, ffi.Pointer)>( + ffi.Pointer, ffi.Int64, ffi.Pointer)>( _ObjCBlock_NSUInteger_ffiVoid_fnPtrTrampoline, 0); int _ObjCBlock_NSUInteger_ffiVoid_closureTrampoline( - ffi.Pointer target, ffi.Pointer arg0) => - (objc.getBlockClosure(target.address) as int Function( + ffi.Pointer block, + int closureId, + ffi.Pointer arg0) => + (objc.getBlockClosure(closureId) as int Function( ffi.Pointer))(arg0); final _ObjCBlock_NSUInteger_ffiVoid_closureCallable = ffi.Pointer.fromFunction< ffi.UnsignedLong Function( - ffi.Pointer, ffi.Pointer)>( + ffi.Pointer, ffi.Int64, ffi.Pointer)>( _ObjCBlock_NSUInteger_ffiVoid_closureTrampoline, 0); /// Construction methods for `objc.ObjCBlock)>`. @@ -9082,25 +9479,34 @@ abstract final class ObjCBlock_NSUInteger_ffiVoid { _ObjectiveCBindings_newClosureBlock_1ckyi24( _ObjCBlock_NSUInteger_ffiVoid_closureCallable, objc.registerBlockClosure( - (ffi.Pointer arg0) => fn(arg0))), + (ffi.Pointer arg0) => fn(arg0)), + objc.blockClosureDisposePort, + objc.disposeObjCBlockWithClosure), retain: false, release: true); } +/// Call operator for `objc.ObjCBlock)>`. +extension ObjCBlock_NSUInteger_ffiVoid_CallExtension + on objc.ObjCBlock)> { + int call(ffi.Pointer arg0) => + _ObjectiveCBindings_invokeBlock_1ckyi24(ref.pointer, arg0); +} + int _ObjCBlock_NSUInteger_ffiVoid_NSFastEnumerationState_objcObjCObject_NSUInteger_fnPtrTrampoline( - ffi.Pointer target, + ffi.Pointer block, + int closureId, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer> arg2, int arg3) => - target - .cast< + ffi.Pointer< ffi.NativeFunction< ffi.UnsignedLong Function( ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer> arg2, - ffi.UnsignedLong arg3)>>() + ffi.UnsignedLong arg3)>>.fromAddress(closureId) .asFunction< int Function( ffi.Pointer, @@ -9110,7 +9516,8 @@ int _ObjCBlock_NSUInteger_ffiVoid_NSFastEnumerationState_objcObjCObject_NSUInteg final _ObjCBlock_NSUInteger_ffiVoid_NSFastEnumerationState_objcObjCObject_NSUInteger_fnPtrCallable = ffi.Pointer.fromFunction< ffi.UnsignedLong Function( - ffi.Pointer, + ffi.Pointer, + ffi.Int64, ffi.Pointer, ffi.Pointer, ffi.Pointer>, @@ -9118,12 +9525,13 @@ final _ObjCBlock_NSUInteger_ffiVoid_NSFastEnumerationState_objcObjCObject_NSUInt _ObjCBlock_NSUInteger_ffiVoid_NSFastEnumerationState_objcObjCObject_NSUInteger_fnPtrTrampoline, 0); int _ObjCBlock_NSUInteger_ffiVoid_NSFastEnumerationState_objcObjCObject_NSUInteger_closureTrampoline( - ffi.Pointer target, + ffi.Pointer block, + int closureId, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer> arg2, int arg3) => - (objc.getBlockClosure(target.address) as int Function( + (objc.getBlockClosure(closureId) as int Function( ffi.Pointer, ffi.Pointer, ffi.Pointer>, @@ -9131,7 +9539,8 @@ int _ObjCBlock_NSUInteger_ffiVoid_NSFastEnumerationState_objcObjCObject_NSUInteg final _ObjCBlock_NSUInteger_ffiVoid_NSFastEnumerationState_objcObjCObject_NSUInteger_closureCallable = ffi.Pointer.fromFunction< ffi.UnsignedLong Function( - ffi.Pointer, + ffi.Pointer, + ffi.Int64, ffi.Pointer, ffi.Pointer, ffi.Pointer>, @@ -9180,28 +9589,48 @@ abstract final class ObjCBlock_NSUInteger_ffiVoid_NSFastEnumerationState_objcObj ffi.Pointer arg1, ffi.Pointer> arg2, int arg3) => - fn(arg0, arg1, arg2, arg3))), + fn(arg0, arg1, arg2, arg3)), + objc.blockClosureDisposePort, + objc.disposeObjCBlockWithClosure), retain: false, release: true); } +/// Call operator for `objc.ObjCBlock, ffi.Pointer, ffi.Pointer>, ffi.UnsignedLong)>`. +extension ObjCBlock_NSUInteger_ffiVoid_NSFastEnumerationState_objcObjCObject_NSUInteger_CallExtension + on objc.ObjCBlock< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.UnsignedLong)> { + int call(ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer> arg2, int arg3) => + _ObjectiveCBindings_invokeBlock_17ap02x( + ref.pointer, arg0, arg1, arg2, arg3); +} + ffi.Pointer<_NSZone> _ObjCBlock_NSZone_ffiVoid_fnPtrTrampoline( - ffi.Pointer target, ffi.Pointer arg0) => - target - .cast< - ffi.NativeFunction< - ffi.Pointer<_NSZone> Function(ffi.Pointer arg0)>>() - .asFunction< - ffi.Pointer<_NSZone> Function(ffi.Pointer)>()(arg0); + ffi.Pointer block, + int closureId, + ffi.Pointer arg0) => + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer<_NSZone> Function( + ffi.Pointer arg0)>>.fromAddress(closureId) + .asFunction Function(ffi.Pointer)>()( + arg0); final _ObjCBlock_NSZone_ffiVoid_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Pointer<_NSZone> Function(ffi.Pointer, + ffi.Pointer<_NSZone> Function(ffi.Pointer, ffi.Int64, ffi.Pointer)>(_ObjCBlock_NSZone_ffiVoid_fnPtrTrampoline); ffi.Pointer<_NSZone> _ObjCBlock_NSZone_ffiVoid_closureTrampoline( - ffi.Pointer target, ffi.Pointer arg0) => - (objc.getBlockClosure(target.address) as ffi.Pointer<_NSZone> Function( + ffi.Pointer block, + int closureId, + ffi.Pointer arg0) => + (objc.getBlockClosure(closureId) as ffi.Pointer<_NSZone> Function( ffi.Pointer))(arg0); final _ObjCBlock_NSZone_ffiVoid_closureCallable = ffi.Pointer.fromFunction< - ffi.Pointer<_NSZone> Function(ffi.Pointer, + ffi.Pointer<_NSZone> Function(ffi.Pointer, ffi.Int64, ffi.Pointer)>(_ObjCBlock_NSZone_ffiVoid_closureTrampoline); /// Construction methods for `objc.ObjCBlock Function(ffi.Pointer)>`. @@ -9235,26 +9664,41 @@ abstract final class ObjCBlock_NSZone_ffiVoid { _ObjectiveCBindings_newClosureBlock_1a8cl66( _ObjCBlock_NSZone_ffiVoid_closureCallable, objc.registerBlockClosure( - (ffi.Pointer arg0) => fn(arg0))), + (ffi.Pointer arg0) => fn(arg0)), + objc.blockClosureDisposePort, + objc.disposeObjCBlockWithClosure), retain: false, release: true); } +/// Call operator for `objc.ObjCBlock Function(ffi.Pointer)>`. +extension ObjCBlock_NSZone_ffiVoid_CallExtension + on objc.ObjCBlock Function(ffi.Pointer)> { + ffi.Pointer<_NSZone> call(ffi.Pointer arg0) => + _ObjectiveCBindings_invokeBlock_1a8cl66(ref.pointer, arg0); +} + bool _ObjCBlock_bool_ffiVoid_fnPtrTrampoline( - ffi.Pointer target, ffi.Pointer arg0) => - target - .cast< - ffi.NativeFunction arg0)>>() + ffi.Pointer block, + int closureId, + ffi.Pointer arg0) => + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer arg0)>>.fromAddress(closureId) .asFunction)>()(arg0); final _ObjCBlock_bool_ffiVoid_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_bool_ffiVoid_fnPtrTrampoline, false); + ffi.Bool Function(ffi.Pointer, ffi.Int64, + ffi.Pointer)>(_ObjCBlock_bool_ffiVoid_fnPtrTrampoline, false); bool _ObjCBlock_bool_ffiVoid_closureTrampoline( - ffi.Pointer target, ffi.Pointer arg0) => - (objc.getBlockClosure(target.address) as bool Function( + ffi.Pointer block, + int closureId, + ffi.Pointer arg0) => + (objc.getBlockClosure(closureId) as bool Function( ffi.Pointer))(arg0); final _ObjCBlock_bool_ffiVoid_closureCallable = ffi.Pointer.fromFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer)>( + ffi.Bool Function( + ffi.Pointer, ffi.Int64, ffi.Pointer)>( _ObjCBlock_bool_ffiVoid_closureTrampoline, false); /// Construction methods for `objc.ObjCBlock)>`. @@ -9286,37 +9730,47 @@ abstract final class ObjCBlock_bool_ffiVoid { _ObjectiveCBindings_newClosureBlock_e3qsqz( _ObjCBlock_bool_ffiVoid_closureCallable, objc.registerBlockClosure( - (ffi.Pointer arg0) => fn(arg0))), + (ffi.Pointer arg0) => fn(arg0)), + objc.blockClosureDisposePort, + objc.disposeObjCBlockWithClosure), retain: false, release: true); } +/// Call operator for `objc.ObjCBlock)>`. +extension ObjCBlock_bool_ffiVoid_CallExtension + on objc.ObjCBlock)> { + bool call(ffi.Pointer arg0) => + _ObjectiveCBindings_invokeBlock_e3qsqz(ref.pointer, arg0); +} + bool _ObjCBlock_bool_ffiVoid_Protocol_fnPtrTrampoline( - ffi.Pointer target, + ffi.Pointer block, + int closureId, ffi.Pointer arg0, ffi.Pointer arg1) => - target - .cast< + ffi.Pointer< ffi.NativeFunction< ffi.Bool Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() + ffi.Pointer arg1)>>.fromAddress(closureId) .asFunction< bool Function(ffi.Pointer, ffi.Pointer)>()(arg0, arg1); final _ObjCBlock_bool_ffiVoid_Protocol_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>( + ffi.Bool Function(ffi.Pointer, ffi.Int64, + ffi.Pointer, ffi.Pointer)>( _ObjCBlock_bool_ffiVoid_Protocol_fnPtrTrampoline, false); bool _ObjCBlock_bool_ffiVoid_Protocol_closureTrampoline( - ffi.Pointer target, + ffi.Pointer block, + int closureId, ffi.Pointer arg0, ffi.Pointer arg1) => - (objc.getBlockClosure(target.address) as bool Function( + (objc.getBlockClosure(closureId) as bool Function( ffi.Pointer, ffi.Pointer))(arg0, arg1); final _ObjCBlock_bool_ffiVoid_Protocol_closureCallable = ffi.Pointer.fromFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>( + ffi.Bool Function(ffi.Pointer, ffi.Int64, + ffi.Pointer, ffi.Pointer)>( _ObjCBlock_bool_ffiVoid_Protocol_closureTrampoline, false); /// Construction methods for `objc.ObjCBlock, Protocol)>`. @@ -9344,46 +9798,56 @@ abstract final class ObjCBlock_bool_ffiVoid_Protocol { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock< - ffi.Bool Function(ffi.Pointer, Protocol)> fromFunction( - bool Function(ffi.Pointer, Protocol) fn) => - objc.ObjCBlock, Protocol)>( - _ObjectiveCBindings_newClosureBlock_ozkafd( - _ObjCBlock_bool_ffiVoid_Protocol_closureCallable, - objc.registerBlockClosure((ffi.Pointer arg0, - ffi.Pointer arg1) => - fn(arg0, Protocol.castFromPointer(arg1, retain: true, release: true)))), - retain: false, - release: true); + static objc.ObjCBlock, Protocol)> + fromFunction(bool Function(ffi.Pointer, Protocol) fn) => + objc.ObjCBlock, Protocol)>( + _ObjectiveCBindings_newClosureBlock_ozkafd( + _ObjCBlock_bool_ffiVoid_Protocol_closureCallable, + objc.registerBlockClosure((ffi.Pointer arg0, + ffi.Pointer arg1) => + fn(arg0, Protocol.castFromPointer(arg1, retain: true, release: true))), + objc.blockClosureDisposePort, + objc.disposeObjCBlockWithClosure), + retain: false, + release: true); +} + +/// Call operator for `objc.ObjCBlock, Protocol)>`. +extension ObjCBlock_bool_ffiVoid_Protocol_CallExtension + on objc.ObjCBlock, Protocol)> { + bool call(ffi.Pointer arg0, Protocol arg1) => + _ObjectiveCBindings_invokeBlock_ozkafd( + ref.pointer, arg0, arg1.ref.pointer); } bool _ObjCBlock_bool_ffiVoid_objcObjCObject_fnPtrTrampoline( - ffi.Pointer target, + ffi.Pointer block, + int closureId, ffi.Pointer arg0, ffi.Pointer arg1) => - target - .cast< + ffi.Pointer< ffi.NativeFunction< ffi.Bool Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() + ffi.Pointer arg1)>>.fromAddress(closureId) .asFunction< bool Function(ffi.Pointer, ffi.Pointer)>()(arg0, arg1); final _ObjCBlock_bool_ffiVoid_objcObjCObject_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>( + ffi.Bool Function(ffi.Pointer, ffi.Int64, + ffi.Pointer, ffi.Pointer)>( _ObjCBlock_bool_ffiVoid_objcObjCObject_fnPtrTrampoline, false); bool _ObjCBlock_bool_ffiVoid_objcObjCObject_closureTrampoline( - ffi.Pointer target, + ffi.Pointer block, + int closureId, ffi.Pointer arg0, ffi.Pointer arg1) => - (objc.getBlockClosure(target.address) as bool Function( + (objc.getBlockClosure(closureId) as bool Function( ffi.Pointer, ffi.Pointer))(arg0, arg1); final _ObjCBlock_bool_ffiVoid_objcObjCObject_closureCallable = ffi.Pointer.fromFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>( + ffi.Bool Function(ffi.Pointer, ffi.Int64, + ffi.Pointer, ffi.Pointer)>( _ObjCBlock_bool_ffiVoid_objcObjCObject_closureTrampoline, false); /// Construction methods for `objc.ObjCBlock, ffi.Pointer)>`. @@ -9423,38 +9887,50 @@ abstract final class ObjCBlock_bool_ffiVoid_objcObjCObject { _ObjCBlock_bool_ffiVoid_objcObjCObject_closureCallable, objc.registerBlockClosure((ffi.Pointer arg0, ffi.Pointer arg1) => - fn(arg0, objc.ObjCObjectBase(arg1, retain: true, release: true)))), + fn(arg0, objc.ObjCObjectBase(arg1, retain: true, release: true))), + objc.blockClosureDisposePort, + objc.disposeObjCBlockWithClosure), retain: false, release: true); } +/// Call operator for `objc.ObjCBlock, ffi.Pointer)>`. +extension ObjCBlock_bool_ffiVoid_objcObjCObject_CallExtension on objc.ObjCBlock< + ffi.Bool Function(ffi.Pointer, ffi.Pointer)> { + bool call(ffi.Pointer arg0, objc.ObjCObjectBase arg1) => + _ObjectiveCBindings_invokeBlock_ozkafd( + ref.pointer, arg0, arg1.ref.pointer); +} + bool _ObjCBlock_bool_ffiVoid_objcObjCSelector_fnPtrTrampoline( - ffi.Pointer target, + ffi.Pointer block, + int closureId, ffi.Pointer arg0, ffi.Pointer arg1) => - target - .cast< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>.fromAddress( + closureId) .asFunction< bool Function(ffi.Pointer, ffi.Pointer)>()(arg0, arg1); final _ObjCBlock_bool_ffiVoid_objcObjCSelector_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>( + ffi.Bool Function(ffi.Pointer, ffi.Int64, + ffi.Pointer, ffi.Pointer)>( _ObjCBlock_bool_ffiVoid_objcObjCSelector_fnPtrTrampoline, false); bool _ObjCBlock_bool_ffiVoid_objcObjCSelector_closureTrampoline( - ffi.Pointer target, + ffi.Pointer block, + int closureId, ffi.Pointer arg0, ffi.Pointer arg1) => - (objc.getBlockClosure(target.address) as bool Function( + (objc.getBlockClosure(closureId) as bool Function( ffi.Pointer, ffi.Pointer))(arg0, arg1); final _ObjCBlock_bool_ffiVoid_objcObjCSelector_closureCallable = ffi.Pointer.fromFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>( + ffi.Bool Function(ffi.Pointer, ffi.Int64, + ffi.Pointer, ffi.Pointer)>( _ObjCBlock_bool_ffiVoid_objcObjCSelector_closureTrampoline, false); /// Construction methods for `objc.ObjCBlock, ffi.Pointer)>`. @@ -9493,24 +9969,36 @@ abstract final class ObjCBlock_bool_ffiVoid_objcObjCSelector { _ObjCBlock_bool_ffiVoid_objcObjCSelector_closureCallable, objc.registerBlockClosure((ffi.Pointer arg0, ffi.Pointer arg1) => - fn(arg0, arg1))), + fn(arg0, arg1)), + objc.blockClosureDisposePort, + objc.disposeObjCBlockWithClosure), retain: false, release: true); } +/// Call operator for `objc.ObjCBlock, ffi.Pointer)>`. +extension ObjCBlock_bool_ffiVoid_objcObjCSelector_CallExtension + on objc.ObjCBlock< + ffi.Bool Function( + ffi.Pointer, ffi.Pointer)> { + bool call(ffi.Pointer arg0, ffi.Pointer arg1) => + _ObjectiveCBindings_invokeBlock_w1e3k0(ref.pointer, arg0, arg1); +} + void _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObject_NSDictionary_fnPtrTrampoline( - ffi.Pointer target, + ffi.Pointer block, + int closureId, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => - target - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>.fromAddress( + closureId) .asFunction< void Function( ffi.Pointer, @@ -9519,52 +10007,58 @@ void final _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObject_NSDictionary_fnPtrCallable = ffi.Pointer.fromFunction< ffi.Void Function( - ffi.Pointer, + ffi.Pointer, + ffi.Int64, ffi.Pointer, ffi.Pointer, ffi.Pointer)>( _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObject_NSDictionary_fnPtrTrampoline); void _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObject_NSDictionary_closureTrampoline( - ffi.Pointer target, + ffi.Pointer block, + int closureId, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => - (objc.getBlockClosure(target.address) as void Function( + (objc.getBlockClosure(closureId) as void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer))(arg0, arg1, arg2); final _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObject_NSDictionary_closureCallable = ffi.Pointer.fromFunction< ffi.Void Function( - ffi.Pointer, + ffi.Pointer, + ffi.Int64, ffi.Pointer, ffi.Pointer, ffi.Pointer)>( _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObject_NSDictionary_closureTrampoline); void _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObject_NSDictionary_listenerTrampoline( - ffi.Pointer target, + ffi.Pointer block, + int closureId, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) { - (objc.getBlockClosure(target.address) as void Function( + (objc.getBlockClosure(closureId) as void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer))(arg0, arg1, arg2); - // objc.objectRelease(block.cast()); + objc.objectRelease(block.cast()); } ffi.NativeCallable< ffi.Void Function( - ffi.Pointer, + ffi.Pointer, + ffi.Int64, ffi.Pointer, ffi.Pointer, ffi.Pointer)> _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObject_NSDictionary_listenerCallable = ffi.NativeCallable< ffi.Void Function( - ffi.Pointer, + ffi.Pointer, + ffi.Int64, ffi.Pointer, ffi.Pointer, ffi.Pointer)>.listener( @@ -9572,26 +10066,28 @@ ffi.NativeCallable< ..keepIsolateAlive = false; void _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObject_NSDictionary_blockingTrampoline( - ffi.Pointer target, + ffi.Pointer block, + int closureId, ffi.Pointer waiter, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) { try { - (objc.getBlockClosure(target.address) as void Function( + (objc.getBlockClosure(closureId) as void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer))(arg0, arg1, arg2); } catch (e) { } finally { objc.signalWaiter(waiter); - // objc.objectRelease(block.cast()); + objc.objectRelease(block.cast()); } } ffi.NativeCallable< ffi.Void Function( - ffi.Pointer, + ffi.Pointer, + ffi.Int64, ffi.Pointer, ffi.Pointer, ffi.Pointer, @@ -9599,7 +10095,8 @@ ffi.NativeCallable< _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObject_NSDictionary_blockingCallable = ffi.NativeCallable< ffi.Void Function( - ffi.Pointer, + ffi.Pointer, + ffi.Int64, ffi.Pointer, ffi.Pointer, ffi.Pointer, @@ -9608,7 +10105,8 @@ ffi.NativeCallable< ..keepIsolateAlive = false; ffi.NativeCallable< ffi.Void Function( - ffi.Pointer, + ffi.Pointer, + ffi.Int64, ffi.Pointer, ffi.Pointer, ffi.Pointer, @@ -9616,7 +10114,8 @@ ffi.NativeCallable< _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObject_NSDictionary_blockingListenerCallable = ffi.NativeCallable< ffi.Void Function( - ffi.Pointer, + ffi.Pointer, + ffi.Int64, ffi.Pointer, ffi.Pointer, ffi.Pointer, @@ -9662,7 +10161,9 @@ abstract final class ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCO objc.registerBlockClosure((ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => fn( ObjCBlock_ffiVoid_objcObjCObject_NSError.castFromPointer(arg0, retain: true, release: true), objc.ObjCObjectBase(arg1, retain: true, release: true), - NSDictionary.castFromPointer(arg2, retain: true, release: true)))), + NSDictionary.castFromPointer(arg2, retain: true, release: true))), + objc.blockClosureDisposePort, + objc.disposeObjCBlockWithClosure), retain: false, release: true); @@ -9699,7 +10200,9 @@ abstract final class ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCO retain: false, release: true), objc.ObjCObjectBase(arg1, retain: false, release: true), NSDictionary.castFromPointer(arg2, - retain: false, release: true)))); + retain: false, release: true))), + objc.blockClosureDisposePort, + objc.disposeObjCBlockWithClosure); final wrapper = _ObjectiveCBindings_wrapListenerBlock_1j2nt86(raw); objc.objectRelease(raw.cast()); return objc.ObjCBlock< @@ -9743,7 +10246,9 @@ abstract final class ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCO retain: false, release: true), objc.ObjCObjectBase(arg1, retain: false, release: true), NSDictionary.castFromPointer(arg2, - retain: false, release: true)))); + retain: false, release: true))), + objc.blockClosureDisposePort, + objc.disposeObjCBlockWithClosure); final rawListener = _ObjectiveCBindings_newClosureBlock_1j2nt86( _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObject_NSDictionary_blockingListenerCallable .nativeFunction @@ -9756,7 +10261,9 @@ abstract final class ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCO retain: false, release: true), objc.ObjCObjectBase(arg1, retain: false, release: true), NSDictionary.castFromPointer(arg2, - retain: false, release: true)))); + retain: false, release: true))), + objc.blockClosureDisposePort, + objc.disposeObjCBlockWithClosure); final wrapper = objc.wrapBlockingBlock( _ObjectiveCBindings_wrapBlockingBlock_1j2nt86, raw, rawListener); objc.objectRelease(raw.cast()); @@ -9770,62 +10277,91 @@ abstract final class ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCO } } +/// Call operator for `objc.ObjCBlock?, NSError)>, ffi.Pointer, NSDictionary)>`. +extension ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObject_NSDictionary_CallExtension + on objc.ObjCBlock< + ffi.Void Function( + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, NSError)>, + ffi.Pointer, + NSDictionary)> { + void call( + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, NSError)> + arg0, + objc.ObjCObjectBase arg1, + NSDictionary arg2) => + _ObjectiveCBindings_invokeBlock_1j2nt86( + ref.pointer, arg0.ref.pointer, arg1.ref.pointer, arg2.ref.pointer); +} + void _ObjCBlock_ffiVoid_ffiVoid_fnPtrTrampoline( - ffi.Pointer target, ffi.Pointer arg0) => - target - .cast< - ffi.NativeFunction arg0)>>() + ffi.Pointer block, + int closureId, + ffi.Pointer arg0) => + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0)>>.fromAddress(closureId) .asFunction)>()(arg0); final _ObjCBlock_ffiVoid_ffiVoid_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, + ffi.Void Function(ffi.Pointer, ffi.Int64, ffi.Pointer)>(_ObjCBlock_ffiVoid_ffiVoid_fnPtrTrampoline); void _ObjCBlock_ffiVoid_ffiVoid_closureTrampoline( - ffi.Pointer target, ffi.Pointer arg0) => - (objc.getBlockClosure(target.address) as void Function( + ffi.Pointer block, + int closureId, + ffi.Pointer arg0) => + (objc.getBlockClosure(closureId) as void Function( ffi.Pointer))(arg0); final _ObjCBlock_ffiVoid_ffiVoid_closureCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, + ffi.Void Function(ffi.Pointer, ffi.Int64, ffi.Pointer)>(_ObjCBlock_ffiVoid_ffiVoid_closureTrampoline); void _ObjCBlock_ffiVoid_ffiVoid_listenerTrampoline( - ffi.Pointer target, ffi.Pointer arg0) { - (objc.getBlockClosure(target.address) as void Function( + ffi.Pointer block, + int closureId, + ffi.Pointer arg0) { + (objc.getBlockClosure(closureId) as void Function( ffi.Pointer))(arg0); - // objc.objectRelease(block.cast()); + objc.objectRelease(block.cast()); } ffi.NativeCallable< - ffi.Void Function(ffi.Pointer, ffi.Pointer)> + ffi.Void Function( + ffi.Pointer, ffi.Int64, ffi.Pointer)> _ObjCBlock_ffiVoid_ffiVoid_listenerCallable = ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, ffi.Pointer)>.listener( + ffi.Void Function(ffi.Pointer, ffi.Int64, + ffi.Pointer)>.listener( _ObjCBlock_ffiVoid_ffiVoid_listenerTrampoline) ..keepIsolateAlive = false; -void _ObjCBlock_ffiVoid_ffiVoid_blockingTrampoline(ffi.Pointer target, - ffi.Pointer waiter, ffi.Pointer arg0) { +void _ObjCBlock_ffiVoid_ffiVoid_blockingTrampoline( + ffi.Pointer block, + int closureId, + ffi.Pointer waiter, + ffi.Pointer arg0) { try { - (objc.getBlockClosure(target.address) as void Function( + (objc.getBlockClosure(closureId) as void Function( ffi.Pointer))(arg0); } catch (e) { } finally { objc.signalWaiter(waiter); - // objc.objectRelease(block.cast()); + objc.objectRelease(block.cast()); } } ffi.NativeCallable< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)> + ffi.Void Function(ffi.Pointer, ffi.Int64, + ffi.Pointer, ffi.Pointer)> _ObjCBlock_ffiVoid_ffiVoid_blockingCallable = ffi.NativeCallable< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>.isolateLocal( + ffi.Void Function(ffi.Pointer, ffi.Int64, + ffi.Pointer, ffi.Pointer)>.isolateLocal( _ObjCBlock_ffiVoid_ffiVoid_blockingTrampoline) ..keepIsolateAlive = false; ffi.NativeCallable< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)> + ffi.Void Function(ffi.Pointer, ffi.Int64, + ffi.Pointer, ffi.Pointer)> _ObjCBlock_ffiVoid_ffiVoid_blockingListenerCallable = ffi.NativeCallable< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>.listener( + ffi.Void Function(ffi.Pointer, ffi.Int64, + ffi.Pointer, ffi.Pointer)>.listener( _ObjCBlock_ffiVoid_ffiVoid_blockingTrampoline) ..keepIsolateAlive = false; @@ -9858,7 +10394,9 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid { _ObjectiveCBindings_newClosureBlock_ovsamd( _ObjCBlock_ffiVoid_ffiVoid_closureCallable, objc.registerBlockClosure( - (ffi.Pointer arg0) => fn(arg0))), + (ffi.Pointer arg0) => fn(arg0)), + objc.blockClosureDisposePort, + objc.disposeObjCBlockWithClosure), retain: false, release: true); @@ -9875,7 +10413,9 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid { void Function(ffi.Pointer) fn) { final raw = _ObjectiveCBindings_newClosureBlock_ovsamd( _ObjCBlock_ffiVoid_ffiVoid_listenerCallable.nativeFunction.cast(), - objc.registerBlockClosure((ffi.Pointer arg0) => fn(arg0))); + objc.registerBlockClosure((ffi.Pointer arg0) => fn(arg0)), + objc.blockClosureDisposePort, + objc.disposeObjCBlockWithClosure); final wrapper = _ObjectiveCBindings_wrapListenerBlock_ovsamd(raw); objc.objectRelease(raw.cast()); return objc.ObjCBlock)>(wrapper, @@ -9895,11 +10435,15 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid { void Function(ffi.Pointer) fn) { final raw = _ObjectiveCBindings_newClosureBlock_ovsamd( _ObjCBlock_ffiVoid_ffiVoid_blockingCallable.nativeFunction.cast(), - objc.registerBlockClosure((ffi.Pointer arg0) => fn(arg0))); + objc.registerBlockClosure((ffi.Pointer arg0) => fn(arg0)), + objc.blockClosureDisposePort, + objc.disposeObjCBlockWithClosure); final rawListener = _ObjectiveCBindings_newClosureBlock_ovsamd( _ObjCBlock_ffiVoid_ffiVoid_blockingListenerCallable.nativeFunction .cast(), - objc.registerBlockClosure((ffi.Pointer arg0) => fn(arg0))); + objc.registerBlockClosure((ffi.Pointer arg0) => fn(arg0)), + objc.blockClosureDisposePort, + objc.disposeObjCBlockWithClosure); final wrapper = objc.wrapBlockingBlock( _ObjectiveCBindings_wrapBlockingBlock_ovsamd, raw, rawListener); objc.objectRelease(raw.cast()); @@ -9909,84 +10453,107 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid { } } +/// Call operator for `objc.ObjCBlock)>`. +extension ObjCBlock_ffiVoid_ffiVoid_CallExtension + on objc.ObjCBlock)> { + void call(ffi.Pointer arg0) => + _ObjectiveCBindings_invokeBlock_ovsamd(ref.pointer, arg0); +} + void _ObjCBlock_ffiVoid_ffiVoid_NSCoder_fnPtrTrampoline( - ffi.Pointer target, + ffi.Pointer block, + int closureId, ffi.Pointer arg0, ffi.Pointer arg1) => - target - .cast< + ffi.Pointer< ffi.NativeFunction< ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() + ffi.Pointer arg1)>>.fromAddress(closureId) .asFunction< void Function(ffi.Pointer, ffi.Pointer)>()(arg0, arg1); final _ObjCBlock_ffiVoid_ffiVoid_NSCoder_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>( + ffi.Void Function(ffi.Pointer, ffi.Int64, + ffi.Pointer, ffi.Pointer)>( _ObjCBlock_ffiVoid_ffiVoid_NSCoder_fnPtrTrampoline); void _ObjCBlock_ffiVoid_ffiVoid_NSCoder_closureTrampoline( - ffi.Pointer target, + ffi.Pointer block, + int closureId, ffi.Pointer arg0, ffi.Pointer arg1) => - (objc.getBlockClosure(target.address) as void Function( + (objc.getBlockClosure(closureId) as void Function( ffi.Pointer, ffi.Pointer))(arg0, arg1); final _ObjCBlock_ffiVoid_ffiVoid_NSCoder_closureCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>( + ffi.Void Function(ffi.Pointer, ffi.Int64, + ffi.Pointer, ffi.Pointer)>( _ObjCBlock_ffiVoid_ffiVoid_NSCoder_closureTrampoline); void _ObjCBlock_ffiVoid_ffiVoid_NSCoder_listenerTrampoline( - ffi.Pointer target, + ffi.Pointer block, + int closureId, ffi.Pointer arg0, ffi.Pointer arg1) { - (objc.getBlockClosure(target.address) as void Function( + (objc.getBlockClosure(closureId) as void Function( ffi.Pointer, ffi.Pointer))(arg0, arg1); - // objc.objectRelease(block.cast()); + objc.objectRelease(block.cast()); } ffi.NativeCallable< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)> + ffi.Void Function(ffi.Pointer, ffi.Int64, + ffi.Pointer, ffi.Pointer)> _ObjCBlock_ffiVoid_ffiVoid_NSCoder_listenerCallable = ffi.NativeCallable< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>.listener( + ffi.Void Function(ffi.Pointer, ffi.Int64, + ffi.Pointer, ffi.Pointer)>.listener( _ObjCBlock_ffiVoid_ffiVoid_NSCoder_listenerTrampoline) ..keepIsolateAlive = false; void _ObjCBlock_ffiVoid_ffiVoid_NSCoder_blockingTrampoline( - ffi.Pointer target, + ffi.Pointer block, + int closureId, ffi.Pointer waiter, ffi.Pointer arg0, ffi.Pointer arg1) { try { - (objc.getBlockClosure(target.address) as void Function( + (objc.getBlockClosure(closureId) as void Function( ffi.Pointer, ffi.Pointer))(arg0, arg1); } catch (e) { } finally { objc.signalWaiter(waiter); - // objc.objectRelease(block.cast()); + objc.objectRelease(block.cast()); } } ffi.NativeCallable< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)> + ffi.Void Function( + ffi.Pointer, + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)> _ObjCBlock_ffiVoid_ffiVoid_NSCoder_blockingCallable = ffi.NativeCallable< ffi.Void Function( - ffi.Pointer, + ffi.Pointer, + ffi.Int64, ffi.Pointer, ffi.Pointer, ffi.Pointer)>.isolateLocal( _ObjCBlock_ffiVoid_ffiVoid_NSCoder_blockingTrampoline) ..keepIsolateAlive = false; ffi.NativeCallable< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)> + ffi.Void Function( + ffi.Pointer, + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)> _ObjCBlock_ffiVoid_ffiVoid_NSCoder_blockingListenerCallable = ffi .NativeCallable< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>.listener( + ffi.Void Function( + ffi.Pointer, + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>.listener( _ObjCBlock_ffiVoid_ffiVoid_NSCoder_blockingTrampoline) ..keepIsolateAlive = false; @@ -10015,17 +10582,18 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSCoder { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSCoder)> fromFunction( - void Function(ffi.Pointer, NSCoder) fn) => - objc.ObjCBlock, NSCoder)>( - _ObjectiveCBindings_newClosureBlock_wjovn7( - _ObjCBlock_ffiVoid_ffiVoid_NSCoder_closureCallable, - objc.registerBlockClosure((ffi.Pointer arg0, - ffi.Pointer arg1) => - fn(arg0, NSCoder.castFromPointer(arg1, retain: true, release: true)))), - retain: false, - release: true); + static objc.ObjCBlock, NSCoder)> + fromFunction(void Function(ffi.Pointer, NSCoder) fn) => + objc.ObjCBlock, NSCoder)>( + _ObjectiveCBindings_newClosureBlock_wjovn7( + _ObjCBlock_ffiVoid_ffiVoid_NSCoder_closureCallable, + objc.registerBlockClosure((ffi.Pointer arg0, + ffi.Pointer arg1) => + fn(arg0, NSCoder.castFromPointer(arg1, retain: true, release: true))), + objc.blockClosureDisposePort, + objc.disposeObjCBlockWithClosure), + retain: false, + release: true); /// Creates a listener block from a Dart function. /// @@ -10044,7 +10612,9 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSCoder { objc.registerBlockClosure((ffi.Pointer arg0, ffi.Pointer arg1) => fn(arg0, - NSCoder.castFromPointer(arg1, retain: false, release: true)))); + NSCoder.castFromPointer(arg1, retain: false, release: true))), + objc.blockClosureDisposePort, + objc.disposeObjCBlockWithClosure); final wrapper = _ObjectiveCBindings_wrapListenerBlock_wjovn7(raw); objc.objectRelease(raw.cast()); return objc.ObjCBlock, NSCoder)>( @@ -10070,7 +10640,9 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSCoder { objc.registerBlockClosure((ffi.Pointer arg0, ffi.Pointer arg1) => fn(arg0, - NSCoder.castFromPointer(arg1, retain: false, release: true)))); + NSCoder.castFromPointer(arg1, retain: false, release: true))), + objc.blockClosureDisposePort, + objc.disposeObjCBlockWithClosure); final rawListener = _ObjectiveCBindings_newClosureBlock_wjovn7( _ObjCBlock_ffiVoid_ffiVoid_NSCoder_blockingListenerCallable .nativeFunction @@ -10078,7 +10650,9 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSCoder { objc.registerBlockClosure((ffi.Pointer arg0, ffi.Pointer arg1) => fn(arg0, - NSCoder.castFromPointer(arg1, retain: false, release: true)))); + NSCoder.castFromPointer(arg1, retain: false, release: true))), + objc.blockClosureDisposePort, + objc.disposeObjCBlockWithClosure); final wrapper = objc.wrapBlockingBlock( _ObjectiveCBindings_wrapBlockingBlock_wjovn7, raw, rawListener); objc.objectRelease(raw.cast()); @@ -10090,80 +10664,104 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSCoder { } } +/// Call operator for `objc.ObjCBlock, NSCoder)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NSCoder_CallExtension + on objc.ObjCBlock, NSCoder)> { + void call(ffi.Pointer arg0, NSCoder arg1) => + _ObjectiveCBindings_invokeBlock_wjovn7( + ref.pointer, arg0, arg1.ref.pointer); +} + void _ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent_fnPtrTrampoline( - ffi.Pointer target, + ffi.Pointer block, + int closureId, ffi.Pointer arg0, ffi.Pointer arg1, int arg2) => - target - .cast< + ffi.Pointer< ffi.NativeFunction< ffi.Void Function( ffi.Pointer arg0, ffi.Pointer arg1, - ffi.UnsignedLong arg2)>>() + ffi.UnsignedLong arg2)>>.fromAddress(closureId) .asFunction< void Function(ffi.Pointer, ffi.Pointer, int)>()(arg0, arg1, arg2); final _ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>( + ffi.Void Function( + ffi.Pointer, + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>( _ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent_fnPtrTrampoline); void _ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent_closureTrampoline( - ffi.Pointer target, + ffi.Pointer block, + int closureId, ffi.Pointer arg0, ffi.Pointer arg1, int arg2) => - (objc.getBlockClosure(target.address) as void Function( - ffi.Pointer, - ffi.Pointer, - int))(arg0, arg1, arg2); + (objc.getBlockClosure(closureId) as void Function(ffi.Pointer, + ffi.Pointer, int))(arg0, arg1, arg2); final _ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent_closureCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>( + ffi.Void Function( + ffi.Pointer, + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>( _ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent_closureTrampoline); void _ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent_listenerTrampoline( - ffi.Pointer target, + ffi.Pointer block, + int closureId, ffi.Pointer arg0, ffi.Pointer arg1, int arg2) { - (objc.getBlockClosure(target.address) as void Function(ffi.Pointer, + (objc.getBlockClosure(closureId) as void Function(ffi.Pointer, ffi.Pointer, int))(arg0, arg1, arg2); - // objc.objectRelease(block.cast()); + objc.objectRelease(block.cast()); } ffi.NativeCallable< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)> + ffi.Void Function( + ffi.Pointer, + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)> _ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent_listenerCallable = ffi .NativeCallable< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>.listener( + ffi.Void Function( + ffi.Pointer, + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>.listener( _ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent_listenerTrampoline) ..keepIsolateAlive = false; void _ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent_blockingTrampoline( - ffi.Pointer target, + ffi.Pointer block, + int closureId, ffi.Pointer waiter, ffi.Pointer arg0, ffi.Pointer arg1, int arg2) { try { - (objc.getBlockClosure(target.address) as void Function( - ffi.Pointer, - ffi.Pointer, - int))(arg0, arg1, arg2); + (objc.getBlockClosure(closureId) as void Function(ffi.Pointer, + ffi.Pointer, int))(arg0, arg1, arg2); } catch (e) { } finally { objc.signalWaiter(waiter); - // objc.objectRelease(block.cast()); + objc.objectRelease(block.cast()); } } ffi.NativeCallable< ffi.Void Function( - ffi.Pointer, + ffi.Pointer, + ffi.Int64, ffi.Pointer, ffi.Pointer, ffi.Pointer, @@ -10171,7 +10769,8 @@ ffi.NativeCallable< _ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent_blockingCallable = ffi .NativeCallable< ffi.Void Function( - ffi.Pointer, + ffi.Pointer, + ffi.Int64, ffi.Pointer, ffi.Pointer, ffi.Pointer, @@ -10180,7 +10779,8 @@ ffi.NativeCallable< ..keepIsolateAlive = false; ffi.NativeCallable< ffi.Void Function( - ffi.Pointer, + ffi.Pointer, + ffi.Int64, ffi.Pointer, ffi.Pointer, ffi.Pointer, @@ -10188,7 +10788,8 @@ ffi.NativeCallable< _ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent_blockingListenerCallable = ffi.NativeCallable< ffi.Void Function( - ffi.Pointer, + ffi.Pointer, + ffi.Int64, ffi.Pointer, ffi.Pointer, ffi.Pointer, @@ -10228,7 +10829,9 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent { _ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent_closureCallable, objc.registerBlockClosure((ffi.Pointer arg0, ffi.Pointer arg1, int arg2) => - fn(arg0, NSStream.castFromPointer(arg1, retain: true, release: true), NSStreamEvent.fromValue(arg2)))), + fn(arg0, NSStream.castFromPointer(arg1, retain: true, release: true), NSStreamEvent.fromValue(arg2))), + objc.blockClosureDisposePort, + objc.disposeObjCBlockWithClosure), retain: false, release: true); @@ -10254,7 +10857,9 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent { fn( arg0, NSStream.castFromPointer(arg1, retain: false, release: true), - NSStreamEvent.fromValue(arg2)))); + NSStreamEvent.fromValue(arg2))), + objc.blockClosureDisposePort, + objc.disposeObjCBlockWithClosure); final wrapper = _ObjectiveCBindings_wrapListenerBlock_18d6mda(raw); objc.objectRelease(raw.cast()); return objc.ObjCBlock< @@ -10284,7 +10889,9 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent { fn( arg0, NSStream.castFromPointer(arg1, retain: false, release: true), - NSStreamEvent.fromValue(arg2)))); + NSStreamEvent.fromValue(arg2))), + objc.blockClosureDisposePort, + objc.disposeObjCBlockWithClosure); final rawListener = _ObjectiveCBindings_newClosureBlock_18d6mda( _ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent_blockingListenerCallable .nativeFunction @@ -10294,7 +10901,9 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent { fn( arg0, NSStream.castFromPointer(arg1, retain: false, release: true), - NSStreamEvent.fromValue(arg2)))); + NSStreamEvent.fromValue(arg2))), + objc.blockClosureDisposePort, + objc.disposeObjCBlockWithClosure); final wrapper = objc.wrapBlockingBlock( _ObjectiveCBindings_wrapBlockingBlock_18d6mda, raw, rawListener); objc.objectRelease(raw.cast()); @@ -10305,90 +10914,113 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent { } } +/// Call operator for `objc.ObjCBlock, NSStream, ffi.UnsignedLong)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent_CallExtension + on objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSStream, ffi.UnsignedLong)> { + void call(ffi.Pointer arg0, NSStream arg1, NSStreamEvent arg2) => + _ObjectiveCBindings_invokeBlock_18d6mda( + ref.pointer, arg0, arg1.ref.pointer, arg2.value); +} + void _ObjCBlock_ffiVoid_objcObjCObject_NSError_fnPtrTrampoline( - ffi.Pointer target, + ffi.Pointer block, + int closureId, ffi.Pointer arg0, ffi.Pointer arg1) => - target - .cast< + ffi.Pointer< ffi.NativeFunction< ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() + ffi.Pointer arg1)>>.fromAddress(closureId) .asFunction< void Function(ffi.Pointer, ffi.Pointer)>()(arg0, arg1); final _ObjCBlock_ffiVoid_objcObjCObject_NSError_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, + ffi.Void Function(ffi.Pointer, ffi.Int64, ffi.Pointer, ffi.Pointer)>( _ObjCBlock_ffiVoid_objcObjCObject_NSError_fnPtrTrampoline); void _ObjCBlock_ffiVoid_objcObjCObject_NSError_closureTrampoline( - ffi.Pointer target, + ffi.Pointer block, + int closureId, ffi.Pointer arg0, ffi.Pointer arg1) => - (objc.getBlockClosure(target.address) as void Function( + (objc.getBlockClosure(closureId) as void Function( ffi.Pointer, ffi.Pointer))(arg0, arg1); final _ObjCBlock_ffiVoid_objcObjCObject_NSError_closureCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, + ffi.Void Function(ffi.Pointer, ffi.Int64, ffi.Pointer, ffi.Pointer)>( _ObjCBlock_ffiVoid_objcObjCObject_NSError_closureTrampoline); void _ObjCBlock_ffiVoid_objcObjCObject_NSError_listenerTrampoline( - ffi.Pointer target, + ffi.Pointer block, + int closureId, ffi.Pointer arg0, ffi.Pointer arg1) { - (objc.getBlockClosure(target.address) as void Function( + (objc.getBlockClosure(closureId) as void Function( ffi.Pointer, ffi.Pointer))(arg0, arg1); - // objc.objectRelease(block.cast()); + objc.objectRelease(block.cast()); } ffi.NativeCallable< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)> + ffi.Void Function(ffi.Pointer, ffi.Int64, + ffi.Pointer, ffi.Pointer)> _ObjCBlock_ffiVoid_objcObjCObject_NSError_listenerCallable = ffi .NativeCallable< ffi.Void Function( - ffi.Pointer, + ffi.Pointer, + ffi.Int64, ffi.Pointer, ffi.Pointer)>.listener( _ObjCBlock_ffiVoid_objcObjCObject_NSError_listenerTrampoline) ..keepIsolateAlive = false; void _ObjCBlock_ffiVoid_objcObjCObject_NSError_blockingTrampoline( - ffi.Pointer target, + ffi.Pointer block, + int closureId, ffi.Pointer waiter, ffi.Pointer arg0, ffi.Pointer arg1) { try { - (objc.getBlockClosure(target.address) as void Function( + (objc.getBlockClosure(closureId) as void Function( ffi.Pointer, ffi.Pointer))(arg0, arg1); } catch (e) { } finally { objc.signalWaiter(waiter); - // objc.objectRelease(block.cast()); + objc.objectRelease(block.cast()); } } ffi.NativeCallable< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)> + ffi.Void Function( + ffi.Pointer, + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)> _ObjCBlock_ffiVoid_objcObjCObject_NSError_blockingCallable = ffi .NativeCallable< ffi.Void Function( - ffi.Pointer, + ffi.Pointer, + ffi.Int64, ffi.Pointer, ffi.Pointer, ffi.Pointer)>.isolateLocal( _ObjCBlock_ffiVoid_objcObjCObject_NSError_blockingTrampoline) ..keepIsolateAlive = false; ffi.NativeCallable< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)> + ffi.Void Function( + ffi.Pointer, + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)> _ObjCBlock_ffiVoid_objcObjCObject_NSError_blockingListenerCallable = ffi .NativeCallable< ffi.Void Function( - ffi.Pointer, + ffi.Pointer, + ffi.Int64, ffi.Pointer, ffi.Pointer, ffi.Pointer)>.listener( @@ -10429,7 +11061,9 @@ abstract final class ObjCBlock_ffiVoid_objcObjCObject_NSError { arg0.address == 0 ? null : objc.ObjCObjectBase(arg0, retain: true, release: true), - NSError.castFromPointer(arg1, retain: true, release: true)))), + NSError.castFromPointer(arg1, retain: true, release: true))), + objc.blockClosureDisposePort, + objc.disposeObjCBlockWithClosure), retain: false, release: true); @@ -10455,7 +11089,9 @@ abstract final class ObjCBlock_ffiVoid_objcObjCObject_NSError { arg0.address == 0 ? null : objc.ObjCObjectBase(arg0, retain: false, release: true), - NSError.castFromPointer(arg1, retain: false, release: true)))); + NSError.castFromPointer(arg1, retain: false, release: true))), + objc.blockClosureDisposePort, + objc.disposeObjCBlockWithClosure); final wrapper = _ObjectiveCBindings_wrapListenerBlock_wjvic9(raw); objc.objectRelease(raw.cast()); return objc.ObjCBlock< @@ -10485,7 +11121,9 @@ abstract final class ObjCBlock_ffiVoid_objcObjCObject_NSError { arg0.address == 0 ? null : objc.ObjCObjectBase(arg0, retain: false, release: true), - NSError.castFromPointer(arg1, retain: false, release: true)))); + NSError.castFromPointer(arg1, retain: false, release: true))), + objc.blockClosureDisposePort, + objc.disposeObjCBlockWithClosure); final rawListener = _ObjectiveCBindings_newClosureBlock_wjvic9( _ObjCBlock_ffiVoid_objcObjCObject_NSError_blockingListenerCallable .nativeFunction @@ -10496,7 +11134,9 @@ abstract final class ObjCBlock_ffiVoid_objcObjCObject_NSError { arg0.address == 0 ? null : objc.ObjCObjectBase(arg0, retain: false, release: true), - NSError.castFromPointer(arg1, retain: false, release: true)))); + NSError.castFromPointer(arg1, retain: false, release: true))), + objc.blockClosureDisposePort, + objc.disposeObjCBlockWithClosure); final wrapper = objc.wrapBlockingBlock( _ObjectiveCBindings_wrapBlockingBlock_wjvic9, raw, rawListener); objc.objectRelease(raw.cast()); @@ -10507,33 +11147,42 @@ abstract final class ObjCBlock_ffiVoid_objcObjCObject_NSError { } } +/// Call operator for `objc.ObjCBlock?, NSError)>`. +extension ObjCBlock_ffiVoid_objcObjCObject_NSError_CallExtension on objc + .ObjCBlock?, NSError)> { + void call(objc.ObjCObjectBase? arg0, NSError arg1) => + _ObjectiveCBindings_invokeBlock_wjvic9( + ref.pointer, arg0?.ref.pointer ?? ffi.nullptr, arg1.ref.pointer); +} + instancetype _ObjCBlock_instancetype_ffiVoid_NSCoder_fnPtrTrampoline( - ffi.Pointer target, + ffi.Pointer block, + int closureId, ffi.Pointer arg0, ffi.Pointer arg1) => - target - .cast< + ffi.Pointer< ffi.NativeFunction< instancetype Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() + ffi.Pointer arg1)>>.fromAddress(closureId) .asFunction< instancetype Function(ffi.Pointer, ffi.Pointer)>()(arg0, arg1); final _ObjCBlock_instancetype_ffiVoid_NSCoder_fnPtrCallable = ffi.Pointer.fromFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>( + instancetype Function(ffi.Pointer, ffi.Int64, + ffi.Pointer, ffi.Pointer)>( _ObjCBlock_instancetype_ffiVoid_NSCoder_fnPtrTrampoline); instancetype _ObjCBlock_instancetype_ffiVoid_NSCoder_closureTrampoline( - ffi.Pointer target, + ffi.Pointer block, + int closureId, ffi.Pointer arg0, ffi.Pointer arg1) => - (objc.getBlockClosure(target.address) as instancetype Function( + (objc.getBlockClosure(closureId) as instancetype Function( ffi.Pointer, ffi.Pointer))(arg0, arg1); final _ObjCBlock_instancetype_ffiVoid_NSCoder_closureCallable = ffi.Pointer.fromFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>( + instancetype Function(ffi.Pointer, ffi.Int64, + ffi.Pointer, ffi.Pointer)>( _ObjCBlock_instancetype_ffiVoid_NSCoder_closureTrampoline); /// Construction methods for `objc.ObjCBlock?> Function(ffi.Pointer, NSCoder)>`. @@ -10572,37 +11221,57 @@ abstract final class ObjCBlock_instancetype_ffiVoid_NSCoder { fn(arg0, NSCoder.castFromPointer(arg1, retain: true, release: true)) ?.ref .retainAndReturnPointer() ?? - ffi.nullptr)), + ffi.nullptr), + objc.blockClosureDisposePort, + objc.disposeObjCBlockWithClosure), retain: false, release: true); } -instancetype - _ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError_fnPtrTrampoline( - ffi.Pointer target, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer> arg3) => - target - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer> arg3)>>() - .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>()( - arg0, arg1, arg2, arg3); +/// Call operator for `objc.ObjCBlock?> Function(ffi.Pointer, NSCoder)>`. +extension ObjCBlock_instancetype_ffiVoid_NSCoder_CallExtension + on objc.ObjCBlock< + objc.Retained?> Function( + ffi.Pointer, NSCoder)> { + Dartinstancetype? call(ffi.Pointer arg0, NSCoder arg1) => + _ObjectiveCBindings_invokeBlock_1m9h2n( + ref.pointer, arg0, arg1.ref.pointer) + .address == + 0 + ? null + : objc.ObjCObjectBase( + _ObjectiveCBindings_invokeBlock_1m9h2n( + ref.pointer, arg0, arg1.ref.pointer), + retain: false, + release: true); +} + +instancetype _ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError_fnPtrTrampoline( + ffi.Pointer block, + int closureId, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer> arg3) => + ffi.Pointer< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer> + arg3)>>.fromAddress(closureId) + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>()(arg0, arg1, arg2, arg3); final _ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError_fnPtrCallable = ffi.Pointer.fromFunction< instancetype Function( - ffi.Pointer, + ffi.Pointer, + ffi.Int64, ffi.Pointer, ffi.Pointer, ffi.Pointer, @@ -10610,12 +11279,13 @@ final _ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError_fnPtrCallable = _ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError_fnPtrTrampoline); instancetype _ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError_closureTrampoline( - ffi.Pointer target, + ffi.Pointer block, + int closureId, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer> arg3) => - (objc.getBlockClosure(target.address) as instancetype Function( + (objc.getBlockClosure(closureId) as instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, @@ -10623,7 +11293,8 @@ instancetype final _ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError_closureCallable = ffi.Pointer.fromFunction< instancetype Function( - ffi.Pointer, + ffi.Pointer, + ffi.Int64, ffi.Pointer, ffi.Pointer, ffi.Pointer, @@ -10660,44 +11331,71 @@ abstract final class ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock? Function(ffi.Pointer, NSData, NSString, ffi.Pointer>)> - fromFunction(Dartinstancetype? Function(ffi.Pointer, NSData, NSString, ffi.Pointer>) fn) => - objc.ObjCBlock? Function(ffi.Pointer, NSData, NSString, ffi.Pointer>)>( - _ObjectiveCBindings_newClosureBlock_e2pkq8( - _ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError_closureCallable, - objc.registerBlockClosure((ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer> arg3) => - fn(arg0, NSData.castFromPointer(arg1, retain: true, release: true), NSString.castFromPointer(arg2, retain: true, release: true), arg3)?.ref.retainAndAutorelease() ?? ffi.nullptr)), - retain: false, + static objc.ObjCBlock? Function(ffi.Pointer, NSData, NSString, ffi.Pointer>)> fromFunction(Dartinstancetype? Function(ffi.Pointer, NSData, NSString, ffi.Pointer>) fn) => + objc.ObjCBlock? Function(ffi.Pointer, NSData, NSString, ffi.Pointer>)>( + _ObjectiveCBindings_newClosureBlock_e2pkq8( + _ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError_closureCallable, + objc.registerBlockClosure((ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer> arg3) => + fn(arg0, NSData.castFromPointer(arg1, retain: true, release: true), NSString.castFromPointer(arg2, retain: true, release: true), arg3)?.ref.retainAndAutorelease() ?? ffi.nullptr), + objc.blockClosureDisposePort, + objc.disposeObjCBlockWithClosure), + retain: false, + release: true); +} + +/// Call operator for `objc.ObjCBlock? Function(ffi.Pointer, NSData, NSString, ffi.Pointer>)>`. +extension ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError_CallExtension + on objc.ObjCBlock< + ffi.Pointer? Function(ffi.Pointer, NSData, + NSString, ffi.Pointer>)> { + Dartinstancetype? call(ffi.Pointer arg0, NSData arg1, NSString arg2, + ffi.Pointer> arg3) => + _ObjectiveCBindings_invokeBlock_e2pkq8(ref.pointer, arg0, + arg1.ref.pointer, arg2.ref.pointer, arg3) + .address == + 0 + ? null + : objc.ObjCObjectBase( + _ObjectiveCBindings_invokeBlock_e2pkq8( + ref.pointer, arg0, arg1.ref.pointer, arg2.ref.pointer, arg3), + retain: true, release: true); } ffi.Pointer _ObjCBlock_objcObjCObject_ffiVoid_fnPtrTrampoline( - ffi.Pointer target, ffi.Pointer arg0) => - target - .cast< + ffi.Pointer block, + int closureId, + ffi.Pointer arg0) => + ffi.Pointer< ffi.NativeFunction< ffi.Pointer Function( - ffi.Pointer arg0)>>() + ffi.Pointer arg0)>>.fromAddress(closureId) .asFunction< ffi.Pointer Function( ffi.Pointer)>()(arg0); final _ObjCBlock_objcObjCObject_ffiVoid_fnPtrCallable = ffi.Pointer.fromFunction< ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>( + ffi.Pointer, + ffi.Int64, + ffi.Pointer)>( _ObjCBlock_objcObjCObject_ffiVoid_fnPtrTrampoline); ffi.Pointer _ObjCBlock_objcObjCObject_ffiVoid_closureTrampoline( - ffi.Pointer target, ffi.Pointer arg0) => - (objc.getBlockClosure(target.address) as ffi.Pointer + ffi.Pointer block, + int closureId, + ffi.Pointer arg0) => + (objc.getBlockClosure(closureId) as ffi.Pointer Function(ffi.Pointer))(arg0); final _ObjCBlock_objcObjCObject_ffiVoid_closureCallable = ffi.Pointer.fromFunction< ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>( + ffi.Pointer, + ffi.Int64, + ffi.Pointer)>( _ObjCBlock_objcObjCObject_ffiVoid_closureTrampoline); /// Construction methods for `objc.ObjCBlock Function(ffi.Pointer)>`. @@ -10734,42 +11432,60 @@ abstract final class ObjCBlock_objcObjCObject_ffiVoid { _ObjectiveCBindings_newClosureBlock_1yesha9( _ObjCBlock_objcObjCObject_ffiVoid_closureCallable, objc.registerBlockClosure((ffi.Pointer arg0) => - fn(arg0).ref.retainAndAutorelease())), + fn(arg0).ref.retainAndAutorelease()), + objc.blockClosureDisposePort, + objc.disposeObjCBlockWithClosure), retain: false, release: true); } +/// Call operator for `objc.ObjCBlock Function(ffi.Pointer)>`. +extension ObjCBlock_objcObjCObject_ffiVoid_CallExtension on objc + .ObjCBlock Function(ffi.Pointer)> { + objc.ObjCObjectBase call(ffi.Pointer arg0) => objc.ObjCObjectBase( + _ObjectiveCBindings_invokeBlock_1yesha9(ref.pointer, arg0), + retain: true, + release: true); +} + ffi.Pointer _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_fnPtrTrampoline( - ffi.Pointer target, + ffi.Pointer block, + int closureId, ffi.Pointer arg0, ffi.Pointer arg1) => - target - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>()(arg0, arg1); + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0, + ffi.Pointer arg1)>>.fromAddress( + closureId) + .asFunction Function(ffi.Pointer, ffi.Pointer)>()( + arg0, arg1); final _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>( + ffi.Pointer Function( + ffi.Pointer, + ffi.Int64, + ffi.Pointer, + ffi.Pointer)>( _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_fnPtrTrampoline); ffi.Pointer _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_closureTrampoline( - ffi.Pointer target, + ffi.Pointer block, + int closureId, ffi.Pointer arg0, ffi.Pointer arg1) => - (objc.getBlockClosure(target.address) + (objc.getBlockClosure(closureId) as ffi.Pointer Function(ffi.Pointer, ffi.Pointer))(arg0, arg1); final _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_closureCallable = ffi.Pointer.fromFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>( + ffi.Pointer Function( + ffi.Pointer, + ffi.Int64, + ffi.Pointer, + ffi.Pointer)>( _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_closureTrampoline); /// Construction methods for `objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer)>`. @@ -10808,44 +11524,57 @@ abstract final class ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector { _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_closureCallable, objc.registerBlockClosure((ffi.Pointer arg0, ffi.Pointer arg1) => - fn(arg0, arg1).ref.retainAndAutorelease())), + fn(arg0, arg1).ref.retainAndAutorelease()), + objc.blockClosureDisposePort, + objc.disposeObjCBlockWithClosure), retain: false, release: true); } +/// Call operator for `objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer)>`. +extension ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_CallExtension + on objc.ObjCBlock< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)> { + objc.ObjCObjectBase call( + ffi.Pointer arg0, ffi.Pointer arg1) => + objc.ObjCObjectBase( + _ObjectiveCBindings_invokeBlock_ykn0t6(ref.pointer, arg0, arg1), + retain: true, + release: true); +} + ffi.Pointer _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_fnPtrTrampoline( - ffi.Pointer target, + ffi.Pointer block, + int closureId, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => - target - .cast< + ffi.Pointer< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()(arg0, arg1, arg2); + ffi.Pointer arg2)>>.fromAddress(closureId) + .asFunction Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>()(arg0, arg1, arg2); final _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_fnPtrCallable = ffi.Pointer.fromFunction< ffi.Pointer Function( - ffi.Pointer, + ffi.Pointer, + ffi.Int64, ffi.Pointer, ffi.Pointer, ffi.Pointer)>( _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_fnPtrTrampoline); ffi.Pointer _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_closureTrampoline( - ffi.Pointer target, + ffi.Pointer block, + int closureId, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => - (objc.getBlockClosure(target.address) + (objc.getBlockClosure(closureId) as ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -10853,7 +11582,8 @@ ffi.Pointer final _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_closureCallable = ffi.Pointer.fromFunction< ffi.Pointer Function( - ffi.Pointer, + ffi.Pointer, + ffi.Int64, ffi.Pointer, ffi.Pointer, ffi.Pointer)>( @@ -10896,36 +11626,48 @@ abstract final class ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCO objc.registerBlockClosure((ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => - fn(arg0, arg1, objc.ObjCObjectBase(arg2, retain: true, release: true)).ref.retainAndAutorelease())), + fn(arg0, arg1, objc.ObjCObjectBase(arg2, retain: true, release: true)).ref.retainAndAutorelease()), + objc.blockClosureDisposePort, + objc.disposeObjCBlockWithClosure), retain: false, release: true); } +/// Call operator for `objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>`. +extension ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_CallExtension + on objc.ObjCBlock< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)> { + objc.ObjCObjectBase call(ffi.Pointer arg0, + ffi.Pointer arg1, objc.ObjCObjectBase arg2) => + objc.ObjCObjectBase( + _ObjectiveCBindings_invokeBlock_1c0c70u( + ref.pointer, arg0, arg1, arg2.ref.pointer), + retain: true, + release: true); +} + ffi.Pointer _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_fnPtrTrampoline( - ffi.Pointer target, + ffi.Pointer block, + int closureId, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer arg3) => - target - .cast< + ffi.Pointer< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, - ffi.Pointer arg3)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()(arg0, arg1, arg2, arg3); + ffi.Pointer arg3)>>.fromAddress(closureId) + .asFunction Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>()(arg0, arg1, arg2, arg3); final _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_fnPtrCallable = ffi.Pointer.fromFunction< ffi.Pointer Function( - ffi.Pointer, + ffi.Pointer, + ffi.Int64, ffi.Pointer, ffi.Pointer, ffi.Pointer, @@ -10933,12 +11675,13 @@ final _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjC _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_fnPtrTrampoline); ffi.Pointer _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_closureTrampoline( - ffi.Pointer target, + ffi.Pointer block, + int closureId, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer arg3) => - (objc.getBlockClosure(target.address) + (objc.getBlockClosure(closureId) as ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -10947,7 +11690,8 @@ ffi.Pointer final _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_closureCallable = ffi.Pointer.fromFunction< ffi.Pointer Function( - ffi.Pointer, + ffi.Pointer, + ffi.Int64, ffi.Pointer, ffi.Pointer, ffi.Pointer, @@ -10994,11 +11738,33 @@ abstract final class ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCO ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer arg3) => - fn(arg0, arg1, objc.ObjCObjectBase(arg2, retain: true, release: true), objc.ObjCObjectBase(arg3, retain: true, release: true)).ref.retainAndAutorelease())), + fn(arg0, arg1, objc.ObjCObjectBase(arg2, retain: true, release: true), objc.ObjCObjectBase(arg3, retain: true, release: true)).ref.retainAndAutorelease()), + objc.blockClosureDisposePort, + objc.disposeObjCBlockWithClosure), retain: false, release: true); } +/// Call operator for `objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>`. +extension ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_CallExtension + on objc.ObjCBlock< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)> { + objc.ObjCObjectBase call( + ffi.Pointer arg0, + ffi.Pointer arg1, + objc.ObjCObjectBase arg2, + objc.ObjCObjectBase arg3) => + objc.ObjCObjectBase( + _ObjectiveCBindings_invokeBlock_u8b97m( + ref.pointer, arg0, arg1, arg2.ref.pointer, arg3.ref.pointer), + retain: true, + release: true); +} + /// Protocol class Protocol extends objc.ObjCObjectBase { Protocol._(ffi.Pointer pointer, diff --git a/pkgs/objective_c/src/objective_c.c b/pkgs/objective_c/src/objective_c.c index 5ac45e685..c3d963944 100644 --- a/pkgs/objective_c/src/objective_c.c +++ b/pkgs/objective_c/src/objective_c.c @@ -16,8 +16,6 @@ typedef struct _ObjCBlockInternal { int reserved; void *invoke; void *descriptor; - void *target; - Dart_Port dispose_port; } ObjCBlockInternal; // https://opensource.apple.com/source/libclosure/libclosure-38/Block_private.h @@ -28,11 +26,9 @@ extern void *_NSConcreteFinalizingBlock[32]; extern void *_NSConcreteGlobalBlock[32]; extern void *_NSConcreteWeakBlockVariable[32]; -// Dispose helper for ObjC blocks that wrap a Dart closure. For these blocks, -// the target is an int ID, and the dispose_port is listening for these IDs. -void DOBJC_disposeObjCBlockWithClosure(ObjCBlockImpl* block) { - ObjCBlockInternal* blk = (ObjCBlockInternal*)block; - Dart_PostInteger_DL(blk->dispose_port, (int64_t)blk->target); +// Dispose helper for ObjC blocks that wrap a Dart closure. +void DOBJC_disposeObjCBlockWithClosure(int64_t dispose_port, int64_t closure_id) { + Dart_PostInteger_DL(dispose_port, closure_id); } bool DOBJC_isValidBlock(ObjCBlockImpl* block) { diff --git a/pkgs/objective_c/src/objective_c.h b/pkgs/objective_c/src/objective_c.h index 29ffa044b..d4fbabd9b 100644 --- a/pkgs/objective_c/src/objective_c.h +++ b/pkgs/objective_c/src/objective_c.h @@ -10,7 +10,7 @@ #include "objective_c_runtime.h" // Dispose helper for ObjC blocks that wrap a Dart closure. -FFI_EXPORT void DOBJC_disposeObjCBlockWithClosure(ObjCBlockImpl *block); +FFI_EXPORT void DOBJC_disposeObjCBlockWithClosure(int64_t dispose_port, int64_t closure_id); // Returns whether the block is valid and live. The pointer must point to // readable memory, or be null. May (rarely) return false positives. diff --git a/pkgs/objective_c/src/objective_c_bindings_generated.m b/pkgs/objective_c/src/objective_c_bindings_generated.m index 0bbfac8e7..417c0e11e 100644 --- a/pkgs/objective_c/src/objective_c_bindings_generated.m +++ b/pkgs/objective_c/src/objective_c_bindings_generated.m @@ -11,78 +11,200 @@ id objc_retain(id); id objc_retainBlock(id); +@interface _ObjectiveCBindings_BlockDestroyer : NSObject {} +@property int64_t closure_id; +@property int64_t dispose_port; +@property void (*dtor)(int64_t, int64_t); +- (void)dealloc; +@end +@implementation _ObjectiveCBindings_BlockDestroyer +- (void)dealloc { self.dtor(self.dispose_port, self.closure_id); } +@end + Protocol* _ObjectiveCBindings_NSStreamDelegate(void) { return @protocol(NSStreamDelegate); } typedef id (^_BlockType)(void * arg0); +__attribute__((visibility("default"))) __attribute__((used)) +id _ObjectiveCBindings_invokeBlock_1yesha9( + _BlockType block, void * arg0) { + return block(arg0); +} + __attribute__((visibility("default"))) __attribute__((used)) _BlockType _ObjectiveCBindings_newClosureBlock_1yesha9( - id (*trampoline)(void * , void * ), void* target) NS_RETURNS_RETAINED { - return ^id (void * arg0) { - return trampoline(target, arg0); + id (*trampoline)(id , int64_t , void * ), int64_t closure_id, int64_t dispose_port, + void (*dtor)(int64_t, int64_t)) NS_RETURNS_RETAINED { + _ObjectiveCBindings_BlockDestroyer* obj = [[_ObjectiveCBindings_BlockDestroyer alloc] init]; + obj.closure_id = closure_id; + obj.dispose_port = dispose_port; + obj.dtor = dtor; + __weak __block _BlockType weakBlk; + _BlockType blk = ^id (void * arg0) { + return trampoline(weakBlk, obj.closure_id, arg0); }; + weakBlk = blk; + return blk; } typedef unsigned long (^_BlockType1)(void * arg0); +__attribute__((visibility("default"))) __attribute__((used)) +unsigned long _ObjectiveCBindings_invokeBlock_1ckyi24( + _BlockType1 block, void * arg0) { + return block(arg0); +} + __attribute__((visibility("default"))) __attribute__((used)) _BlockType1 _ObjectiveCBindings_newClosureBlock_1ckyi24( - unsigned long (*trampoline)(void * , void * ), void* target) NS_RETURNS_RETAINED { - return ^unsigned long (void * arg0) { - return trampoline(target, arg0); + unsigned long (*trampoline)(id , int64_t , void * ), int64_t closure_id, int64_t dispose_port, + void (*dtor)(int64_t, int64_t)) NS_RETURNS_RETAINED { + _ObjectiveCBindings_BlockDestroyer* obj = [[_ObjectiveCBindings_BlockDestroyer alloc] init]; + obj.closure_id = closure_id; + obj.dispose_port = dispose_port; + obj.dtor = dtor; + __weak __block _BlockType1 weakBlk; + _BlockType1 blk = ^unsigned long (void * arg0) { + return trampoline(weakBlk, obj.closure_id, arg0); }; + weakBlk = blk; + return blk; } typedef unsigned long (^_BlockType2)(void * arg0, NSFastEnumerationState * arg1, id * arg2, unsigned long arg3); +__attribute__((visibility("default"))) __attribute__((used)) +unsigned long _ObjectiveCBindings_invokeBlock_17ap02x( + _BlockType2 block, void * arg0, NSFastEnumerationState * arg1, id * arg2, unsigned long arg3) { + return block(arg0, arg1, arg2, arg3); +} + __attribute__((visibility("default"))) __attribute__((used)) _BlockType2 _ObjectiveCBindings_newClosureBlock_17ap02x( - unsigned long (*trampoline)(void * , void * , NSFastEnumerationState * , id * , unsigned long ), void* target) NS_RETURNS_RETAINED { - return ^unsigned long (void * arg0, NSFastEnumerationState * arg1, id * arg2, unsigned long arg3) { - return trampoline(target, arg0, arg1, arg2, arg3); + unsigned long (*trampoline)(id , int64_t , void * , NSFastEnumerationState * , id * , unsigned long ), int64_t closure_id, int64_t dispose_port, + void (*dtor)(int64_t, int64_t)) NS_RETURNS_RETAINED { + _ObjectiveCBindings_BlockDestroyer* obj = [[_ObjectiveCBindings_BlockDestroyer alloc] init]; + obj.closure_id = closure_id; + obj.dispose_port = dispose_port; + obj.dtor = dtor; + __weak __block _BlockType2 weakBlk; + _BlockType2 blk = ^unsigned long (void * arg0, NSFastEnumerationState * arg1, id * arg2, unsigned long arg3) { + return trampoline(weakBlk, obj.closure_id, arg0, arg1, arg2, arg3); }; + weakBlk = blk; + return blk; } typedef struct _NSZone * (^_BlockType3)(void * arg0); +__attribute__((visibility("default"))) __attribute__((used)) +struct _NSZone * _ObjectiveCBindings_invokeBlock_1a8cl66( + _BlockType3 block, void * arg0) { + return block(arg0); +} + __attribute__((visibility("default"))) __attribute__((used)) _BlockType3 _ObjectiveCBindings_newClosureBlock_1a8cl66( - struct _NSZone * (*trampoline)(void * , void * ), void* target) NS_RETURNS_RETAINED { - return ^struct _NSZone * (void * arg0) { - return trampoline(target, arg0); + struct _NSZone * (*trampoline)(id , int64_t , void * ), int64_t closure_id, int64_t dispose_port, + void (*dtor)(int64_t, int64_t)) NS_RETURNS_RETAINED { + _ObjectiveCBindings_BlockDestroyer* obj = [[_ObjectiveCBindings_BlockDestroyer alloc] init]; + obj.closure_id = closure_id; + obj.dispose_port = dispose_port; + obj.dtor = dtor; + __weak __block _BlockType3 weakBlk; + _BlockType3 blk = ^struct _NSZone * (void * arg0) { + return trampoline(weakBlk, obj.closure_id, arg0); }; + weakBlk = blk; + return blk; } typedef BOOL (^_BlockType4)(void * arg0); +__attribute__((visibility("default"))) __attribute__((used)) +BOOL _ObjectiveCBindings_invokeBlock_e3qsqz( + _BlockType4 block, void * arg0) { + return block(arg0); +} + __attribute__((visibility("default"))) __attribute__((used)) _BlockType4 _ObjectiveCBindings_newClosureBlock_e3qsqz( - BOOL (*trampoline)(void * , void * ), void* target) NS_RETURNS_RETAINED { - return ^BOOL (void * arg0) { - return trampoline(target, arg0); + BOOL (*trampoline)(id , int64_t , void * ), int64_t closure_id, int64_t dispose_port, + void (*dtor)(int64_t, int64_t)) NS_RETURNS_RETAINED { + _ObjectiveCBindings_BlockDestroyer* obj = [[_ObjectiveCBindings_BlockDestroyer alloc] init]; + obj.closure_id = closure_id; + obj.dispose_port = dispose_port; + obj.dtor = dtor; + __weak __block _BlockType4 weakBlk; + _BlockType4 blk = ^BOOL (void * arg0) { + return trampoline(weakBlk, obj.closure_id, arg0); }; + weakBlk = blk; + return blk; } typedef BOOL (^_BlockType5)(void * arg0, id arg1); +__attribute__((visibility("default"))) __attribute__((used)) +BOOL _ObjectiveCBindings_invokeBlock_ozkafd( + _BlockType5 block, void * arg0, id arg1) { + return block(arg0, arg1); +} + __attribute__((visibility("default"))) __attribute__((used)) _BlockType5 _ObjectiveCBindings_newClosureBlock_ozkafd( - BOOL (*trampoline)(void * , void * , id ), void* target) NS_RETURNS_RETAINED { - return ^BOOL (void * arg0, id arg1) { - return trampoline(target, arg0, arg1); + BOOL (*trampoline)(id , int64_t , void * , id ), int64_t closure_id, int64_t dispose_port, + void (*dtor)(int64_t, int64_t)) NS_RETURNS_RETAINED { + _ObjectiveCBindings_BlockDestroyer* obj = [[_ObjectiveCBindings_BlockDestroyer alloc] init]; + obj.closure_id = closure_id; + obj.dispose_port = dispose_port; + obj.dtor = dtor; + __weak __block _BlockType5 weakBlk; + _BlockType5 blk = ^BOOL (void * arg0, id arg1) { + return trampoline(weakBlk, obj.closure_id, arg0, arg1); }; + weakBlk = blk; + return blk; } typedef BOOL (^_BlockType6)(void * arg0, struct objc_selector * arg1); +__attribute__((visibility("default"))) __attribute__((used)) +BOOL _ObjectiveCBindings_invokeBlock_w1e3k0( + _BlockType6 block, void * arg0, struct objc_selector * arg1) { + return block(arg0, arg1); +} + __attribute__((visibility("default"))) __attribute__((used)) _BlockType6 _ObjectiveCBindings_newClosureBlock_w1e3k0( - BOOL (*trampoline)(void * , void * , struct objc_selector * ), void* target) NS_RETURNS_RETAINED { - return ^BOOL (void * arg0, struct objc_selector * arg1) { - return trampoline(target, arg0, arg1); + BOOL (*trampoline)(id , int64_t , void * , struct objc_selector * ), int64_t closure_id, int64_t dispose_port, + void (*dtor)(int64_t, int64_t)) NS_RETURNS_RETAINED { + _ObjectiveCBindings_BlockDestroyer* obj = [[_ObjectiveCBindings_BlockDestroyer alloc] init]; + obj.closure_id = closure_id; + obj.dispose_port = dispose_port; + obj.dtor = dtor; + __weak __block _BlockType6 weakBlk; + _BlockType6 blk = ^BOOL (void * arg0, struct objc_selector * arg1) { + return trampoline(weakBlk, obj.closure_id, arg0, arg1); }; + weakBlk = blk; + return blk; } typedef void (^_BlockType7)(id arg0, id arg1, id arg2); +__attribute__((visibility("default"))) __attribute__((used)) +void _ObjectiveCBindings_invokeBlock_1j2nt86( + _BlockType7 block, id arg0, id arg1, id arg2) { + return block(arg0, arg1, arg2); +} + __attribute__((visibility("default"))) __attribute__((used)) _BlockType7 _ObjectiveCBindings_newClosureBlock_1j2nt86( - void (*trampoline)(void * , id , id , id ), void* target) NS_RETURNS_RETAINED { - return ^void (id arg0, id arg1, id arg2) { - return trampoline(target, arg0, arg1, arg2); + void (*trampoline)(id , int64_t , id , id , id ), int64_t closure_id, int64_t dispose_port, + void (*dtor)(int64_t, int64_t)) NS_RETURNS_RETAINED { + _ObjectiveCBindings_BlockDestroyer* obj = [[_ObjectiveCBindings_BlockDestroyer alloc] init]; + obj.closure_id = closure_id; + obj.dispose_port = dispose_port; + obj.dtor = dtor; + __weak __block _BlockType7 weakBlk; + _BlockType7 blk = ^void (id arg0, id arg1, id arg2) { + return trampoline(weakBlk, obj.closure_id, arg0, arg1, arg2); }; + weakBlk = blk; + return blk; } __attribute__((visibility("default"))) __attribute__((used)) @@ -113,12 +235,26 @@ _BlockType7 _ObjectiveCBindings_wrapBlockingBlock_1j2nt86( } typedef void (^_BlockType8)(void * arg0); +__attribute__((visibility("default"))) __attribute__((used)) +void _ObjectiveCBindings_invokeBlock_ovsamd( + _BlockType8 block, void * arg0) { + return block(arg0); +} + __attribute__((visibility("default"))) __attribute__((used)) _BlockType8 _ObjectiveCBindings_newClosureBlock_ovsamd( - void (*trampoline)(void * , void * ), void* target) NS_RETURNS_RETAINED { - return ^void (void * arg0) { - return trampoline(target, arg0); + void (*trampoline)(id , int64_t , void * ), int64_t closure_id, int64_t dispose_port, + void (*dtor)(int64_t, int64_t)) NS_RETURNS_RETAINED { + _ObjectiveCBindings_BlockDestroyer* obj = [[_ObjectiveCBindings_BlockDestroyer alloc] init]; + obj.closure_id = closure_id; + obj.dispose_port = dispose_port; + obj.dtor = dtor; + __weak __block _BlockType8 weakBlk; + _BlockType8 blk = ^void (void * arg0) { + return trampoline(weakBlk, obj.closure_id, arg0); }; + weakBlk = blk; + return blk; } __attribute__((visibility("default"))) __attribute__((used)) @@ -149,12 +285,26 @@ _BlockType8 _ObjectiveCBindings_wrapBlockingBlock_ovsamd( } typedef void (^_BlockType9)(void * arg0, id arg1); +__attribute__((visibility("default"))) __attribute__((used)) +void _ObjectiveCBindings_invokeBlock_wjovn7( + _BlockType9 block, void * arg0, id arg1) { + return block(arg0, arg1); +} + __attribute__((visibility("default"))) __attribute__((used)) _BlockType9 _ObjectiveCBindings_newClosureBlock_wjovn7( - void (*trampoline)(void * , void * , id ), void* target) NS_RETURNS_RETAINED { - return ^void (void * arg0, id arg1) { - return trampoline(target, arg0, arg1); + void (*trampoline)(id , int64_t , void * , id ), int64_t closure_id, int64_t dispose_port, + void (*dtor)(int64_t, int64_t)) NS_RETURNS_RETAINED { + _ObjectiveCBindings_BlockDestroyer* obj = [[_ObjectiveCBindings_BlockDestroyer alloc] init]; + obj.closure_id = closure_id; + obj.dispose_port = dispose_port; + obj.dtor = dtor; + __weak __block _BlockType9 weakBlk; + _BlockType9 blk = ^void (void * arg0, id arg1) { + return trampoline(weakBlk, obj.closure_id, arg0, arg1); }; + weakBlk = blk; + return blk; } __attribute__((visibility("default"))) __attribute__((used)) @@ -185,12 +335,26 @@ _BlockType9 _ObjectiveCBindings_wrapBlockingBlock_wjovn7( } typedef void (^_BlockType10)(void * arg0, id arg1, NSStreamEvent arg2); +__attribute__((visibility("default"))) __attribute__((used)) +void _ObjectiveCBindings_invokeBlock_18d6mda( + _BlockType10 block, void * arg0, id arg1, NSStreamEvent arg2) { + return block(arg0, arg1, arg2); +} + __attribute__((visibility("default"))) __attribute__((used)) _BlockType10 _ObjectiveCBindings_newClosureBlock_18d6mda( - void (*trampoline)(void * , void * , id , NSStreamEvent ), void* target) NS_RETURNS_RETAINED { - return ^void (void * arg0, id arg1, NSStreamEvent arg2) { - return trampoline(target, arg0, arg1, arg2); + void (*trampoline)(id , int64_t , void * , id , NSStreamEvent ), int64_t closure_id, int64_t dispose_port, + void (*dtor)(int64_t, int64_t)) NS_RETURNS_RETAINED { + _ObjectiveCBindings_BlockDestroyer* obj = [[_ObjectiveCBindings_BlockDestroyer alloc] init]; + obj.closure_id = closure_id; + obj.dispose_port = dispose_port; + obj.dtor = dtor; + __weak __block _BlockType10 weakBlk; + _BlockType10 blk = ^void (void * arg0, id arg1, NSStreamEvent arg2) { + return trampoline(weakBlk, obj.closure_id, arg0, arg1, arg2); }; + weakBlk = blk; + return blk; } __attribute__((visibility("default"))) __attribute__((used)) @@ -221,12 +385,26 @@ _BlockType10 _ObjectiveCBindings_wrapBlockingBlock_18d6mda( } typedef void (^_BlockType11)(id arg0, id arg1); +__attribute__((visibility("default"))) __attribute__((used)) +void _ObjectiveCBindings_invokeBlock_wjvic9( + _BlockType11 block, id arg0, id arg1) { + return block(arg0, arg1); +} + __attribute__((visibility("default"))) __attribute__((used)) _BlockType11 _ObjectiveCBindings_newClosureBlock_wjvic9( - void (*trampoline)(void * , id , id ), void* target) NS_RETURNS_RETAINED { - return ^void (id arg0, id arg1) { - return trampoline(target, arg0, arg1); + void (*trampoline)(id , int64_t , id , id ), int64_t closure_id, int64_t dispose_port, + void (*dtor)(int64_t, int64_t)) NS_RETURNS_RETAINED { + _ObjectiveCBindings_BlockDestroyer* obj = [[_ObjectiveCBindings_BlockDestroyer alloc] init]; + obj.closure_id = closure_id; + obj.dispose_port = dispose_port; + obj.dtor = dtor; + __weak __block _BlockType11 weakBlk; + _BlockType11 blk = ^void (id arg0, id arg1) { + return trampoline(weakBlk, obj.closure_id, arg0, arg1); }; + weakBlk = blk; + return blk; } __attribute__((visibility("default"))) __attribute__((used)) @@ -257,46 +435,116 @@ _BlockType11 _ObjectiveCBindings_wrapBlockingBlock_wjvic9( } typedef id (^_BlockType12)(void * arg0, id arg1); +__attribute__((visibility("default"))) __attribute__((used)) +id _ObjectiveCBindings_invokeBlock_1m9h2n( + _BlockType12 block, void * arg0, id arg1) NS_RETURNS_RETAINED { + return block(arg0, arg1); +} + __attribute__((visibility("default"))) __attribute__((used)) _BlockType12 _ObjectiveCBindings_newClosureBlock_1m9h2n( - id (*trampoline)(void * , void * , id ), void* target) NS_RETURNS_RETAINED { - return ^id (void * arg0, id arg1) { - return trampoline(target, arg0, arg1); + id (*trampoline)(id , int64_t , void * , id ), int64_t closure_id, int64_t dispose_port, + void (*dtor)(int64_t, int64_t)) NS_RETURNS_RETAINED { + _ObjectiveCBindings_BlockDestroyer* obj = [[_ObjectiveCBindings_BlockDestroyer alloc] init]; + obj.closure_id = closure_id; + obj.dispose_port = dispose_port; + obj.dtor = dtor; + __weak __block _BlockType12 weakBlk; + _BlockType12 blk = ^id (void * arg0, id arg1) { + return trampoline(weakBlk, obj.closure_id, arg0, arg1); }; + weakBlk = blk; + return blk; } typedef id (^_BlockType13)(void * arg0, id arg1, id arg2, id * arg3); +__attribute__((visibility("default"))) __attribute__((used)) +id _ObjectiveCBindings_invokeBlock_e2pkq8( + _BlockType13 block, void * arg0, id arg1, id arg2, id * arg3) { + return block(arg0, arg1, arg2, arg3); +} + __attribute__((visibility("default"))) __attribute__((used)) _BlockType13 _ObjectiveCBindings_newClosureBlock_e2pkq8( - id (*trampoline)(void * , void * , id , id , id * ), void* target) NS_RETURNS_RETAINED { - return ^id (void * arg0, id arg1, id arg2, id * arg3) { - return trampoline(target, arg0, arg1, arg2, arg3); + id (*trampoline)(id , int64_t , void * , id , id , id * ), int64_t closure_id, int64_t dispose_port, + void (*dtor)(int64_t, int64_t)) NS_RETURNS_RETAINED { + _ObjectiveCBindings_BlockDestroyer* obj = [[_ObjectiveCBindings_BlockDestroyer alloc] init]; + obj.closure_id = closure_id; + obj.dispose_port = dispose_port; + obj.dtor = dtor; + __weak __block _BlockType13 weakBlk; + _BlockType13 blk = ^id (void * arg0, id arg1, id arg2, id * arg3) { + return trampoline(weakBlk, obj.closure_id, arg0, arg1, arg2, arg3); }; + weakBlk = blk; + return blk; } typedef id (^_BlockType14)(void * arg0, struct objc_selector * arg1); +__attribute__((visibility("default"))) __attribute__((used)) +id _ObjectiveCBindings_invokeBlock_ykn0t6( + _BlockType14 block, void * arg0, struct objc_selector * arg1) { + return block(arg0, arg1); +} + __attribute__((visibility("default"))) __attribute__((used)) _BlockType14 _ObjectiveCBindings_newClosureBlock_ykn0t6( - id (*trampoline)(void * , void * , struct objc_selector * ), void* target) NS_RETURNS_RETAINED { - return ^id (void * arg0, struct objc_selector * arg1) { - return trampoline(target, arg0, arg1); + id (*trampoline)(id , int64_t , void * , struct objc_selector * ), int64_t closure_id, int64_t dispose_port, + void (*dtor)(int64_t, int64_t)) NS_RETURNS_RETAINED { + _ObjectiveCBindings_BlockDestroyer* obj = [[_ObjectiveCBindings_BlockDestroyer alloc] init]; + obj.closure_id = closure_id; + obj.dispose_port = dispose_port; + obj.dtor = dtor; + __weak __block _BlockType14 weakBlk; + _BlockType14 blk = ^id (void * arg0, struct objc_selector * arg1) { + return trampoline(weakBlk, obj.closure_id, arg0, arg1); }; + weakBlk = blk; + return blk; } typedef id (^_BlockType15)(void * arg0, struct objc_selector * arg1, id arg2); +__attribute__((visibility("default"))) __attribute__((used)) +id _ObjectiveCBindings_invokeBlock_1c0c70u( + _BlockType15 block, void * arg0, struct objc_selector * arg1, id arg2) { + return block(arg0, arg1, arg2); +} + __attribute__((visibility("default"))) __attribute__((used)) _BlockType15 _ObjectiveCBindings_newClosureBlock_1c0c70u( - id (*trampoline)(void * , void * , struct objc_selector * , id ), void* target) NS_RETURNS_RETAINED { - return ^id (void * arg0, struct objc_selector * arg1, id arg2) { - return trampoline(target, arg0, arg1, arg2); + id (*trampoline)(id , int64_t , void * , struct objc_selector * , id ), int64_t closure_id, int64_t dispose_port, + void (*dtor)(int64_t, int64_t)) NS_RETURNS_RETAINED { + _ObjectiveCBindings_BlockDestroyer* obj = [[_ObjectiveCBindings_BlockDestroyer alloc] init]; + obj.closure_id = closure_id; + obj.dispose_port = dispose_port; + obj.dtor = dtor; + __weak __block _BlockType15 weakBlk; + _BlockType15 blk = ^id (void * arg0, struct objc_selector * arg1, id arg2) { + return trampoline(weakBlk, obj.closure_id, arg0, arg1, arg2); }; + weakBlk = blk; + return blk; } typedef id (^_BlockType16)(void * arg0, struct objc_selector * arg1, id arg2, id arg3); +__attribute__((visibility("default"))) __attribute__((used)) +id _ObjectiveCBindings_invokeBlock_u8b97m( + _BlockType16 block, void * arg0, struct objc_selector * arg1, id arg2, id arg3) { + return block(arg0, arg1, arg2, arg3); +} + __attribute__((visibility("default"))) __attribute__((used)) _BlockType16 _ObjectiveCBindings_newClosureBlock_u8b97m( - id (*trampoline)(void * , void * , struct objc_selector * , id , id ), void* target) NS_RETURNS_RETAINED { - return ^id (void * arg0, struct objc_selector * arg1, id arg2, id arg3) { - return trampoline(target, arg0, arg1, arg2, arg3); + id (*trampoline)(id , int64_t , void * , struct objc_selector * , id , id ), int64_t closure_id, int64_t dispose_port, + void (*dtor)(int64_t, int64_t)) NS_RETURNS_RETAINED { + _ObjectiveCBindings_BlockDestroyer* obj = [[_ObjectiveCBindings_BlockDestroyer alloc] init]; + obj.closure_id = closure_id; + obj.dispose_port = dispose_port; + obj.dtor = dtor; + __weak __block _BlockType16 weakBlk; + _BlockType16 blk = ^id (void * arg0, struct objc_selector * arg1, id arg2, id arg3) { + return trampoline(weakBlk, obj.closure_id, arg0, arg1, arg2, arg3); }; + weakBlk = blk; + return blk; } diff --git a/pkgs/objective_c/test/main.c b/pkgs/objective_c/test/main.c index 88bd241be..b02316d43 100644 --- a/pkgs/objective_c/test/main.c +++ b/pkgs/objective_c/test/main.c @@ -15,12 +15,9 @@ } int main() { - ASSERT_SYMBOL("DOBJC_disposeObjCBlockWithClosure"); // objective_c.c - ASSERT_SYMBOL("DOBJC_runOnMainThread"); - - ASSERT_SYMBOL("DOBJC_disposeObjCBlockWithClosure"); // objective_c.c - ASSERT_SYMBOL("DOBJC_runOnMainThread"); // objective_c.m - ASSERT_SYMBOL("OBJC_CLASS_$_DOBJCDartProxy"); // proxy.m + ASSERT_SYMBOL("DOBJC_finalizeObject"); // objective_c.c + ASSERT_SYMBOL("DOBJC_runOnMainThread"); // objective_c.m + ASSERT_SYMBOL("OBJC_CLASS_$_DOBJCDartProxy"); // proxy.m // objective_c_bindings_generated.m ASSERT_SYMBOL("_ObjectiveCBindings_wrapListenerBlock_ovsamd"); return 0; diff --git a/pkgs/objective_c/test/setup.dart b/pkgs/objective_c/test/setup.dart index e78993627..d12cf593c 100644 --- a/pkgs/objective_c/test/setup.dart +++ b/pkgs/objective_c/test/setup.dart @@ -92,7 +92,7 @@ void main(List arguments) { // Sanity check that the dylib was created correctly. final lib = DynamicLibrary.open(outputFile); - lib.lookup('DOBJC_disposeObjCBlockWithClosure'); // objective_c.c + lib.lookup('DOBJC_finalizeObject'); // objective_c.c lib.lookup('DOBJC_runOnMainThread'); // objective_c.m lib.lookup('Dart_InitializeApiDL'); // dart_api_dl.c lib.lookup('OBJC_CLASS_\$_DOBJCDartProxy'); // proxy.m From d42c833d9dbc78804f163ed6afd1784655326045 Mon Sep 17 00:00:00 2001 From: Liam Appelbe Date: Fri, 10 Jan 2025 15:45:39 +1100 Subject: [PATCH 5/7] Support blocking blocks --- .../lib/src/code_generator/objc_block.dart | 168 ++- .../objc_built_in_functions.dart | 72 +- .../ffigen/lib/src/code_generator/writer.dart | 15 +- .../test/native_objc_test/block_test.dart | 79 +- pkgs/objective_c/lib/src/internal.dart | 39 +- .../src/objective_c_bindings_generated.dart | 1344 +++++++---------- .../src/objective_c_bindings_generated.m | 282 ++-- pkgs/objective_c/test/main.c | 2 +- pkgs/objective_c/test/setup.dart | 2 +- 9 files changed, 913 insertions(+), 1090 deletions(-) diff --git a/pkgs/ffigen/lib/src/code_generator/objc_block.dart b/pkgs/ffigen/lib/src/code_generator/objc_block.dart index 81bba4ab9..56c44c722 100644 --- a/pkgs/ffigen/lib/src/code_generator/objc_block.dart +++ b/pkgs/ffigen/lib/src/code_generator/objc_block.dart @@ -15,6 +15,8 @@ class ObjCBlock extends BindingType { final List params; final bool returnsRetained; late final ObjCBlockWrapperFuncs _blockWrappers; + late final _FnTypeHelper _typeHelper; + late final _FnTypeHelper _blockingTypeHelper; factory ObjCBlock({ required Type returnType, @@ -108,9 +110,10 @@ class ObjCBlock extends BindingType { final voidPtr = PointerType(voidType); final blockPtr = PointerType(objCBlockType); - final func = _FnHelper(w, returnType, params); - final blockingFunc = _FnHelper(w, returnType, [ + _typeHelper = _FnTypeHelper(w, returnType, params); + + _blockingTypeHelper = _FnTypeHelper(w, returnType, [ Parameter(type: voidPtr, name: 'waiter', objCConsumed: false), ...params, ]); @@ -144,12 +147,9 @@ class ObjCBlock extends BindingType { ObjCBuiltInFunctions.registerBlockClosure.gen(w); final getBlockClosure = ObjCBuiltInFunctions.getBlockClosure.gen(w); final releaseFn = ObjCBuiltInFunctions.objectRelease.gen(w); - final wrapBlockingBlockFn = ObjCBuiltInFunctions.wrapBlockingBlock.gen(w); + final pkgNewClosureBlock = ObjCBuiltInFunctions.newClosureBlock.gen(w); + final pkgNewBlockingBlock = ObjCBuiltInFunctions.newBlockingBlock.gen(w); final signalWaiterFn = ObjCBuiltInFunctions.signalWaiter.gen(w); - final blockClosureDisposePort = - ObjCBuiltInFunctions.blockClosureDisposePort.gen(w); - final disposeObjCBlockWithClosure = - ObjCBuiltInFunctions.disposeObjCBlockWithClosure.gen(w); final returnFfiDartType = returnType.getFfiDartType(w); final voidPtrCType = voidPtr.getCType(w); final int64Type = NativeType(SupportedNativeType.int64).getCType(w); @@ -161,47 +161,46 @@ class ObjCBlock extends BindingType { // Write the function pointer based trampoline function. s.write(''' $returnFfiDartType $funcPtrTrampoline( - $blockCType block, int closureId, ${func.paramsFfiDartType}) => - ${w.ffiLibraryPrefix}.Pointer<${func.natFnFfiDartType}>.fromAddress(closureId) - .asFunction<${func.ffiDartType}>()(${func.paramsNameOnly}); + $blockCType block, int closureId, ${_typeHelper.paramsFfiDartType}) => + ${w.ffiLibraryPrefix}.Pointer<${_typeHelper.natFnFfiDartType}>.fromAddress(closureId).asFunction<${_typeHelper.ffiDartType}>()(${_typeHelper.paramsNameOnly}); final $funcPtrCallable = ${w.ffiLibraryPrefix}.Pointer.fromFunction< - ${func.trampCType}>($funcPtrTrampoline $exceptionalReturn); + ${_typeHelper.trampCType}>($funcPtrTrampoline $exceptionalReturn); '''); // Write the closure based trampoline function. s.write(''' $returnFfiDartType $closureTrampoline( - $blockCType block, int closureId, ${func.paramsFfiDartType}) => - ($getBlockClosure(closureId) as ${func.ffiDartType})(${func.paramsNameOnly}); + $blockCType block, int closureId, ${_typeHelper.paramsFfiDartType}) => + ($getBlockClosure(closureId) as ${_typeHelper.ffiDartType})(${_typeHelper.paramsNameOnly}); final $closureCallable = ${w.ffiLibraryPrefix}.Pointer.fromFunction< - ${func.trampCType}>($closureTrampoline $exceptionalReturn); + ${_typeHelper.trampCType}>($closureTrampoline $exceptionalReturn); '''); if (hasListener) { // Write the listener trampoline function. s.write(''' $returnFfiDartType $listenerTrampoline( - $blockCType block, int closureId, ${func.paramsFfiDartType}) { - ($getBlockClosure(closureId) as ${func.ffiDartType})(${func.paramsNameOnly}); + $blockCType block, int closureId, ${_typeHelper.paramsFfiDartType}) { + ($getBlockClosure(closureId) as ${_typeHelper.ffiDartType})(${_typeHelper.paramsNameOnly}); $releaseFn(block.cast()); } -${func.trampNatCallType} $listenerCallable = ${func.trampNatCallType}.listener( - $listenerTrampoline $exceptionalReturn)..keepIsolateAlive = false; -$returnFfiDartType $blockingTrampoline( - $blockCType block, int closureId, ${blockingFunc.paramsFfiDartType}) { +${_typeHelper.trampNatCallType} $listenerCallable = ${_typeHelper.trampNatCallType}.listener( + $listenerTrampoline $exceptionalReturn)..keepIsolateAlive = false; +$returnFfiDartType $blockingTrampoline($blockCType block, int closureId, + ${_blockingTypeHelper.paramsFfiDartType}) { try { - ($getBlockClosure(closureId) as ${func.ffiDartType})(${func.paramsNameOnly}); + ($getBlockClosure(closureId) as ${_typeHelper.ffiDartType})(${_typeHelper.paramsNameOnly}); } catch (e) { } finally { $signalWaiterFn(waiter); $releaseFn(block.cast()); } } -${blockingFunc.trampNatCallType} $blockingCallable = - ${blockingFunc.trampNatCallType}.isolateLocal( +${_blockingTypeHelper.trampNatCallType} $blockingCallable = + ${_blockingTypeHelper.trampNatCallType}.isolateLocal( $blockingTrampoline $exceptionalReturn)..keepIsolateAlive = false; -${blockingFunc.trampNatCallType} $blockingListenerCallable = - ${blockingFunc.trampNatCallType}.listener( +${_blockingTypeHelper.trampNatCallType} $blockingListenerCallable = + ${_blockingTypeHelper.trampNatCallType}.listener( $blockingTrampoline $exceptionalReturn)..keepIsolateAlive = false; '''); } @@ -221,7 +220,7 @@ ${blockingFunc.trampNatCallType} $blockingListenerCallable = objCRetain: true, objCAutorelease: !returnsRetained, ); - final convFn = '(${func.paramsFfiDartType}) => $convFnInvocation'; + final convFn = '(${_typeHelper.paramsFfiDartType}) => $convFnInvocation'; // Write the wrapper class. s.write(''' @@ -238,7 +237,7 @@ abstract final class $name { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - // static $blockType fromFunctionPointer(${func.natFnPtrCType} ptr) => + // static $blockType fromFunctionPointer(${_typeHelper.natFnPtrCType} ptr) => // $blockType($newPointerBlock($funcPtrCallable, ptr.cast()), // retain: false, release: true); @@ -247,18 +246,17 @@ abstract final class $name { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static $blockType fromFunction(${func.dartType} fn) => - $blockType($newClosureBlock( - $closureCallable, $registerBlockClosure($convFn), - $blockClosureDisposePort, $disposeObjCBlockWithClosure), - retain: false, release: true); + static $blockType fromFunction(${_typeHelper.dartType} fn) => + $blockType($pkgNewClosureBlock( + $convFn, $closureCallable.cast(), + $newClosureBlock), retain: false, release: true); '''); // Listener block constructor is only available for void blocks. if (hasListener) { // This snippet is the same as the convFn above, except that the params // don't need to be retained because they've already been retained by - // _blockWrappers.listenerWrapper. + // _blockWrappers.newListenerBlock. final listenerConvertedFnArgs = params .map((p) => p.type.convertFfiDartTypeToDartType(w, p.name, objCRetain: false)) @@ -270,9 +268,9 @@ abstract final class $name { objCAutorelease: !returnsRetained, ); final listenerConvFn = - '(${func.paramsFfiDartType}) => $listenerConvFnInvocation'; - final wrapListenerFn = _blockWrappers.listenerWrapper!.name; - final wrapBlockingFn = _blockWrappers.blockingWrapper!.name; + '(${_typeHelper.paramsFfiDartType}) => $listenerConvFnInvocation'; + final newListenerBlock = _blockWrappers.newListenerBlock!.name; + final newBlockingBlock = _blockWrappers.newBlockingBlock!.name; s.write(''' @@ -285,15 +283,10 @@ abstract final class $name { /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - static $blockType listener(${func.dartType} fn) { - final raw = $newClosureBlock( - $listenerCallable.nativeFunction.cast(), - $registerBlockClosure($listenerConvFn), - $blockClosureDisposePort, $disposeObjCBlockWithClosure); - final wrapper = $wrapListenerFn(raw); - $releaseFn(raw.cast()); - return $blockType(wrapper, retain: false, release: true); - } + static $blockType listener(${_typeHelper.dartType} fn) => + $blockType($pkgNewClosureBlock( + $listenerConvFn, $listenerCallable.nativeFunction.cast(), + $newListenerBlock), retain: false, release: true); /// Creates a blocking block from a Dart function. /// @@ -304,20 +297,11 @@ abstract final class $name { /// This block does not keep the owner isolate alive. If the owner isolate has /// shut down, and the block is invoked by native code, it may block /// indefinitely, or have other undefined behavior. - static $blockType blocking(${func.dartType} fn) { - final raw = $newClosureBlock( - $blockingCallable.nativeFunction.cast(), - $registerBlockClosure($listenerConvFn), - $blockClosureDisposePort, $disposeObjCBlockWithClosure); - final rawListener = $newClosureBlock( - $blockingListenerCallable.nativeFunction.cast(), - $registerBlockClosure($listenerConvFn), - $blockClosureDisposePort, $disposeObjCBlockWithClosure); - final wrapper = $wrapBlockingBlockFn($wrapBlockingFn, raw, rawListener); - $releaseFn(raw.cast()); - $releaseFn(rawListener.cast()); - return $blockType(wrapper, retain: false, release: true); - } + static $blockType blocking(${_typeHelper.dartType} fn) => + $blockType($pkgNewBlockingBlock( + $listenerConvFn, $blockingCallable.nativeFunction.cast(), + $blockingListenerCallable.nativeFunction.cast(), + $newBlockingBlock), retain: false, release: true); '''); } s.write('}\n\n'); @@ -339,7 +323,8 @@ abstract final class $name { s.write(''' /// Call operator for `$blockType`. extension $callExtension on $blockType { - ${returnType.getDartType(w)} call(${func.paramsDartType}) => $callMethod; + ${returnType.getDartType(w)} call(${_typeHelper.paramsDartType}) => + $callMethod; } '''); @@ -382,7 +367,11 @@ extension $callExtension on $blockType { final blockingName = w.objCLevelUniqueNamer.makeUnique('_BlockingTrampoline'); final trampolineArg = - _blockWrappers.trampolineType.getNativeType(varName: 'trampoline'); + _typeHelper.trampFnType.getNativeType(varName: 'trampoline'); + final blockingTrampolineArg = + _blockingTypeHelper.trampFnType.getNativeType(varName: 'tramp'); + final blockingListenerTrampolineArg = _blockingTypeHelper.trampFnType + .getNativeType(varName: 'listener_tramp'); final retainStr = returnsRetained ? 'NS_RETURNS_RETAINED' : ''; final dtorClass = '_${w.className}_BlockDestroyer'; @@ -400,10 +389,8 @@ __attribute__((visibility("default"))) __attribute__((used)) $blockTypeName $newClosureBlock( $trampolineArg, int64_t closure_id, int64_t dispose_port, void (*dtor)(int64_t, int64_t)) NS_RETURNS_RETAINED { - $dtorClass* obj = [[$dtorClass alloc] init]; - obj.closure_id = closure_id; - obj.dispose_port = dispose_port; - obj.dtor = dtor; + $dtorClass* obj = [$dtorClass + new:closure_id disposePort:dispose_port destructor:dtor]; __weak __block $blockTypeName weakBlk; $blockTypeName blk = ^$returnNativeType($argStr) { return trampoline(weakBlk, ${['obj.closure_id', ...noRetains].join(', ')}); @@ -414,36 +401,51 @@ $blockTypeName $newClosureBlock( '''); if (hasListener) { - final listenerWrapper = _blockWrappers.listenerWrapper!.name; - final blockingWrapper = _blockWrappers.blockingWrapper!.name; + final newListenerBlock = _blockWrappers.newListenerBlock!.name; + final newBlockingBlock = _blockWrappers.newBlockingBlock!.name; s.write(''' __attribute__((visibility("default"))) __attribute__((used)) -$blockTypeName $listenerWrapper($blockTypeName block) NS_RETURNS_RETAINED { - return ^void($argStr) { - ${generateRetain('block')}; - block(${retains.join(', ')}); +$blockTypeName $newListenerBlock( + $trampolineArg, int64_t closure_id, int64_t dispose_port, + void (*dtor)(int64_t, int64_t)) NS_RETURNS_RETAINED { + $dtorClass* obj = [$dtorClass + new:closure_id disposePort:dispose_port destructor:dtor]; + __weak __block $blockTypeName weakBlk; + $blockTypeName blk = ^$returnNativeType($argStr) { + ${generateRetain('weakBlk')}; + return trampoline(weakBlk, ${['obj.closure_id', ...retains].join(', ')}); }; + weakBlk = blk; + return blk; } typedef $returnNativeType (^$blockingName)($blockingArgStr); __attribute__((visibility("default"))) __attribute__((used)) -$blockTypeName $blockingWrapper( - $blockingName block, $blockingName listenerBlock, +$blockTypeName $newBlockingBlock( + $blockingTrampolineArg, $blockingListenerTrampolineArg, + int64_t closure_id, int64_t dispose_port, void (*dtor)(int64_t, int64_t), void* (*newWaiter)(), void (*awaitWaiter)(void*)) NS_RETURNS_RETAINED { NSThread *targetThread = [NSThread currentThread]; - return ^void($argStr) { + $dtorClass* obj = [$dtorClass + new:closure_id disposePort:dispose_port destructor:dtor]; + __weak __block $blockTypeName weakBlk; + $blockTypeName blk = ^$returnNativeType($argStr) { + ${generateRetain('weakBlk')}; if ([NSThread currentThread] == targetThread) { - ${generateRetain('block')}; - block(${blockingRetains.join(', ')}); + tramp(weakBlk, ${['obj.closure_id', ...blockingRetains].join(', ')}); } else { void* waiter = newWaiter(); - ${generateRetain('listenerBlock')}; - listenerBlock(${blockingListenerRetains.join(', ')}); + listener_tramp(weakBlk, ${[ + 'obj.closure_id', + ...blockingListenerRetains + ].join(', ')}); awaitWaiter(waiter); } }; + weakBlk = blk; + return blk; } '''); } @@ -523,8 +525,9 @@ $blockTypeName $blockingWrapper( } } -class _FnHelper { +class _FnTypeHelper { late final NativeFunc natFnType; + late final FunctionType trampFnType; late final String natFnFfiDartType; late final String natFnPtrCType; late final String dartType; @@ -537,7 +540,7 @@ class _FnHelper { late final String paramsFfiDartType; late final String paramsDartType; - _FnHelper(Writer w, Type returnType, List params) { + _FnTypeHelper(Writer w, Type returnType, List params) { final fnType = FunctionType(returnType: returnType, parameters: params); natFnType = NativeFunc(fnType); natFnFfiDartType = natFnType.getFfiDartType(w); @@ -545,7 +548,7 @@ class _FnHelper { dartType = fnType.getDartType(w, writeArgumentNames: false); ffiDartType = fnType.getFfiDartType(w, writeArgumentNames: false); - final trampFnType = FunctionType( + trampFnType = FunctionType( returnType: returnType, parameters: [ Parameter( @@ -554,7 +557,8 @@ class _FnHelper { objCConsumed: false), Parameter( type: NativeType(SupportedNativeType.int64), - name: 'closure_id', objCConsumed: false), + name: 'closure_id', + objCConsumed: false), ...params, ], ); 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 48c771d90..65e5d59ba 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 @@ -33,7 +33,8 @@ class ObjCBuiltInFunctions { static const getProtocol = ObjCImport('getProtocol'); static const objectRelease = ObjCImport('objectRelease'); static const signalWaiter = ObjCImport('signalWaiter'); - static const wrapBlockingBlock = ObjCImport('wrapBlockingBlock'); + static const newBlockingBlock = ObjCImport('newBlockingBlock'); + static const newClosureBlock = ObjCImport('newClosureBlock'); static const blockClosureDisposePort = ObjCImport('blockClosureDisposePort'); static const disposeObjCBlockWithClosure = ObjCImport('disposeObjCBlockWithClosure'); @@ -215,20 +216,6 @@ class ObjCBuiltInFunctions { ObjCBlockWrapperFuncs getBlockTrampolines(ObjCBlock block) { final id = _methodSigId(block.returnType, block.params); final idHash = fnvHash32(id).toRadixString(36); - final trampolineType = FunctionType( - returnType: block.returnType, - parameters: [ - Parameter( - type: PointerType(objCBlockType), - name: 'block', - objCConsumed: false), - Parameter( - type: NativeType(SupportedNativeType.int64), - name: 'closure_id', - objCConsumed: false), - ...block.params, - ], - ); final dtorType = FunctionType( returnType: voidType, parameters: [ @@ -243,7 +230,6 @@ class ObjCBuiltInFunctions { ], ); return _blockTrampolines[id] ??= ObjCBlockWrapperFuncs( - trampolineType, Func( name: '_${wrapperName}_invokeBlock_$idHash', returnType: block.returnType, @@ -266,7 +252,7 @@ class ObjCBuiltInFunctions { parameters: [ Parameter( name: 'trampoline', - type: PointerType(NativeFunc(trampolineType)), + type: PointerType(voidType), objCConsumed: false), Parameter( type: NativeType(SupportedNativeType.int64), @@ -287,37 +273,53 @@ class ObjCBuiltInFunctions { useNameForLookup: true, ffiNativeConfig: const FfiNativeConfig(enabled: true), ), - // TODO: wrap*Block should become new*Block. block.hasListener - ? _blockTrampolineFunc('_${wrapperName}_wrapListenerBlock_$idHash') + ? _blockTrampolineFunc( + '_${wrapperName}_newListenerBlock_$idHash', dtorType) : null, block.hasListener - ? _blockTrampolineFunc('_${wrapperName}_wrapBlockingBlock_$idHash', + ? _blockTrampolineFunc( + '_${wrapperName}_newBlockingBlock_$idHash', dtorType, blocking: true) : null, ); } - Func _blockTrampolineFunc(String name, {bool blocking = false}) => Func( + Func _blockTrampolineFunc(String name, Type dtorType, + {bool blocking = false}) => + Func( name: name, returnType: PointerType(objCBlockType), parameters: [ Parameter( - name: 'block', - type: PointerType(objCBlockType), + name: 'trampoline', + type: PointerType(voidType), objCConsumed: false), - if (blocking) ...[ + if (blocking) Parameter( - name: 'listnerBlock', - type: PointerType(objCBlockType), + name: 'listener_trampoline', + type: PointerType(voidType), objCConsumed: false), + Parameter( + type: NativeType(SupportedNativeType.int64), + name: 'closure_id', + objCConsumed: false), + Parameter( + type: NativeType(SupportedNativeType.int64), + name: 'dispose_port', + objCConsumed: false), + Parameter( + name: 'dtor', + type: PointerType(NativeFunc(dtorType)), + objCConsumed: false), + if (blocking) ...[ Parameter( - name: 'newWaiter', + name: 'new_waiter', type: PointerType(NativeFunc(FunctionType( returnType: PointerType(voidType), parameters: []))), objCConsumed: false), Parameter( - name: 'awaitWaiter', + name: 'await_waiter', type: PointerType( NativeFunc(FunctionType(returnType: voidType, parameters: [ Parameter(type: PointerType(voidType), objCConsumed: false), @@ -341,24 +343,22 @@ class ObjCBuiltInFunctions { /// A native trampoline function for a listener block. class ObjCBlockWrapperFuncs extends AstNode { - final FunctionType trampolineType; final Func invokeBlock; final Func newClosureBlock; - final Func? listenerWrapper; - final Func? blockingWrapper; + final Func? newListenerBlock; + final Func? newBlockingBlock; bool objCBindingsGenerated = false; - ObjCBlockWrapperFuncs(this.trampolineType, this.invokeBlock, - this.newClosureBlock, this.listenerWrapper, this.blockingWrapper); + ObjCBlockWrapperFuncs(this.invokeBlock, this.newClosureBlock, + this.newListenerBlock, this.newBlockingBlock); @override void visitChildren(Visitor visitor) { super.visitChildren(visitor); - visitor.visit(trampolineType); visitor.visit(invokeBlock); visitor.visit(newClosureBlock); - visitor.visit(listenerWrapper); - visitor.visit(blockingWrapper); + visitor.visit(newListenerBlock); + visitor.visit(newBlockingBlock); } } diff --git a/pkgs/ffigen/lib/src/code_generator/writer.dart b/pkgs/ffigen/lib/src/code_generator/writer.dart index d313cfa8d..f1d9b8cb6 100644 --- a/pkgs/ffigen/lib/src/code_generator/writer.dart +++ b/pkgs/ffigen/lib/src/code_generator/writer.dart @@ -438,6 +438,7 @@ class Writer { for (final entryPoint in nativeEntryPoints) { s.write(_objcImport(entryPoint, outDir)); } + final dtorClass = '_${className}_BlockDestroyer'; s.write(''' #if !__has_feature(objc_arc) @@ -447,13 +448,23 @@ class Writer { id objc_retain(id); id objc_retainBlock(id); -@interface _${className}_BlockDestroyer : NSObject {} +@interface $dtorClass : NSObject {} @property int64_t closure_id; @property int64_t dispose_port; @property void (*dtor)(int64_t, int64_t); ++ (instancetype)new:(int64_t) closure_id disposePort:(int64_t) dispose_port + destructor:(void (*)(int64_t, int64_t)) dtor; - (void)dealloc; @end -@implementation _${className}_BlockDestroyer +@implementation $dtorClass ++ (instancetype)new:(int64_t) closure_id disposePort:(int64_t) dispose_port + destructor:(void (*)(int64_t, int64_t)) dtor { + $dtorClass* d = [[$dtorClass alloc] init]; + d.closure_id = closure_id; + d.dispose_port = dispose_port; + d.dtor = dtor; + return d; +} - (void)dealloc { self.dtor(self.dispose_port, self.closure_id); } @end '''); diff --git a/pkgs/ffigen/test/native_objc_test/block_test.dart b/pkgs/ffigen/test/native_objc_test/block_test.dart index 4f7912e51..2892f425b 100644 --- a/pkgs/ffigen/test/native_objc_test/block_test.dart +++ b/pkgs/ffigen/test/native_objc_test/block_test.dart @@ -123,7 +123,7 @@ void main() { } } - /*test('Blocking block same thread', () { + test('Blocking block same thread', () { int value = 0; final block = VoidBlock.blocking(() { waitSync(Duration(milliseconds: 100)); @@ -177,7 +177,7 @@ void main() { }); block(); expect(value, 123); - });*/ + }); test('Float block', () { final block = FloatBlock.fromFunction((double x) { @@ -462,8 +462,14 @@ void main() { expect(internal_for_testing.isClosureOfBlock(closureId), false); }, skip: !canDoGC); - (Pointer, Pointer, Pointer, int, int, int) - blockBlockDartCallRefCountTest() { + ( + Pointer, + Pointer, + Pointer, + int, + int, + int + ) blockBlockDartCallRefCountTest() { final pool = lib.objc_autoreleasePoolPush(); final inputBlock = IntBlock.fromFunction((int x) { return 5 * x; @@ -488,21 +494,12 @@ void main() { // One reference held by inputBlock object, another bound to the // outputBlock lambda. expect(blockRetainCount(inputBlock.ref.pointer), 2); - expect( - internal_for_testing - .isClosureOfBlock(inputBlockId), - true); + expect(internal_for_testing.isClosureOfBlock(inputBlockId), true); expect(blockRetainCount(blockBlock.ref.pointer), 1); - expect( - internal_for_testing - .isClosureOfBlock(blockBlockId), - true); + expect(internal_for_testing.isClosureOfBlock(blockBlockId), true); expect(blockRetainCount(outputBlock.ref.pointer), 1); - expect( - internal_for_testing - .isClosureOfBlock(outputBlockId), - true); + expect(internal_for_testing.isClosureOfBlock(outputBlockId), true); return ( inputBlock.ref.pointer, blockBlock.ref.pointer, @@ -514,26 +511,34 @@ void main() { } test('Calling a block block from Dart has correct ref counting', () async { - final (inputBlock, blockBlock, outputBlock, inputBlockId, blockBlockId, outputBlockId) = - blockBlockDartCallRefCountTest(); + final ( + inputBlock, + blockBlock, + outputBlock, + inputBlockId, + blockBlockId, + outputBlockId + ) = blockBlockDartCallRefCountTest(); doGC(); await Future.delayed(Duration.zero); // Let dispose message arrive. doGC(); await Future.delayed(Duration.zero); // Let dispose message arrive. expect(blockRetainCount(inputBlock), 0); - expect(internal_for_testing.isClosureOfBlock(inputBlockId), - false); + expect(internal_for_testing.isClosureOfBlock(inputBlockId), false); expect(blockRetainCount(blockBlock), 0); - expect(internal_for_testing.isClosureOfBlock(blockBlockId), - false); + expect(internal_for_testing.isClosureOfBlock(blockBlockId), false); expect(blockRetainCount(outputBlock), 0); - expect(internal_for_testing.isClosureOfBlock(outputBlockId), - false); + expect(internal_for_testing.isClosureOfBlock(outputBlockId), false); }, skip: !canDoGC); - (Pointer, Pointer, Pointer, int, int) - blockBlockObjCCallRefCountTest() { + ( + Pointer, + Pointer, + Pointer, + int, + int + ) blockBlockObjCCallRefCountTest() { final pool = lib.objc_autoreleasePoolPush(); late Pointer inputBlock; final blockBlock = @@ -553,16 +558,16 @@ void main() { expect(blockRetainCount(inputBlock), 1); expect(blockRetainCount(blockBlock.ref.pointer), 1); - expect( - internal_for_testing - .isClosureOfBlock(blockBlockId), - true); + expect(internal_for_testing.isClosureOfBlock(blockBlockId), true); expect(blockRetainCount(outputBlock.ref.pointer), 1); - expect( - internal_for_testing - .isClosureOfBlock(outputBlockId), - true); - return (inputBlock, blockBlock.ref.pointer, outputBlock.ref.pointer, blockBlockId, outputBlockId); + expect(internal_for_testing.isClosureOfBlock(outputBlockId), true); + return ( + inputBlock, + blockBlock.ref.pointer, + outputBlock.ref.pointer, + blockBlockId, + outputBlockId + ); } test('Calling a block block from ObjC has correct ref counting', () async { @@ -763,7 +768,7 @@ void main() { expect(objectRetainCount(rawDummyObject), 0); }, skip: !canDoGC); - /*test('Blocking block ref counting new thread', () async { + test('Blocking block ref counting new thread', () async { final completer = Completer(); DummyObject? dummyObject = DummyObject.new1(); DartObjectListenerBlock? block = @@ -794,7 +799,7 @@ void main() { expect(blockRetainCount(rawBlock), 0); expect(objectRetainCount(rawDummyObject), 0); - }, skip: !canDoGC);*/ + }, skip: !canDoGC); test('Block trampoline args converted to id', () { final objCBindings = diff --git a/pkgs/objective_c/lib/src/internal.dart b/pkgs/objective_c/lib/src/internal.dart index dcfb52ad4..fd8b61929 100644 --- a/pkgs/objective_c/lib/src/internal.dart +++ b/pkgs/objective_c/lib/src/internal.dart @@ -358,9 +358,7 @@ final _blockClosureDisposer = () { }, 'ObjCBlockClosureDisposer') ..keepIsolateAlive = false; }(); - -/// Only for use by ffigen bindings. -int get blockClosureDisposePort => _blockClosureDisposer.sendPort.nativePort; +typedef DisposeBlockFn = NativeFunction; /// Only for use by ffigen bindings. int registerBlockClosure(Function closure) { @@ -370,28 +368,39 @@ int registerBlockClosure(Function closure) { return _blockClosureRegistryLastId; } -/// Only for use by ffigen bindings. -typedef DisposeBlockFn = NativeFunction; -Pointer get disposeObjCBlockWithClosure => - Native.addressOf(c.disposeObjCBlockWithClosure); - /// Only for use by ffigen bindings. Function getBlockClosure(int id) { assert(_blockClosureRegistry.containsKey(id)); return _blockClosureRegistry[id]!; } +typedef NewClosureBlockFn = BlockPtr Function( + VoidPtr, int, int, Pointer); + +/// Only for use by ffigen bindings. +BlockPtr newClosureBlock( + Function closure, VoidPtr trampoline, NewClosureBlockFn nativeNew) => + nativeNew( + trampoline, + registerBlockClosure(closure), + _blockClosureDisposer.sendPort.nativePort, + Native.addressOf(c.disposeObjCBlockWithClosure), + ); + typedef NewWaiterFn = NativeFunction; typedef AwaitWaiterFn = NativeFunction; -typedef NativeWrapperFn = BlockPtr Function( - BlockPtr, BlockPtr, Pointer, Pointer); +typedef NewBlockingBlockFn = BlockPtr Function(VoidPtr, VoidPtr, int, int, + Pointer, Pointer, Pointer); /// Only for use by ffigen bindings. -BlockPtr wrapBlockingBlock( - NativeWrapperFn nativeWrapper, BlockPtr raw, BlockPtr rawListener) => - nativeWrapper( - raw, - rawListener, +BlockPtr newBlockingBlock(Function closure, VoidPtr trampoline, + VoidPtr listenerTrampoline, NewBlockingBlockFn nativeNew) => + nativeNew( + trampoline, + listenerTrampoline, + registerBlockClosure(closure), + _blockClosureDisposer.sendPort.nativePort, + Native.addressOf(c.disposeObjCBlockWithClosure), Native.addressOf(c.newWaiter), Native.addressOf(c.awaitWaiter), ); diff --git a/pkgs/objective_c/lib/src/objective_c_bindings_generated.dart b/pkgs/objective_c/lib/src/objective_c_bindings_generated.dart index 14cdf0217..f2fbd2a25 100644 --- a/pkgs/objective_c/lib/src/objective_c_bindings_generated.dart +++ b/pkgs/objective_c/lib/src/objective_c_bindings_generated.dart @@ -209,17 +209,154 @@ external ffi.Pointer _ObjectiveCBindings_invokeBlock_ykn0t6( ffi.Pointer arg1, ); +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int64, + ffi.Int64, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64 dispose_port, ffi.Int64 closure_id)>>, + ffi.Pointer Function()>>, + ffi.Pointer< + ffi.NativeFunction)>>)>( + isLeaf: true) +external ffi.Pointer + _ObjectiveCBindings_newBlockingBlock_18d6mda( + ffi.Pointer trampoline, + ffi.Pointer listener_trampoline, + int closure_id, + int dispose_port, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64 dispose_port, ffi.Int64 closure_id)>> + dtor, + ffi.Pointer Function()>> new_waiter, + ffi.Pointer)>> + await_waiter, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int64, + ffi.Int64, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64 dispose_port, ffi.Int64 closure_id)>>, + ffi.Pointer Function()>>, + ffi.Pointer< + ffi.NativeFunction)>>)>( + isLeaf: true) +external ffi.Pointer + _ObjectiveCBindings_newBlockingBlock_1j2nt86( + ffi.Pointer trampoline, + ffi.Pointer listener_trampoline, + int closure_id, + int dispose_port, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64 dispose_port, ffi.Int64 closure_id)>> + dtor, + ffi.Pointer Function()>> new_waiter, + ffi.Pointer)>> + await_waiter, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int64, + ffi.Int64, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64 dispose_port, ffi.Int64 closure_id)>>, + ffi.Pointer Function()>>, + ffi.Pointer< + ffi.NativeFunction)>>)>( + isLeaf: true) +external ffi.Pointer + _ObjectiveCBindings_newBlockingBlock_ovsamd( + ffi.Pointer trampoline, + ffi.Pointer listener_trampoline, + int closure_id, + int dispose_port, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64 dispose_port, ffi.Int64 closure_id)>> + dtor, + ffi.Pointer Function()>> new_waiter, + ffi.Pointer)>> + await_waiter, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int64, + ffi.Int64, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64 dispose_port, ffi.Int64 closure_id)>>, + ffi.Pointer Function()>>, + ffi.Pointer< + ffi.NativeFunction)>>)>( + isLeaf: true) +external ffi.Pointer + _ObjectiveCBindings_newBlockingBlock_wjovn7( + ffi.Pointer trampoline, + ffi.Pointer listener_trampoline, + int closure_id, + int dispose_port, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64 dispose_port, ffi.Int64 closure_id)>> + dtor, + ffi.Pointer Function()>> new_waiter, + ffi.Pointer)>> + await_waiter, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int64, + ffi.Int64, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64 dispose_port, ffi.Int64 closure_id)>>, + ffi.Pointer Function()>>, + ffi.Pointer< + ffi.NativeFunction)>>)>( + isLeaf: true) +external ffi.Pointer + _ObjectiveCBindings_newBlockingBlock_wjvic9( + ffi.Pointer trampoline, + ffi.Pointer listener_trampoline, + int closure_id, + int dispose_port, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64 dispose_port, ffi.Int64 closure_id)>> + dtor, + ffi.Pointer Function()>> new_waiter, + ffi.Pointer)>> + await_waiter, +); + @ffi.Native< ffi.Pointer Function( - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer block, - ffi.Int64 closure_id, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer> arg2, - ffi.UnsignedLong arg3)>>, + ffi.Pointer, ffi.Int64, ffi.Int64, ffi.Pointer< @@ -228,16 +365,7 @@ external ffi.Pointer _ObjectiveCBindings_invokeBlock_ykn0t6( ffi.Int64 closure_id)>>)>(isLeaf: true) external ffi.Pointer _ObjectiveCBindings_newClosureBlock_17ap02x( - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer block, - ffi.Int64 closure_id, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer> arg2, - ffi.UnsignedLong arg3)>> - trampoline, + ffi.Pointer trampoline, int closure_id, int dispose_port, ffi.Pointer< @@ -248,14 +376,7 @@ external ffi.Pointer @ffi.Native< ffi.Pointer Function( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer block, - ffi.Int64 closure_id, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.UnsignedLong arg2)>>, + ffi.Pointer, ffi.Int64, ffi.Int64, ffi.Pointer< @@ -264,15 +385,7 @@ external ffi.Pointer ffi.Int64 closure_id)>>)>(isLeaf: true) external ffi.Pointer _ObjectiveCBindings_newClosureBlock_18d6mda( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer block, - ffi.Int64 closure_id, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.UnsignedLong arg2)>> - trampoline, + ffi.Pointer trampoline, int closure_id, int dispose_port, ffi.Pointer< @@ -283,12 +396,7 @@ external ffi.Pointer @ffi.Native< ffi.Pointer Function( - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer<_NSZone> Function( - ffi.Pointer block, - ffi.Int64 closure_id, - ffi.Pointer arg0)>>, + ffi.Pointer, ffi.Int64, ffi.Int64, ffi.Pointer< @@ -297,13 +405,7 @@ external ffi.Pointer ffi.Int64 closure_id)>>)>(isLeaf: true) external ffi.Pointer _ObjectiveCBindings_newClosureBlock_1a8cl66( - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer<_NSZone> Function( - ffi.Pointer block, - ffi.Int64 closure_id, - ffi.Pointer arg0)>> - trampoline, + ffi.Pointer trampoline, int closure_id, int dispose_port, ffi.Pointer< @@ -314,14 +416,7 @@ external ffi.Pointer @ffi.Native< ffi.Pointer Function( - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer block, - ffi.Int64 closure_id, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>, + ffi.Pointer, ffi.Int64, ffi.Int64, ffi.Pointer< @@ -330,15 +425,7 @@ external ffi.Pointer ffi.Int64 closure_id)>>)>(isLeaf: true) external ffi.Pointer _ObjectiveCBindings_newClosureBlock_1c0c70u( - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer block, - ffi.Int64 closure_id, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>> - trampoline, + ffi.Pointer trampoline, int closure_id, int dispose_port, ffi.Pointer< @@ -349,10 +436,7 @@ external ffi.Pointer @ffi.Native< ffi.Pointer Function( - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer block, - ffi.Int64 closure_id, ffi.Pointer arg0)>>, + ffi.Pointer, ffi.Int64, ffi.Int64, ffi.Pointer< @@ -361,11 +445,7 @@ external ffi.Pointer ffi.Int64 closure_id)>>)>(isLeaf: true) external ffi.Pointer _ObjectiveCBindings_newClosureBlock_1ckyi24( - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer block, - ffi.Int64 closure_id, ffi.Pointer arg0)>> - trampoline, + ffi.Pointer trampoline, int closure_id, int dispose_port, ffi.Pointer< @@ -376,14 +456,7 @@ external ffi.Pointer @ffi.Native< ffi.Pointer Function( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer block, - ffi.Int64 closure_id, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>, + ffi.Pointer, ffi.Int64, ffi.Int64, ffi.Pointer< @@ -392,15 +465,7 @@ external ffi.Pointer ffi.Int64 closure_id)>>)>(isLeaf: true) external ffi.Pointer _ObjectiveCBindings_newClosureBlock_1j2nt86( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer block, - ffi.Int64 closure_id, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>> - trampoline, + ffi.Pointer trampoline, int closure_id, int dispose_port, ffi.Pointer< @@ -411,13 +476,7 @@ external ffi.Pointer @ffi.Native< ffi.Pointer Function( - ffi.Pointer< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer block, - ffi.Int64 closure_id, - ffi.Pointer arg0, - ffi.Pointer arg1)>>, + ffi.Pointer, ffi.Int64, ffi.Int64, ffi.Pointer< @@ -426,14 +485,7 @@ external ffi.Pointer ffi.Int64 closure_id)>>)>(isLeaf: true) external ffi.Pointer _ObjectiveCBindings_newClosureBlock_1m9h2n( - ffi.Pointer< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer block, - ffi.Int64 closure_id, - ffi.Pointer arg0, - ffi.Pointer arg1)>> - trampoline, + ffi.Pointer trampoline, int closure_id, int dispose_port, ffi.Pointer< @@ -444,12 +496,7 @@ external ffi.Pointer @ffi.Native< ffi.Pointer Function( - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer block, - ffi.Int64 closure_id, - ffi.Pointer arg0)>>, + ffi.Pointer, ffi.Int64, ffi.Int64, ffi.Pointer< @@ -458,13 +505,7 @@ external ffi.Pointer ffi.Int64 closure_id)>>)>(isLeaf: true) external ffi.Pointer _ObjectiveCBindings_newClosureBlock_1yesha9( - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer block, - ffi.Int64 closure_id, - ffi.Pointer arg0)>> - trampoline, + ffi.Pointer trampoline, int closure_id, int dispose_port, ffi.Pointer< @@ -475,15 +516,7 @@ external ffi.Pointer @ffi.Native< ffi.Pointer Function( - ffi.Pointer< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer block, - ffi.Int64 closure_id, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer> arg3)>>, + ffi.Pointer, ffi.Int64, ffi.Int64, ffi.Pointer< @@ -492,16 +525,7 @@ external ffi.Pointer ffi.Int64 closure_id)>>)>(isLeaf: true) external ffi.Pointer _ObjectiveCBindings_newClosureBlock_e2pkq8( - ffi.Pointer< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer block, - ffi.Int64 closure_id, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer> arg3)>> - trampoline, + ffi.Pointer trampoline, int closure_id, int dispose_port, ffi.Pointer< @@ -512,10 +536,7 @@ external ffi.Pointer @ffi.Native< ffi.Pointer Function( - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer block, - ffi.Int64 closure_id, ffi.Pointer arg0)>>, + ffi.Pointer, ffi.Int64, ffi.Int64, ffi.Pointer< @@ -524,11 +545,7 @@ external ffi.Pointer ffi.Int64 closure_id)>>)>(isLeaf: true) external ffi.Pointer _ObjectiveCBindings_newClosureBlock_e3qsqz( - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer block, - ffi.Int64 closure_id, ffi.Pointer arg0)>> - trampoline, + ffi.Pointer trampoline, int closure_id, int dispose_port, ffi.Pointer< @@ -539,10 +556,7 @@ external ffi.Pointer @ffi.Native< ffi.Pointer Function( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer block, - ffi.Int64 closure_id, ffi.Pointer arg0)>>, + ffi.Pointer, ffi.Int64, ffi.Int64, ffi.Pointer< @@ -551,11 +565,7 @@ external ffi.Pointer ffi.Int64 closure_id)>>)>(isLeaf: true) external ffi.Pointer _ObjectiveCBindings_newClosureBlock_ovsamd( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer block, - ffi.Int64 closure_id, ffi.Pointer arg0)>> - trampoline, + ffi.Pointer trampoline, int closure_id, int dispose_port, ffi.Pointer< @@ -566,13 +576,7 @@ external ffi.Pointer @ffi.Native< ffi.Pointer Function( - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer block, - ffi.Int64 closure_id, - ffi.Pointer arg0, - ffi.Pointer arg1)>>, + ffi.Pointer, ffi.Int64, ffi.Int64, ffi.Pointer< @@ -581,14 +585,7 @@ external ffi.Pointer ffi.Int64 closure_id)>>)>(isLeaf: true) external ffi.Pointer _ObjectiveCBindings_newClosureBlock_ozkafd( - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer block, - ffi.Int64 closure_id, - ffi.Pointer arg0, - ffi.Pointer arg1)>> - trampoline, + ffi.Pointer trampoline, int closure_id, int dispose_port, ffi.Pointer< @@ -599,15 +596,7 @@ external ffi.Pointer @ffi.Native< ffi.Pointer Function( - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer block, - ffi.Int64 closure_id, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3)>>, + ffi.Pointer, ffi.Int64, ffi.Int64, ffi.Pointer< @@ -616,16 +605,7 @@ external ffi.Pointer ffi.Int64 closure_id)>>)>(isLeaf: true) external ffi.Pointer _ObjectiveCBindings_newClosureBlock_u8b97m( - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer block, - ffi.Int64 closure_id, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3)>> - trampoline, + ffi.Pointer trampoline, int closure_id, int dispose_port, ffi.Pointer< @@ -636,13 +616,7 @@ external ffi.Pointer @ffi.Native< ffi.Pointer Function( - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer block, - ffi.Int64 closure_id, - ffi.Pointer arg0, - ffi.Pointer arg1)>>, + ffi.Pointer, ffi.Int64, ffi.Int64, ffi.Pointer< @@ -651,14 +625,7 @@ external ffi.Pointer ffi.Int64 closure_id)>>)>(isLeaf: true) external ffi.Pointer _ObjectiveCBindings_newClosureBlock_w1e3k0( - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer block, - ffi.Int64 closure_id, - ffi.Pointer arg0, - ffi.Pointer arg1)>> - trampoline, + ffi.Pointer trampoline, int closure_id, int dispose_port, ffi.Pointer< @@ -669,13 +636,7 @@ external ffi.Pointer @ffi.Native< ffi.Pointer Function( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer block, - ffi.Int64 closure_id, - ffi.Pointer arg0, - ffi.Pointer arg1)>>, + ffi.Pointer, ffi.Int64, ffi.Int64, ffi.Pointer< @@ -684,14 +645,7 @@ external ffi.Pointer ffi.Int64 closure_id)>>)>(isLeaf: true) external ffi.Pointer _ObjectiveCBindings_newClosureBlock_wjovn7( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer block, - ffi.Int64 closure_id, - ffi.Pointer arg0, - ffi.Pointer arg1)>> - trampoline, + ffi.Pointer trampoline, int closure_id, int dispose_port, ffi.Pointer< @@ -702,13 +656,7 @@ external ffi.Pointer @ffi.Native< ffi.Pointer Function( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer block, - ffi.Int64 closure_id, - ffi.Pointer arg0, - ffi.Pointer arg1)>>, + ffi.Pointer, ffi.Int64, ffi.Int64, ffi.Pointer< @@ -717,14 +665,7 @@ external ffi.Pointer ffi.Int64 closure_id)>>)>(isLeaf: true) external ffi.Pointer _ObjectiveCBindings_newClosureBlock_wjvic9( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer block, - ffi.Int64 closure_id, - ffi.Pointer arg0, - ffi.Pointer arg1)>> - trampoline, + ffi.Pointer trampoline, int closure_id, int dispose_port, ffi.Pointer< @@ -735,13 +676,7 @@ external ffi.Pointer @ffi.Native< ffi.Pointer Function( - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer block, - ffi.Int64 closure_id, - ffi.Pointer arg0, - ffi.Pointer arg1)>>, + ffi.Pointer, ffi.Int64, ffi.Int64, ffi.Pointer< @@ -750,14 +685,7 @@ external ffi.Pointer ffi.Int64 closure_id)>>)>(isLeaf: true) external ffi.Pointer _ObjectiveCBindings_newClosureBlock_ykn0t6( - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer block, - ffi.Int64 closure_id, - ffi.Pointer arg0, - ffi.Pointer arg1)>> - trampoline, + ffi.Pointer trampoline, int closure_id, int dispose_port, ffi.Pointer< @@ -766,129 +694,104 @@ external ffi.Pointer dtor, ); -@ffi.Native< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer Function()>>, - ffi.Pointer< - ffi.NativeFunction)>>)>( - isLeaf: true) -external ffi.Pointer - _ObjectiveCBindings_wrapBlockingBlock_18d6mda( - ffi.Pointer block, - ffi.Pointer listnerBlock, - ffi.Pointer Function()>> newWaiter, - ffi.Pointer)>> - awaitWaiter, -); - -@ffi.Native< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer Function()>>, - ffi.Pointer< - ffi.NativeFunction)>>)>( - isLeaf: true) -external ffi.Pointer - _ObjectiveCBindings_wrapBlockingBlock_1j2nt86( - ffi.Pointer block, - ffi.Pointer listnerBlock, - ffi.Pointer Function()>> newWaiter, - ffi.Pointer)>> - awaitWaiter, -); - -@ffi.Native< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer Function()>>, - ffi.Pointer< - ffi.NativeFunction)>>)>( - isLeaf: true) -external ffi.Pointer - _ObjectiveCBindings_wrapBlockingBlock_ovsamd( - ffi.Pointer block, - ffi.Pointer listnerBlock, - ffi.Pointer Function()>> newWaiter, - ffi.Pointer)>> - awaitWaiter, -); - -@ffi.Native< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer Function()>>, - ffi.Pointer< - ffi.NativeFunction)>>)>( - isLeaf: true) -external ffi.Pointer - _ObjectiveCBindings_wrapBlockingBlock_wjovn7( - ffi.Pointer block, - ffi.Pointer listnerBlock, - ffi.Pointer Function()>> newWaiter, - ffi.Pointer)>> - awaitWaiter, -); - -@ffi.Native< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer Function()>>, - ffi.Pointer< - ffi.NativeFunction)>>)>( - isLeaf: true) -external ffi.Pointer - _ObjectiveCBindings_wrapBlockingBlock_wjvic9( - ffi.Pointer block, - ffi.Pointer listnerBlock, - ffi.Pointer Function()>> newWaiter, - ffi.Pointer)>> - awaitWaiter, -); - @ffi.Native< ffi.Pointer Function( - ffi.Pointer)>(isLeaf: true) + ffi.Pointer, + ffi.Int64, + ffi.Int64, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64 dispose_port, + ffi.Int64 closure_id)>>)>(isLeaf: true) external ffi.Pointer - _ObjectiveCBindings_wrapListenerBlock_18d6mda( - ffi.Pointer block, + _ObjectiveCBindings_newListenerBlock_18d6mda( + ffi.Pointer trampoline, + int closure_id, + int dispose_port, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64 dispose_port, ffi.Int64 closure_id)>> + dtor, ); @ffi.Native< ffi.Pointer Function( - ffi.Pointer)>(isLeaf: true) + ffi.Pointer, + ffi.Int64, + ffi.Int64, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64 dispose_port, + ffi.Int64 closure_id)>>)>(isLeaf: true) external ffi.Pointer - _ObjectiveCBindings_wrapListenerBlock_1j2nt86( - ffi.Pointer block, + _ObjectiveCBindings_newListenerBlock_1j2nt86( + ffi.Pointer trampoline, + int closure_id, + int dispose_port, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64 dispose_port, ffi.Int64 closure_id)>> + dtor, ); @ffi.Native< ffi.Pointer Function( - ffi.Pointer)>(isLeaf: true) + ffi.Pointer, + ffi.Int64, + ffi.Int64, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64 dispose_port, + ffi.Int64 closure_id)>>)>(isLeaf: true) external ffi.Pointer - _ObjectiveCBindings_wrapListenerBlock_ovsamd( - ffi.Pointer block, + _ObjectiveCBindings_newListenerBlock_ovsamd( + ffi.Pointer trampoline, + int closure_id, + int dispose_port, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64 dispose_port, ffi.Int64 closure_id)>> + dtor, ); @ffi.Native< ffi.Pointer Function( - ffi.Pointer)>(isLeaf: true) + ffi.Pointer, + ffi.Int64, + ffi.Int64, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64 dispose_port, + ffi.Int64 closure_id)>>)>(isLeaf: true) external ffi.Pointer - _ObjectiveCBindings_wrapListenerBlock_wjovn7( - ffi.Pointer block, + _ObjectiveCBindings_newListenerBlock_wjovn7( + ffi.Pointer trampoline, + int closure_id, + int dispose_port, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64 dispose_port, ffi.Int64 closure_id)>> + dtor, ); @ffi.Native< ffi.Pointer Function( - ffi.Pointer)>(isLeaf: true) + ffi.Pointer, + ffi.Int64, + ffi.Int64, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64 dispose_port, + ffi.Int64 closure_id)>>)>(isLeaf: true) external ffi.Pointer - _ObjectiveCBindings_wrapListenerBlock_wjvic9( - ffi.Pointer block, + _ObjectiveCBindings_newListenerBlock_wjvic9( + ffi.Pointer trampoline, + int closure_id, + int dispose_port, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64 dispose_port, ffi.Int64 closure_id)>> + dtor, ); /// Helper class to adapt a Dart stream into a `NSInputStream`. @@ -9405,12 +9308,11 @@ abstract final class ObjCBlock_NSString_ffiVoid { static objc.ObjCBlock)> fromFunction( NSString Function(ffi.Pointer) fn) => objc.ObjCBlock)>( - _ObjectiveCBindings_newClosureBlock_1yesha9( - _ObjCBlock_NSString_ffiVoid_closureCallable, - objc.registerBlockClosure((ffi.Pointer arg0) => - fn(arg0).ref.retainAndAutorelease()), - objc.blockClosureDisposePort, - objc.disposeObjCBlockWithClosure), + objc.newClosureBlock( + (ffi.Pointer arg0) => + fn(arg0).ref.retainAndAutorelease(), + _ObjCBlock_NSString_ffiVoid_closureCallable.cast(), + _ObjectiveCBindings_newClosureBlock_1yesha9), retain: false, release: true); } @@ -9476,12 +9378,10 @@ abstract final class ObjCBlock_NSUInteger_ffiVoid { static objc.ObjCBlock)> fromFunction(int Function(ffi.Pointer) fn) => objc.ObjCBlock)>( - _ObjectiveCBindings_newClosureBlock_1ckyi24( - _ObjCBlock_NSUInteger_ffiVoid_closureCallable, - objc.registerBlockClosure( - (ffi.Pointer arg0) => fn(arg0)), - objc.blockClosureDisposePort, - objc.disposeObjCBlockWithClosure), + objc.newClosureBlock( + (ffi.Pointer arg0) => fn(arg0), + _ObjCBlock_NSUInteger_ffiVoid_closureCallable.cast(), + _ObjectiveCBindings_newClosureBlock_1ckyi24), retain: false, release: true); } @@ -9580,20 +9480,20 @@ abstract final class ObjCBlock_NSUInteger_ffiVoid_NSFastEnumerationState_objcObj /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock, ffi.Pointer, ffi.Pointer>, ffi.UnsignedLong)> - fromFunction(int Function(ffi.Pointer, ffi.Pointer, ffi.Pointer>, int) fn) => - objc.ObjCBlock, ffi.Pointer, ffi.Pointer>, ffi.UnsignedLong)>( - _ObjectiveCBindings_newClosureBlock_17ap02x( - _ObjCBlock_NSUInteger_ffiVoid_NSFastEnumerationState_objcObjCObject_NSUInteger_closureCallable, - objc.registerBlockClosure((ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer> arg2, - int arg3) => - fn(arg0, arg1, arg2, arg3)), - objc.blockClosureDisposePort, - objc.disposeObjCBlockWithClosure), - retain: false, - release: true); + static objc.ObjCBlock< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.UnsignedLong)> fromFunction(int Function(ffi.Pointer, ffi.Pointer, ffi.Pointer>, int) fn) => + objc.ObjCBlock, ffi.Pointer, ffi.Pointer>, ffi.UnsignedLong)>( + objc.newClosureBlock( + (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer> arg2, int arg3) => + fn(arg0, arg1, arg2, arg3), + _ObjCBlock_NSUInteger_ffiVoid_NSFastEnumerationState_objcObjCObject_NSUInteger_closureCallable.cast(), + _ObjectiveCBindings_newClosureBlock_17ap02x), + retain: false, + release: true); } /// Call operator for `objc.ObjCBlock, ffi.Pointer, ffi.Pointer>, ffi.UnsignedLong)>`. @@ -9661,12 +9561,10 @@ abstract final class ObjCBlock_NSZone_ffiVoid { static objc.ObjCBlock Function(ffi.Pointer)> fromFunction(ffi.Pointer<_NSZone> Function(ffi.Pointer) fn) => objc.ObjCBlock Function(ffi.Pointer)>( - _ObjectiveCBindings_newClosureBlock_1a8cl66( - _ObjCBlock_NSZone_ffiVoid_closureCallable, - objc.registerBlockClosure( - (ffi.Pointer arg0) => fn(arg0)), - objc.blockClosureDisposePort, - objc.disposeObjCBlockWithClosure), + objc.newClosureBlock( + (ffi.Pointer arg0) => fn(arg0), + _ObjCBlock_NSZone_ffiVoid_closureCallable.cast(), + _ObjectiveCBindings_newClosureBlock_1a8cl66), retain: false, release: true); } @@ -9727,12 +9625,10 @@ abstract final class ObjCBlock_bool_ffiVoid { static objc.ObjCBlock)> fromFunction( bool Function(ffi.Pointer) fn) => objc.ObjCBlock)>( - _ObjectiveCBindings_newClosureBlock_e3qsqz( - _ObjCBlock_bool_ffiVoid_closureCallable, - objc.registerBlockClosure( - (ffi.Pointer arg0) => fn(arg0)), - objc.blockClosureDisposePort, - objc.disposeObjCBlockWithClosure), + objc.newClosureBlock( + (ffi.Pointer arg0) => fn(arg0), + _ObjCBlock_bool_ffiVoid_closureCallable.cast(), + _ObjectiveCBindings_newClosureBlock_e3qsqz), retain: false, release: true); } @@ -9801,13 +9697,14 @@ abstract final class ObjCBlock_bool_ffiVoid_Protocol { static objc.ObjCBlock, Protocol)> fromFunction(bool Function(ffi.Pointer, Protocol) fn) => objc.ObjCBlock, Protocol)>( - _ObjectiveCBindings_newClosureBlock_ozkafd( - _ObjCBlock_bool_ffiVoid_Protocol_closureCallable, - objc.registerBlockClosure((ffi.Pointer arg0, - ffi.Pointer arg1) => - fn(arg0, Protocol.castFromPointer(arg1, retain: true, release: true))), - objc.blockClosureDisposePort, - objc.disposeObjCBlockWithClosure), + objc.newClosureBlock( + (ffi.Pointer arg0, ffi.Pointer arg1) => + fn( + arg0, + Protocol.castFromPointer(arg1, + retain: true, release: true)), + _ObjCBlock_bool_ffiVoid_Protocol_closureCallable.cast(), + _ObjectiveCBindings_newClosureBlock_ozkafd), retain: false, release: true); } @@ -9882,14 +9779,14 @@ abstract final class ObjCBlock_bool_ffiVoid_objcObjCObject { static objc.ObjCBlock, ffi.Pointer)> fromFunction( bool Function(ffi.Pointer, objc.ObjCObjectBase) fn) => - objc.ObjCBlock, ffi.Pointer)>( - _ObjectiveCBindings_newClosureBlock_ozkafd( - _ObjCBlock_bool_ffiVoid_objcObjCObject_closureCallable, - objc.registerBlockClosure((ffi.Pointer arg0, - ffi.Pointer arg1) => - fn(arg0, objc.ObjCObjectBase(arg1, retain: true, release: true))), - objc.blockClosureDisposePort, - objc.disposeObjCBlockWithClosure), + objc.ObjCBlock< + ffi.Bool Function( + ffi.Pointer, ffi.Pointer)>( + objc.newClosureBlock( + (ffi.Pointer arg0, ffi.Pointer arg1) => + fn(arg0, objc.ObjCObjectBase(arg1, retain: true, release: true)), + _ObjCBlock_bool_ffiVoid_objcObjCObject_closureCallable.cast(), + _ObjectiveCBindings_newClosureBlock_ozkafd), retain: false, release: true); } @@ -9962,16 +9859,17 @@ abstract final class ObjCBlock_bool_ffiVoid_objcObjCSelector { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock, ffi.Pointer)> + static objc + .ObjCBlock, ffi.Pointer)> fromFunction(bool Function(ffi.Pointer, ffi.Pointer) fn) => - objc.ObjCBlock, ffi.Pointer)>( - _ObjectiveCBindings_newClosureBlock_w1e3k0( - _ObjCBlock_bool_ffiVoid_objcObjCSelector_closureCallable, - objc.registerBlockClosure((ffi.Pointer arg0, - ffi.Pointer arg1) => - fn(arg0, arg1)), - objc.blockClosureDisposePort, - objc.disposeObjCBlockWithClosure), + objc.ObjCBlock< + ffi.Bool Function( + ffi.Pointer, ffi.Pointer)>( + objc.newClosureBlock( + (ffi.Pointer arg0, ffi.Pointer arg1) => + fn(arg0, arg1), + _ObjCBlock_bool_ffiVoid_objcObjCSelector_closureCallable.cast(), + _ObjectiveCBindings_newClosureBlock_w1e3k0), retain: false, release: true); } @@ -10156,14 +10054,16 @@ abstract final class ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCO static objc.ObjCBlock?, NSError)>, ffi.Pointer, NSDictionary)> fromFunction(void Function(objc.ObjCBlock?, NSError)>, objc.ObjCObjectBase, NSDictionary) fn) => objc.ObjCBlock?, NSError)>, ffi.Pointer, NSDictionary)>( - _ObjectiveCBindings_newClosureBlock_1j2nt86( - _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObject_NSDictionary_closureCallable, - objc.registerBlockClosure((ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => fn( - ObjCBlock_ffiVoid_objcObjCObject_NSError.castFromPointer(arg0, retain: true, release: true), - objc.ObjCObjectBase(arg1, retain: true, release: true), - NSDictionary.castFromPointer(arg2, retain: true, release: true))), - objc.blockClosureDisposePort, - objc.disposeObjCBlockWithClosure), + objc.newClosureBlock( + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + fn( + ObjCBlock_ffiVoid_objcObjCObject_NSError.castFromPointer(arg0, retain: true, release: true), + objc.ObjCObjectBase(arg1, retain: true, release: true), + NSDictionary.castFromPointer(arg2, retain: true, release: true)), + _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObject_NSDictionary_closureCallable.cast(), + _ObjectiveCBindings_newClosureBlock_1j2nt86), retain: false, release: true); @@ -10176,42 +10076,21 @@ abstract final class ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCO /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - static objc.ObjCBlock< - ffi.Void Function( - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError)>, - ffi.Pointer, - NSDictionary)> listener( - void Function( - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError)>, - objc.ObjCObjectBase, - NSDictionary) - fn) { - final raw = _ObjectiveCBindings_newClosureBlock_1j2nt86( - _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObject_NSDictionary_listenerCallable - .nativeFunction - .cast(), - objc.registerBlockClosure((ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - fn( - ObjCBlock_ffiVoid_objcObjCObject_NSError.castFromPointer(arg0, - retain: false, release: true), - objc.ObjCObjectBase(arg1, retain: false, release: true), - NSDictionary.castFromPointer(arg2, - retain: false, release: true))), - objc.blockClosureDisposePort, - objc.disposeObjCBlockWithClosure); - final wrapper = _ObjectiveCBindings_wrapListenerBlock_1j2nt86(raw); - objc.objectRelease(raw.cast()); - return objc.ObjCBlock< - ffi.Void Function( - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError)>, - ffi.Pointer, - NSDictionary)>(wrapper, retain: false, release: true); - } + static objc.ObjCBlock?, NSError)>, ffi.Pointer, NSDictionary)> + listener(void Function(objc.ObjCBlock?, NSError)>, objc.ObjCObjectBase, NSDictionary) fn) => + objc.ObjCBlock?, NSError)>, ffi.Pointer, NSDictionary)>( + objc.newClosureBlock( + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + fn( + ObjCBlock_ffiVoid_objcObjCObject_NSError.castFromPointer(arg0, retain: false, release: true), + objc.ObjCObjectBase(arg1, retain: false, release: true), + NSDictionary.castFromPointer(arg2, retain: false, release: true)), + _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObject_NSDictionary_listenerCallable.nativeFunction.cast(), + _ObjectiveCBindings_newListenerBlock_1j2nt86), + retain: false, + release: true); /// Creates a blocking block from a Dart function. /// @@ -10222,59 +10101,22 @@ abstract final class ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCO /// This block does not keep the owner isolate alive. If the owner isolate has /// shut down, and the block is invoked by native code, it may block /// indefinitely, or have other undefined behavior. - static objc.ObjCBlock< - ffi.Void Function( - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError)>, - ffi.Pointer, - NSDictionary)> blocking( - void Function( - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError)>, - objc.ObjCObjectBase, - NSDictionary) - fn) { - final raw = _ObjectiveCBindings_newClosureBlock_1j2nt86( - _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObject_NSDictionary_blockingCallable - .nativeFunction - .cast(), - objc.registerBlockClosure((ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - fn( - ObjCBlock_ffiVoid_objcObjCObject_NSError.castFromPointer(arg0, - retain: false, release: true), - objc.ObjCObjectBase(arg1, retain: false, release: true), - NSDictionary.castFromPointer(arg2, - retain: false, release: true))), - objc.blockClosureDisposePort, - objc.disposeObjCBlockWithClosure); - final rawListener = _ObjectiveCBindings_newClosureBlock_1j2nt86( - _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObject_NSDictionary_blockingListenerCallable - .nativeFunction - .cast(), - objc.registerBlockClosure((ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - fn( - ObjCBlock_ffiVoid_objcObjCObject_NSError.castFromPointer(arg0, - retain: false, release: true), - objc.ObjCObjectBase(arg1, retain: false, release: true), - NSDictionary.castFromPointer(arg2, - retain: false, release: true))), - objc.blockClosureDisposePort, - objc.disposeObjCBlockWithClosure); - final wrapper = objc.wrapBlockingBlock( - _ObjectiveCBindings_wrapBlockingBlock_1j2nt86, raw, rawListener); - objc.objectRelease(raw.cast()); - objc.objectRelease(rawListener.cast()); - return objc.ObjCBlock< - ffi.Void Function( - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError)>, - ffi.Pointer, - NSDictionary)>(wrapper, retain: false, release: true); - } + static objc.ObjCBlock?, NSError)>, ffi.Pointer, NSDictionary)> + blocking(void Function(objc.ObjCBlock?, NSError)>, objc.ObjCObjectBase, NSDictionary) fn) => + objc.ObjCBlock?, NSError)>, ffi.Pointer, NSDictionary)>( + objc.newBlockingBlock( + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + fn( + ObjCBlock_ffiVoid_objcObjCObject_NSError.castFromPointer(arg0, retain: false, release: true), + objc.ObjCObjectBase(arg1, retain: false, release: true), + NSDictionary.castFromPointer(arg2, retain: false, release: true)), + _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObject_NSDictionary_blockingCallable.nativeFunction.cast(), + _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObject_NSDictionary_blockingListenerCallable.nativeFunction.cast(), + _ObjectiveCBindings_newBlockingBlock_1j2nt86), + retain: false, + release: true); } /// Call operator for `objc.ObjCBlock?, NSError)>, ffi.Pointer, NSDictionary)>`. @@ -10391,12 +10233,10 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid { static objc.ObjCBlock)> fromFunction( void Function(ffi.Pointer) fn) => objc.ObjCBlock)>( - _ObjectiveCBindings_newClosureBlock_ovsamd( - _ObjCBlock_ffiVoid_ffiVoid_closureCallable, - objc.registerBlockClosure( - (ffi.Pointer arg0) => fn(arg0)), - objc.blockClosureDisposePort, - objc.disposeObjCBlockWithClosure), + objc.newClosureBlock( + (ffi.Pointer arg0) => fn(arg0), + _ObjCBlock_ffiVoid_ffiVoid_closureCallable.cast(), + _ObjectiveCBindings_newClosureBlock_ovsamd), retain: false, release: true); @@ -10410,17 +10250,14 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid { /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. static objc.ObjCBlock)> listener( - void Function(ffi.Pointer) fn) { - final raw = _ObjectiveCBindings_newClosureBlock_ovsamd( - _ObjCBlock_ffiVoid_ffiVoid_listenerCallable.nativeFunction.cast(), - objc.registerBlockClosure((ffi.Pointer arg0) => fn(arg0)), - objc.blockClosureDisposePort, - objc.disposeObjCBlockWithClosure); - final wrapper = _ObjectiveCBindings_wrapListenerBlock_ovsamd(raw); - objc.objectRelease(raw.cast()); - return objc.ObjCBlock)>(wrapper, - retain: false, release: true); - } + void Function(ffi.Pointer) fn) => + objc.ObjCBlock)>( + objc.newClosureBlock( + (ffi.Pointer arg0) => fn(arg0), + _ObjCBlock_ffiVoid_ffiVoid_listenerCallable.nativeFunction.cast(), + _ObjectiveCBindings_newListenerBlock_ovsamd), + retain: false, + release: true); /// Creates a blocking block from a Dart function. /// @@ -10432,25 +10269,16 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid { /// shut down, and the block is invoked by native code, it may block /// indefinitely, or have other undefined behavior. static objc.ObjCBlock)> blocking( - void Function(ffi.Pointer) fn) { - final raw = _ObjectiveCBindings_newClosureBlock_ovsamd( - _ObjCBlock_ffiVoid_ffiVoid_blockingCallable.nativeFunction.cast(), - objc.registerBlockClosure((ffi.Pointer arg0) => fn(arg0)), - objc.blockClosureDisposePort, - objc.disposeObjCBlockWithClosure); - final rawListener = _ObjectiveCBindings_newClosureBlock_ovsamd( - _ObjCBlock_ffiVoid_ffiVoid_blockingListenerCallable.nativeFunction - .cast(), - objc.registerBlockClosure((ffi.Pointer arg0) => fn(arg0)), - objc.blockClosureDisposePort, - objc.disposeObjCBlockWithClosure); - final wrapper = objc.wrapBlockingBlock( - _ObjectiveCBindings_wrapBlockingBlock_ovsamd, raw, rawListener); - objc.objectRelease(raw.cast()); - objc.objectRelease(rawListener.cast()); - return objc.ObjCBlock)>(wrapper, - retain: false, release: true); - } + void Function(ffi.Pointer) fn) => + objc.ObjCBlock)>( + objc.newBlockingBlock( + (ffi.Pointer arg0) => fn(arg0), + _ObjCBlock_ffiVoid_ffiVoid_blockingCallable.nativeFunction.cast(), + _ObjCBlock_ffiVoid_ffiVoid_blockingListenerCallable.nativeFunction + .cast(), + _ObjectiveCBindings_newBlockingBlock_ovsamd), + retain: false, + release: true); } /// Call operator for `objc.ObjCBlock)>`. @@ -10585,13 +10413,13 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSCoder { static objc.ObjCBlock, NSCoder)> fromFunction(void Function(ffi.Pointer, NSCoder) fn) => objc.ObjCBlock, NSCoder)>( - _ObjectiveCBindings_newClosureBlock_wjovn7( - _ObjCBlock_ffiVoid_ffiVoid_NSCoder_closureCallable, - objc.registerBlockClosure((ffi.Pointer arg0, + objc.newClosureBlock( + (ffi.Pointer arg0, ffi.Pointer arg1) => - fn(arg0, NSCoder.castFromPointer(arg1, retain: true, release: true))), - objc.blockClosureDisposePort, - objc.disposeObjCBlockWithClosure), + fn(arg0, + NSCoder.castFromPointer(arg1, retain: true, release: true)), + _ObjCBlock_ffiVoid_ffiVoid_NSCoder_closureCallable.cast(), + _ObjectiveCBindings_newClosureBlock_wjovn7), retain: false, release: true); @@ -10604,24 +10432,18 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSCoder { /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - static objc.ObjCBlock, NSCoder)> - listener(void Function(ffi.Pointer, NSCoder) fn) { - final raw = _ObjectiveCBindings_newClosureBlock_wjovn7( - _ObjCBlock_ffiVoid_ffiVoid_NSCoder_listenerCallable.nativeFunction - .cast(), - objc.registerBlockClosure((ffi.Pointer arg0, - ffi.Pointer arg1) => - fn(arg0, - NSCoder.castFromPointer(arg1, retain: false, release: true))), - objc.blockClosureDisposePort, - objc.disposeObjCBlockWithClosure); - final wrapper = _ObjectiveCBindings_wrapListenerBlock_wjovn7(raw); - objc.objectRelease(raw.cast()); - return objc.ObjCBlock, NSCoder)>( - wrapper, - retain: false, - release: true); - } + static objc.ObjCBlock, NSCoder)> listener( + void Function(ffi.Pointer, NSCoder) fn) => + objc.ObjCBlock, NSCoder)>( + objc.newClosureBlock( + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + arg0, + NSCoder.castFromPointer(arg1, retain: false, release: true)), + _ObjCBlock_ffiVoid_ffiVoid_NSCoder_listenerCallable.nativeFunction + .cast(), + _ObjectiveCBindings_newListenerBlock_wjovn7), + retain: false, + release: true); /// Creates a blocking block from a Dart function. /// @@ -10632,36 +10454,21 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSCoder { /// This block does not keep the owner isolate alive. If the owner isolate has /// shut down, and the block is invoked by native code, it may block /// indefinitely, or have other undefined behavior. - static objc.ObjCBlock, NSCoder)> - blocking(void Function(ffi.Pointer, NSCoder) fn) { - final raw = _ObjectiveCBindings_newClosureBlock_wjovn7( - _ObjCBlock_ffiVoid_ffiVoid_NSCoder_blockingCallable.nativeFunction - .cast(), - objc.registerBlockClosure((ffi.Pointer arg0, - ffi.Pointer arg1) => - fn(arg0, - NSCoder.castFromPointer(arg1, retain: false, release: true))), - objc.blockClosureDisposePort, - objc.disposeObjCBlockWithClosure); - final rawListener = _ObjectiveCBindings_newClosureBlock_wjovn7( - _ObjCBlock_ffiVoid_ffiVoid_NSCoder_blockingListenerCallable - .nativeFunction - .cast(), - objc.registerBlockClosure((ffi.Pointer arg0, - ffi.Pointer arg1) => - fn(arg0, - NSCoder.castFromPointer(arg1, retain: false, release: true))), - objc.blockClosureDisposePort, - objc.disposeObjCBlockWithClosure); - final wrapper = objc.wrapBlockingBlock( - _ObjectiveCBindings_wrapBlockingBlock_wjovn7, raw, rawListener); - objc.objectRelease(raw.cast()); - objc.objectRelease(rawListener.cast()); - return objc.ObjCBlock, NSCoder)>( - wrapper, - retain: false, - release: true); - } + static objc.ObjCBlock, NSCoder)> blocking( + void Function(ffi.Pointer, NSCoder) fn) => + objc.ObjCBlock, NSCoder)>( + objc.newBlockingBlock( + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + arg0, + NSCoder.castFromPointer(arg1, retain: false, release: true)), + _ObjCBlock_ffiVoid_ffiVoid_NSCoder_blockingCallable.nativeFunction + .cast(), + _ObjCBlock_ffiVoid_ffiVoid_NSCoder_blockingListenerCallable + .nativeFunction + .cast(), + _ObjectiveCBindings_newBlockingBlock_wjovn7), + retain: false, + release: true); } /// Call operator for `objc.ObjCBlock, NSCoder)>`. @@ -10825,13 +10632,15 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent { static objc.ObjCBlock, NSStream, ffi.UnsignedLong)> fromFunction( void Function(ffi.Pointer, NSStream, NSStreamEvent) fn) => objc.ObjCBlock, NSStream, ffi.UnsignedLong)>( - _ObjectiveCBindings_newClosureBlock_18d6mda( - _ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent_closureCallable, - objc.registerBlockClosure((ffi.Pointer arg0, - ffi.Pointer arg1, int arg2) => - fn(arg0, NSStream.castFromPointer(arg1, retain: true, release: true), NSStreamEvent.fromValue(arg2))), - objc.blockClosureDisposePort, - objc.disposeObjCBlockWithClosure), + objc.newClosureBlock( + (ffi.Pointer arg0, ffi.Pointer arg1, + int arg2) => + fn( + arg0, + NSStream.castFromPointer(arg1, retain: true, release: true), + NSStreamEvent.fromValue(arg2)), + _ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent_closureCallable.cast(), + _ObjectiveCBindings_newClosureBlock_18d6mda), retain: false, release: true); @@ -10844,28 +10653,20 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent { /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSStream, ffi.UnsignedLong)> - listener( - void Function(ffi.Pointer, NSStream, NSStreamEvent) fn) { - final raw = _ObjectiveCBindings_newClosureBlock_18d6mda( - _ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent_listenerCallable - .nativeFunction - .cast(), - objc.registerBlockClosure((ffi.Pointer arg0, - ffi.Pointer arg1, int arg2) => - fn( - arg0, - NSStream.castFromPointer(arg1, retain: false, release: true), - NSStreamEvent.fromValue(arg2))), - objc.blockClosureDisposePort, - objc.disposeObjCBlockWithClosure); - final wrapper = _ObjectiveCBindings_wrapListenerBlock_18d6mda(raw); - objc.objectRelease(raw.cast()); - return objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSStream, - ffi.UnsignedLong)>(wrapper, retain: false, release: true); - } + static objc.ObjCBlock, NSStream, ffi.UnsignedLong)> listener( + void Function(ffi.Pointer, NSStream, NSStreamEvent) fn) => + objc.ObjCBlock, NSStream, ffi.UnsignedLong)>( + objc.newClosureBlock( + (ffi.Pointer arg0, ffi.Pointer arg1, int arg2) => fn( + arg0, + NSStream.castFromPointer(arg1, retain: false, release: true), + NSStreamEvent.fromValue(arg2)), + _ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent_listenerCallable + .nativeFunction + .cast(), + _ObjectiveCBindings_newListenerBlock_18d6mda), + retain: false, + release: true); /// Creates a blocking block from a Dart function. /// @@ -10876,42 +10677,21 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent { /// This block does not keep the owner isolate alive. If the owner isolate has /// shut down, and the block is invoked by native code, it may block /// indefinitely, or have other undefined behavior. - static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSStream, ffi.UnsignedLong)> - blocking( - void Function(ffi.Pointer, NSStream, NSStreamEvent) fn) { - final raw = _ObjectiveCBindings_newClosureBlock_18d6mda( - _ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent_blockingCallable - .nativeFunction - .cast(), - objc.registerBlockClosure((ffi.Pointer arg0, - ffi.Pointer arg1, int arg2) => - fn( - arg0, - NSStream.castFromPointer(arg1, retain: false, release: true), - NSStreamEvent.fromValue(arg2))), - objc.blockClosureDisposePort, - objc.disposeObjCBlockWithClosure); - final rawListener = _ObjectiveCBindings_newClosureBlock_18d6mda( - _ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent_blockingListenerCallable - .nativeFunction - .cast(), - objc.registerBlockClosure((ffi.Pointer arg0, - ffi.Pointer arg1, int arg2) => - fn( - arg0, - NSStream.castFromPointer(arg1, retain: false, release: true), - NSStreamEvent.fromValue(arg2))), - objc.blockClosureDisposePort, - objc.disposeObjCBlockWithClosure); - final wrapper = objc.wrapBlockingBlock( - _ObjectiveCBindings_wrapBlockingBlock_18d6mda, raw, rawListener); - objc.objectRelease(raw.cast()); - objc.objectRelease(rawListener.cast()); - return objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSStream, - ffi.UnsignedLong)>(wrapper, retain: false, release: true); - } + static objc.ObjCBlock, NSStream, ffi.UnsignedLong)> blocking( + void Function(ffi.Pointer, NSStream, NSStreamEvent) fn) => + objc.ObjCBlock, NSStream, ffi.UnsignedLong)>( + objc.newBlockingBlock( + (ffi.Pointer arg0, ffi.Pointer arg1, int arg2) => fn( + arg0, + NSStream.castFromPointer(arg1, retain: false, release: true), + NSStreamEvent.fromValue(arg2)), + _ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent_blockingCallable + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent_blockingListenerCallable.nativeFunction.cast(), + _ObjectiveCBindings_newBlockingBlock_18d6mda), + retain: false, + release: true); } /// Call operator for `objc.ObjCBlock, NSStream, ffi.UnsignedLong)>`. @@ -11055,15 +10835,16 @@ abstract final class ObjCBlock_ffiVoid_objcObjCObject_NSError { static objc.ObjCBlock?, NSError)> fromFunction( void Function(objc.ObjCObjectBase?, NSError) fn) => objc.ObjCBlock?, NSError)>( - _ObjectiveCBindings_newClosureBlock_wjvic9( - _ObjCBlock_ffiVoid_objcObjCObject_NSError_closureCallable, - objc.registerBlockClosure((ffi.Pointer arg0, ffi.Pointer arg1) => fn( - arg0.address == 0 - ? null - : objc.ObjCObjectBase(arg0, retain: true, release: true), - NSError.castFromPointer(arg1, retain: true, release: true))), - objc.blockClosureDisposePort, - objc.disposeObjCBlockWithClosure), + objc.newClosureBlock( + (ffi.Pointer arg0, + ffi.Pointer arg1) => + fn( + arg0.address == 0 + ? null + : objc.ObjCObjectBase(arg0, retain: true, release: true), + NSError.castFromPointer(arg1, retain: true, release: true)), + _ObjCBlock_ffiVoid_objcObjCObject_NSError_closureCallable.cast(), + _ObjectiveCBindings_newClosureBlock_wjvic9), retain: false, release: true); @@ -11076,28 +10857,21 @@ abstract final class ObjCBlock_ffiVoid_objcObjCObject_NSError { /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - static objc - .ObjCBlock?, NSError)> - listener(void Function(objc.ObjCObjectBase?, NSError) fn) { - final raw = _ObjectiveCBindings_newClosureBlock_wjvic9( - _ObjCBlock_ffiVoid_objcObjCObject_NSError_listenerCallable - .nativeFunction - .cast(), - objc.registerBlockClosure((ffi.Pointer arg0, - ffi.Pointer arg1) => - fn( - arg0.address == 0 - ? null - : objc.ObjCObjectBase(arg0, retain: false, release: true), - NSError.castFromPointer(arg1, retain: false, release: true))), - objc.blockClosureDisposePort, - objc.disposeObjCBlockWithClosure); - final wrapper = _ObjectiveCBindings_wrapListenerBlock_wjvic9(raw); - objc.objectRelease(raw.cast()); - return objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError)>(wrapper, - retain: false, release: true); - } + static objc.ObjCBlock?, NSError)> listener( + void Function(objc.ObjCObjectBase?, NSError) fn) => + objc.ObjCBlock?, NSError)>( + objc.newClosureBlock( + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + arg0.address == 0 + ? null + : objc.ObjCObjectBase(arg0, retain: false, release: true), + NSError.castFromPointer(arg1, retain: false, release: true)), + _ObjCBlock_ffiVoid_objcObjCObject_NSError_listenerCallable + .nativeFunction + .cast(), + _ObjectiveCBindings_newListenerBlock_wjvic9), + retain: false, + release: true); /// Creates a blocking block from a Dart function. /// @@ -11108,43 +10882,22 @@ abstract final class ObjCBlock_ffiVoid_objcObjCObject_NSError { /// This block does not keep the owner isolate alive. If the owner isolate has /// shut down, and the block is invoked by native code, it may block /// indefinitely, or have other undefined behavior. - static objc - .ObjCBlock?, NSError)> - blocking(void Function(objc.ObjCObjectBase?, NSError) fn) { - final raw = _ObjectiveCBindings_newClosureBlock_wjvic9( - _ObjCBlock_ffiVoid_objcObjCObject_NSError_blockingCallable - .nativeFunction - .cast(), - objc.registerBlockClosure((ffi.Pointer arg0, - ffi.Pointer arg1) => - fn( - arg0.address == 0 - ? null - : objc.ObjCObjectBase(arg0, retain: false, release: true), - NSError.castFromPointer(arg1, retain: false, release: true))), - objc.blockClosureDisposePort, - objc.disposeObjCBlockWithClosure); - final rawListener = _ObjectiveCBindings_newClosureBlock_wjvic9( - _ObjCBlock_ffiVoid_objcObjCObject_NSError_blockingListenerCallable - .nativeFunction - .cast(), - objc.registerBlockClosure((ffi.Pointer arg0, - ffi.Pointer arg1) => - fn( - arg0.address == 0 - ? null - : objc.ObjCObjectBase(arg0, retain: false, release: true), - NSError.castFromPointer(arg1, retain: false, release: true))), - objc.blockClosureDisposePort, - objc.disposeObjCBlockWithClosure); - final wrapper = objc.wrapBlockingBlock( - _ObjectiveCBindings_wrapBlockingBlock_wjvic9, raw, rawListener); - objc.objectRelease(raw.cast()); - objc.objectRelease(rawListener.cast()); - return objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError)>(wrapper, - retain: false, release: true); - } + static objc.ObjCBlock?, NSError)> blocking( + void Function(objc.ObjCObjectBase?, NSError) fn) => + objc.ObjCBlock?, NSError)>( + objc.newBlockingBlock( + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + arg0.address == 0 + ? null + : objc.ObjCObjectBase(arg0, retain: false, release: true), + NSError.castFromPointer(arg1, retain: false, release: true)), + _ObjCBlock_ffiVoid_objcObjCObject_NSError_blockingCallable + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_objcObjCObject_NSError_blockingListenerCallable.nativeFunction.cast(), + _ObjectiveCBindings_newBlockingBlock_wjvic9), + retain: false, + release: true); } /// Call operator for `objc.ObjCBlock?, NSError)>`. @@ -11212,20 +10965,21 @@ abstract final class ObjCBlock_instancetype_ffiVoid_NSCoder { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock?> Function(ffi.Pointer, NSCoder)> fromFunction( - Dartinstancetype? Function(ffi.Pointer, NSCoder) fn) => - objc.ObjCBlock?> Function(ffi.Pointer, NSCoder)>( - _ObjectiveCBindings_newClosureBlock_1m9h2n( - _ObjCBlock_instancetype_ffiVoid_NSCoder_closureCallable, - objc.registerBlockClosure((ffi.Pointer arg0, ffi.Pointer arg1) => - fn(arg0, NSCoder.castFromPointer(arg1, retain: true, release: true)) - ?.ref - .retainAndReturnPointer() ?? - ffi.nullptr), - objc.blockClosureDisposePort, - objc.disposeObjCBlockWithClosure), - retain: false, - release: true); + static objc + .ObjCBlock?> Function(ffi.Pointer, NSCoder)> + fromFunction( + Dartinstancetype? Function(ffi.Pointer, NSCoder) fn) => + objc.ObjCBlock?> Function(ffi.Pointer, NSCoder)>( + objc.newClosureBlock( + (ffi.Pointer arg0, ffi.Pointer arg1) => + fn(arg0, NSCoder.castFromPointer(arg1, retain: true, release: true)) + ?.ref + .retainAndReturnPointer() ?? + ffi.nullptr, + _ObjCBlock_instancetype_ffiVoid_NSCoder_closureCallable.cast(), + _ObjectiveCBindings_newClosureBlock_1m9h2n), + retain: false, + release: true); } /// Call operator for `objc.ObjCBlock?> Function(ffi.Pointer, NSCoder)>`. @@ -11331,17 +11085,18 @@ abstract final class ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock? Function(ffi.Pointer, NSData, NSString, ffi.Pointer>)> fromFunction(Dartinstancetype? Function(ffi.Pointer, NSData, NSString, ffi.Pointer>) fn) => + static objc.ObjCBlock? Function(ffi.Pointer, NSData, NSString, ffi.Pointer>)> fromFunction( + Dartinstancetype? Function(ffi.Pointer, NSData, NSString, ffi.Pointer>) + fn) => objc.ObjCBlock? Function(ffi.Pointer, NSData, NSString, ffi.Pointer>)>( - _ObjectiveCBindings_newClosureBlock_e2pkq8( - _ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError_closureCallable, - objc.registerBlockClosure((ffi.Pointer arg0, + objc.newClosureBlock( + (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer> arg3) => - fn(arg0, NSData.castFromPointer(arg1, retain: true, release: true), NSString.castFromPointer(arg2, retain: true, release: true), arg3)?.ref.retainAndAutorelease() ?? ffi.nullptr), - objc.blockClosureDisposePort, - objc.disposeObjCBlockWithClosure), + fn(arg0, NSData.castFromPointer(arg1, retain: true, release: true), NSString.castFromPointer(arg2, retain: true, release: true), arg3)?.ref.retainAndAutorelease() ?? ffi.nullptr, + _ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError_closureCallable.cast(), + _ObjectiveCBindings_newClosureBlock_e2pkq8), retain: false, release: true); } @@ -11425,18 +11180,18 @@ abstract final class ObjCBlock_objcObjCObject_ffiVoid { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock< - ffi.Pointer Function(ffi.Pointer)> fromFunction( - objc.ObjCObjectBase Function(ffi.Pointer) fn) => - objc.ObjCBlock Function(ffi.Pointer)>( - _ObjectiveCBindings_newClosureBlock_1yesha9( - _ObjCBlock_objcObjCObject_ffiVoid_closureCallable, - objc.registerBlockClosure((ffi.Pointer arg0) => - fn(arg0).ref.retainAndAutorelease()), - objc.blockClosureDisposePort, - objc.disposeObjCBlockWithClosure), - retain: false, - release: true); + static objc + .ObjCBlock Function(ffi.Pointer)> + fromFunction(objc.ObjCObjectBase Function(ffi.Pointer) fn) => + objc.ObjCBlock< + ffi.Pointer Function(ffi.Pointer)>( + objc.newClosureBlock( + (ffi.Pointer arg0) => + fn(arg0).ref.retainAndAutorelease(), + _ObjCBlock_objcObjCObject_ffiVoid_closureCallable.cast(), + _ObjectiveCBindings_newClosureBlock_1yesha9), + retain: false, + release: true); } /// Call operator for `objc.ObjCBlock Function(ffi.Pointer)>`. @@ -11519,14 +11274,14 @@ abstract final class ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector { /// will result in a crash. static objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer)> fromFunction(objc.ObjCObjectBase Function(ffi.Pointer, ffi.Pointer) fn) => - objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer)>( - _ObjectiveCBindings_newClosureBlock_ykn0t6( - _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_closureCallable, - objc.registerBlockClosure((ffi.Pointer arg0, - ffi.Pointer arg1) => - fn(arg0, arg1).ref.retainAndAutorelease()), - objc.blockClosureDisposePort, - objc.disposeObjCBlockWithClosure), + objc.ObjCBlock< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>( + objc.newClosureBlock( + (ffi.Pointer arg0, ffi.Pointer arg1) => + fn(arg0, arg1).ref.retainAndAutorelease(), + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_closureCallable.cast(), + _ObjectiveCBindings_newClosureBlock_ykn0t6), retain: false, release: true); } @@ -11621,14 +11376,15 @@ abstract final class ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCO static objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)> fromFunction(objc.ObjCObjectBase Function(ffi.Pointer, ffi.Pointer, objc.ObjCObjectBase) fn) => objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>( - _ObjectiveCBindings_newClosureBlock_1c0c70u( - _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_closureCallable, - objc.registerBlockClosure((ffi.Pointer arg0, + objc.newClosureBlock( + (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => - fn(arg0, arg1, objc.ObjCObjectBase(arg2, retain: true, release: true)).ref.retainAndAutorelease()), - objc.blockClosureDisposePort, - objc.disposeObjCBlockWithClosure), + fn(arg0, arg1, objc.ObjCObjectBase(arg2, retain: true, release: true)) + .ref + .retainAndAutorelease(), + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_closureCallable.cast(), + _ObjectiveCBindings_newClosureBlock_1c0c70u), retain: false, release: true); } @@ -11730,19 +11486,21 @@ abstract final class ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCO /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)> fromFunction(objc.ObjCObjectBase Function(ffi.Pointer, ffi.Pointer, objc.ObjCObjectBase, objc.ObjCObjectBase) fn) => - objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>( - _ObjectiveCBindings_newClosureBlock_u8b97m( - _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_closureCallable, - objc.registerBlockClosure((ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3) => - fn(arg0, arg1, objc.ObjCObjectBase(arg2, retain: true, release: true), objc.ObjCObjectBase(arg3, retain: true, release: true)).ref.retainAndAutorelease()), - objc.blockClosureDisposePort, - objc.disposeObjCBlockWithClosure), - retain: false, - release: true); + static objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)> + fromFunction(objc.ObjCObjectBase Function(ffi.Pointer, ffi.Pointer, objc.ObjCObjectBase, objc.ObjCObjectBase) fn) => + objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>( + objc.newClosureBlock( + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + fn(arg0, arg1, objc.ObjCObjectBase(arg2, retain: true, release: true), objc.ObjCObjectBase(arg3, retain: true, release: true)) + .ref + .retainAndAutorelease(), + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_closureCallable.cast(), + _ObjectiveCBindings_newClosureBlock_u8b97m), + retain: false, + release: true); } /// Call operator for `objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>`. diff --git a/pkgs/objective_c/src/objective_c_bindings_generated.m b/pkgs/objective_c/src/objective_c_bindings_generated.m index 417c0e11e..e4f24a85c 100644 --- a/pkgs/objective_c/src/objective_c_bindings_generated.m +++ b/pkgs/objective_c/src/objective_c_bindings_generated.m @@ -15,9 +15,19 @@ @interface _ObjectiveCBindings_BlockDestroyer : NSObject {} @property int64_t closure_id; @property int64_t dispose_port; @property void (*dtor)(int64_t, int64_t); ++ (instancetype)new:(int64_t) closure_id disposePort:(int64_t) dispose_port + destructor:(void (*)(int64_t, int64_t)) dtor; - (void)dealloc; @end @implementation _ObjectiveCBindings_BlockDestroyer ++ (instancetype)new:(int64_t) closure_id disposePort:(int64_t) dispose_port + destructor:(void (*)(int64_t, int64_t)) dtor { + _ObjectiveCBindings_BlockDestroyer* d = [[_ObjectiveCBindings_BlockDestroyer alloc] init]; + d.closure_id = closure_id; + d.dispose_port = dispose_port; + d.dtor = dtor; + return d; +} - (void)dealloc { self.dtor(self.dispose_port, self.closure_id); } @end @@ -34,10 +44,8 @@ id _ObjectiveCBindings_invokeBlock_1yesha9( _BlockType _ObjectiveCBindings_newClosureBlock_1yesha9( id (*trampoline)(id , int64_t , void * ), int64_t closure_id, int64_t dispose_port, void (*dtor)(int64_t, int64_t)) NS_RETURNS_RETAINED { - _ObjectiveCBindings_BlockDestroyer* obj = [[_ObjectiveCBindings_BlockDestroyer alloc] init]; - obj.closure_id = closure_id; - obj.dispose_port = dispose_port; - obj.dtor = dtor; + _ObjectiveCBindings_BlockDestroyer* obj = [_ObjectiveCBindings_BlockDestroyer + new:closure_id disposePort:dispose_port destructor:dtor]; __weak __block _BlockType weakBlk; _BlockType blk = ^id (void * arg0) { return trampoline(weakBlk, obj.closure_id, arg0); @@ -57,10 +65,8 @@ unsigned long _ObjectiveCBindings_invokeBlock_1ckyi24( _BlockType1 _ObjectiveCBindings_newClosureBlock_1ckyi24( unsigned long (*trampoline)(id , int64_t , void * ), int64_t closure_id, int64_t dispose_port, void (*dtor)(int64_t, int64_t)) NS_RETURNS_RETAINED { - _ObjectiveCBindings_BlockDestroyer* obj = [[_ObjectiveCBindings_BlockDestroyer alloc] init]; - obj.closure_id = closure_id; - obj.dispose_port = dispose_port; - obj.dtor = dtor; + _ObjectiveCBindings_BlockDestroyer* obj = [_ObjectiveCBindings_BlockDestroyer + new:closure_id disposePort:dispose_port destructor:dtor]; __weak __block _BlockType1 weakBlk; _BlockType1 blk = ^unsigned long (void * arg0) { return trampoline(weakBlk, obj.closure_id, arg0); @@ -80,10 +86,8 @@ unsigned long _ObjectiveCBindings_invokeBlock_17ap02x( _BlockType2 _ObjectiveCBindings_newClosureBlock_17ap02x( unsigned long (*trampoline)(id , int64_t , void * , NSFastEnumerationState * , id * , unsigned long ), int64_t closure_id, int64_t dispose_port, void (*dtor)(int64_t, int64_t)) NS_RETURNS_RETAINED { - _ObjectiveCBindings_BlockDestroyer* obj = [[_ObjectiveCBindings_BlockDestroyer alloc] init]; - obj.closure_id = closure_id; - obj.dispose_port = dispose_port; - obj.dtor = dtor; + _ObjectiveCBindings_BlockDestroyer* obj = [_ObjectiveCBindings_BlockDestroyer + new:closure_id disposePort:dispose_port destructor:dtor]; __weak __block _BlockType2 weakBlk; _BlockType2 blk = ^unsigned long (void * arg0, NSFastEnumerationState * arg1, id * arg2, unsigned long arg3) { return trampoline(weakBlk, obj.closure_id, arg0, arg1, arg2, arg3); @@ -103,10 +107,8 @@ unsigned long (*trampoline)(id , int64_t , void * , NSFastEnumerationState * , _BlockType3 _ObjectiveCBindings_newClosureBlock_1a8cl66( struct _NSZone * (*trampoline)(id , int64_t , void * ), int64_t closure_id, int64_t dispose_port, void (*dtor)(int64_t, int64_t)) NS_RETURNS_RETAINED { - _ObjectiveCBindings_BlockDestroyer* obj = [[_ObjectiveCBindings_BlockDestroyer alloc] init]; - obj.closure_id = closure_id; - obj.dispose_port = dispose_port; - obj.dtor = dtor; + _ObjectiveCBindings_BlockDestroyer* obj = [_ObjectiveCBindings_BlockDestroyer + new:closure_id disposePort:dispose_port destructor:dtor]; __weak __block _BlockType3 weakBlk; _BlockType3 blk = ^struct _NSZone * (void * arg0) { return trampoline(weakBlk, obj.closure_id, arg0); @@ -126,10 +128,8 @@ BOOL _ObjectiveCBindings_invokeBlock_e3qsqz( _BlockType4 _ObjectiveCBindings_newClosureBlock_e3qsqz( BOOL (*trampoline)(id , int64_t , void * ), int64_t closure_id, int64_t dispose_port, void (*dtor)(int64_t, int64_t)) NS_RETURNS_RETAINED { - _ObjectiveCBindings_BlockDestroyer* obj = [[_ObjectiveCBindings_BlockDestroyer alloc] init]; - obj.closure_id = closure_id; - obj.dispose_port = dispose_port; - obj.dtor = dtor; + _ObjectiveCBindings_BlockDestroyer* obj = [_ObjectiveCBindings_BlockDestroyer + new:closure_id disposePort:dispose_port destructor:dtor]; __weak __block _BlockType4 weakBlk; _BlockType4 blk = ^BOOL (void * arg0) { return trampoline(weakBlk, obj.closure_id, arg0); @@ -149,10 +149,8 @@ BOOL _ObjectiveCBindings_invokeBlock_ozkafd( _BlockType5 _ObjectiveCBindings_newClosureBlock_ozkafd( BOOL (*trampoline)(id , int64_t , void * , id ), int64_t closure_id, int64_t dispose_port, void (*dtor)(int64_t, int64_t)) NS_RETURNS_RETAINED { - _ObjectiveCBindings_BlockDestroyer* obj = [[_ObjectiveCBindings_BlockDestroyer alloc] init]; - obj.closure_id = closure_id; - obj.dispose_port = dispose_port; - obj.dtor = dtor; + _ObjectiveCBindings_BlockDestroyer* obj = [_ObjectiveCBindings_BlockDestroyer + new:closure_id disposePort:dispose_port destructor:dtor]; __weak __block _BlockType5 weakBlk; _BlockType5 blk = ^BOOL (void * arg0, id arg1) { return trampoline(weakBlk, obj.closure_id, arg0, arg1); @@ -172,10 +170,8 @@ BOOL _ObjectiveCBindings_invokeBlock_w1e3k0( _BlockType6 _ObjectiveCBindings_newClosureBlock_w1e3k0( BOOL (*trampoline)(id , int64_t , void * , struct objc_selector * ), int64_t closure_id, int64_t dispose_port, void (*dtor)(int64_t, int64_t)) NS_RETURNS_RETAINED { - _ObjectiveCBindings_BlockDestroyer* obj = [[_ObjectiveCBindings_BlockDestroyer alloc] init]; - obj.closure_id = closure_id; - obj.dispose_port = dispose_port; - obj.dtor = dtor; + _ObjectiveCBindings_BlockDestroyer* obj = [_ObjectiveCBindings_BlockDestroyer + new:closure_id disposePort:dispose_port destructor:dtor]; __weak __block _BlockType6 weakBlk; _BlockType6 blk = ^BOOL (void * arg0, struct objc_selector * arg1) { return trampoline(weakBlk, obj.closure_id, arg0, arg1); @@ -195,10 +191,8 @@ void _ObjectiveCBindings_invokeBlock_1j2nt86( _BlockType7 _ObjectiveCBindings_newClosureBlock_1j2nt86( void (*trampoline)(id , int64_t , id , id , id ), int64_t closure_id, int64_t dispose_port, void (*dtor)(int64_t, int64_t)) NS_RETURNS_RETAINED { - _ObjectiveCBindings_BlockDestroyer* obj = [[_ObjectiveCBindings_BlockDestroyer alloc] init]; - obj.closure_id = closure_id; - obj.dispose_port = dispose_port; - obj.dtor = dtor; + _ObjectiveCBindings_BlockDestroyer* obj = [_ObjectiveCBindings_BlockDestroyer + new:closure_id disposePort:dispose_port destructor:dtor]; __weak __block _BlockType7 weakBlk; _BlockType7 blk = ^void (id arg0, id arg1, id arg2) { return trampoline(weakBlk, obj.closure_id, arg0, arg1, arg2); @@ -208,30 +202,42 @@ _BlockType7 _ObjectiveCBindings_newClosureBlock_1j2nt86( } __attribute__((visibility("default"))) __attribute__((used)) -_BlockType7 _ObjectiveCBindings_wrapListenerBlock_1j2nt86(_BlockType7 block) NS_RETURNS_RETAINED { - return ^void(id arg0, id arg1, id arg2) { - objc_retainBlock(block); - block(objc_retainBlock(arg0), objc_retain(arg1), objc_retain(arg2)); +_BlockType7 _ObjectiveCBindings_newListenerBlock_1j2nt86( + void (*trampoline)(id , int64_t , id , id , id ), int64_t closure_id, int64_t dispose_port, + void (*dtor)(int64_t, int64_t)) NS_RETURNS_RETAINED { + _ObjectiveCBindings_BlockDestroyer* obj = [_ObjectiveCBindings_BlockDestroyer + new:closure_id disposePort:dispose_port destructor:dtor]; + __weak __block _BlockType7 weakBlk; + _BlockType7 blk = ^void (id arg0, id arg1, id arg2) { + objc_retainBlock(weakBlk); + return trampoline(weakBlk, obj.closure_id, objc_retainBlock(arg0), objc_retain(arg1), objc_retain(arg2)); }; + weakBlk = blk; + return blk; } typedef void (^_BlockingTrampoline7)(void * waiter, id arg0, id arg1, id arg2); __attribute__((visibility("default"))) __attribute__((used)) -_BlockType7 _ObjectiveCBindings_wrapBlockingBlock_1j2nt86( - _BlockingTrampoline7 block, _BlockingTrampoline7 listenerBlock, +_BlockType7 _ObjectiveCBindings_newBlockingBlock_1j2nt86( + void (*tramp)(id , int64_t , void * , id , id , id ), void (*listener_tramp)(id , int64_t , void * , id , id , id ), + int64_t closure_id, int64_t dispose_port, void (*dtor)(int64_t, int64_t), void* (*newWaiter)(), void (*awaitWaiter)(void*)) NS_RETURNS_RETAINED { NSThread *targetThread = [NSThread currentThread]; - return ^void(id arg0, id arg1, id arg2) { + _ObjectiveCBindings_BlockDestroyer* obj = [_ObjectiveCBindings_BlockDestroyer + new:closure_id disposePort:dispose_port destructor:dtor]; + __weak __block _BlockType7 weakBlk; + _BlockType7 blk = ^void (id arg0, id arg1, id arg2) { + objc_retainBlock(weakBlk); if ([NSThread currentThread] == targetThread) { - objc_retainBlock(block); - block(nil, objc_retainBlock(arg0), objc_retain(arg1), objc_retain(arg2)); + tramp(weakBlk, obj.closure_id, nil, objc_retainBlock(arg0), objc_retain(arg1), objc_retain(arg2)); } else { void* waiter = newWaiter(); - objc_retainBlock(listenerBlock); - listenerBlock(waiter, objc_retainBlock(arg0), objc_retain(arg1), objc_retain(arg2)); + listener_tramp(weakBlk, obj.closure_id, waiter, objc_retainBlock(arg0), objc_retain(arg1), objc_retain(arg2)); awaitWaiter(waiter); } }; + weakBlk = blk; + return blk; } typedef void (^_BlockType8)(void * arg0); @@ -245,10 +251,8 @@ void _ObjectiveCBindings_invokeBlock_ovsamd( _BlockType8 _ObjectiveCBindings_newClosureBlock_ovsamd( void (*trampoline)(id , int64_t , void * ), int64_t closure_id, int64_t dispose_port, void (*dtor)(int64_t, int64_t)) NS_RETURNS_RETAINED { - _ObjectiveCBindings_BlockDestroyer* obj = [[_ObjectiveCBindings_BlockDestroyer alloc] init]; - obj.closure_id = closure_id; - obj.dispose_port = dispose_port; - obj.dtor = dtor; + _ObjectiveCBindings_BlockDestroyer* obj = [_ObjectiveCBindings_BlockDestroyer + new:closure_id disposePort:dispose_port destructor:dtor]; __weak __block _BlockType8 weakBlk; _BlockType8 blk = ^void (void * arg0) { return trampoline(weakBlk, obj.closure_id, arg0); @@ -258,30 +262,42 @@ _BlockType8 _ObjectiveCBindings_newClosureBlock_ovsamd( } __attribute__((visibility("default"))) __attribute__((used)) -_BlockType8 _ObjectiveCBindings_wrapListenerBlock_ovsamd(_BlockType8 block) NS_RETURNS_RETAINED { - return ^void(void * arg0) { - objc_retainBlock(block); - block(arg0); +_BlockType8 _ObjectiveCBindings_newListenerBlock_ovsamd( + void (*trampoline)(id , int64_t , void * ), int64_t closure_id, int64_t dispose_port, + void (*dtor)(int64_t, int64_t)) NS_RETURNS_RETAINED { + _ObjectiveCBindings_BlockDestroyer* obj = [_ObjectiveCBindings_BlockDestroyer + new:closure_id disposePort:dispose_port destructor:dtor]; + __weak __block _BlockType8 weakBlk; + _BlockType8 blk = ^void (void * arg0) { + objc_retainBlock(weakBlk); + return trampoline(weakBlk, obj.closure_id, arg0); }; + weakBlk = blk; + return blk; } typedef void (^_BlockingTrampoline8)(void * waiter, void * arg0); __attribute__((visibility("default"))) __attribute__((used)) -_BlockType8 _ObjectiveCBindings_wrapBlockingBlock_ovsamd( - _BlockingTrampoline8 block, _BlockingTrampoline8 listenerBlock, +_BlockType8 _ObjectiveCBindings_newBlockingBlock_ovsamd( + void (*tramp)(id , int64_t , void * , void * ), void (*listener_tramp)(id , int64_t , void * , void * ), + int64_t closure_id, int64_t dispose_port, void (*dtor)(int64_t, int64_t), void* (*newWaiter)(), void (*awaitWaiter)(void*)) NS_RETURNS_RETAINED { NSThread *targetThread = [NSThread currentThread]; - return ^void(void * arg0) { + _ObjectiveCBindings_BlockDestroyer* obj = [_ObjectiveCBindings_BlockDestroyer + new:closure_id disposePort:dispose_port destructor:dtor]; + __weak __block _BlockType8 weakBlk; + _BlockType8 blk = ^void (void * arg0) { + objc_retainBlock(weakBlk); if ([NSThread currentThread] == targetThread) { - objc_retainBlock(block); - block(nil, arg0); + tramp(weakBlk, obj.closure_id, nil, arg0); } else { void* waiter = newWaiter(); - objc_retainBlock(listenerBlock); - listenerBlock(waiter, arg0); + listener_tramp(weakBlk, obj.closure_id, waiter, arg0); awaitWaiter(waiter); } }; + weakBlk = blk; + return blk; } typedef void (^_BlockType9)(void * arg0, id arg1); @@ -295,10 +311,8 @@ void _ObjectiveCBindings_invokeBlock_wjovn7( _BlockType9 _ObjectiveCBindings_newClosureBlock_wjovn7( void (*trampoline)(id , int64_t , void * , id ), int64_t closure_id, int64_t dispose_port, void (*dtor)(int64_t, int64_t)) NS_RETURNS_RETAINED { - _ObjectiveCBindings_BlockDestroyer* obj = [[_ObjectiveCBindings_BlockDestroyer alloc] init]; - obj.closure_id = closure_id; - obj.dispose_port = dispose_port; - obj.dtor = dtor; + _ObjectiveCBindings_BlockDestroyer* obj = [_ObjectiveCBindings_BlockDestroyer + new:closure_id disposePort:dispose_port destructor:dtor]; __weak __block _BlockType9 weakBlk; _BlockType9 blk = ^void (void * arg0, id arg1) { return trampoline(weakBlk, obj.closure_id, arg0, arg1); @@ -308,30 +322,42 @@ _BlockType9 _ObjectiveCBindings_newClosureBlock_wjovn7( } __attribute__((visibility("default"))) __attribute__((used)) -_BlockType9 _ObjectiveCBindings_wrapListenerBlock_wjovn7(_BlockType9 block) NS_RETURNS_RETAINED { - return ^void(void * arg0, id arg1) { - objc_retainBlock(block); - block(arg0, objc_retain(arg1)); +_BlockType9 _ObjectiveCBindings_newListenerBlock_wjovn7( + void (*trampoline)(id , int64_t , void * , id ), int64_t closure_id, int64_t dispose_port, + void (*dtor)(int64_t, int64_t)) NS_RETURNS_RETAINED { + _ObjectiveCBindings_BlockDestroyer* obj = [_ObjectiveCBindings_BlockDestroyer + new:closure_id disposePort:dispose_port destructor:dtor]; + __weak __block _BlockType9 weakBlk; + _BlockType9 blk = ^void (void * arg0, id arg1) { + objc_retainBlock(weakBlk); + return trampoline(weakBlk, obj.closure_id, arg0, objc_retain(arg1)); }; + weakBlk = blk; + return blk; } typedef void (^_BlockingTrampoline9)(void * waiter, void * arg0, id arg1); __attribute__((visibility("default"))) __attribute__((used)) -_BlockType9 _ObjectiveCBindings_wrapBlockingBlock_wjovn7( - _BlockingTrampoline9 block, _BlockingTrampoline9 listenerBlock, +_BlockType9 _ObjectiveCBindings_newBlockingBlock_wjovn7( + void (*tramp)(id , int64_t , void * , void * , id ), void (*listener_tramp)(id , int64_t , void * , void * , id ), + int64_t closure_id, int64_t dispose_port, void (*dtor)(int64_t, int64_t), void* (*newWaiter)(), void (*awaitWaiter)(void*)) NS_RETURNS_RETAINED { NSThread *targetThread = [NSThread currentThread]; - return ^void(void * arg0, id arg1) { + _ObjectiveCBindings_BlockDestroyer* obj = [_ObjectiveCBindings_BlockDestroyer + new:closure_id disposePort:dispose_port destructor:dtor]; + __weak __block _BlockType9 weakBlk; + _BlockType9 blk = ^void (void * arg0, id arg1) { + objc_retainBlock(weakBlk); if ([NSThread currentThread] == targetThread) { - objc_retainBlock(block); - block(nil, arg0, objc_retain(arg1)); + tramp(weakBlk, obj.closure_id, nil, arg0, objc_retain(arg1)); } else { void* waiter = newWaiter(); - objc_retainBlock(listenerBlock); - listenerBlock(waiter, arg0, objc_retain(arg1)); + listener_tramp(weakBlk, obj.closure_id, waiter, arg0, objc_retain(arg1)); awaitWaiter(waiter); } }; + weakBlk = blk; + return blk; } typedef void (^_BlockType10)(void * arg0, id arg1, NSStreamEvent arg2); @@ -345,10 +371,8 @@ void _ObjectiveCBindings_invokeBlock_18d6mda( _BlockType10 _ObjectiveCBindings_newClosureBlock_18d6mda( void (*trampoline)(id , int64_t , void * , id , NSStreamEvent ), int64_t closure_id, int64_t dispose_port, void (*dtor)(int64_t, int64_t)) NS_RETURNS_RETAINED { - _ObjectiveCBindings_BlockDestroyer* obj = [[_ObjectiveCBindings_BlockDestroyer alloc] init]; - obj.closure_id = closure_id; - obj.dispose_port = dispose_port; - obj.dtor = dtor; + _ObjectiveCBindings_BlockDestroyer* obj = [_ObjectiveCBindings_BlockDestroyer + new:closure_id disposePort:dispose_port destructor:dtor]; __weak __block _BlockType10 weakBlk; _BlockType10 blk = ^void (void * arg0, id arg1, NSStreamEvent arg2) { return trampoline(weakBlk, obj.closure_id, arg0, arg1, arg2); @@ -358,30 +382,42 @@ _BlockType10 _ObjectiveCBindings_newClosureBlock_18d6mda( } __attribute__((visibility("default"))) __attribute__((used)) -_BlockType10 _ObjectiveCBindings_wrapListenerBlock_18d6mda(_BlockType10 block) NS_RETURNS_RETAINED { - return ^void(void * arg0, id arg1, NSStreamEvent arg2) { - objc_retainBlock(block); - block(arg0, objc_retain(arg1), arg2); +_BlockType10 _ObjectiveCBindings_newListenerBlock_18d6mda( + void (*trampoline)(id , int64_t , void * , id , NSStreamEvent ), int64_t closure_id, int64_t dispose_port, + void (*dtor)(int64_t, int64_t)) NS_RETURNS_RETAINED { + _ObjectiveCBindings_BlockDestroyer* obj = [_ObjectiveCBindings_BlockDestroyer + new:closure_id disposePort:dispose_port destructor:dtor]; + __weak __block _BlockType10 weakBlk; + _BlockType10 blk = ^void (void * arg0, id arg1, NSStreamEvent arg2) { + objc_retainBlock(weakBlk); + return trampoline(weakBlk, obj.closure_id, arg0, objc_retain(arg1), arg2); }; + weakBlk = blk; + return blk; } typedef void (^_BlockingTrampoline10)(void * waiter, void * arg0, id arg1, NSStreamEvent arg2); __attribute__((visibility("default"))) __attribute__((used)) -_BlockType10 _ObjectiveCBindings_wrapBlockingBlock_18d6mda( - _BlockingTrampoline10 block, _BlockingTrampoline10 listenerBlock, +_BlockType10 _ObjectiveCBindings_newBlockingBlock_18d6mda( + void (*tramp)(id , int64_t , void * , void * , id , NSStreamEvent ), void (*listener_tramp)(id , int64_t , void * , void * , id , NSStreamEvent ), + int64_t closure_id, int64_t dispose_port, void (*dtor)(int64_t, int64_t), void* (*newWaiter)(), void (*awaitWaiter)(void*)) NS_RETURNS_RETAINED { NSThread *targetThread = [NSThread currentThread]; - return ^void(void * arg0, id arg1, NSStreamEvent arg2) { + _ObjectiveCBindings_BlockDestroyer* obj = [_ObjectiveCBindings_BlockDestroyer + new:closure_id disposePort:dispose_port destructor:dtor]; + __weak __block _BlockType10 weakBlk; + _BlockType10 blk = ^void (void * arg0, id arg1, NSStreamEvent arg2) { + objc_retainBlock(weakBlk); if ([NSThread currentThread] == targetThread) { - objc_retainBlock(block); - block(nil, arg0, objc_retain(arg1), arg2); + tramp(weakBlk, obj.closure_id, nil, arg0, objc_retain(arg1), arg2); } else { void* waiter = newWaiter(); - objc_retainBlock(listenerBlock); - listenerBlock(waiter, arg0, objc_retain(arg1), arg2); + listener_tramp(weakBlk, obj.closure_id, waiter, arg0, objc_retain(arg1), arg2); awaitWaiter(waiter); } }; + weakBlk = blk; + return blk; } typedef void (^_BlockType11)(id arg0, id arg1); @@ -395,10 +431,8 @@ void _ObjectiveCBindings_invokeBlock_wjvic9( _BlockType11 _ObjectiveCBindings_newClosureBlock_wjvic9( void (*trampoline)(id , int64_t , id , id ), int64_t closure_id, int64_t dispose_port, void (*dtor)(int64_t, int64_t)) NS_RETURNS_RETAINED { - _ObjectiveCBindings_BlockDestroyer* obj = [[_ObjectiveCBindings_BlockDestroyer alloc] init]; - obj.closure_id = closure_id; - obj.dispose_port = dispose_port; - obj.dtor = dtor; + _ObjectiveCBindings_BlockDestroyer* obj = [_ObjectiveCBindings_BlockDestroyer + new:closure_id disposePort:dispose_port destructor:dtor]; __weak __block _BlockType11 weakBlk; _BlockType11 blk = ^void (id arg0, id arg1) { return trampoline(weakBlk, obj.closure_id, arg0, arg1); @@ -408,30 +442,42 @@ _BlockType11 _ObjectiveCBindings_newClosureBlock_wjvic9( } __attribute__((visibility("default"))) __attribute__((used)) -_BlockType11 _ObjectiveCBindings_wrapListenerBlock_wjvic9(_BlockType11 block) NS_RETURNS_RETAINED { - return ^void(id arg0, id arg1) { - objc_retainBlock(block); - block(objc_retain(arg0), objc_retain(arg1)); +_BlockType11 _ObjectiveCBindings_newListenerBlock_wjvic9( + void (*trampoline)(id , int64_t , id , id ), int64_t closure_id, int64_t dispose_port, + void (*dtor)(int64_t, int64_t)) NS_RETURNS_RETAINED { + _ObjectiveCBindings_BlockDestroyer* obj = [_ObjectiveCBindings_BlockDestroyer + new:closure_id disposePort:dispose_port destructor:dtor]; + __weak __block _BlockType11 weakBlk; + _BlockType11 blk = ^void (id arg0, id arg1) { + objc_retainBlock(weakBlk); + return trampoline(weakBlk, obj.closure_id, objc_retain(arg0), objc_retain(arg1)); }; + weakBlk = blk; + return blk; } typedef void (^_BlockingTrampoline11)(void * waiter, id arg0, id arg1); __attribute__((visibility("default"))) __attribute__((used)) -_BlockType11 _ObjectiveCBindings_wrapBlockingBlock_wjvic9( - _BlockingTrampoline11 block, _BlockingTrampoline11 listenerBlock, +_BlockType11 _ObjectiveCBindings_newBlockingBlock_wjvic9( + void (*tramp)(id , int64_t , void * , id , id ), void (*listener_tramp)(id , int64_t , void * , id , id ), + int64_t closure_id, int64_t dispose_port, void (*dtor)(int64_t, int64_t), void* (*newWaiter)(), void (*awaitWaiter)(void*)) NS_RETURNS_RETAINED { NSThread *targetThread = [NSThread currentThread]; - return ^void(id arg0, id arg1) { + _ObjectiveCBindings_BlockDestroyer* obj = [_ObjectiveCBindings_BlockDestroyer + new:closure_id disposePort:dispose_port destructor:dtor]; + __weak __block _BlockType11 weakBlk; + _BlockType11 blk = ^void (id arg0, id arg1) { + objc_retainBlock(weakBlk); if ([NSThread currentThread] == targetThread) { - objc_retainBlock(block); - block(nil, objc_retain(arg0), objc_retain(arg1)); + tramp(weakBlk, obj.closure_id, nil, objc_retain(arg0), objc_retain(arg1)); } else { void* waiter = newWaiter(); - objc_retainBlock(listenerBlock); - listenerBlock(waiter, objc_retain(arg0), objc_retain(arg1)); + listener_tramp(weakBlk, obj.closure_id, waiter, objc_retain(arg0), objc_retain(arg1)); awaitWaiter(waiter); } }; + weakBlk = blk; + return blk; } typedef id (^_BlockType12)(void * arg0, id arg1); @@ -445,10 +491,8 @@ id _ObjectiveCBindings_invokeBlock_1m9h2n( _BlockType12 _ObjectiveCBindings_newClosureBlock_1m9h2n( id (*trampoline)(id , int64_t , void * , id ), int64_t closure_id, int64_t dispose_port, void (*dtor)(int64_t, int64_t)) NS_RETURNS_RETAINED { - _ObjectiveCBindings_BlockDestroyer* obj = [[_ObjectiveCBindings_BlockDestroyer alloc] init]; - obj.closure_id = closure_id; - obj.dispose_port = dispose_port; - obj.dtor = dtor; + _ObjectiveCBindings_BlockDestroyer* obj = [_ObjectiveCBindings_BlockDestroyer + new:closure_id disposePort:dispose_port destructor:dtor]; __weak __block _BlockType12 weakBlk; _BlockType12 blk = ^id (void * arg0, id arg1) { return trampoline(weakBlk, obj.closure_id, arg0, arg1); @@ -468,10 +512,8 @@ id _ObjectiveCBindings_invokeBlock_e2pkq8( _BlockType13 _ObjectiveCBindings_newClosureBlock_e2pkq8( id (*trampoline)(id , int64_t , void * , id , id , id * ), int64_t closure_id, int64_t dispose_port, void (*dtor)(int64_t, int64_t)) NS_RETURNS_RETAINED { - _ObjectiveCBindings_BlockDestroyer* obj = [[_ObjectiveCBindings_BlockDestroyer alloc] init]; - obj.closure_id = closure_id; - obj.dispose_port = dispose_port; - obj.dtor = dtor; + _ObjectiveCBindings_BlockDestroyer* obj = [_ObjectiveCBindings_BlockDestroyer + new:closure_id disposePort:dispose_port destructor:dtor]; __weak __block _BlockType13 weakBlk; _BlockType13 blk = ^id (void * arg0, id arg1, id arg2, id * arg3) { return trampoline(weakBlk, obj.closure_id, arg0, arg1, arg2, arg3); @@ -491,10 +533,8 @@ id _ObjectiveCBindings_invokeBlock_ykn0t6( _BlockType14 _ObjectiveCBindings_newClosureBlock_ykn0t6( id (*trampoline)(id , int64_t , void * , struct objc_selector * ), int64_t closure_id, int64_t dispose_port, void (*dtor)(int64_t, int64_t)) NS_RETURNS_RETAINED { - _ObjectiveCBindings_BlockDestroyer* obj = [[_ObjectiveCBindings_BlockDestroyer alloc] init]; - obj.closure_id = closure_id; - obj.dispose_port = dispose_port; - obj.dtor = dtor; + _ObjectiveCBindings_BlockDestroyer* obj = [_ObjectiveCBindings_BlockDestroyer + new:closure_id disposePort:dispose_port destructor:dtor]; __weak __block _BlockType14 weakBlk; _BlockType14 blk = ^id (void * arg0, struct objc_selector * arg1) { return trampoline(weakBlk, obj.closure_id, arg0, arg1); @@ -514,10 +554,8 @@ id _ObjectiveCBindings_invokeBlock_1c0c70u( _BlockType15 _ObjectiveCBindings_newClosureBlock_1c0c70u( id (*trampoline)(id , int64_t , void * , struct objc_selector * , id ), int64_t closure_id, int64_t dispose_port, void (*dtor)(int64_t, int64_t)) NS_RETURNS_RETAINED { - _ObjectiveCBindings_BlockDestroyer* obj = [[_ObjectiveCBindings_BlockDestroyer alloc] init]; - obj.closure_id = closure_id; - obj.dispose_port = dispose_port; - obj.dtor = dtor; + _ObjectiveCBindings_BlockDestroyer* obj = [_ObjectiveCBindings_BlockDestroyer + new:closure_id disposePort:dispose_port destructor:dtor]; __weak __block _BlockType15 weakBlk; _BlockType15 blk = ^id (void * arg0, struct objc_selector * arg1, id arg2) { return trampoline(weakBlk, obj.closure_id, arg0, arg1, arg2); @@ -537,10 +575,8 @@ id _ObjectiveCBindings_invokeBlock_u8b97m( _BlockType16 _ObjectiveCBindings_newClosureBlock_u8b97m( id (*trampoline)(id , int64_t , void * , struct objc_selector * , id , id ), int64_t closure_id, int64_t dispose_port, void (*dtor)(int64_t, int64_t)) NS_RETURNS_RETAINED { - _ObjectiveCBindings_BlockDestroyer* obj = [[_ObjectiveCBindings_BlockDestroyer alloc] init]; - obj.closure_id = closure_id; - obj.dispose_port = dispose_port; - obj.dtor = dtor; + _ObjectiveCBindings_BlockDestroyer* obj = [_ObjectiveCBindings_BlockDestroyer + new:closure_id disposePort:dispose_port destructor:dtor]; __weak __block _BlockType16 weakBlk; _BlockType16 blk = ^id (void * arg0, struct objc_selector * arg1, id arg2, id arg3) { return trampoline(weakBlk, obj.closure_id, arg0, arg1, arg2, arg3); diff --git a/pkgs/objective_c/test/main.c b/pkgs/objective_c/test/main.c index b02316d43..422d5548f 100644 --- a/pkgs/objective_c/test/main.c +++ b/pkgs/objective_c/test/main.c @@ -19,6 +19,6 @@ int main() { ASSERT_SYMBOL("DOBJC_runOnMainThread"); // objective_c.m ASSERT_SYMBOL("OBJC_CLASS_$_DOBJCDartProxy"); // proxy.m // objective_c_bindings_generated.m - ASSERT_SYMBOL("_ObjectiveCBindings_wrapListenerBlock_ovsamd"); + ASSERT_SYMBOL("_ObjectiveCBindings_newListenerBlock_ovsamd"); return 0; } diff --git a/pkgs/objective_c/test/setup.dart b/pkgs/objective_c/test/setup.dart index d12cf593c..07e8ba8c4 100644 --- a/pkgs/objective_c/test/setup.dart +++ b/pkgs/objective_c/test/setup.dart @@ -97,7 +97,7 @@ void main(List arguments) { lib.lookup('Dart_InitializeApiDL'); // dart_api_dl.c lib.lookup('OBJC_CLASS_\$_DOBJCDartProxy'); // proxy.m // objective_c_bindings_generated.m - lib.lookup('_ObjectiveCBindings_wrapListenerBlock_ovsamd'); + lib.lookup('_ObjectiveCBindings_newListenerBlock_ovsamd'); // Sanity check that the executable can find FFI symbols. _linkMain([...objFiles, cMain], '$cMain.exe'); From a26542833c66a51f0210e5dd5a4768bf6c2982e1 Mon Sep 17 00:00:00 2001 From: Liam Appelbe Date: Fri, 10 Jan 2025 16:44:15 +1100 Subject: [PATCH 6/7] Support function pointer blocks --- .../lib/src/code_generator/objc_block.dart | 61 +- .../objc_built_in_functions.dart | 23 +- .../test/native_objc_test/block_test.dart | 10 +- .../src/objective_c_bindings_generated.dart | 929 ++++++++++++------ .../src/objective_c_bindings_generated.m | 119 +++ pkgs/objective_c/test/generate_code_test.dart | 1 - 6 files changed, 835 insertions(+), 308 deletions(-) diff --git a/pkgs/ffigen/lib/src/code_generator/objc_block.dart b/pkgs/ffigen/lib/src/code_generator/objc_block.dart index 56c44c722..9123860cb 100644 --- a/pkgs/ffigen/lib/src/code_generator/objc_block.dart +++ b/pkgs/ffigen/lib/src/code_generator/objc_block.dart @@ -139,20 +139,15 @@ class ObjCBlock extends BindingType { final callExtension = w.topLevelUniqueNamer.makeUnique('${name}_CallExtension'); - final newPointerBlock = - 'todo'; //ObjCBuiltInFunctions.newPointerBlock.gen(w); + final newPointerBlock = _blockWrappers.newPointerBlock.name; final newClosureBlock = _blockWrappers.newClosureBlock.name; final invokeBlock = _blockWrappers.invokeBlock.name; - final registerBlockClosure = - ObjCBuiltInFunctions.registerBlockClosure.gen(w); final getBlockClosure = ObjCBuiltInFunctions.getBlockClosure.gen(w); final releaseFn = ObjCBuiltInFunctions.objectRelease.gen(w); final pkgNewClosureBlock = ObjCBuiltInFunctions.newClosureBlock.gen(w); final pkgNewBlockingBlock = ObjCBuiltInFunctions.newBlockingBlock.gen(w); final signalWaiterFn = ObjCBuiltInFunctions.signalWaiter.gen(w); final returnFfiDartType = returnType.getFfiDartType(w); - final voidPtrCType = voidPtr.getCType(w); - final int64Type = NativeType(SupportedNativeType.int64).getCType(w); final blockCType = blockPtr.getCType(w); final blockType = _blockType(w); final defaultValue = returnType.getDefaultValue(w); @@ -160,11 +155,12 @@ class ObjCBlock extends BindingType { // Write the function pointer based trampoline function. s.write(''' -$returnFfiDartType $funcPtrTrampoline( - $blockCType block, int closureId, ${_typeHelper.paramsFfiDartType}) => - ${w.ffiLibraryPrefix}.Pointer<${_typeHelper.natFnFfiDartType}>.fromAddress(closureId).asFunction<${_typeHelper.ffiDartType}>()(${_typeHelper.paramsNameOnly}); +$returnFfiDartType $funcPtrTrampoline(${_typeHelper.natFnPtrFfiDartType} func, + ${_typeHelper.paramsFfiDartType}) => + func.asFunction<${_typeHelper.ffiDartType}>()( + ${_typeHelper.paramsNameOnly}); final $funcPtrCallable = ${w.ffiLibraryPrefix}.Pointer.fromFunction< - ${_typeHelper.trampCType}>($funcPtrTrampoline $exceptionalReturn); + ${_typeHelper.fnPtrTrampCType}>($funcPtrTrampoline $exceptionalReturn); '''); // Write the closure based trampoline function. @@ -237,9 +233,9 @@ abstract final class $name { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - // static $blockType fromFunctionPointer(${_typeHelper.natFnPtrCType} ptr) => - // $blockType($newPointerBlock($funcPtrCallable, ptr.cast()), - // retain: false, release: true); + static $blockType fromFunctionPointer(${_typeHelper.natFnPtrCType} ptr) => + $blockType($newPointerBlock($funcPtrCallable.cast(), ptr.cast()), + retain: false, release: true); /// Creates a block from a Dart function. /// @@ -361,6 +357,7 @@ extension $callExtension on $blockType { final returnNativeType = returnType.getNativeType(); + final newPointerBlock = _blockWrappers.newPointerBlock.name; final newClosureBlock = _blockWrappers.newClosureBlock.name; final invokeBlock = _blockWrappers.invokeBlock.name; final blockTypeName = w.objCLevelUniqueNamer.makeUnique('_BlockType'); @@ -375,6 +372,15 @@ extension $callExtension on $blockType { final retainStr = returnsRetained ? 'NS_RETURNS_RETAINED' : ''; final dtorClass = '_${w.className}_BlockDestroyer'; + final fnPtrArg = _typeHelper.fnType.getNativeType(varName: 'func'); + final fnPtrTrampArg = FunctionType( + returnType: returnType, + parameters: [ + Parameter(type: _typeHelper.fnType, name: 'func', objCConsumed: false), + ...params, + ], + ).getNativeType(varName: 'trampoline'); + final s = StringBuffer(); s.write(''' @@ -385,6 +391,13 @@ $returnNativeType $invokeBlock( return block(${noRetains.join(', ')}); } +__attribute__((visibility("default"))) __attribute__((used)) +$blockTypeName $newPointerBlock($fnPtrTrampArg, $fnPtrArg) NS_RETURNS_RETAINED { + return ^$returnNativeType($argStr) { + return trampoline(${['func', ...noRetains].join(', ')}); + }; +} + __attribute__((visibility("default"))) __attribute__((used)) $blockTypeName $newClosureBlock( $trampolineArg, int64_t closure_id, int64_t dispose_port, @@ -526,12 +539,13 @@ $blockTypeName $newBlockingBlock( } class _FnTypeHelper { - late final NativeFunc natFnType; + late final FunctionType fnType; late final FunctionType trampFnType; - late final String natFnFfiDartType; + late final String natFnPtrFfiDartType; late final String natFnPtrCType; late final String dartType; late final String ffiDartType; + late final String fnPtrTrampCType; late final String trampCType; late final String trampFfiDartType; late final String trampNatCallType; @@ -541,13 +555,22 @@ class _FnTypeHelper { late final String paramsDartType; _FnTypeHelper(Writer w, Type returnType, List params) { - final fnType = FunctionType(returnType: returnType, parameters: params); - natFnType = NativeFunc(fnType); - natFnFfiDartType = natFnType.getFfiDartType(w); - natFnPtrCType = PointerType(natFnType).getCType(w); + fnType = FunctionType(returnType: returnType, parameters: params); + final natFnPtrType = PointerType(NativeFunc(fnType)); + natFnPtrFfiDartType = natFnPtrType.getFfiDartType(w); + natFnPtrCType = natFnPtrType.getCType(w); dartType = fnType.getDartType(w, writeArgumentNames: false); ffiDartType = fnType.getFfiDartType(w, writeArgumentNames: false); + final fnPtrTrampFnType = FunctionType( + returnType: returnType, + parameters: [ + Parameter(type: natFnPtrType, name: 'func', objCConsumed: false), + ...params, + ], + ); + fnPtrTrampCType = fnPtrTrampFnType.getCType(w, writeArgumentNames: false); + trampFnType = FunctionType( returnType: returnType, parameters: [ 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 65e5d59ba..06f207367 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 @@ -246,6 +246,23 @@ class ObjCBuiltInFunctions { useNameForLookup: true, ffiNativeConfig: const FfiNativeConfig(enabled: true), ), + Func( + name: '_${wrapperName}_newPointerBlock_$idHash', + returnType: PointerType(objCBlockType), + parameters: [ + Parameter( + name: 'trampoline', + type: PointerType(voidType), + objCConsumed: false), + Parameter( + name: 'func', type: PointerType(voidType), objCConsumed: false), + ], + objCReturnsRetained: true, + isLeaf: true, + isInternal: true, + useNameForLookup: true, + ffiNativeConfig: const FfiNativeConfig(enabled: true), + ), Func( name: '_${wrapperName}_newClosureBlock_$idHash', returnType: PointerType(objCBlockType), @@ -344,18 +361,20 @@ class ObjCBuiltInFunctions { /// A native trampoline function for a listener block. class ObjCBlockWrapperFuncs extends AstNode { final Func invokeBlock; + final Func newPointerBlock; final Func newClosureBlock; final Func? newListenerBlock; final Func? newBlockingBlock; bool objCBindingsGenerated = false; - ObjCBlockWrapperFuncs(this.invokeBlock, this.newClosureBlock, - this.newListenerBlock, this.newBlockingBlock); + ObjCBlockWrapperFuncs(this.invokeBlock, this.newPointerBlock, + this.newClosureBlock, this.newListenerBlock, this.newBlockingBlock); @override void visitChildren(Visitor visitor) { super.visitChildren(visitor); visitor.visit(invokeBlock); + visitor.visit(newPointerBlock); visitor.visit(newClosureBlock); visitor.visit(newListenerBlock); visitor.visit(newBlockingBlock); diff --git a/pkgs/ffigen/test/native_objc_test/block_test.dart b/pkgs/ffigen/test/native_objc_test/block_test.dart index 2892f425b..46709f5d2 100644 --- a/pkgs/ffigen/test/native_objc_test/block_test.dart +++ b/pkgs/ffigen/test/native_objc_test/block_test.dart @@ -65,14 +65,14 @@ void main() { expect(blockTester2.call_(456), 4560); }); - /*test('Block from function pointer', () { + test('Block from function pointer', () { final block = IntBlock.fromFunctionPointer(Pointer.fromFunction(_add100, 999)); final blockTester = BlockTester.newFromBlock_(block); blockTester.pokeBlock(); expect(blockTester.call_(123), 223); expect(block(123), 223); - });*/ + }); int Function(int) makeAdder(int addTo) { return (int x) => addTo + x; @@ -404,11 +404,9 @@ void main() { expect(result2(1), 14); }); - /*Pointer funcPointerBlockRefCountTest() { + Pointer funcPointerBlockRefCountTest() { final block = IntBlock.fromFunctionPointer(Pointer.fromFunction(_add100, 999)); - expect(internal_for_testing.isClosureOfBlock(closureId), - false); expect(blockRetainCount(block.ref.pointer), 1); return block.ref.pointer; } @@ -417,7 +415,7 @@ void main() { final rawBlock = funcPointerBlockRefCountTest(); doGC(); expect(blockRetainCount(rawBlock), 0); - }, skip: !canDoGC);*/ + }, skip: !canDoGC); (Pointer, int) funcBlockRefCountTest() { final block = IntBlock.fromFunction(makeAdder(4000)); diff --git a/pkgs/objective_c/lib/src/objective_c_bindings_generated.dart b/pkgs/objective_c/lib/src/objective_c_bindings_generated.dart index f2fbd2a25..15a6abe90 100644 --- a/pkgs/objective_c/lib/src/objective_c_bindings_generated.dart +++ b/pkgs/objective_c/lib/src/objective_c_bindings_generated.dart @@ -794,6 +794,159 @@ external ffi.Pointer dtor, ); +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(isLeaf: true) +external ffi.Pointer + _ObjectiveCBindings_newPointerBlock_17ap02x( + ffi.Pointer trampoline, + ffi.Pointer func, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(isLeaf: true) +external ffi.Pointer + _ObjectiveCBindings_newPointerBlock_18d6mda( + ffi.Pointer trampoline, + ffi.Pointer func, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(isLeaf: true) +external ffi.Pointer + _ObjectiveCBindings_newPointerBlock_1a8cl66( + ffi.Pointer trampoline, + ffi.Pointer func, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(isLeaf: true) +external ffi.Pointer + _ObjectiveCBindings_newPointerBlock_1c0c70u( + ffi.Pointer trampoline, + ffi.Pointer func, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(isLeaf: true) +external ffi.Pointer + _ObjectiveCBindings_newPointerBlock_1ckyi24( + ffi.Pointer trampoline, + ffi.Pointer func, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(isLeaf: true) +external ffi.Pointer + _ObjectiveCBindings_newPointerBlock_1j2nt86( + ffi.Pointer trampoline, + ffi.Pointer func, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(isLeaf: true) +external ffi.Pointer + _ObjectiveCBindings_newPointerBlock_1m9h2n( + ffi.Pointer trampoline, + ffi.Pointer func, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(isLeaf: true) +external ffi.Pointer + _ObjectiveCBindings_newPointerBlock_1yesha9( + ffi.Pointer trampoline, + ffi.Pointer func, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(isLeaf: true) +external ffi.Pointer + _ObjectiveCBindings_newPointerBlock_e2pkq8( + ffi.Pointer trampoline, + ffi.Pointer func, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(isLeaf: true) +external ffi.Pointer + _ObjectiveCBindings_newPointerBlock_e3qsqz( + ffi.Pointer trampoline, + ffi.Pointer func, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(isLeaf: true) +external ffi.Pointer + _ObjectiveCBindings_newPointerBlock_ovsamd( + ffi.Pointer trampoline, + ffi.Pointer func, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(isLeaf: true) +external ffi.Pointer + _ObjectiveCBindings_newPointerBlock_ozkafd( + ffi.Pointer trampoline, + ffi.Pointer func, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(isLeaf: true) +external ffi.Pointer + _ObjectiveCBindings_newPointerBlock_u8b97m( + ffi.Pointer trampoline, + ffi.Pointer func, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(isLeaf: true) +external ffi.Pointer + _ObjectiveCBindings_newPointerBlock_w1e3k0( + ffi.Pointer trampoline, + ffi.Pointer func, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(isLeaf: true) +external ffi.Pointer + _ObjectiveCBindings_newPointerBlock_wjovn7( + ffi.Pointer trampoline, + ffi.Pointer func, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(isLeaf: true) +external ffi.Pointer + _ObjectiveCBindings_newPointerBlock_wjvic9( + ffi.Pointer trampoline, + ffi.Pointer func, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(isLeaf: true) +external ffi.Pointer + _ObjectiveCBindings_newPointerBlock_ykn0t6( + ffi.Pointer trampoline, + ffi.Pointer func, +); + /// Helper class to adapt a Dart stream into a `NSInputStream`. class DartInputStreamAdapter extends NSInputStream { DartInputStreamAdapter._(ffi.Pointer pointer, @@ -9255,20 +9408,20 @@ class NSValue extends NSObject { } ffi.Pointer _ObjCBlock_NSString_ffiVoid_fnPtrTrampoline( - ffi.Pointer block, - int closureId, + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0)>> + func, ffi.Pointer arg0) => - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer arg0)>>.fromAddress(closureId) - .asFunction< - ffi.Pointer Function( - ffi.Pointer)>()(arg0); + func.asFunction< + ffi.Pointer Function(ffi.Pointer)>()(arg0); final _ObjCBlock_NSString_ffiVoid_fnPtrCallable = ffi.Pointer.fromFunction< ffi.Pointer Function( - ffi.Pointer, - ffi.Int64, + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0)>>, ffi.Pointer)>(_ObjCBlock_NSString_ffiVoid_fnPtrTrampoline); ffi.Pointer _ObjCBlock_NSString_ffiVoid_closureTrampoline( ffi.Pointer block, @@ -9296,9 +9449,17 @@ abstract final class ObjCBlock_NSString_ffiVoid { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - // static objc.ObjCBlock)> fromFunctionPointer(ffi.Pointer Function(ffi.Pointer arg0)>> ptr) => - // objc.ObjCBlock)>(todo(_ObjCBlock_NSString_ffiVoid_fnPtrCallable, ptr.cast()), - // retain: false, release: true); + static objc.ObjCBlock)> fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0)>> + ptr) => + objc.ObjCBlock)>( + _ObjectiveCBindings_newPointerBlock_1yesha9( + _ObjCBlock_NSString_ffiVoid_fnPtrCallable.cast(), ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// @@ -9327,17 +9488,18 @@ extension ObjCBlock_NSString_ffiVoid_CallExtension } int _ObjCBlock_NSUInteger_ffiVoid_fnPtrTrampoline( - ffi.Pointer block, - int closureId, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer arg0)>> + func, ffi.Pointer arg0) => - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer arg0)>>.fromAddress(closureId) - .asFunction)>()(arg0); + func.asFunction)>()(arg0); final _ObjCBlock_NSUInteger_ffiVoid_fnPtrCallable = ffi.Pointer.fromFunction< ffi.UnsignedLong Function( - ffi.Pointer, ffi.Int64, ffi.Pointer)>( + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer arg0)>>, + ffi.Pointer)>( _ObjCBlock_NSUInteger_ffiVoid_fnPtrTrampoline, 0); int _ObjCBlock_NSUInteger_ffiVoid_closureTrampoline( ffi.Pointer block, @@ -9366,9 +9528,16 @@ abstract final class ObjCBlock_NSUInteger_ffiVoid { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - // static objc.ObjCBlock)> fromFunctionPointer(ffi.Pointer arg0)>> ptr) => - // objc.ObjCBlock)>(todo(_ObjCBlock_NSUInteger_ffiVoid_fnPtrCallable, ptr.cast()), - // retain: false, release: true); + static objc.ObjCBlock)> fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer arg0)>> + ptr) => + objc.ObjCBlock)>( + _ObjectiveCBindings_newPointerBlock_1ckyi24( + _ObjCBlock_NSUInteger_ffiVoid_fnPtrCallable.cast(), ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// @@ -9394,30 +9563,34 @@ extension ObjCBlock_NSUInteger_ffiVoid_CallExtension } int _ObjCBlock_NSUInteger_ffiVoid_NSFastEnumerationState_objcObjCObject_NSUInteger_fnPtrTrampoline( - ffi.Pointer block, - int closureId, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer> arg2, + ffi.UnsignedLong arg3)>> + func, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer> arg2, int arg3) => - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer> arg2, - ffi.UnsignedLong arg3)>>.fromAddress(closureId) - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - int)>()(arg0, arg1, arg2, arg3); + func.asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + int)>()(arg0, arg1, arg2, arg3); final _ObjCBlock_NSUInteger_ffiVoid_NSFastEnumerationState_objcObjCObject_NSUInteger_fnPtrCallable = ffi.Pointer.fromFunction< ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Int64, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer> arg2, + ffi.UnsignedLong arg3)>>, ffi.Pointer, ffi.Pointer, ffi.Pointer>, @@ -9471,9 +9644,22 @@ abstract final class ObjCBlock_NSUInteger_ffiVoid_NSFastEnumerationState_objcObj /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - // static objc.ObjCBlock, ffi.Pointer, ffi.Pointer>, ffi.UnsignedLong)> fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer> arg2, ffi.UnsignedLong arg3)>> ptr) => - // objc.ObjCBlock, ffi.Pointer, ffi.Pointer>, ffi.UnsignedLong)>(todo(_ObjCBlock_NSUInteger_ffiVoid_NSFastEnumerationState_objcObjCObject_NSUInteger_fnPtrCallable, ptr.cast()), - // retain: false, release: true); + static objc.ObjCBlock< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.UnsignedLong)> + fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer> arg2, ffi.UnsignedLong arg3)>> ptr) => + objc.ObjCBlock< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.UnsignedLong)>( + _ObjectiveCBindings_newPointerBlock_17ap02x(_ObjCBlock_NSUInteger_ffiVoid_NSFastEnumerationState_objcObjCObject_NSUInteger_fnPtrCallable.cast(), ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// @@ -9511,17 +9697,18 @@ extension ObjCBlock_NSUInteger_ffiVoid_NSFastEnumerationState_objcObjCObject_NSU } ffi.Pointer<_NSZone> _ObjCBlock_NSZone_ffiVoid_fnPtrTrampoline( - ffi.Pointer block, - int closureId, - ffi.Pointer arg0) => - ffi.Pointer< + ffi.Pointer< ffi.NativeFunction< - ffi.Pointer<_NSZone> Function( - ffi.Pointer arg0)>>.fromAddress(closureId) - .asFunction Function(ffi.Pointer)>()( + ffi.Pointer<_NSZone> Function(ffi.Pointer arg0)>> + func, + ffi.Pointer arg0) => + func.asFunction Function(ffi.Pointer)>()( arg0); final _ObjCBlock_NSZone_ffiVoid_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Pointer<_NSZone> Function(ffi.Pointer, ffi.Int64, + ffi.Pointer<_NSZone> Function( + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer<_NSZone> Function(ffi.Pointer arg0)>>, ffi.Pointer)>(_ObjCBlock_NSZone_ffiVoid_fnPtrTrampoline); ffi.Pointer<_NSZone> _ObjCBlock_NSZone_ffiVoid_closureTrampoline( ffi.Pointer block, @@ -9549,9 +9736,15 @@ abstract final class ObjCBlock_NSZone_ffiVoid { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - // static objc.ObjCBlock Function(ffi.Pointer)> fromFunctionPointer(ffi.Pointer Function(ffi.Pointer arg0)>> ptr) => - // objc.ObjCBlock Function(ffi.Pointer)>(todo(_ObjCBlock_NSZone_ffiVoid_fnPtrCallable, ptr.cast()), - // retain: false, release: true); + static objc.ObjCBlock< + ffi.Pointer<_NSZone> Function(ffi.Pointer)> fromFunctionPointer( + ffi.Pointer Function(ffi.Pointer arg0)>> + ptr) => + objc.ObjCBlock Function(ffi.Pointer)>( + _ObjectiveCBindings_newPointerBlock_1a8cl66( + _ObjCBlock_NSZone_ffiVoid_fnPtrCallable.cast(), ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// @@ -9577,16 +9770,16 @@ extension ObjCBlock_NSZone_ffiVoid_CallExtension } bool _ObjCBlock_bool_ffiVoid_fnPtrTrampoline( - ffi.Pointer block, - int closureId, + ffi.Pointer< + ffi + .NativeFunction arg0)>> + func, ffi.Pointer arg0) => - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer arg0)>>.fromAddress(closureId) - .asFunction)>()(arg0); + func.asFunction)>()(arg0); final _ObjCBlock_bool_ffiVoid_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Bool Function(ffi.Pointer, ffi.Int64, + ffi.Bool Function( + ffi.Pointer< + ffi.NativeFunction arg0)>>, ffi.Pointer)>(_ObjCBlock_bool_ffiVoid_fnPtrTrampoline, false); bool _ObjCBlock_bool_ffiVoid_closureTrampoline( ffi.Pointer block, @@ -9613,9 +9806,16 @@ abstract final class ObjCBlock_bool_ffiVoid { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - // static objc.ObjCBlock)> fromFunctionPointer(ffi.Pointer arg0)>> ptr) => - // objc.ObjCBlock)>(todo(_ObjCBlock_bool_ffiVoid_fnPtrCallable, ptr.cast()), - // retain: false, release: true); + static objc.ObjCBlock)> fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0)>> + ptr) => + objc.ObjCBlock)>( + _ObjectiveCBindings_newPointerBlock_e3qsqz( + _ObjCBlock_bool_ffiVoid_fnPtrCallable.cast(), ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// @@ -9641,20 +9841,24 @@ extension ObjCBlock_bool_ffiVoid_CallExtension } bool _ObjCBlock_bool_ffiVoid_Protocol_fnPtrTrampoline( - ffi.Pointer block, - int closureId, + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + func, ffi.Pointer arg0, ffi.Pointer arg1) => - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>.fromAddress(closureId) - .asFunction< - bool Function(ffi.Pointer, - ffi.Pointer)>()(arg0, arg1); + func.asFunction< + bool Function( + ffi.Pointer, ffi.Pointer)>()(arg0, arg1); final _ObjCBlock_bool_ffiVoid_Protocol_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Bool Function(ffi.Pointer, ffi.Int64, - ffi.Pointer, ffi.Pointer)>( + ffi.Bool Function( + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>, + ffi.Pointer, + ffi.Pointer)>( _ObjCBlock_bool_ffiVoid_Protocol_fnPtrTrampoline, false); bool _ObjCBlock_bool_ffiVoid_Protocol_closureTrampoline( ffi.Pointer block, @@ -9685,9 +9889,16 @@ abstract final class ObjCBlock_bool_ffiVoid_Protocol { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - // static objc.ObjCBlock, Protocol)> fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1)>> ptr) => - // objc.ObjCBlock, Protocol)>(todo(_ObjCBlock_bool_ffiVoid_Protocol_fnPtrCallable, ptr.cast()), - // retain: false, release: true); + static objc.ObjCBlock< + ffi.Bool Function(ffi.Pointer, Protocol)> fromFunctionPointer( + ffi.Pointer arg0, ffi.Pointer arg1)>> + ptr) => + objc.ObjCBlock, Protocol)>( + _ObjectiveCBindings_newPointerBlock_ozkafd( + _ObjCBlock_bool_ffiVoid_Protocol_fnPtrCallable.cast(), + ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// @@ -9718,21 +9929,25 @@ extension ObjCBlock_bool_ffiVoid_Protocol_CallExtension } bool _ObjCBlock_bool_ffiVoid_objcObjCObject_fnPtrTrampoline( - ffi.Pointer block, - int closureId, + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + func, ffi.Pointer arg0, ffi.Pointer arg1) => - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>.fromAddress(closureId) - .asFunction< - bool Function(ffi.Pointer, - ffi.Pointer)>()(arg0, arg1); + func.asFunction< + bool Function( + ffi.Pointer, ffi.Pointer)>()(arg0, arg1); final _ObjCBlock_bool_ffiVoid_objcObjCObject_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Bool Function(ffi.Pointer, ffi.Int64, - ffi.Pointer, ffi.Pointer)>( + ffi.Bool Function( + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>, + ffi.Pointer, + ffi.Pointer)>( _ObjCBlock_bool_ffiVoid_objcObjCObject_fnPtrTrampoline, false); bool _ObjCBlock_bool_ffiVoid_objcObjCObject_closureTrampoline( ffi.Pointer block, @@ -9767,9 +9982,17 @@ abstract final class ObjCBlock_bool_ffiVoid_objcObjCObject { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - // static objc.ObjCBlock, ffi.Pointer)> fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1)>> ptr) => - // objc.ObjCBlock, ffi.Pointer)>(todo(_ObjCBlock_bool_ffiVoid_objcObjCObject_fnPtrCallable, ptr.cast()), - // retain: false, release: true); + static objc + .ObjCBlock, ffi.Pointer)> + fromFunctionPointer( + ffi.Pointer arg0, ffi.Pointer arg1)>> + ptr) => + objc.ObjCBlock, ffi.Pointer)>( + _ObjectiveCBindings_newPointerBlock_ozkafd( + _ObjCBlock_bool_ffiVoid_objcObjCObject_fnPtrCallable.cast(), + ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// @@ -9800,22 +10023,25 @@ extension ObjCBlock_bool_ffiVoid_objcObjCObject_CallExtension on objc.ObjCBlock< } bool _ObjCBlock_bool_ffiVoid_objcObjCSelector_fnPtrTrampoline( - ffi.Pointer block, - int closureId, - ffi.Pointer arg0, - ffi.Pointer arg1) => - ffi.Pointer< + ffi.Pointer< ffi.NativeFunction< ffi.Bool Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>.fromAddress( - closureId) - .asFunction< - bool Function(ffi.Pointer, - ffi.Pointer)>()(arg0, arg1); + ffi.Pointer arg1)>> + func, + ffi.Pointer arg0, + ffi.Pointer arg1) => + func.asFunction< + bool Function(ffi.Pointer, + ffi.Pointer)>()(arg0, arg1); final _ObjCBlock_bool_ffiVoid_objcObjCSelector_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Bool Function(ffi.Pointer, ffi.Int64, - ffi.Pointer, ffi.Pointer)>( + ffi.Bool Function( + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>, + ffi.Pointer, + ffi.Pointer)>( _ObjCBlock_bool_ffiVoid_objcObjCSelector_fnPtrTrampoline, false); bool _ObjCBlock_bool_ffiVoid_objcObjCSelector_closureTrampoline( ffi.Pointer block, @@ -9850,9 +10076,17 @@ abstract final class ObjCBlock_bool_ffiVoid_objcObjCSelector { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - // static objc.ObjCBlock, ffi.Pointer)> fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1)>> ptr) => - // objc.ObjCBlock, ffi.Pointer)>(todo(_ObjCBlock_bool_ffiVoid_objcObjCSelector_fnPtrCallable, ptr.cast()), - // retain: false, release: true); + static objc + .ObjCBlock, ffi.Pointer)> + fromFunctionPointer( + ffi.Pointer arg0, ffi.Pointer arg1)>> + ptr) => + objc.ObjCBlock, ffi.Pointer)>( + _ObjectiveCBindings_newPointerBlock_w1e3k0( + _ObjCBlock_bool_ffiVoid_objcObjCSelector_fnPtrCallable.cast(), + ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// @@ -9885,28 +10119,30 @@ extension ObjCBlock_bool_ffiVoid_objcObjCSelector_CallExtension void _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObject_NSDictionary_fnPtrTrampoline( - ffi.Pointer block, - int closureId, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - ffi.Pointer< + ffi.Pointer< ffi.NativeFunction< ffi.Void Function( ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2)>>.fromAddress( - closureId) - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()(arg0, arg1, arg2); + ffi.Pointer arg2)>> + func, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + func.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(arg0, arg1, arg2); final _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObject_NSDictionary_fnPtrCallable = ffi.Pointer.fromFunction< ffi.Void Function( - ffi.Pointer, - ffi.Int64, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>, ffi.Pointer, ffi.Pointer, ffi.Pointer)>( @@ -10042,9 +10278,19 @@ abstract final class ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCO /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - // static objc.ObjCBlock?, NSError)>, ffi.Pointer, NSDictionary)> fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2)>> ptr) => - // objc.ObjCBlock?, NSError)>, ffi.Pointer, NSDictionary)>(todo(_ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObject_NSDictionary_fnPtrCallable, ptr.cast()), - // retain: false, release: true); + static objc.ObjCBlock?, NSError)>, ffi.Pointer, NSDictionary)> + fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2)>> ptr) => + objc.ObjCBlock< + ffi.Void Function( + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer?, NSError)>, + ffi.Pointer, + NSDictionary)>( + _ObjectiveCBindings_newPointerBlock_1j2nt86( + _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObject_NSDictionary_fnPtrCallable.cast(), ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// @@ -10138,16 +10384,16 @@ extension ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObject_NSDic } void _ObjCBlock_ffiVoid_ffiVoid_fnPtrTrampoline( - ffi.Pointer block, - int closureId, + ffi.Pointer< + ffi + .NativeFunction arg0)>> + func, ffi.Pointer arg0) => - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0)>>.fromAddress(closureId) - .asFunction)>()(arg0); + func.asFunction)>()(arg0); final _ObjCBlock_ffiVoid_ffiVoid_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, ffi.Int64, + ffi.Void Function( + ffi.Pointer< + ffi.NativeFunction arg0)>>, ffi.Pointer)>(_ObjCBlock_ffiVoid_ffiVoid_fnPtrTrampoline); void _ObjCBlock_ffiVoid_ffiVoid_closureTrampoline( ffi.Pointer block, @@ -10221,9 +10467,16 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - // static objc.ObjCBlock)> fromFunctionPointer(ffi.Pointer arg0)>> ptr) => - // objc.ObjCBlock)>(todo(_ObjCBlock_ffiVoid_ffiVoid_fnPtrCallable, ptr.cast()), - // retain: false, release: true); + static objc.ObjCBlock)> fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) => + objc.ObjCBlock)>( + _ObjectiveCBindings_newPointerBlock_ovsamd( + _ObjCBlock_ffiVoid_ffiVoid_fnPtrCallable.cast(), ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// @@ -10289,21 +10542,25 @@ extension ObjCBlock_ffiVoid_ffiVoid_CallExtension } void _ObjCBlock_ffiVoid_ffiVoid_NSCoder_fnPtrTrampoline( - ffi.Pointer block, - int closureId, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + func, ffi.Pointer arg0, ffi.Pointer arg1) => - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>.fromAddress(closureId) - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer)>()(arg0, arg1); + func.asFunction< + void Function( + ffi.Pointer, ffi.Pointer)>()(arg0, arg1); final _ObjCBlock_ffiVoid_ffiVoid_NSCoder_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, ffi.Int64, - ffi.Pointer, ffi.Pointer)>( + ffi.Void Function( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>, + ffi.Pointer, + ffi.Pointer)>( _ObjCBlock_ffiVoid_ffiVoid_NSCoder_fnPtrTrampoline); void _ObjCBlock_ffiVoid_ffiVoid_NSCoder_closureTrampoline( ffi.Pointer block, @@ -10401,9 +10658,16 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSCoder { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - // static objc.ObjCBlock, NSCoder)> fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1)>> ptr) => - // objc.ObjCBlock, NSCoder)>(todo(_ObjCBlock_ffiVoid_ffiVoid_NSCoder_fnPtrCallable, ptr.cast()), - // retain: false, release: true); + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSCoder)> fromFunctionPointer( + ffi.Pointer arg0, ffi.Pointer arg1)>> + ptr) => + objc.ObjCBlock, NSCoder)>( + _ObjectiveCBindings_newPointerBlock_wjovn7( + _ObjCBlock_ffiVoid_ffiVoid_NSCoder_fnPtrCallable.cast(), + ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// @@ -10480,25 +10744,28 @@ extension ObjCBlock_ffiVoid_ffiVoid_NSCoder_CallExtension } void _ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent_fnPtrTrampoline( - ffi.Pointer block, - int closureId, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.UnsignedLong arg2)>> + func, ffi.Pointer arg0, ffi.Pointer arg1, int arg2) => - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.UnsignedLong arg2)>>.fromAddress(closureId) - .asFunction< - void Function(ffi.Pointer, ffi.Pointer, - int)>()(arg0, arg1, arg2); + func.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + int)>()(arg0, arg1, arg2); final _ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent_fnPtrCallable = ffi.Pointer.fromFunction< ffi.Void Function( - ffi.Pointer, - ffi.Int64, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.UnsignedLong arg2)>>, ffi.Pointer, ffi.Pointer, ffi.UnsignedLong)>( @@ -10620,9 +10887,17 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - // static objc.ObjCBlock, NSStream, ffi.UnsignedLong)> fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.UnsignedLong arg2)>> ptr) => - // objc.ObjCBlock, NSStream, ffi.UnsignedLong)>(todo(_ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent_fnPtrCallable, ptr.cast()), - // retain: false, release: true); + static objc + .ObjCBlock, NSStream, ffi.UnsignedLong)> + fromFunctionPointer( + ffi.Pointer arg0, ffi.Pointer arg1, ffi.UnsignedLong arg2)>> + ptr) => + objc.ObjCBlock, NSStream, ffi.UnsignedLong)>( + _ObjectiveCBindings_newPointerBlock_18d6mda( + _ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent_fnPtrCallable.cast(), + ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// @@ -10704,21 +10979,25 @@ extension ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent_CallExtension } void _ObjCBlock_ffiVoid_objcObjCObject_NSError_fnPtrTrampoline( - ffi.Pointer block, - int closureId, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + func, ffi.Pointer arg0, ffi.Pointer arg1) => - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>.fromAddress(closureId) - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer)>()(arg0, arg1); + func.asFunction< + void Function(ffi.Pointer, + ffi.Pointer)>()(arg0, arg1); final _ObjCBlock_ffiVoid_objcObjCObject_NSError_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, ffi.Int64, - ffi.Pointer, ffi.Pointer)>( + ffi.Void Function( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>, + ffi.Pointer, + ffi.Pointer)>( _ObjCBlock_ffiVoid_objcObjCObject_NSError_fnPtrTrampoline); void _ObjCBlock_ffiVoid_objcObjCObject_NSError_closureTrampoline( ffi.Pointer block, @@ -10823,9 +11102,16 @@ abstract final class ObjCBlock_ffiVoid_objcObjCObject_NSError { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - // static objc.ObjCBlock?, NSError)> fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1)>> ptr) => - // objc.ObjCBlock?, NSError)>(todo(_ObjCBlock_ffiVoid_objcObjCObject_NSError_fnPtrCallable, ptr.cast()), - // retain: false, release: true); + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, NSError)> fromFunctionPointer( + ffi.Pointer arg0, ffi.Pointer arg1)>> + ptr) => + objc.ObjCBlock?, NSError)>( + _ObjectiveCBindings_newPointerBlock_wjvic9( + _ObjCBlock_ffiVoid_objcObjCObject_NSError_fnPtrCallable.cast(), + ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// @@ -10909,21 +11195,25 @@ extension ObjCBlock_ffiVoid_objcObjCObject_NSError_CallExtension on objc } instancetype _ObjCBlock_instancetype_ffiVoid_NSCoder_fnPtrTrampoline( - ffi.Pointer block, - int closureId, + ffi.Pointer< + ffi.NativeFunction< + instancetype Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + func, ffi.Pointer arg0, ffi.Pointer arg1) => - ffi.Pointer< - ffi.NativeFunction< - instancetype Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>.fromAddress(closureId) - .asFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer)>()(arg0, arg1); + func.asFunction< + instancetype Function( + ffi.Pointer, ffi.Pointer)>()(arg0, arg1); final _ObjCBlock_instancetype_ffiVoid_NSCoder_fnPtrCallable = ffi.Pointer.fromFunction< - instancetype Function(ffi.Pointer, ffi.Int64, - ffi.Pointer, ffi.Pointer)>( + instancetype Function( + ffi.Pointer< + ffi.NativeFunction< + instancetype Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>, + ffi.Pointer, + ffi.Pointer)>( _ObjCBlock_instancetype_ffiVoid_NSCoder_fnPtrTrampoline); instancetype _ObjCBlock_instancetype_ffiVoid_NSCoder_closureTrampoline( ffi.Pointer block, @@ -10956,9 +11246,17 @@ abstract final class ObjCBlock_instancetype_ffiVoid_NSCoder { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - // static objc.ObjCBlock?> Function(ffi.Pointer, NSCoder)> fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1)>> ptr) => - // objc.ObjCBlock?> Function(ffi.Pointer, NSCoder)>(todo(_ObjCBlock_instancetype_ffiVoid_NSCoder_fnPtrCallable, ptr.cast()), - // retain: false, release: true); + static objc.ObjCBlock< + objc.Retained?> Function( + ffi.Pointer, NSCoder)> + fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1)>> ptr) => + objc.ObjCBlock< + objc.Retained?> Function( + ffi.Pointer, NSCoder)>( + _ObjectiveCBindings_newPointerBlock_1m9h2n( + _ObjCBlock_instancetype_ffiVoid_NSCoder_fnPtrCallable.cast(), ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// @@ -11000,32 +11298,37 @@ extension ObjCBlock_instancetype_ffiVoid_NSCoder_CallExtension release: true); } -instancetype _ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError_fnPtrTrampoline( - ffi.Pointer block, - int closureId, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer> arg3) => - ffi.Pointer< - ffi.NativeFunction< +instancetype + _ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError_fnPtrTrampoline( + ffi.Pointer< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer> arg3)>> + func, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer> arg3) => + func.asFunction< instancetype Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer> - arg3)>>.fromAddress(closureId) - .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>()(arg0, arg1, arg2, arg3); + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>()( + arg0, arg1, arg2, arg3); final _ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError_fnPtrCallable = ffi.Pointer.fromFunction< instancetype Function( - ffi.Pointer, - ffi.Int64, + ffi.Pointer< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer> arg3)>>, ffi.Pointer, ffi.Pointer, ffi.Pointer, @@ -11076,9 +11379,19 @@ abstract final class ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - // static objc.ObjCBlock? Function(ffi.Pointer, NSData, NSString, ffi.Pointer>)> fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer> arg3)>> ptr) => - // objc.ObjCBlock? Function(ffi.Pointer, NSData, NSString, ffi.Pointer>)>(todo(_ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError_fnPtrCallable, ptr.cast()), - // retain: false, release: true); + static objc.ObjCBlock< + ffi.Pointer? Function(ffi.Pointer, NSData, + NSString, ffi.Pointer>)> + fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer> arg3)>> ptr) => + objc.ObjCBlock< + ffi.Pointer? Function( + ffi.Pointer, + NSData, + NSString, + ffi.Pointer>)>( + _ObjectiveCBindings_newPointerBlock_e2pkq8(_ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError_fnPtrCallable.cast(), ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// @@ -11121,21 +11434,21 @@ extension ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError_CallExtension } ffi.Pointer _ObjCBlock_objcObjCObject_ffiVoid_fnPtrTrampoline( - ffi.Pointer block, - int closureId, + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0)>> + func, ffi.Pointer arg0) => - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer arg0)>>.fromAddress(closureId) - .asFunction< - ffi.Pointer Function( - ffi.Pointer)>()(arg0); + func.asFunction< + ffi.Pointer Function(ffi.Pointer)>()(arg0); final _ObjCBlock_objcObjCObject_ffiVoid_fnPtrCallable = ffi.Pointer.fromFunction< ffi.Pointer Function( - ffi.Pointer, - ffi.Int64, + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0)>>, ffi.Pointer)>( _ObjCBlock_objcObjCObject_ffiVoid_fnPtrTrampoline); ffi.Pointer @@ -11171,9 +11484,17 @@ abstract final class ObjCBlock_objcObjCObject_ffiVoid { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - // static objc.ObjCBlock Function(ffi.Pointer)> fromFunctionPointer(ffi.Pointer Function(ffi.Pointer arg0)>> ptr) => - // objc.ObjCBlock Function(ffi.Pointer)>(todo(_ObjCBlock_objcObjCObject_ffiVoid_fnPtrCallable, ptr.cast()), - // retain: false, release: true); + static objc.ObjCBlock Function(ffi.Pointer)> + fromFunctionPointer( + ffi.Pointer Function(ffi.Pointer arg0)>> + ptr) => + objc.ObjCBlock< + ffi.Pointer Function(ffi.Pointer)>( + _ObjectiveCBindings_newPointerBlock_1yesha9( + _ObjCBlock_objcObjCObject_ffiVoid_fnPtrCallable.cast(), + ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// @@ -11205,23 +11526,25 @@ extension ObjCBlock_objcObjCObject_ffiVoid_CallExtension on objc ffi.Pointer _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_fnPtrTrampoline( - ffi.Pointer block, - int closureId, + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0, + ffi.Pointer arg1)>> + func, ffi.Pointer arg0, ffi.Pointer arg1) => - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer arg0, - ffi.Pointer arg1)>>.fromAddress( - closureId) - .asFunction Function(ffi.Pointer, ffi.Pointer)>()( - arg0, arg1); + func.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>()(arg0, arg1); final _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_fnPtrCallable = ffi.Pointer.fromFunction< ffi.Pointer Function( - ffi.Pointer, - ffi.Int64, + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0, + ffi.Pointer arg1)>>, ffi.Pointer, ffi.Pointer)>( _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_fnPtrTrampoline); @@ -11263,9 +11586,17 @@ abstract final class ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - // static objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer)> fromFunctionPointer(ffi.Pointer Function(ffi.Pointer arg0, ffi.Pointer arg1)>> ptr) => - // objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer)>(todo(_ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_fnPtrCallable, ptr.cast()), - // retain: false, release: true); + static objc + .ObjCBlock Function(ffi.Pointer, ffi.Pointer)> + fromFunctionPointer(ffi.Pointer Function(ffi.Pointer arg0, ffi.Pointer arg1)>> ptr) => + objc.ObjCBlock< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>( + _ObjectiveCBindings_newPointerBlock_ykn0t6( + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_fnPtrCallable.cast(), + ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// @@ -11301,23 +11632,30 @@ extension ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_CallExtension ffi.Pointer _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_fnPtrTrampoline( - ffi.Pointer block, - int closureId, + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>> + func, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>.fromAddress(closureId) - .asFunction Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>()(arg0, arg1, arg2); + func.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(arg0, arg1, arg2); final _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_fnPtrCallable = ffi.Pointer.fromFunction< ffi.Pointer Function( - ffi.Pointer, - ffi.Int64, + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>, ffi.Pointer, ffi.Pointer, ffi.Pointer)>( @@ -11364,9 +11702,18 @@ abstract final class ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCO /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - // static objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)> fromFunctionPointer(ffi.Pointer Function(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2)>> ptr) => - // objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(todo(_ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_fnPtrCallable, ptr.cast()), - // retain: false, release: true); + static objc.ObjCBlock< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)> + fromFunctionPointer(ffi.Pointer Function(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2)>> ptr) => + objc.ObjCBlock< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjectiveCBindings_newPointerBlock_1c0c70u(_ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_fnPtrCallable.cast(), ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// @@ -11405,25 +11752,34 @@ extension ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_CallE ffi.Pointer _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_fnPtrTrampoline( - ffi.Pointer block, - int closureId, + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3)>> + func, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer arg3) => - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3)>>.fromAddress(closureId) - .asFunction Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>()(arg0, arg1, arg2, arg3); + func.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(arg0, arg1, arg2, arg3); final _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_fnPtrCallable = ffi.Pointer.fromFunction< ffi.Pointer Function( - ffi.Pointer, - ffi.Int64, + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3)>>, ffi.Pointer, ffi.Pointer, ffi.Pointer, @@ -11477,9 +11833,22 @@ abstract final class ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCO /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - // static objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)> fromFunctionPointer(ffi.Pointer Function(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer arg3)>> ptr) => - // objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(todo(_ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_fnPtrCallable, ptr.cast()), - // retain: false, release: true); + static objc.ObjCBlock< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)> + fromFunctionPointer(ffi.Pointer Function(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer arg3)>> ptr) => + objc.ObjCBlock< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjectiveCBindings_newPointerBlock_u8b97m(_ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_fnPtrCallable.cast(), ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// diff --git a/pkgs/objective_c/src/objective_c_bindings_generated.m b/pkgs/objective_c/src/objective_c_bindings_generated.m index e4f24a85c..1f13d71c3 100644 --- a/pkgs/objective_c/src/objective_c_bindings_generated.m +++ b/pkgs/objective_c/src/objective_c_bindings_generated.m @@ -40,6 +40,13 @@ id _ObjectiveCBindings_invokeBlock_1yesha9( return block(arg0); } +__attribute__((visibility("default"))) __attribute__((used)) +_BlockType _ObjectiveCBindings_newPointerBlock_1yesha9(id (*trampoline)(id (*)(void * ), void * ), id (*func)(void * )) NS_RETURNS_RETAINED { + return ^id (void * arg0) { + return trampoline(func, arg0); + }; +} + __attribute__((visibility("default"))) __attribute__((used)) _BlockType _ObjectiveCBindings_newClosureBlock_1yesha9( id (*trampoline)(id , int64_t , void * ), int64_t closure_id, int64_t dispose_port, @@ -61,6 +68,13 @@ unsigned long _ObjectiveCBindings_invokeBlock_1ckyi24( return block(arg0); } +__attribute__((visibility("default"))) __attribute__((used)) +_BlockType1 _ObjectiveCBindings_newPointerBlock_1ckyi24(unsigned long (*trampoline)(unsigned long (*)(void * ), void * ), unsigned long (*func)(void * )) NS_RETURNS_RETAINED { + return ^unsigned long (void * arg0) { + return trampoline(func, arg0); + }; +} + __attribute__((visibility("default"))) __attribute__((used)) _BlockType1 _ObjectiveCBindings_newClosureBlock_1ckyi24( unsigned long (*trampoline)(id , int64_t , void * ), int64_t closure_id, int64_t dispose_port, @@ -82,6 +96,13 @@ unsigned long _ObjectiveCBindings_invokeBlock_17ap02x( return block(arg0, arg1, arg2, arg3); } +__attribute__((visibility("default"))) __attribute__((used)) +_BlockType2 _ObjectiveCBindings_newPointerBlock_17ap02x(unsigned long (*trampoline)(unsigned long (*)(void * , NSFastEnumerationState * , id * , unsigned long ), void * , NSFastEnumerationState * , id * , unsigned long ), unsigned long (*func)(void * , NSFastEnumerationState * , id * , unsigned long )) NS_RETURNS_RETAINED { + return ^unsigned long (void * arg0, NSFastEnumerationState * arg1, id * arg2, unsigned long arg3) { + return trampoline(func, arg0, arg1, arg2, arg3); + }; +} + __attribute__((visibility("default"))) __attribute__((used)) _BlockType2 _ObjectiveCBindings_newClosureBlock_17ap02x( unsigned long (*trampoline)(id , int64_t , void * , NSFastEnumerationState * , id * , unsigned long ), int64_t closure_id, int64_t dispose_port, @@ -103,6 +124,13 @@ unsigned long (*trampoline)(id , int64_t , void * , NSFastEnumerationState * , return block(arg0); } +__attribute__((visibility("default"))) __attribute__((used)) +_BlockType3 _ObjectiveCBindings_newPointerBlock_1a8cl66(struct _NSZone * (*trampoline)(struct _NSZone * (*)(void * ), void * ), struct _NSZone * (*func)(void * )) NS_RETURNS_RETAINED { + return ^struct _NSZone * (void * arg0) { + return trampoline(func, arg0); + }; +} + __attribute__((visibility("default"))) __attribute__((used)) _BlockType3 _ObjectiveCBindings_newClosureBlock_1a8cl66( struct _NSZone * (*trampoline)(id , int64_t , void * ), int64_t closure_id, int64_t dispose_port, @@ -124,6 +152,13 @@ BOOL _ObjectiveCBindings_invokeBlock_e3qsqz( return block(arg0); } +__attribute__((visibility("default"))) __attribute__((used)) +_BlockType4 _ObjectiveCBindings_newPointerBlock_e3qsqz(BOOL (*trampoline)(BOOL (*)(void * ), void * ), BOOL (*func)(void * )) NS_RETURNS_RETAINED { + return ^BOOL (void * arg0) { + return trampoline(func, arg0); + }; +} + __attribute__((visibility("default"))) __attribute__((used)) _BlockType4 _ObjectiveCBindings_newClosureBlock_e3qsqz( BOOL (*trampoline)(id , int64_t , void * ), int64_t closure_id, int64_t dispose_port, @@ -145,6 +180,13 @@ BOOL _ObjectiveCBindings_invokeBlock_ozkafd( return block(arg0, arg1); } +__attribute__((visibility("default"))) __attribute__((used)) +_BlockType5 _ObjectiveCBindings_newPointerBlock_ozkafd(BOOL (*trampoline)(BOOL (*)(void * , id ), void * , id ), BOOL (*func)(void * , id )) NS_RETURNS_RETAINED { + return ^BOOL (void * arg0, id arg1) { + return trampoline(func, arg0, arg1); + }; +} + __attribute__((visibility("default"))) __attribute__((used)) _BlockType5 _ObjectiveCBindings_newClosureBlock_ozkafd( BOOL (*trampoline)(id , int64_t , void * , id ), int64_t closure_id, int64_t dispose_port, @@ -166,6 +208,13 @@ BOOL _ObjectiveCBindings_invokeBlock_w1e3k0( return block(arg0, arg1); } +__attribute__((visibility("default"))) __attribute__((used)) +_BlockType6 _ObjectiveCBindings_newPointerBlock_w1e3k0(BOOL (*trampoline)(BOOL (*)(void * , struct objc_selector * ), void * , struct objc_selector * ), BOOL (*func)(void * , struct objc_selector * )) NS_RETURNS_RETAINED { + return ^BOOL (void * arg0, struct objc_selector * arg1) { + return trampoline(func, arg0, arg1); + }; +} + __attribute__((visibility("default"))) __attribute__((used)) _BlockType6 _ObjectiveCBindings_newClosureBlock_w1e3k0( BOOL (*trampoline)(id , int64_t , void * , struct objc_selector * ), int64_t closure_id, int64_t dispose_port, @@ -187,6 +236,13 @@ void _ObjectiveCBindings_invokeBlock_1j2nt86( return block(arg0, arg1, arg2); } +__attribute__((visibility("default"))) __attribute__((used)) +_BlockType7 _ObjectiveCBindings_newPointerBlock_1j2nt86(void (*trampoline)(void (*)(id , id , id ), id , id , id ), void (*func)(id , id , id )) NS_RETURNS_RETAINED { + return ^void (id arg0, id arg1, id arg2) { + return trampoline(func, arg0, arg1, arg2); + }; +} + __attribute__((visibility("default"))) __attribute__((used)) _BlockType7 _ObjectiveCBindings_newClosureBlock_1j2nt86( void (*trampoline)(id , int64_t , id , id , id ), int64_t closure_id, int64_t dispose_port, @@ -247,6 +303,13 @@ void _ObjectiveCBindings_invokeBlock_ovsamd( return block(arg0); } +__attribute__((visibility("default"))) __attribute__((used)) +_BlockType8 _ObjectiveCBindings_newPointerBlock_ovsamd(void (*trampoline)(void (*)(void * ), void * ), void (*func)(void * )) NS_RETURNS_RETAINED { + return ^void (void * arg0) { + return trampoline(func, arg0); + }; +} + __attribute__((visibility("default"))) __attribute__((used)) _BlockType8 _ObjectiveCBindings_newClosureBlock_ovsamd( void (*trampoline)(id , int64_t , void * ), int64_t closure_id, int64_t dispose_port, @@ -307,6 +370,13 @@ void _ObjectiveCBindings_invokeBlock_wjovn7( return block(arg0, arg1); } +__attribute__((visibility("default"))) __attribute__((used)) +_BlockType9 _ObjectiveCBindings_newPointerBlock_wjovn7(void (*trampoline)(void (*)(void * , id ), void * , id ), void (*func)(void * , id )) NS_RETURNS_RETAINED { + return ^void (void * arg0, id arg1) { + return trampoline(func, arg0, arg1); + }; +} + __attribute__((visibility("default"))) __attribute__((used)) _BlockType9 _ObjectiveCBindings_newClosureBlock_wjovn7( void (*trampoline)(id , int64_t , void * , id ), int64_t closure_id, int64_t dispose_port, @@ -367,6 +437,13 @@ void _ObjectiveCBindings_invokeBlock_18d6mda( return block(arg0, arg1, arg2); } +__attribute__((visibility("default"))) __attribute__((used)) +_BlockType10 _ObjectiveCBindings_newPointerBlock_18d6mda(void (*trampoline)(void (*)(void * , id , NSStreamEvent ), void * , id , NSStreamEvent ), void (*func)(void * , id , NSStreamEvent )) NS_RETURNS_RETAINED { + return ^void (void * arg0, id arg1, NSStreamEvent arg2) { + return trampoline(func, arg0, arg1, arg2); + }; +} + __attribute__((visibility("default"))) __attribute__((used)) _BlockType10 _ObjectiveCBindings_newClosureBlock_18d6mda( void (*trampoline)(id , int64_t , void * , id , NSStreamEvent ), int64_t closure_id, int64_t dispose_port, @@ -427,6 +504,13 @@ void _ObjectiveCBindings_invokeBlock_wjvic9( return block(arg0, arg1); } +__attribute__((visibility("default"))) __attribute__((used)) +_BlockType11 _ObjectiveCBindings_newPointerBlock_wjvic9(void (*trampoline)(void (*)(id , id ), id , id ), void (*func)(id , id )) NS_RETURNS_RETAINED { + return ^void (id arg0, id arg1) { + return trampoline(func, arg0, arg1); + }; +} + __attribute__((visibility("default"))) __attribute__((used)) _BlockType11 _ObjectiveCBindings_newClosureBlock_wjvic9( void (*trampoline)(id , int64_t , id , id ), int64_t closure_id, int64_t dispose_port, @@ -487,6 +571,13 @@ id _ObjectiveCBindings_invokeBlock_1m9h2n( return block(arg0, arg1); } +__attribute__((visibility("default"))) __attribute__((used)) +_BlockType12 _ObjectiveCBindings_newPointerBlock_1m9h2n(id (*trampoline)(id (*)(void * , id ), void * , id ), id (*func)(void * , id )) NS_RETURNS_RETAINED { + return ^id (void * arg0, id arg1) { + return trampoline(func, arg0, arg1); + }; +} + __attribute__((visibility("default"))) __attribute__((used)) _BlockType12 _ObjectiveCBindings_newClosureBlock_1m9h2n( id (*trampoline)(id , int64_t , void * , id ), int64_t closure_id, int64_t dispose_port, @@ -508,6 +599,13 @@ id _ObjectiveCBindings_invokeBlock_e2pkq8( return block(arg0, arg1, arg2, arg3); } +__attribute__((visibility("default"))) __attribute__((used)) +_BlockType13 _ObjectiveCBindings_newPointerBlock_e2pkq8(id (*trampoline)(id (*)(void * , id , id , id * ), void * , id , id , id * ), id (*func)(void * , id , id , id * )) NS_RETURNS_RETAINED { + return ^id (void * arg0, id arg1, id arg2, id * arg3) { + return trampoline(func, arg0, arg1, arg2, arg3); + }; +} + __attribute__((visibility("default"))) __attribute__((used)) _BlockType13 _ObjectiveCBindings_newClosureBlock_e2pkq8( id (*trampoline)(id , int64_t , void * , id , id , id * ), int64_t closure_id, int64_t dispose_port, @@ -529,6 +627,13 @@ id _ObjectiveCBindings_invokeBlock_ykn0t6( return block(arg0, arg1); } +__attribute__((visibility("default"))) __attribute__((used)) +_BlockType14 _ObjectiveCBindings_newPointerBlock_ykn0t6(id (*trampoline)(id (*)(void * , struct objc_selector * ), void * , struct objc_selector * ), id (*func)(void * , struct objc_selector * )) NS_RETURNS_RETAINED { + return ^id (void * arg0, struct objc_selector * arg1) { + return trampoline(func, arg0, arg1); + }; +} + __attribute__((visibility("default"))) __attribute__((used)) _BlockType14 _ObjectiveCBindings_newClosureBlock_ykn0t6( id (*trampoline)(id , int64_t , void * , struct objc_selector * ), int64_t closure_id, int64_t dispose_port, @@ -550,6 +655,13 @@ id _ObjectiveCBindings_invokeBlock_1c0c70u( return block(arg0, arg1, arg2); } +__attribute__((visibility("default"))) __attribute__((used)) +_BlockType15 _ObjectiveCBindings_newPointerBlock_1c0c70u(id (*trampoline)(id (*)(void * , struct objc_selector * , id ), void * , struct objc_selector * , id ), id (*func)(void * , struct objc_selector * , id )) NS_RETURNS_RETAINED { + return ^id (void * arg0, struct objc_selector * arg1, id arg2) { + return trampoline(func, arg0, arg1, arg2); + }; +} + __attribute__((visibility("default"))) __attribute__((used)) _BlockType15 _ObjectiveCBindings_newClosureBlock_1c0c70u( id (*trampoline)(id , int64_t , void * , struct objc_selector * , id ), int64_t closure_id, int64_t dispose_port, @@ -571,6 +683,13 @@ id _ObjectiveCBindings_invokeBlock_u8b97m( return block(arg0, arg1, arg2, arg3); } +__attribute__((visibility("default"))) __attribute__((used)) +_BlockType16 _ObjectiveCBindings_newPointerBlock_u8b97m(id (*trampoline)(id (*)(void * , struct objc_selector * , id , id ), void * , struct objc_selector * , id , id ), id (*func)(void * , struct objc_selector * , id , id )) NS_RETURNS_RETAINED { + return ^id (void * arg0, struct objc_selector * arg1, id arg2, id arg3) { + return trampoline(func, arg0, arg1, arg2, arg3); + }; +} + __attribute__((visibility("default"))) __attribute__((used)) _BlockType16 _ObjectiveCBindings_newClosureBlock_u8b97m( id (*trampoline)(id , int64_t , void * , struct objc_selector * , id , id ), int64_t closure_id, int64_t dispose_port, diff --git a/pkgs/objective_c/test/generate_code_test.dart b/pkgs/objective_c/test/generate_code_test.dart index 5e2e2af1c..4bd0f3a26 100644 --- a/pkgs/objective_c/test/generate_code_test.dart +++ b/pkgs/objective_c/test/generate_code_test.dart @@ -26,7 +26,6 @@ void main() { File('lib/src/c_bindings_generated.dart').readAsStringSync(); expect(cBindings, contains('sel_registerName')); expect(cBindings, contains('objc_msgSend')); - expect(cBindings, contains('_NSConcreteGlobalBlock')); expect(cBindings, contains('_ObjCBlock')); final objcBindings = File('lib/src/objective_c_bindings_generated.dart') From 665ef620df490bf75a506c0bbd9706a9d2961516 Mon Sep 17 00:00:00 2001 From: Liam Appelbe Date: Tue, 14 Jan 2025 11:10:02 +1100 Subject: [PATCH 7/7] Remove objc_retain from bindings --- .../src/code_generator/objc_interface.dart | 3 +- .../lib/src/code_generator/pointer.dart | 3 +- .../ffigen/lib/src/code_generator/writer.dart | 1 - .../src/objective_c_bindings_generated.dart | 3248 ++++++++--------- .../src/objective_c_bindings_generated.m | 107 +- 5 files changed, 1681 insertions(+), 1681 deletions(-) diff --git a/pkgs/ffigen/lib/src/code_generator/objc_interface.dart b/pkgs/ffigen/lib/src/code_generator/objc_interface.dart index 6d9e03ed2..de18c0ea3 100644 --- a/pkgs/ffigen/lib/src/code_generator/objc_interface.dart +++ b/pkgs/ffigen/lib/src/code_generator/objc_interface.dart @@ -180,7 +180,8 @@ ${generateAsStub ? '' : _generateMethods(w)} } @override - String? generateRetain(String value) => 'objc_retain($value)'; + String? generateRetain(String value) => + '(__bridge id)(__bridge_retained void*)($value)'; @override void visit(Visitation visitation) => visitation.visitObjCInterface(this); diff --git a/pkgs/ffigen/lib/src/code_generator/pointer.dart b/pkgs/ffigen/lib/src/code_generator/pointer.dart index f64873a45..98abd88d6 100644 --- a/pkgs/ffigen/lib/src/code_generator/pointer.dart +++ b/pkgs/ffigen/lib/src/code_generator/pointer.dart @@ -153,7 +153,8 @@ class ObjCObjectPointer extends PointerType { '${getDartType(w)}($value, retain: $objCRetain, release: true)'; @override - String? generateRetain(String value) => 'objc_retain($value)'; + String? generateRetain(String value) => + '(__bridge id)(__bridge_retained void*)($value)'; @override bool isSupertypeOf(Type other) { diff --git a/pkgs/ffigen/lib/src/code_generator/writer.dart b/pkgs/ffigen/lib/src/code_generator/writer.dart index f1d9b8cb6..1254e0c27 100644 --- a/pkgs/ffigen/lib/src/code_generator/writer.dart +++ b/pkgs/ffigen/lib/src/code_generator/writer.dart @@ -445,7 +445,6 @@ class Writer { #error "This file must be compiled with ARC enabled" #endif -id objc_retain(id); id objc_retainBlock(id); @interface $dtorClass : NSObject {} diff --git a/pkgs/objective_c/lib/src/objective_c_bindings_generated.dart b/pkgs/objective_c/lib/src/objective_c_bindings_generated.dart index 15a6abe90..c9b1efa49 100644 --- a/pkgs/objective_c/lib/src/objective_c_bindings_generated.dart +++ b/pkgs/objective_c/lib/src/objective_c_bindings_generated.dart @@ -36,6 +36,21 @@ set NSLocalizedDescriptionKey(NSString value) { _NSLocalizedDescriptionKey = value.ref.retainAndReturnPointer(); } +@ffi.Native< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>() +external instancetype _ObjectiveCBindings_invokeBlock_10z9f5k( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer> arg3, +); + @ffi.Native< ffi.UnsignedLong Function( ffi.Pointer, @@ -53,12 +68,11 @@ external int _ObjectiveCBindings_invokeBlock_17ap02x( @ffi.Native< ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>() -external void _ObjectiveCBindings_invokeBlock_18d6mda( + ffi.Pointer)>() +external void _ObjectiveCBindings_invokeBlock_18v1jvf( ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1, - int arg2, ); @ffi.Native< @@ -69,34 +83,13 @@ external ffi.Pointer<_NSZone> _ObjectiveCBindings_invokeBlock_1a8cl66( ffi.Pointer arg0, ); -@ffi.Native< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>() -external ffi.Pointer _ObjectiveCBindings_invokeBlock_1c0c70u( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, -); - -@ffi.Native< - ffi.UnsignedLong Function( - ffi.Pointer, ffi.Pointer)>() -external int _ObjectiveCBindings_invokeBlock_1ckyi24( - ffi.Pointer block, - ffi.Pointer arg0, -); - @ffi.Native< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>() -external void _ObjectiveCBindings_invokeBlock_1j2nt86( +external void _ObjectiveCBindings_invokeBlock_1b3bb6a( ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1, @@ -104,58 +97,50 @@ external void _ObjectiveCBindings_invokeBlock_1j2nt86( ); @ffi.Native< - instancetype Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>() -external instancetype _ObjectiveCBindings_invokeBlock_1m9h2n( + ffi.UnsignedLong Function( + ffi.Pointer, ffi.Pointer)>() +external int _ObjectiveCBindings_invokeBlock_1ckyi24( ffi.Pointer block, ffi.Pointer arg0, - ffi.Pointer arg1, ); @ffi.Native< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>() -external ffi.Pointer _ObjectiveCBindings_invokeBlock_1yesha9( +external ffi.Pointer _ObjectiveCBindings_invokeBlock_1mbt9g9( ffi.Pointer block, ffi.Pointer arg0, ); @ffi.Native< - instancetype Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>() -external instancetype _ObjectiveCBindings_invokeBlock_e2pkq8( + ffi.Pointer, + ffi.Pointer)>() +external ffi.Pointer _ObjectiveCBindings_invokeBlock_1mllhpc( ffi.Pointer block, ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer arg1, ffi.Pointer arg2, - ffi.Pointer> arg3, -); - -@ffi.Native< - ffi.Bool Function(ffi.Pointer, ffi.Pointer)>() -external bool _ObjectiveCBindings_invokeBlock_e3qsqz( - ffi.Pointer block, - ffi.Pointer arg0, ); @ffi.Native< - ffi.Void Function(ffi.Pointer, ffi.Pointer)>() -external void _ObjectiveCBindings_invokeBlock_ovsamd( + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>() +external bool _ObjectiveCBindings_invokeBlock_3su7tt( ffi.Pointer block, ffi.Pointer arg0, + ffi.Pointer arg1, ); @ffi.Native< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>() -external bool _ObjectiveCBindings_invokeBlock_ozkafd( + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>() +external ffi.Pointer _ObjectiveCBindings_invokeBlock_50as9u( ffi.Pointer block, ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer arg1, ); @ffi.Native< @@ -165,7 +150,7 @@ external bool _ObjectiveCBindings_invokeBlock_ozkafd( ffi.Pointer, ffi.Pointer, ffi.Pointer)>() -external ffi.Pointer _ObjectiveCBindings_invokeBlock_u8b97m( +external ffi.Pointer _ObjectiveCBindings_invokeBlock_c7gk2u( ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1, @@ -174,41 +159,56 @@ external ffi.Pointer _ObjectiveCBindings_invokeBlock_u8b97m( ); @ffi.Native< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>() -external bool _ObjectiveCBindings_invokeBlock_w1e3k0( + ffi.Bool Function(ffi.Pointer, ffi.Pointer)>() +external bool _ObjectiveCBindings_invokeBlock_e3qsqz( ffi.Pointer block, ffi.Pointer arg0, - ffi.Pointer arg1, ); @ffi.Native< ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>() -external void _ObjectiveCBindings_invokeBlock_wjovn7( + ffi.Pointer, ffi.UnsignedLong)>() +external void _ObjectiveCBindings_invokeBlock_hoampi( ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1, + int arg2, +); + +@ffi.Native< + ffi.Void Function(ffi.Pointer, ffi.Pointer)>() +external void _ObjectiveCBindings_invokeBlock_ovsamd( + ffi.Pointer block, + ffi.Pointer arg0, ); @ffi.Native< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>() -external void _ObjectiveCBindings_invokeBlock_wjvic9( +external void _ObjectiveCBindings_invokeBlock_pfv6jd( ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1, ); @ffi.Native< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>() -external ffi.Pointer _ObjectiveCBindings_invokeBlock_ykn0t6( + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>() +external bool _ObjectiveCBindings_invokeBlock_w1e3k0( ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1, ); +@ffi.Native< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>() +external instancetype _ObjectiveCBindings_invokeBlock_xr62hr( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, +); + @ffi.Native< ffi.Pointer Function( ffi.Pointer, @@ -224,7 +224,7 @@ external ffi.Pointer _ObjectiveCBindings_invokeBlock_ykn0t6( ffi.NativeFunction)>>)>( isLeaf: true) external ffi.Pointer - _ObjectiveCBindings_newBlockingBlock_18d6mda( + _ObjectiveCBindings_newBlockingBlock_18v1jvf( ffi.Pointer trampoline, ffi.Pointer listener_trampoline, int closure_id, @@ -253,7 +253,7 @@ external ffi.Pointer ffi.NativeFunction)>>)>( isLeaf: true) external ffi.Pointer - _ObjectiveCBindings_newBlockingBlock_1j2nt86( + _ObjectiveCBindings_newBlockingBlock_1b3bb6a( ffi.Pointer trampoline, ffi.Pointer listener_trampoline, int closure_id, @@ -282,7 +282,7 @@ external ffi.Pointer ffi.NativeFunction)>>)>( isLeaf: true) external ffi.Pointer - _ObjectiveCBindings_newBlockingBlock_ovsamd( + _ObjectiveCBindings_newBlockingBlock_hoampi( ffi.Pointer trampoline, ffi.Pointer listener_trampoline, int closure_id, @@ -311,7 +311,7 @@ external ffi.Pointer ffi.NativeFunction)>>)>( isLeaf: true) external ffi.Pointer - _ObjectiveCBindings_newBlockingBlock_wjovn7( + _ObjectiveCBindings_newBlockingBlock_ovsamd( ffi.Pointer trampoline, ffi.Pointer listener_trampoline, int closure_id, @@ -340,7 +340,7 @@ external ffi.Pointer ffi.NativeFunction)>>)>( isLeaf: true) external ffi.Pointer - _ObjectiveCBindings_newBlockingBlock_wjvic9( + _ObjectiveCBindings_newBlockingBlock_pfv6jd( ffi.Pointer trampoline, ffi.Pointer listener_trampoline, int closure_id, @@ -364,7 +364,7 @@ external ffi.Pointer ffi.Void Function(ffi.Int64 dispose_port, ffi.Int64 closure_id)>>)>(isLeaf: true) external ffi.Pointer - _ObjectiveCBindings_newClosureBlock_17ap02x( + _ObjectiveCBindings_newClosureBlock_10z9f5k( ffi.Pointer trampoline, int closure_id, int dispose_port, @@ -384,7 +384,7 @@ external ffi.Pointer ffi.Void Function(ffi.Int64 dispose_port, ffi.Int64 closure_id)>>)>(isLeaf: true) external ffi.Pointer - _ObjectiveCBindings_newClosureBlock_18d6mda( + _ObjectiveCBindings_newClosureBlock_17ap02x( ffi.Pointer trampoline, int closure_id, int dispose_port, @@ -404,7 +404,7 @@ external ffi.Pointer ffi.Void Function(ffi.Int64 dispose_port, ffi.Int64 closure_id)>>)>(isLeaf: true) external ffi.Pointer - _ObjectiveCBindings_newClosureBlock_1a8cl66( + _ObjectiveCBindings_newClosureBlock_18v1jvf( ffi.Pointer trampoline, int closure_id, int dispose_port, @@ -424,7 +424,7 @@ external ffi.Pointer ffi.Void Function(ffi.Int64 dispose_port, ffi.Int64 closure_id)>>)>(isLeaf: true) external ffi.Pointer - _ObjectiveCBindings_newClosureBlock_1c0c70u( + _ObjectiveCBindings_newClosureBlock_1a8cl66( ffi.Pointer trampoline, int closure_id, int dispose_port, @@ -444,7 +444,7 @@ external ffi.Pointer ffi.Void Function(ffi.Int64 dispose_port, ffi.Int64 closure_id)>>)>(isLeaf: true) external ffi.Pointer - _ObjectiveCBindings_newClosureBlock_1ckyi24( + _ObjectiveCBindings_newClosureBlock_1b3bb6a( ffi.Pointer trampoline, int closure_id, int dispose_port, @@ -464,7 +464,7 @@ external ffi.Pointer ffi.Void Function(ffi.Int64 dispose_port, ffi.Int64 closure_id)>>)>(isLeaf: true) external ffi.Pointer - _ObjectiveCBindings_newClosureBlock_1j2nt86( + _ObjectiveCBindings_newClosureBlock_1ckyi24( ffi.Pointer trampoline, int closure_id, int dispose_port, @@ -484,7 +484,7 @@ external ffi.Pointer ffi.Void Function(ffi.Int64 dispose_port, ffi.Int64 closure_id)>>)>(isLeaf: true) external ffi.Pointer - _ObjectiveCBindings_newClosureBlock_1m9h2n( + _ObjectiveCBindings_newClosureBlock_1mbt9g9( ffi.Pointer trampoline, int closure_id, int dispose_port, @@ -504,7 +504,7 @@ external ffi.Pointer ffi.Void Function(ffi.Int64 dispose_port, ffi.Int64 closure_id)>>)>(isLeaf: true) external ffi.Pointer - _ObjectiveCBindings_newClosureBlock_1yesha9( + _ObjectiveCBindings_newClosureBlock_1mllhpc( ffi.Pointer trampoline, int closure_id, int dispose_port, @@ -524,7 +524,7 @@ external ffi.Pointer ffi.Void Function(ffi.Int64 dispose_port, ffi.Int64 closure_id)>>)>(isLeaf: true) external ffi.Pointer - _ObjectiveCBindings_newClosureBlock_e2pkq8( + _ObjectiveCBindings_newClosureBlock_3su7tt( ffi.Pointer trampoline, int closure_id, int dispose_port, @@ -544,7 +544,7 @@ external ffi.Pointer ffi.Void Function(ffi.Int64 dispose_port, ffi.Int64 closure_id)>>)>(isLeaf: true) external ffi.Pointer - _ObjectiveCBindings_newClosureBlock_e3qsqz( + _ObjectiveCBindings_newClosureBlock_50as9u( ffi.Pointer trampoline, int closure_id, int dispose_port, @@ -564,7 +564,7 @@ external ffi.Pointer ffi.Void Function(ffi.Int64 dispose_port, ffi.Int64 closure_id)>>)>(isLeaf: true) external ffi.Pointer - _ObjectiveCBindings_newClosureBlock_ovsamd( + _ObjectiveCBindings_newClosureBlock_c7gk2u( ffi.Pointer trampoline, int closure_id, int dispose_port, @@ -584,7 +584,7 @@ external ffi.Pointer ffi.Void Function(ffi.Int64 dispose_port, ffi.Int64 closure_id)>>)>(isLeaf: true) external ffi.Pointer - _ObjectiveCBindings_newClosureBlock_ozkafd( + _ObjectiveCBindings_newClosureBlock_e3qsqz( ffi.Pointer trampoline, int closure_id, int dispose_port, @@ -604,7 +604,7 @@ external ffi.Pointer ffi.Void Function(ffi.Int64 dispose_port, ffi.Int64 closure_id)>>)>(isLeaf: true) external ffi.Pointer - _ObjectiveCBindings_newClosureBlock_u8b97m( + _ObjectiveCBindings_newClosureBlock_hoampi( ffi.Pointer trampoline, int closure_id, int dispose_port, @@ -624,7 +624,7 @@ external ffi.Pointer ffi.Void Function(ffi.Int64 dispose_port, ffi.Int64 closure_id)>>)>(isLeaf: true) external ffi.Pointer - _ObjectiveCBindings_newClosureBlock_w1e3k0( + _ObjectiveCBindings_newClosureBlock_ovsamd( ffi.Pointer trampoline, int closure_id, int dispose_port, @@ -644,7 +644,7 @@ external ffi.Pointer ffi.Void Function(ffi.Int64 dispose_port, ffi.Int64 closure_id)>>)>(isLeaf: true) external ffi.Pointer - _ObjectiveCBindings_newClosureBlock_wjovn7( + _ObjectiveCBindings_newClosureBlock_pfv6jd( ffi.Pointer trampoline, int closure_id, int dispose_port, @@ -664,7 +664,7 @@ external ffi.Pointer ffi.Void Function(ffi.Int64 dispose_port, ffi.Int64 closure_id)>>)>(isLeaf: true) external ffi.Pointer - _ObjectiveCBindings_newClosureBlock_wjvic9( + _ObjectiveCBindings_newClosureBlock_w1e3k0( ffi.Pointer trampoline, int closure_id, int dispose_port, @@ -684,7 +684,7 @@ external ffi.Pointer ffi.Void Function(ffi.Int64 dispose_port, ffi.Int64 closure_id)>>)>(isLeaf: true) external ffi.Pointer - _ObjectiveCBindings_newClosureBlock_ykn0t6( + _ObjectiveCBindings_newClosureBlock_xr62hr( ffi.Pointer trampoline, int closure_id, int dispose_port, @@ -704,7 +704,7 @@ external ffi.Pointer ffi.Void Function(ffi.Int64 dispose_port, ffi.Int64 closure_id)>>)>(isLeaf: true) external ffi.Pointer - _ObjectiveCBindings_newListenerBlock_18d6mda( + _ObjectiveCBindings_newListenerBlock_18v1jvf( ffi.Pointer trampoline, int closure_id, int dispose_port, @@ -724,7 +724,7 @@ external ffi.Pointer ffi.Void Function(ffi.Int64 dispose_port, ffi.Int64 closure_id)>>)>(isLeaf: true) external ffi.Pointer - _ObjectiveCBindings_newListenerBlock_1j2nt86( + _ObjectiveCBindings_newListenerBlock_1b3bb6a( ffi.Pointer trampoline, int closure_id, int dispose_port, @@ -744,7 +744,7 @@ external ffi.Pointer ffi.Void Function(ffi.Int64 dispose_port, ffi.Int64 closure_id)>>)>(isLeaf: true) external ffi.Pointer - _ObjectiveCBindings_newListenerBlock_ovsamd( + _ObjectiveCBindings_newListenerBlock_hoampi( ffi.Pointer trampoline, int closure_id, int dispose_port, @@ -764,7 +764,7 @@ external ffi.Pointer ffi.Void Function(ffi.Int64 dispose_port, ffi.Int64 closure_id)>>)>(isLeaf: true) external ffi.Pointer - _ObjectiveCBindings_newListenerBlock_wjovn7( + _ObjectiveCBindings_newListenerBlock_ovsamd( ffi.Pointer trampoline, int closure_id, int dispose_port, @@ -784,7 +784,7 @@ external ffi.Pointer ffi.Void Function(ffi.Int64 dispose_port, ffi.Int64 closure_id)>>)>(isLeaf: true) external ffi.Pointer - _ObjectiveCBindings_newListenerBlock_wjvic9( + _ObjectiveCBindings_newListenerBlock_pfv6jd( ffi.Pointer trampoline, int closure_id, int dispose_port, @@ -798,7 +798,7 @@ external ffi.Pointer ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(isLeaf: true) external ffi.Pointer - _ObjectiveCBindings_newPointerBlock_17ap02x( + _ObjectiveCBindings_newPointerBlock_10z9f5k( ffi.Pointer trampoline, ffi.Pointer func, ); @@ -807,7 +807,7 @@ external ffi.Pointer ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(isLeaf: true) external ffi.Pointer - _ObjectiveCBindings_newPointerBlock_18d6mda( + _ObjectiveCBindings_newPointerBlock_17ap02x( ffi.Pointer trampoline, ffi.Pointer func, ); @@ -816,7 +816,7 @@ external ffi.Pointer ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(isLeaf: true) external ffi.Pointer - _ObjectiveCBindings_newPointerBlock_1a8cl66( + _ObjectiveCBindings_newPointerBlock_18v1jvf( ffi.Pointer trampoline, ffi.Pointer func, ); @@ -825,7 +825,7 @@ external ffi.Pointer ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(isLeaf: true) external ffi.Pointer - _ObjectiveCBindings_newPointerBlock_1c0c70u( + _ObjectiveCBindings_newPointerBlock_1a8cl66( ffi.Pointer trampoline, ffi.Pointer func, ); @@ -834,7 +834,7 @@ external ffi.Pointer ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(isLeaf: true) external ffi.Pointer - _ObjectiveCBindings_newPointerBlock_1ckyi24( + _ObjectiveCBindings_newPointerBlock_1b3bb6a( ffi.Pointer trampoline, ffi.Pointer func, ); @@ -843,7 +843,7 @@ external ffi.Pointer ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(isLeaf: true) external ffi.Pointer - _ObjectiveCBindings_newPointerBlock_1j2nt86( + _ObjectiveCBindings_newPointerBlock_1ckyi24( ffi.Pointer trampoline, ffi.Pointer func, ); @@ -852,7 +852,7 @@ external ffi.Pointer ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(isLeaf: true) external ffi.Pointer - _ObjectiveCBindings_newPointerBlock_1m9h2n( + _ObjectiveCBindings_newPointerBlock_1mbt9g9( ffi.Pointer trampoline, ffi.Pointer func, ); @@ -861,7 +861,7 @@ external ffi.Pointer ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(isLeaf: true) external ffi.Pointer - _ObjectiveCBindings_newPointerBlock_1yesha9( + _ObjectiveCBindings_newPointerBlock_1mllhpc( ffi.Pointer trampoline, ffi.Pointer func, ); @@ -870,7 +870,7 @@ external ffi.Pointer ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(isLeaf: true) external ffi.Pointer - _ObjectiveCBindings_newPointerBlock_e2pkq8( + _ObjectiveCBindings_newPointerBlock_3su7tt( ffi.Pointer trampoline, ffi.Pointer func, ); @@ -879,7 +879,7 @@ external ffi.Pointer ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(isLeaf: true) external ffi.Pointer - _ObjectiveCBindings_newPointerBlock_e3qsqz( + _ObjectiveCBindings_newPointerBlock_50as9u( ffi.Pointer trampoline, ffi.Pointer func, ); @@ -888,7 +888,7 @@ external ffi.Pointer ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(isLeaf: true) external ffi.Pointer - _ObjectiveCBindings_newPointerBlock_ovsamd( + _ObjectiveCBindings_newPointerBlock_c7gk2u( ffi.Pointer trampoline, ffi.Pointer func, ); @@ -897,7 +897,7 @@ external ffi.Pointer ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(isLeaf: true) external ffi.Pointer - _ObjectiveCBindings_newPointerBlock_ozkafd( + _ObjectiveCBindings_newPointerBlock_e3qsqz( ffi.Pointer trampoline, ffi.Pointer func, ); @@ -906,7 +906,7 @@ external ffi.Pointer ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(isLeaf: true) external ffi.Pointer - _ObjectiveCBindings_newPointerBlock_u8b97m( + _ObjectiveCBindings_newPointerBlock_hoampi( ffi.Pointer trampoline, ffi.Pointer func, ); @@ -915,7 +915,7 @@ external ffi.Pointer ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(isLeaf: true) external ffi.Pointer - _ObjectiveCBindings_newPointerBlock_w1e3k0( + _ObjectiveCBindings_newPointerBlock_ovsamd( ffi.Pointer trampoline, ffi.Pointer func, ); @@ -924,7 +924,7 @@ external ffi.Pointer ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(isLeaf: true) external ffi.Pointer - _ObjectiveCBindings_newPointerBlock_wjovn7( + _ObjectiveCBindings_newPointerBlock_pfv6jd( ffi.Pointer trampoline, ffi.Pointer func, ); @@ -933,7 +933,7 @@ external ffi.Pointer ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(isLeaf: true) external ffi.Pointer - _ObjectiveCBindings_newPointerBlock_wjvic9( + _ObjectiveCBindings_newPointerBlock_w1e3k0( ffi.Pointer trampoline, ffi.Pointer func, ); @@ -942,7 +942,7 @@ external ffi.Pointer ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(isLeaf: true) external ffi.Pointer - _ObjectiveCBindings_newPointerBlock_ykn0t6( + _ObjectiveCBindings_newPointerBlock_xr62hr( ffi.Pointer trampoline, ffi.Pointer func, ); @@ -964,13 +964,13 @@ class DartInputStreamAdapter extends NSInputStream { /// Returns whether [obj] is an instance of [DartInputStreamAdapter]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_69e0x1(obj.ref.pointer, _sel_isKindOfClass_, + return _objc_msgSend_19nvye5(obj.ref.pointer, _sel_isKindOfClass_, _class_DOBJCDartInputStreamAdapter); } /// inputStreamWithData: static DartInputStreamAdapter? inputStreamWithData_(NSData data) { - final _ret = _objc_msgSend_62nh5j(_class_DOBJCDartInputStreamAdapter, + final _ret = _objc_msgSend_1sotr3r(_class_DOBJCDartInputStreamAdapter, _sel_inputStreamWithData_, data.ref.pointer); return _ret.address == 0 ? null @@ -980,7 +980,7 @@ class DartInputStreamAdapter extends NSInputStream { /// inputStreamWithFileAtPath: static DartInputStreamAdapter? inputStreamWithFileAtPath_(NSString path) { - final _ret = _objc_msgSend_62nh5j(_class_DOBJCDartInputStreamAdapter, + final _ret = _objc_msgSend_1sotr3r(_class_DOBJCDartInputStreamAdapter, _sel_inputStreamWithFileAtPath_, path.ref.pointer); return _ret.address == 0 ? null @@ -993,7 +993,7 @@ class DartInputStreamAdapter extends NSInputStream { /// -1 => The `NSInputStream` has been closed and the port can be closed. /// _ => The number of types being required in a `read:maxLength` call. static DartInputStreamAdapter inputStreamWithPort_(int sendPort) { - final _ret = _objc_msgSend_r25hnf(_class_DOBJCDartInputStreamAdapter, + final _ret = _objc_msgSend_1ya1kjn(_class_DOBJCDartInputStreamAdapter, _sel_inputStreamWithPort_, sendPort); return DartInputStreamAdapter.castFromPointer(_ret, retain: true, release: true); @@ -1001,7 +1001,7 @@ class DartInputStreamAdapter extends NSInputStream { /// inputStreamWithURL: static DartInputStreamAdapter? inputStreamWithURL_(NSURL url) { - final _ret = _objc_msgSend_62nh5j(_class_DOBJCDartInputStreamAdapter, + final _ret = _objc_msgSend_1sotr3r(_class_DOBJCDartInputStreamAdapter, _sel_inputStreamWithURL_, url.ref.pointer); return _ret.address == 0 ? null @@ -1011,13 +1011,13 @@ class DartInputStreamAdapter extends NSInputStream { /// addData: int addData_(NSData data) { - return _objc_msgSend_1p4b7x4( + return _objc_msgSend_1vd1c5m( this.ref.pointer, _sel_addData_, data.ref.pointer); } /// initWithData: DartInputStreamAdapter initWithData_(NSData data) { - final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_1sotr3r(this.ref.retainAndReturnPointer(), _sel_initWithData_, data.ref.pointer); return DartInputStreamAdapter.castFromPointer(_ret, retain: false, release: true); @@ -1025,7 +1025,7 @@ class DartInputStreamAdapter extends NSInputStream { /// initWithFileAtPath: DartInputStreamAdapter? initWithFileAtPath_(NSString path) { - final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_1sotr3r(this.ref.retainAndReturnPointer(), _sel_initWithFileAtPath_, path.ref.pointer); return _ret.address == 0 ? null @@ -1035,7 +1035,7 @@ class DartInputStreamAdapter extends NSInputStream { /// initWithURL: DartInputStreamAdapter? initWithURL_(NSURL url) { - final _ret = _objc_msgSend_62nh5j( + final _ret = _objc_msgSend_1sotr3r( this.ref.retainAndReturnPointer(), _sel_initWithURL_, url.ref.pointer); return _ret.address == 0 ? null @@ -1050,7 +1050,7 @@ class DartInputStreamAdapter extends NSInputStream { /// setError: void setError_(NSError error) { - _objc_msgSend_1jdvcbf(this.ref.pointer, _sel_setError_, error.ref.pointer); + _objc_msgSend_xtuoz7(this.ref.pointer, _sel_setError_, error.ref.pointer); } /// stream:handleEvent: @@ -1059,7 +1059,7 @@ class DartInputStreamAdapter extends NSInputStream { throw objc.UnimplementedOptionalMethodException( 'DOBJCDartInputStreamAdapter', 'stream:handleEvent:'); } - _objc_msgSend_hglvhy(this.ref.pointer, _sel_stream_handleEvent_, + _objc_msgSend_3l8zum(this.ref.pointer, _sel_stream_handleEvent_, aStream.ref.pointer, eventCode.value); } } @@ -1081,38 +1081,38 @@ class DartProxy extends NSProxy { /// Returns whether [obj] is an instance of [DartProxy]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_69e0x1( + return _objc_msgSend_19nvye5( obj.ref.pointer, _sel_isKindOfClass_, _class_DOBJCDartProxy); } /// alloc static objc.ObjCObjectBase alloc() { - final _ret = _objc_msgSend_1x359cv(_class_DOBJCDartProxy, _sel_alloc); + final _ret = _objc_msgSend_151sglz(_class_DOBJCDartProxy, _sel_alloc); return objc.ObjCObjectBase(_ret, retain: false, release: true); } /// newFromBuilder: static DartProxy newFromBuilder_(DartProxyBuilder builder) { - final _ret = _objc_msgSend_62nh5j( + final _ret = _objc_msgSend_1sotr3r( _class_DOBJCDartProxy, _sel_newFromBuilder_, builder.ref.pointer); return DartProxy.castFromPointer(_ret, retain: false, release: true); } /// autorelease DartProxy autorelease() { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_autorelease); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_autorelease); return DartProxy.castFromPointer(_ret, retain: true, release: true); } /// forwardInvocation: void forwardInvocation_(NSInvocation invocation) { - _objc_msgSend_1jdvcbf( + _objc_msgSend_xtuoz7( this.ref.pointer, _sel_forwardInvocation_, invocation.ref.pointer); } /// initFromBuilder: DartProxy initFromBuilder_(DartProxyBuilder builder) { - final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_1sotr3r(this.ref.retainAndReturnPointer(), _sel_initFromBuilder_, builder.ref.pointer); return DartProxy.castFromPointer(_ret, retain: false, release: true); } @@ -1120,7 +1120,7 @@ class DartProxy extends NSProxy { /// methodSignatureForSelector: NSMethodSignature methodSignatureForSelector_( ffi.Pointer sel) { - final _ret = _objc_msgSend_19hbqky( + final _ret = _objc_msgSend_3ctkt6( this.ref.pointer, _sel_methodSignatureForSelector_, sel); return NSMethodSignature.castFromPointer(_ret, retain: true, release: true); } @@ -1133,13 +1133,13 @@ class DartProxy extends NSProxy { /// retain DartProxy retain() { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_retain); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_retain); return DartProxy.castFromPointer(_ret, retain: true, release: true); } /// self DartProxy self() { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_self); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_self); return DartProxy.castFromPointer(_ret, retain: true, release: true); } } @@ -1161,33 +1161,33 @@ class DartProxyBuilder extends NSObject { /// Returns whether [obj] is an instance of [DartProxyBuilder]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_69e0x1( + return _objc_msgSend_19nvye5( obj.ref.pointer, _sel_isKindOfClass_, _class_DOBJCDartProxyBuilder); } /// alloc static DartProxyBuilder alloc() { final _ret = - _objc_msgSend_1x359cv(_class_DOBJCDartProxyBuilder, _sel_alloc); + _objc_msgSend_151sglz(_class_DOBJCDartProxyBuilder, _sel_alloc); return DartProxyBuilder.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static DartProxyBuilder allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_hzlb60( + final _ret = _objc_msgSend_1cwp428( _class_DOBJCDartProxyBuilder, _sel_allocWithZone_, zone); return DartProxyBuilder.castFromPointer(_ret, retain: false, release: true); } /// new static DartProxyBuilder new1() { - final _ret = _objc_msgSend_1x359cv(_class_DOBJCDartProxyBuilder, _sel_new); + final _ret = _objc_msgSend_151sglz(_class_DOBJCDartProxyBuilder, _sel_new); return DartProxyBuilder.castFromPointer(_ret, retain: false, release: true); } /// autorelease DartProxyBuilder autorelease() { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_autorelease); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_autorelease); return DartProxyBuilder.castFromPointer(_ret, retain: true, release: true); } @@ -1196,7 +1196,7 @@ class DartProxyBuilder extends NSObject { ffi.Pointer sel, NSMethodSignature signature, ffi.Pointer block) { - _objc_msgSend_kq0sbq( + _objc_msgSend_140ec04( this.ref.pointer, _sel_implementMethod_withSignature_andBlock_, sel, @@ -1207,19 +1207,19 @@ class DartProxyBuilder extends NSObject { /// init DartProxyBuilder init() { final _ret = - _objc_msgSend_1x359cv(this.ref.retainAndReturnPointer(), _sel_init); + _objc_msgSend_151sglz(this.ref.retainAndReturnPointer(), _sel_init); return DartProxyBuilder.castFromPointer(_ret, retain: false, release: true); } /// retain DartProxyBuilder retain() { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_retain); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_retain); return DartProxyBuilder.castFromPointer(_ret, retain: true, release: true); } /// self DartProxyBuilder self() { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_self); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_self); return DartProxyBuilder.castFromPointer(_ret, retain: true, release: true); } } @@ -1241,46 +1241,46 @@ class NSArray extends NSObject { /// Returns whether [obj] is an instance of [NSArray]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_69e0x1( + return _objc_msgSend_19nvye5( obj.ref.pointer, _sel_isKindOfClass_, _class_NSArray); } /// alloc static NSArray alloc() { - final _ret = _objc_msgSend_1x359cv(_class_NSArray, _sel_alloc); + final _ret = _objc_msgSend_151sglz(_class_NSArray, _sel_alloc); return NSArray.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static NSArray allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _objc_msgSend_hzlb60(_class_NSArray, _sel_allocWithZone_, zone); + _objc_msgSend_1cwp428(_class_NSArray, _sel_allocWithZone_, zone); return NSArray.castFromPointer(_ret, retain: false, release: true); } /// array static NSArray array() { - final _ret = _objc_msgSend_1x359cv(_class_NSArray, _sel_array); + final _ret = _objc_msgSend_151sglz(_class_NSArray, _sel_array); return NSArray.castFromPointer(_ret, retain: true, release: true); } /// arrayWithArray: static NSArray arrayWithArray_(NSArray array) { - final _ret = _objc_msgSend_62nh5j( + final _ret = _objc_msgSend_1sotr3r( _class_NSArray, _sel_arrayWithArray_, array.ref.pointer); return NSArray.castFromPointer(_ret, retain: true, release: true); } /// arrayWithObject: static NSArray arrayWithObject_(objc.ObjCObjectBase anObject) { - final _ret = _objc_msgSend_62nh5j( + final _ret = _objc_msgSend_1sotr3r( _class_NSArray, _sel_arrayWithObject_, anObject.ref.pointer); return NSArray.castFromPointer(_ret, retain: true, release: true); } /// arrayWithObjects: static NSArray arrayWithObjects_(objc.ObjCObjectBase firstObj) { - final _ret = _objc_msgSend_62nh5j( + final _ret = _objc_msgSend_1sotr3r( _class_NSArray, _sel_arrayWithObjects_, firstObj.ref.pointer); return NSArray.castFromPointer(_ret, retain: true, release: true); } @@ -1288,14 +1288,14 @@ class NSArray extends NSObject { /// arrayWithObjects:count: static NSArray arrayWithObjects_count_( ffi.Pointer> objects, int cnt) { - final _ret = _objc_msgSend_1lqqdvl( + final _ret = _objc_msgSend_zmbtbd( _class_NSArray, _sel_arrayWithObjects_count_, objects, cnt); return NSArray.castFromPointer(_ret, retain: true, release: true); } /// new static NSArray new1() { - final _ret = _objc_msgSend_1x359cv(_class_NSArray, _sel_new); + final _ret = _objc_msgSend_151sglz(_class_NSArray, _sel_new); return NSArray.castFromPointer(_ret, retain: false, release: true); } @@ -1320,34 +1320,34 @@ class NSArray extends NSObject { /// encodeWithCoder: void encodeWithCoder_(NSCoder coder) { - _objc_msgSend_1jdvcbf( + _objc_msgSend_xtuoz7( this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); } /// init NSArray init() { final _ret = - _objc_msgSend_1x359cv(this.ref.retainAndReturnPointer(), _sel_init); + _objc_msgSend_151sglz(this.ref.retainAndReturnPointer(), _sel_init); return NSArray.castFromPointer(_ret, retain: false, release: true); } /// initWithArray: NSArray initWithArray_(NSArray array) { - final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_1sotr3r(this.ref.retainAndReturnPointer(), _sel_initWithArray_, array.ref.pointer); return NSArray.castFromPointer(_ret, retain: false, release: true); } /// initWithArray:copyItems: NSArray initWithArray_copyItems_(NSArray array, bool flag) { - final _ret = _objc_msgSend_1bdmr5f(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_17amj0z(this.ref.retainAndReturnPointer(), _sel_initWithArray_copyItems_, array.ref.pointer, flag); return NSArray.castFromPointer(_ret, retain: false, release: true); } /// initWithCoder: NSArray? initWithCoder_(NSCoder coder) { - final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_1sotr3r(this.ref.retainAndReturnPointer(), _sel_initWithCoder_, coder.ref.pointer); return _ret.address == 0 ? null @@ -1356,7 +1356,7 @@ class NSArray extends NSObject { /// initWithObjects: NSArray initWithObjects_(objc.ObjCObjectBase firstObj) { - final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_1sotr3r(this.ref.retainAndReturnPointer(), _sel_initWithObjects_, firstObj.ref.pointer); return NSArray.castFromPointer(_ret, retain: false, release: true); } @@ -1364,7 +1364,7 @@ class NSArray extends NSObject { /// initWithObjects:count: NSArray initWithObjects_count_( ffi.Pointer> objects, int cnt) { - final _ret = _objc_msgSend_1lqqdvl(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_zmbtbd(this.ref.retainAndReturnPointer(), _sel_initWithObjects_count_, objects, cnt); return NSArray.castFromPointer(_ret, retain: false, release: true); } @@ -1372,7 +1372,7 @@ class NSArray extends NSObject { /// objectAtIndex: objc.ObjCObjectBase objectAtIndex_(int index) { final _ret = - _objc_msgSend_1qrcblu(this.ref.pointer, _sel_objectAtIndex_, index); + _objc_msgSend_14hpxwa(this.ref.pointer, _sel_objectAtIndex_, index); return objc.ObjCObjectBase(_ret, retain: true, release: true); } } @@ -1411,54 +1411,54 @@ class NSCharacterSet extends NSObject { /// Returns whether [obj] is an instance of [NSCharacterSet]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_69e0x1( + return _objc_msgSend_19nvye5( obj.ref.pointer, _sel_isKindOfClass_, _class_NSCharacterSet); } /// alloc static NSCharacterSet alloc() { - final _ret = _objc_msgSend_1x359cv(_class_NSCharacterSet, _sel_alloc); + final _ret = _objc_msgSend_151sglz(_class_NSCharacterSet, _sel_alloc); return NSCharacterSet.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static NSCharacterSet allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _objc_msgSend_hzlb60(_class_NSCharacterSet, _sel_allocWithZone_, zone); + _objc_msgSend_1cwp428(_class_NSCharacterSet, _sel_allocWithZone_, zone); return NSCharacterSet.castFromPointer(_ret, retain: false, release: true); } /// alphanumericCharacterSet static NSCharacterSet getAlphanumericCharacterSet() { - final _ret = _objc_msgSend_1x359cv( + final _ret = _objc_msgSend_151sglz( _class_NSCharacterSet, _sel_alphanumericCharacterSet); return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); } /// capitalizedLetterCharacterSet static NSCharacterSet getCapitalizedLetterCharacterSet() { - final _ret = _objc_msgSend_1x359cv( + final _ret = _objc_msgSend_151sglz( _class_NSCharacterSet, _sel_capitalizedLetterCharacterSet); return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); } /// characterSetWithBitmapRepresentation: static NSCharacterSet characterSetWithBitmapRepresentation_(NSData data) { - final _ret = _objc_msgSend_62nh5j(_class_NSCharacterSet, + final _ret = _objc_msgSend_1sotr3r(_class_NSCharacterSet, _sel_characterSetWithBitmapRepresentation_, data.ref.pointer); return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); } /// characterSetWithCharactersInString: static NSCharacterSet characterSetWithCharactersInString_(NSString aString) { - final _ret = _objc_msgSend_62nh5j(_class_NSCharacterSet, + final _ret = _objc_msgSend_1sotr3r(_class_NSCharacterSet, _sel_characterSetWithCharactersInString_, aString.ref.pointer); return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); } /// characterSetWithContentsOfFile: static NSCharacterSet? characterSetWithContentsOfFile_(NSString fName) { - final _ret = _objc_msgSend_62nh5j(_class_NSCharacterSet, + final _ret = _objc_msgSend_1sotr3r(_class_NSCharacterSet, _sel_characterSetWithContentsOfFile_, fName.ref.pointer); return _ret.address == 0 ? null @@ -1467,7 +1467,7 @@ class NSCharacterSet extends NSObject { /// characterSetWithRange: static NSCharacterSet characterSetWithRange_(NSRange aRange) { - final _ret = _objc_msgSend_83z673( + final _ret = _objc_msgSend_1k1o1s7( _class_NSCharacterSet, _sel_characterSetWithRange_, aRange); return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); } @@ -1475,20 +1475,20 @@ class NSCharacterSet extends NSObject { /// controlCharacterSet static NSCharacterSet getControlCharacterSet() { final _ret = - _objc_msgSend_1x359cv(_class_NSCharacterSet, _sel_controlCharacterSet); + _objc_msgSend_151sglz(_class_NSCharacterSet, _sel_controlCharacterSet); return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); } /// decimalDigitCharacterSet static NSCharacterSet getDecimalDigitCharacterSet() { - final _ret = _objc_msgSend_1x359cv( + final _ret = _objc_msgSend_151sglz( _class_NSCharacterSet, _sel_decimalDigitCharacterSet); return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); } /// decomposableCharacterSet static NSCharacterSet getDecomposableCharacterSet() { - final _ret = _objc_msgSend_1x359cv( + final _ret = _objc_msgSend_151sglz( _class_NSCharacterSet, _sel_decomposableCharacterSet); return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); } @@ -1496,47 +1496,47 @@ class NSCharacterSet extends NSObject { /// illegalCharacterSet static NSCharacterSet getIllegalCharacterSet() { final _ret = - _objc_msgSend_1x359cv(_class_NSCharacterSet, _sel_illegalCharacterSet); + _objc_msgSend_151sglz(_class_NSCharacterSet, _sel_illegalCharacterSet); return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); } /// letterCharacterSet static NSCharacterSet getLetterCharacterSet() { final _ret = - _objc_msgSend_1x359cv(_class_NSCharacterSet, _sel_letterCharacterSet); + _objc_msgSend_151sglz(_class_NSCharacterSet, _sel_letterCharacterSet); return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); } /// lowercaseLetterCharacterSet static NSCharacterSet getLowercaseLetterCharacterSet() { - final _ret = _objc_msgSend_1x359cv( + final _ret = _objc_msgSend_151sglz( _class_NSCharacterSet, _sel_lowercaseLetterCharacterSet); return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); } /// new static NSCharacterSet new1() { - final _ret = _objc_msgSend_1x359cv(_class_NSCharacterSet, _sel_new); + final _ret = _objc_msgSend_151sglz(_class_NSCharacterSet, _sel_new); return NSCharacterSet.castFromPointer(_ret, retain: false, release: true); } /// newlineCharacterSet static NSCharacterSet getNewlineCharacterSet() { final _ret = - _objc_msgSend_1x359cv(_class_NSCharacterSet, _sel_newlineCharacterSet); + _objc_msgSend_151sglz(_class_NSCharacterSet, _sel_newlineCharacterSet); return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); } /// nonBaseCharacterSet static NSCharacterSet getNonBaseCharacterSet() { final _ret = - _objc_msgSend_1x359cv(_class_NSCharacterSet, _sel_nonBaseCharacterSet); + _objc_msgSend_151sglz(_class_NSCharacterSet, _sel_nonBaseCharacterSet); return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); } /// punctuationCharacterSet static NSCharacterSet getPunctuationCharacterSet() { - final _ret = _objc_msgSend_1x359cv( + final _ret = _objc_msgSend_151sglz( _class_NSCharacterSet, _sel_punctuationCharacterSet); return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); } @@ -1550,41 +1550,41 @@ class NSCharacterSet extends NSObject { /// symbolCharacterSet static NSCharacterSet getSymbolCharacterSet() { final _ret = - _objc_msgSend_1x359cv(_class_NSCharacterSet, _sel_symbolCharacterSet); + _objc_msgSend_151sglz(_class_NSCharacterSet, _sel_symbolCharacterSet); return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); } /// uppercaseLetterCharacterSet static NSCharacterSet getUppercaseLetterCharacterSet() { - final _ret = _objc_msgSend_1x359cv( + final _ret = _objc_msgSend_151sglz( _class_NSCharacterSet, _sel_uppercaseLetterCharacterSet); return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); } /// whitespaceAndNewlineCharacterSet static NSCharacterSet getWhitespaceAndNewlineCharacterSet() { - final _ret = _objc_msgSend_1x359cv( + final _ret = _objc_msgSend_151sglz( _class_NSCharacterSet, _sel_whitespaceAndNewlineCharacterSet); return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); } /// whitespaceCharacterSet static NSCharacterSet getWhitespaceCharacterSet() { - final _ret = _objc_msgSend_1x359cv( + final _ret = _objc_msgSend_151sglz( _class_NSCharacterSet, _sel_whitespaceCharacterSet); return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); } /// autorelease NSCharacterSet autorelease() { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_autorelease); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_autorelease); return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); } /// bitmapRepresentation NSData get bitmapRepresentation { final _ret = - _objc_msgSend_1x359cv(this.ref.pointer, _sel_bitmapRepresentation); + _objc_msgSend_151sglz(this.ref.pointer, _sel_bitmapRepresentation); return NSData.castFromPointer(_ret, retain: true, release: true); } @@ -1596,7 +1596,7 @@ class NSCharacterSet extends NSObject { /// encodeWithCoder: void encodeWithCoder_(NSCoder coder) { - _objc_msgSend_1jdvcbf( + _objc_msgSend_xtuoz7( this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); } @@ -1609,13 +1609,13 @@ class NSCharacterSet extends NSObject { /// init NSCharacterSet init() { final _ret = - _objc_msgSend_1x359cv(this.ref.retainAndReturnPointer(), _sel_init); + _objc_msgSend_151sglz(this.ref.retainAndReturnPointer(), _sel_init); return NSCharacterSet.castFromPointer(_ret, retain: false, release: true); } /// initWithCoder: NSCharacterSet? initWithCoder_(NSCoder coder) { - final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_1sotr3r(this.ref.retainAndReturnPointer(), _sel_initWithCoder_, coder.ref.pointer); return _ret.address == 0 ? null @@ -1624,13 +1624,13 @@ class NSCharacterSet extends NSObject { /// invertedSet NSCharacterSet get invertedSet { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_invertedSet); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_invertedSet); return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); } /// isSupersetOfSet: bool isSupersetOfSet_(NSCharacterSet theOtherSet) { - return _objc_msgSend_69e0x1( + return _objc_msgSend_19nvye5( this.ref.pointer, _sel_isSupersetOfSet_, theOtherSet.ref.pointer); } @@ -1642,13 +1642,13 @@ class NSCharacterSet extends NSObject { /// retain NSCharacterSet retain() { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_retain); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_retain); return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); } /// self NSCharacterSet self() { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_self); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_self); return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); } } @@ -1670,7 +1670,7 @@ class NSCoder extends objc.ObjCObjectBase { /// Returns whether [obj] is an instance of [NSCoder]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_69e0x1( + return _objc_msgSend_19nvye5( obj.ref.pointer, _sel_isKindOfClass_, _class_NSCoder); } } @@ -1709,31 +1709,32 @@ class NSData extends NSObject { /// Returns whether [obj] is an instance of [NSData]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_69e0x1( + return _objc_msgSend_19nvye5( obj.ref.pointer, _sel_isKindOfClass_, _class_NSData); } /// alloc static NSData alloc() { - final _ret = _objc_msgSend_1x359cv(_class_NSData, _sel_alloc); + final _ret = _objc_msgSend_151sglz(_class_NSData, _sel_alloc); return NSData.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static NSData allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_hzlb60(_class_NSData, _sel_allocWithZone_, zone); + final _ret = + _objc_msgSend_1cwp428(_class_NSData, _sel_allocWithZone_, zone); return NSData.castFromPointer(_ret, retain: false, release: true); } /// data static NSData data() { - final _ret = _objc_msgSend_1x359cv(_class_NSData, _sel_data); + final _ret = _objc_msgSend_151sglz(_class_NSData, _sel_data); return NSData.castFromPointer(_ret, retain: true, release: true); } /// dataWithBytes:length: static NSData dataWithBytes_length_(ffi.Pointer bytes, int length) { - final _ret = _objc_msgSend_19qmeje( + final _ret = _objc_msgSend_3nbx5e( _class_NSData, _sel_dataWithBytes_length_, bytes, length); return NSData.castFromPointer(_ret, retain: true, release: true); } @@ -1741,7 +1742,7 @@ class NSData extends NSObject { /// dataWithBytesNoCopy:length: static NSData dataWithBytesNoCopy_length_( ffi.Pointer bytes, int length) { - final _ret = _objc_msgSend_19qmeje( + final _ret = _objc_msgSend_3nbx5e( _class_NSData, _sel_dataWithBytesNoCopy_length_, bytes, length); return NSData.castFromPointer(_ret, retain: true, release: true); } @@ -1749,14 +1750,14 @@ class NSData extends NSObject { /// dataWithBytesNoCopy:length:freeWhenDone: static NSData dataWithBytesNoCopy_length_freeWhenDone_( ffi.Pointer bytes, int length, bool b) { - final _ret = _objc_msgSend_1je1k7e(_class_NSData, + final _ret = _objc_msgSend_161ne8y(_class_NSData, _sel_dataWithBytesNoCopy_length_freeWhenDone_, bytes, length, b); return NSData.castFromPointer(_ret, retain: true, release: true); } /// dataWithContentsOfFile: static NSData? dataWithContentsOfFile_(NSString path) { - final _ret = _objc_msgSend_62nh5j( + final _ret = _objc_msgSend_1sotr3r( _class_NSData, _sel_dataWithContentsOfFile_, path.ref.pointer); return _ret.address == 0 ? null @@ -1768,7 +1769,7 @@ class NSData extends NSObject { NSString path, NSDataReadingOptions readOptionsMask, ffi.Pointer> errorPtr) { - final _ret = _objc_msgSend_p8i56h( + final _ret = _objc_msgSend_8321cp( _class_NSData, _sel_dataWithContentsOfFile_options_error_, path.ref.pointer, @@ -1781,7 +1782,7 @@ class NSData extends NSObject { /// dataWithContentsOfURL: static NSData? dataWithContentsOfURL_(NSURL url) { - final _ret = _objc_msgSend_62nh5j( + final _ret = _objc_msgSend_1sotr3r( _class_NSData, _sel_dataWithContentsOfURL_, url.ref.pointer); return _ret.address == 0 ? null @@ -1793,7 +1794,7 @@ class NSData extends NSObject { NSURL url, NSDataReadingOptions readOptionsMask, ffi.Pointer> errorPtr) { - final _ret = _objc_msgSend_p8i56h( + final _ret = _objc_msgSend_8321cp( _class_NSData, _sel_dataWithContentsOfURL_options_error_, url.ref.pointer, @@ -1806,14 +1807,14 @@ class NSData extends NSObject { /// dataWithData: static NSData dataWithData_(NSData data) { - final _ret = _objc_msgSend_62nh5j( + final _ret = _objc_msgSend_1sotr3r( _class_NSData, _sel_dataWithData_, data.ref.pointer); return NSData.castFromPointer(_ret, retain: true, release: true); } /// new static NSData new1() { - final _ret = _objc_msgSend_1x359cv(_class_NSData, _sel_new); + final _ret = _objc_msgSend_151sglz(_class_NSData, _sel_new); return NSData.castFromPointer(_ret, retain: false, release: true); } @@ -1831,7 +1832,7 @@ class NSData extends NSObject { NSData? compressedDataUsingAlgorithm_error_( NSDataCompressionAlgorithm algorithm, ffi.Pointer> error) { - final _ret = _objc_msgSend_1okds6o(this.ref.pointer, + final _ret = _objc_msgSend_1vnlaqg(this.ref.pointer, _sel_compressedDataUsingAlgorithm_error_, algorithm.value, error); return _ret.address == 0 ? null @@ -1842,7 +1843,7 @@ class NSData extends NSObject { NSData? decompressedDataUsingAlgorithm_error_( NSDataCompressionAlgorithm algorithm, ffi.Pointer> error) { - final _ret = _objc_msgSend_1okds6o(this.ref.pointer, + final _ret = _objc_msgSend_1vnlaqg(this.ref.pointer, _sel_decompressedDataUsingAlgorithm_error_, algorithm.value, error); return _ret.address == 0 ? null @@ -1851,21 +1852,21 @@ class NSData extends NSObject { /// encodeWithCoder: void encodeWithCoder_(NSCoder coder) { - _objc_msgSend_1jdvcbf( + _objc_msgSend_xtuoz7( this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); } /// init NSData init() { final _ret = - _objc_msgSend_1x359cv(this.ref.retainAndReturnPointer(), _sel_init); + _objc_msgSend_151sglz(this.ref.retainAndReturnPointer(), _sel_init); return NSData.castFromPointer(_ret, retain: false, release: true); } /// initWithBase64EncodedData:options: NSData? initWithBase64EncodedData_options_( NSData base64Data, NSDataBase64DecodingOptions options) { - final _ret = _objc_msgSend_dnlotu( + final _ret = _objc_msgSend_7kpg7m( this.ref.retainAndReturnPointer(), _sel_initWithBase64EncodedData_options_, base64Data.ref.pointer, @@ -1878,7 +1879,7 @@ class NSData extends NSObject { /// initWithBase64EncodedString:options: NSData? initWithBase64EncodedString_options_( NSString base64String, NSDataBase64DecodingOptions options) { - final _ret = _objc_msgSend_dnlotu( + final _ret = _objc_msgSend_7kpg7m( this.ref.retainAndReturnPointer(), _sel_initWithBase64EncodedString_options_, base64String.ref.pointer, @@ -1890,14 +1891,14 @@ class NSData extends NSObject { /// initWithBytes:length: NSData initWithBytes_length_(ffi.Pointer bytes, int length) { - final _ret = _objc_msgSend_19qmeje(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_3nbx5e(this.ref.retainAndReturnPointer(), _sel_initWithBytes_length_, bytes, length); return NSData.castFromPointer(_ret, retain: false, release: true); } /// initWithBytesNoCopy:length: NSData initWithBytesNoCopy_length_(ffi.Pointer bytes, int length) { - final _ret = _objc_msgSend_19qmeje(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_3nbx5e(this.ref.retainAndReturnPointer(), _sel_initWithBytesNoCopy_length_, bytes, length); return NSData.castFromPointer(_ret, retain: false, release: true); } @@ -1905,14 +1906,14 @@ class NSData extends NSObject { /// initWithBytesNoCopy:length:freeWhenDone: NSData initWithBytesNoCopy_length_freeWhenDone_( ffi.Pointer bytes, int length, bool b) { - final _ret = _objc_msgSend_1je1k7e(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_161ne8y(this.ref.retainAndReturnPointer(), _sel_initWithBytesNoCopy_length_freeWhenDone_, bytes, length, b); return NSData.castFromPointer(_ret, retain: false, release: true); } /// initWithCoder: NSData? initWithCoder_(NSCoder coder) { - final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_1sotr3r(this.ref.retainAndReturnPointer(), _sel_initWithCoder_, coder.ref.pointer); return _ret.address == 0 ? null @@ -1921,7 +1922,7 @@ class NSData extends NSObject { /// initWithContentsOfFile: NSData? initWithContentsOfFile_(NSString path) { - final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_1sotr3r(this.ref.retainAndReturnPointer(), _sel_initWithContentsOfFile_, path.ref.pointer); return _ret.address == 0 ? null @@ -1933,7 +1934,7 @@ class NSData extends NSObject { NSString path, NSDataReadingOptions readOptionsMask, ffi.Pointer> errorPtr) { - final _ret = _objc_msgSend_p8i56h( + final _ret = _objc_msgSend_8321cp( this.ref.retainAndReturnPointer(), _sel_initWithContentsOfFile_options_error_, path.ref.pointer, @@ -1946,7 +1947,7 @@ class NSData extends NSObject { /// initWithContentsOfURL: NSData? initWithContentsOfURL_(NSURL url) { - final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_1sotr3r(this.ref.retainAndReturnPointer(), _sel_initWithContentsOfURL_, url.ref.pointer); return _ret.address == 0 ? null @@ -1958,7 +1959,7 @@ class NSData extends NSObject { NSURL url, NSDataReadingOptions readOptionsMask, ffi.Pointer> errorPtr) { - final _ret = _objc_msgSend_p8i56h( + final _ret = _objc_msgSend_8321cp( this.ref.retainAndReturnPointer(), _sel_initWithContentsOfURL_options_error_, url.ref.pointer, @@ -1971,7 +1972,7 @@ class NSData extends NSObject { /// initWithData: NSData initWithData_(NSData data) { - final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_1sotr3r(this.ref.retainAndReturnPointer(), _sel_initWithData_, data.ref.pointer); return NSData.castFromPointer(_ret, retain: false, release: true); } @@ -2135,60 +2136,61 @@ class NSDate extends NSObject { /// Returns whether [obj] is an instance of [NSDate]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_69e0x1( + return _objc_msgSend_19nvye5( obj.ref.pointer, _sel_isKindOfClass_, _class_NSDate); } /// alloc static NSDate alloc() { - final _ret = _objc_msgSend_1x359cv(_class_NSDate, _sel_alloc); + final _ret = _objc_msgSend_151sglz(_class_NSDate, _sel_alloc); return NSDate.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static NSDate allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_hzlb60(_class_NSDate, _sel_allocWithZone_, zone); + final _ret = + _objc_msgSend_1cwp428(_class_NSDate, _sel_allocWithZone_, zone); return NSDate.castFromPointer(_ret, retain: false, release: true); } /// date static NSDate date() { - final _ret = _objc_msgSend_1x359cv(_class_NSDate, _sel_date); + final _ret = _objc_msgSend_151sglz(_class_NSDate, _sel_date); return NSDate.castFromPointer(_ret, retain: true, release: true); } /// dateWithTimeInterval:sinceDate: static NSDate dateWithTimeInterval_sinceDate_( double secsToBeAdded, NSDate date) { - final _ret = _objc_msgSend_xh7c7e(_class_NSDate, + final _ret = _objc_msgSend_1ozwf6k(_class_NSDate, _sel_dateWithTimeInterval_sinceDate_, secsToBeAdded, date.ref.pointer); return NSDate.castFromPointer(_ret, retain: true, release: true); } /// dateWithTimeIntervalSince1970: static NSDate dateWithTimeIntervalSince1970_(double secs) { - final _ret = _objc_msgSend_1x911p2( + final _ret = _objc_msgSend_oa8mke( _class_NSDate, _sel_dateWithTimeIntervalSince1970_, secs); return NSDate.castFromPointer(_ret, retain: true, release: true); } /// dateWithTimeIntervalSinceNow: static NSDate dateWithTimeIntervalSinceNow_(double secs) { - final _ret = _objc_msgSend_1x911p2( + final _ret = _objc_msgSend_oa8mke( _class_NSDate, _sel_dateWithTimeIntervalSinceNow_, secs); return NSDate.castFromPointer(_ret, retain: true, release: true); } /// dateWithTimeIntervalSinceReferenceDate: static NSDate dateWithTimeIntervalSinceReferenceDate_(double ti) { - final _ret = _objc_msgSend_1x911p2( + final _ret = _objc_msgSend_oa8mke( _class_NSDate, _sel_dateWithTimeIntervalSinceReferenceDate_, ti); return NSDate.castFromPointer(_ret, retain: true, release: true); } /// new static NSDate new1() { - final _ret = _objc_msgSend_1x359cv(_class_NSDate, _sel_new); + final _ret = _objc_msgSend_151sglz(_class_NSDate, _sel_new); return NSDate.castFromPointer(_ret, retain: false, release: true); } @@ -2199,33 +2201,33 @@ class NSDate extends NSObject { /// autorelease NSDate autorelease() { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_autorelease); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_autorelease); return NSDate.castFromPointer(_ret, retain: true, release: true); } /// dateByAddingTimeInterval: NSDate dateByAddingTimeInterval_(double ti) { - final _ret = _objc_msgSend_1x911p2( + final _ret = _objc_msgSend_oa8mke( this.ref.pointer, _sel_dateByAddingTimeInterval_, ti); return NSDate.castFromPointer(_ret, retain: true, release: true); } /// encodeWithCoder: void encodeWithCoder_(NSCoder coder) { - _objc_msgSend_1jdvcbf( + _objc_msgSend_xtuoz7( this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); } /// init NSDate init() { final _ret = - _objc_msgSend_1x359cv(this.ref.retainAndReturnPointer(), _sel_init); + _objc_msgSend_151sglz(this.ref.retainAndReturnPointer(), _sel_init); return NSDate.castFromPointer(_ret, retain: false, release: true); } /// initWithCoder: NSDate? initWithCoder_(NSCoder coder) { - final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_1sotr3r(this.ref.retainAndReturnPointer(), _sel_initWithCoder_, coder.ref.pointer); return _ret.address == 0 ? null @@ -2234,41 +2236,41 @@ class NSDate extends NSObject { /// initWithTimeInterval:sinceDate: NSDate initWithTimeInterval_sinceDate_(double secsToBeAdded, NSDate date) { - final _ret = _objc_msgSend_xh7c7e(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_1ozwf6k(this.ref.retainAndReturnPointer(), _sel_initWithTimeInterval_sinceDate_, secsToBeAdded, date.ref.pointer); return NSDate.castFromPointer(_ret, retain: false, release: true); } /// initWithTimeIntervalSince1970: NSDate initWithTimeIntervalSince1970_(double secs) { - final _ret = _objc_msgSend_1x911p2(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_oa8mke(this.ref.retainAndReturnPointer(), _sel_initWithTimeIntervalSince1970_, secs); return NSDate.castFromPointer(_ret, retain: false, release: true); } /// initWithTimeIntervalSinceNow: NSDate initWithTimeIntervalSinceNow_(double secs) { - final _ret = _objc_msgSend_1x911p2(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_oa8mke(this.ref.retainAndReturnPointer(), _sel_initWithTimeIntervalSinceNow_, secs); return NSDate.castFromPointer(_ret, retain: false, release: true); } /// initWithTimeIntervalSinceReferenceDate: NSDate initWithTimeIntervalSinceReferenceDate_(double ti) { - final _ret = _objc_msgSend_1x911p2(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_oa8mke(this.ref.retainAndReturnPointer(), _sel_initWithTimeIntervalSinceReferenceDate_, ti); return NSDate.castFromPointer(_ret, retain: false, release: true); } /// retain NSDate retain() { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_retain); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_retain); return NSDate.castFromPointer(_ret, retain: true, release: true); } /// self NSDate self() { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_self); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_self); return NSDate.castFromPointer(_ret, retain: true, release: true); } @@ -2299,32 +2301,32 @@ class NSDictionary extends NSObject { /// Returns whether [obj] is an instance of [NSDictionary]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_69e0x1( + return _objc_msgSend_19nvye5( obj.ref.pointer, _sel_isKindOfClass_, _class_NSDictionary); } /// alloc static NSDictionary alloc() { - final _ret = _objc_msgSend_1x359cv(_class_NSDictionary, _sel_alloc); + final _ret = _objc_msgSend_151sglz(_class_NSDictionary, _sel_alloc); return NSDictionary.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static NSDictionary allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _objc_msgSend_hzlb60(_class_NSDictionary, _sel_allocWithZone_, zone); + _objc_msgSend_1cwp428(_class_NSDictionary, _sel_allocWithZone_, zone); return NSDictionary.castFromPointer(_ret, retain: false, release: true); } /// dictionary static NSDictionary dictionary() { - final _ret = _objc_msgSend_1x359cv(_class_NSDictionary, _sel_dictionary); + final _ret = _objc_msgSend_151sglz(_class_NSDictionary, _sel_dictionary); return NSDictionary.castFromPointer(_ret, retain: true, release: true); } /// dictionaryWithDictionary: static NSDictionary dictionaryWithDictionary_(NSDictionary dict) { - final _ret = _objc_msgSend_62nh5j( + final _ret = _objc_msgSend_1sotr3r( _class_NSDictionary, _sel_dictionaryWithDictionary_, dict.ref.pointer); return NSDictionary.castFromPointer(_ret, retain: true, release: true); } @@ -2332,7 +2334,7 @@ class NSDictionary extends NSObject { /// dictionaryWithObject:forKey: static NSDictionary dictionaryWithObject_forKey_( objc.ObjCObjectBase object, objc.ObjCObjectBase key) { - final _ret = _objc_msgSend_rsfdlh(_class_NSDictionary, + final _ret = _objc_msgSend_15qeuct(_class_NSDictionary, _sel_dictionaryWithObject_forKey_, object.ref.pointer, key.ref.pointer); return NSDictionary.castFromPointer(_ret, retain: true, release: true); } @@ -2340,7 +2342,7 @@ class NSDictionary extends NSObject { /// dictionaryWithObjects:forKeys: static NSDictionary dictionaryWithObjects_forKeys_( NSArray objects, NSArray keys) { - final _ret = _objc_msgSend_rsfdlh( + final _ret = _objc_msgSend_15qeuct( _class_NSDictionary, _sel_dictionaryWithObjects_forKeys_, objects.ref.pointer, @@ -2353,7 +2355,7 @@ class NSDictionary extends NSObject { ffi.Pointer> objects, ffi.Pointer> keys, int cnt) { - final _ret = _objc_msgSend_cfqbni(_class_NSDictionary, + final _ret = _objc_msgSend_1dydpdi(_class_NSDictionary, _sel_dictionaryWithObjects_forKeys_count_, objects, keys, cnt); return NSDictionary.castFromPointer(_ret, retain: true, release: true); } @@ -2361,14 +2363,14 @@ class NSDictionary extends NSObject { /// dictionaryWithObjectsAndKeys: static NSDictionary dictionaryWithObjectsAndKeys_( objc.ObjCObjectBase firstObject) { - final _ret = _objc_msgSend_62nh5j(_class_NSDictionary, + final _ret = _objc_msgSend_1sotr3r(_class_NSDictionary, _sel_dictionaryWithObjectsAndKeys_, firstObject.ref.pointer); return NSDictionary.castFromPointer(_ret, retain: true, release: true); } /// new static NSDictionary new1() { - final _ret = _objc_msgSend_1x359cv(_class_NSDictionary, _sel_new); + final _ret = _objc_msgSend_151sglz(_class_NSDictionary, _sel_new); return NSDictionary.castFromPointer(_ret, retain: false, release: true); } @@ -2393,20 +2395,20 @@ class NSDictionary extends NSObject { /// encodeWithCoder: void encodeWithCoder_(NSCoder coder) { - _objc_msgSend_1jdvcbf( + _objc_msgSend_xtuoz7( this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); } /// init NSDictionary init() { final _ret = - _objc_msgSend_1x359cv(this.ref.retainAndReturnPointer(), _sel_init); + _objc_msgSend_151sglz(this.ref.retainAndReturnPointer(), _sel_init); return NSDictionary.castFromPointer(_ret, retain: false, release: true); } /// initWithCoder: NSDictionary? initWithCoder_(NSCoder coder) { - final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_1sotr3r(this.ref.retainAndReturnPointer(), _sel_initWithCoder_, coder.ref.pointer); return _ret.address == 0 ? null @@ -2415,7 +2417,7 @@ class NSDictionary extends NSObject { /// initWithDictionary: NSDictionary initWithDictionary_(NSDictionary otherDictionary) { - final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_1sotr3r(this.ref.retainAndReturnPointer(), _sel_initWithDictionary_, otherDictionary.ref.pointer); return NSDictionary.castFromPointer(_ret, retain: false, release: true); } @@ -2423,14 +2425,14 @@ class NSDictionary extends NSObject { /// initWithDictionary:copyItems: NSDictionary initWithDictionary_copyItems_( NSDictionary otherDictionary, bool flag) { - final _ret = _objc_msgSend_1bdmr5f(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_17amj0z(this.ref.retainAndReturnPointer(), _sel_initWithDictionary_copyItems_, otherDictionary.ref.pointer, flag); return NSDictionary.castFromPointer(_ret, retain: false, release: true); } /// initWithObjects:forKeys: NSDictionary initWithObjects_forKeys_(NSArray objects, NSArray keys) { - final _ret = _objc_msgSend_rsfdlh(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_15qeuct(this.ref.retainAndReturnPointer(), _sel_initWithObjects_forKeys_, objects.ref.pointer, keys.ref.pointer); return NSDictionary.castFromPointer(_ret, retain: false, release: true); } @@ -2440,27 +2442,27 @@ class NSDictionary extends NSObject { ffi.Pointer> objects, ffi.Pointer> keys, int cnt) { - final _ret = _objc_msgSend_cfqbni(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_1dydpdi(this.ref.retainAndReturnPointer(), _sel_initWithObjects_forKeys_count_, objects, keys, cnt); return NSDictionary.castFromPointer(_ret, retain: false, release: true); } /// initWithObjectsAndKeys: NSDictionary initWithObjectsAndKeys_(objc.ObjCObjectBase firstObject) { - final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_1sotr3r(this.ref.retainAndReturnPointer(), _sel_initWithObjectsAndKeys_, firstObject.ref.pointer); return NSDictionary.castFromPointer(_ret, retain: false, release: true); } /// keyEnumerator NSEnumerator keyEnumerator() { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_keyEnumerator); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_keyEnumerator); return NSEnumerator.castFromPointer(_ret, retain: true, release: true); } /// objectForKey: objc.ObjCObjectBase? objectForKey_(objc.ObjCObjectBase aKey) { - final _ret = _objc_msgSend_62nh5j( + final _ret = _objc_msgSend_1sotr3r( this.ref.pointer, _sel_objectForKey_, aKey.ref.pointer); return _ret.address == 0 ? null @@ -2500,26 +2502,26 @@ class NSEnumerator extends NSObject { /// Returns whether [obj] is an instance of [NSEnumerator]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_69e0x1( + return _objc_msgSend_19nvye5( obj.ref.pointer, _sel_isKindOfClass_, _class_NSEnumerator); } /// alloc static NSEnumerator alloc() { - final _ret = _objc_msgSend_1x359cv(_class_NSEnumerator, _sel_alloc); + final _ret = _objc_msgSend_151sglz(_class_NSEnumerator, _sel_alloc); return NSEnumerator.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static NSEnumerator allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _objc_msgSend_hzlb60(_class_NSEnumerator, _sel_allocWithZone_, zone); + _objc_msgSend_1cwp428(_class_NSEnumerator, _sel_allocWithZone_, zone); return NSEnumerator.castFromPointer(_ret, retain: false, release: true); } /// new static NSEnumerator new1() { - final _ret = _objc_msgSend_1x359cv(_class_NSEnumerator, _sel_new); + final _ret = _objc_msgSend_151sglz(_class_NSEnumerator, _sel_new); return NSEnumerator.castFromPointer(_ret, retain: false, release: true); } @@ -2535,13 +2537,13 @@ class NSEnumerator extends NSObject { /// init NSEnumerator init() { final _ret = - _objc_msgSend_1x359cv(this.ref.retainAndReturnPointer(), _sel_init); + _objc_msgSend_151sglz(this.ref.retainAndReturnPointer(), _sel_init); return NSEnumerator.castFromPointer(_ret, retain: false, release: true); } /// nextObject objc.ObjCObjectBase? nextObject() { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_nextObject); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_nextObject); return _ret.address == 0 ? null : objc.ObjCObjectBase(_ret, retain: true, release: true); @@ -2565,27 +2567,27 @@ class NSError extends NSObject { /// Returns whether [obj] is an instance of [NSError]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_69e0x1( + return _objc_msgSend_19nvye5( obj.ref.pointer, _sel_isKindOfClass_, _class_NSError); } /// alloc static NSError alloc() { - final _ret = _objc_msgSend_1x359cv(_class_NSError, _sel_alloc); + final _ret = _objc_msgSend_151sglz(_class_NSError, _sel_alloc); return NSError.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static NSError allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _objc_msgSend_hzlb60(_class_NSError, _sel_allocWithZone_, zone); + _objc_msgSend_1cwp428(_class_NSError, _sel_allocWithZone_, zone); return NSError.castFromPointer(_ret, retain: false, release: true); } /// errorWithDomain:code:userInfo: static NSError errorWithDomain_code_userInfo_( NSString domain, int code, objc.ObjCObjectBase? dict) { - final _ret = _objc_msgSend_17xjpl7( + final _ret = _objc_msgSend_rc4ypv( _class_NSError, _sel_errorWithDomain_code_userInfo_, domain.ref.pointer, @@ -2596,7 +2598,7 @@ class NSError extends NSObject { /// new static NSError new1() { - final _ret = _objc_msgSend_1x359cv(_class_NSError, _sel_new); + final _ret = _objc_msgSend_151sglz(_class_NSError, _sel_new); return NSError.castFromPointer(_ret, retain: false, release: true); } @@ -2612,19 +2614,19 @@ class NSError extends NSObject { /// domain NSString get domain { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_domain); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_domain); return NSString.castFromPointer(_ret, retain: true, release: true); } /// encodeWithCoder: void encodeWithCoder_(NSCoder coder) { - _objc_msgSend_1jdvcbf( + _objc_msgSend_xtuoz7( this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); } /// helpAnchor NSString? get helpAnchor { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_helpAnchor); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_helpAnchor); return _ret.address == 0 ? null : NSString.castFromPointer(_ret, retain: true, release: true); @@ -2633,13 +2635,13 @@ class NSError extends NSObject { /// init NSError init() { final _ret = - _objc_msgSend_1x359cv(this.ref.retainAndReturnPointer(), _sel_init); + _objc_msgSend_151sglz(this.ref.retainAndReturnPointer(), _sel_init); return NSError.castFromPointer(_ret, retain: false, release: true); } /// initWithCoder: NSError? initWithCoder_(NSCoder coder) { - final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_1sotr3r(this.ref.retainAndReturnPointer(), _sel_initWithCoder_, coder.ref.pointer); return _ret.address == 0 ? null @@ -2649,7 +2651,7 @@ class NSError extends NSObject { /// initWithDomain:code:userInfo: NSError initWithDomain_code_userInfo_( NSString domain, int code, objc.ObjCObjectBase? dict) { - final _ret = _objc_msgSend_17xjpl7( + final _ret = _objc_msgSend_rc4ypv( this.ref.retainAndReturnPointer(), _sel_initWithDomain_code_userInfo_, domain.ref.pointer, @@ -2661,14 +2663,14 @@ class NSError extends NSObject { /// localizedDescription NSString get localizedDescription { final _ret = - _objc_msgSend_1x359cv(this.ref.pointer, _sel_localizedDescription); + _objc_msgSend_151sglz(this.ref.pointer, _sel_localizedDescription); return NSString.castFromPointer(_ret, retain: true, release: true); } /// localizedFailureReason NSString? get localizedFailureReason { final _ret = - _objc_msgSend_1x359cv(this.ref.pointer, _sel_localizedFailureReason); + _objc_msgSend_151sglz(this.ref.pointer, _sel_localizedFailureReason); return _ret.address == 0 ? null : NSString.castFromPointer(_ret, retain: true, release: true); @@ -2677,7 +2679,7 @@ class NSError extends NSObject { /// localizedRecoveryOptions NSArray? get localizedRecoveryOptions { final _ret = - _objc_msgSend_1x359cv(this.ref.pointer, _sel_localizedRecoveryOptions); + _objc_msgSend_151sglz(this.ref.pointer, _sel_localizedRecoveryOptions); return _ret.address == 0 ? null : NSArray.castFromPointer(_ret, retain: true, release: true); @@ -2685,7 +2687,7 @@ class NSError extends NSObject { /// localizedRecoverySuggestion NSString? get localizedRecoverySuggestion { - final _ret = _objc_msgSend_1x359cv( + final _ret = _objc_msgSend_151sglz( this.ref.pointer, _sel_localizedRecoverySuggestion); return _ret.address == 0 ? null @@ -2695,7 +2697,7 @@ class NSError extends NSObject { /// recoveryAttempter objc.ObjCObjectBase? get recoveryAttempter { final _ret = - _objc_msgSend_1x359cv(this.ref.pointer, _sel_recoveryAttempter); + _objc_msgSend_151sglz(this.ref.pointer, _sel_recoveryAttempter); return _ret.address == 0 ? null : objc.ObjCObjectBase(_ret, retain: true, release: true); @@ -2703,13 +2705,13 @@ class NSError extends NSObject { /// underlyingErrors NSArray get underlyingErrors { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_underlyingErrors); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_underlyingErrors); return NSArray.castFromPointer(_ret, retain: true, release: true); } /// userInfo objc.ObjCObjectBase get userInfo { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_userInfo); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_userInfo); return objc.ObjCObjectBase(_ret, retain: true, release: true); } } @@ -2724,8 +2726,7 @@ extension NSExtendedMutableData on NSMutableData { /// appendData: void appendData_(NSData other) { - _objc_msgSend_1jdvcbf( - this.ref.pointer, _sel_appendData_, other.ref.pointer); + _objc_msgSend_xtuoz7(this.ref.pointer, _sel_appendData_, other.ref.pointer); } /// increaseLengthBy: @@ -2759,7 +2760,7 @@ extension NSExtendedMutableData on NSMutableData { /// setData: void setData_(NSData data) { - _objc_msgSend_1jdvcbf(this.ref.pointer, _sel_setData_, data.ref.pointer); + _objc_msgSend_xtuoz7(this.ref.pointer, _sel_setData_, data.ref.pointer); } } @@ -2792,46 +2793,46 @@ class NSIndexSet extends NSObject { /// Returns whether [obj] is an instance of [NSIndexSet]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_69e0x1( + return _objc_msgSend_19nvye5( obj.ref.pointer, _sel_isKindOfClass_, _class_NSIndexSet); } /// alloc static NSIndexSet alloc() { - final _ret = _objc_msgSend_1x359cv(_class_NSIndexSet, _sel_alloc); + final _ret = _objc_msgSend_151sglz(_class_NSIndexSet, _sel_alloc); return NSIndexSet.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static NSIndexSet allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _objc_msgSend_hzlb60(_class_NSIndexSet, _sel_allocWithZone_, zone); + _objc_msgSend_1cwp428(_class_NSIndexSet, _sel_allocWithZone_, zone); return NSIndexSet.castFromPointer(_ret, retain: false, release: true); } /// indexSet static NSIndexSet indexSet() { - final _ret = _objc_msgSend_1x359cv(_class_NSIndexSet, _sel_indexSet); + final _ret = _objc_msgSend_151sglz(_class_NSIndexSet, _sel_indexSet); return NSIndexSet.castFromPointer(_ret, retain: true, release: true); } /// indexSetWithIndex: static NSIndexSet indexSetWithIndex_(int value) { - final _ret = _objc_msgSend_1qrcblu( + final _ret = _objc_msgSend_14hpxwa( _class_NSIndexSet, _sel_indexSetWithIndex_, value); return NSIndexSet.castFromPointer(_ret, retain: true, release: true); } /// indexSetWithIndexesInRange: static NSIndexSet indexSetWithIndexesInRange_(NSRange range) { - final _ret = _objc_msgSend_83z673( + final _ret = _objc_msgSend_1k1o1s7( _class_NSIndexSet, _sel_indexSetWithIndexesInRange_, range); return NSIndexSet.castFromPointer(_ret, retain: true, release: true); } /// new static NSIndexSet new1() { - final _ret = _objc_msgSend_1x359cv(_class_NSIndexSet, _sel_new); + final _ret = _objc_msgSend_151sglz(_class_NSIndexSet, _sel_new); return NSIndexSet.castFromPointer(_ret, retain: false, release: true); } @@ -2847,7 +2848,7 @@ class NSIndexSet extends NSObject { /// containsIndexes: bool containsIndexes_(NSIndexSet indexSet) { - return _objc_msgSend_69e0x1( + return _objc_msgSend_19nvye5( this.ref.pointer, _sel_containsIndexes_, indexSet.ref.pointer); } @@ -2870,7 +2871,7 @@ class NSIndexSet extends NSObject { /// encodeWithCoder: void encodeWithCoder_(NSCoder coder) { - _objc_msgSend_1jdvcbf( + _objc_msgSend_xtuoz7( this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); } @@ -2915,13 +2916,13 @@ class NSIndexSet extends NSObject { /// init NSIndexSet init() { final _ret = - _objc_msgSend_1x359cv(this.ref.retainAndReturnPointer(), _sel_init); + _objc_msgSend_151sglz(this.ref.retainAndReturnPointer(), _sel_init); return NSIndexSet.castFromPointer(_ret, retain: false, release: true); } /// initWithCoder: NSIndexSet? initWithCoder_(NSCoder coder) { - final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_1sotr3r(this.ref.retainAndReturnPointer(), _sel_initWithCoder_, coder.ref.pointer); return _ret.address == 0 ? null @@ -2930,21 +2931,21 @@ class NSIndexSet extends NSObject { /// initWithIndex: NSIndexSet initWithIndex_(int value) { - final _ret = _objc_msgSend_1qrcblu( + final _ret = _objc_msgSend_14hpxwa( this.ref.retainAndReturnPointer(), _sel_initWithIndex_, value); return NSIndexSet.castFromPointer(_ret, retain: false, release: true); } /// initWithIndexSet: NSIndexSet initWithIndexSet_(NSIndexSet indexSet) { - final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_1sotr3r(this.ref.retainAndReturnPointer(), _sel_initWithIndexSet_, indexSet.ref.pointer); return NSIndexSet.castFromPointer(_ret, retain: false, release: true); } /// initWithIndexesInRange: NSIndexSet initWithIndexesInRange_(NSRange range) { - final _ret = _objc_msgSend_83z673( + final _ret = _objc_msgSend_1k1o1s7( this.ref.retainAndReturnPointer(), _sel_initWithIndexesInRange_, range); return NSIndexSet.castFromPointer(_ret, retain: false, release: true); } @@ -2957,7 +2958,7 @@ class NSIndexSet extends NSObject { /// isEqualToIndexSet: bool isEqualToIndexSet_(NSIndexSet indexSet) { - return _objc_msgSend_69e0x1( + return _objc_msgSend_19nvye5( this.ref.pointer, _sel_isEqualToIndexSet_, indexSet.ref.pointer); } @@ -2984,13 +2985,13 @@ class NSInputStream extends NSStream { /// Returns whether [obj] is an instance of [NSInputStream]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_69e0x1( + return _objc_msgSend_19nvye5( obj.ref.pointer, _sel_isKindOfClass_, _class_NSInputStream); } /// inputStreamWithData: static NSInputStream? inputStreamWithData_(NSData data) { - final _ret = _objc_msgSend_62nh5j( + final _ret = _objc_msgSend_1sotr3r( _class_NSInputStream, _sel_inputStreamWithData_, data.ref.pointer); return _ret.address == 0 ? null @@ -2999,7 +3000,7 @@ class NSInputStream extends NSStream { /// inputStreamWithFileAtPath: static NSInputStream? inputStreamWithFileAtPath_(NSString path) { - final _ret = _objc_msgSend_62nh5j(_class_NSInputStream, + final _ret = _objc_msgSend_1sotr3r(_class_NSInputStream, _sel_inputStreamWithFileAtPath_, path.ref.pointer); return _ret.address == 0 ? null @@ -3008,7 +3009,7 @@ class NSInputStream extends NSStream { /// inputStreamWithURL: static NSInputStream? inputStreamWithURL_(NSURL url) { - final _ret = _objc_msgSend_62nh5j( + final _ret = _objc_msgSend_1sotr3r( _class_NSInputStream, _sel_inputStreamWithURL_, url.ref.pointer); return _ret.address == 0 ? null @@ -3029,14 +3030,14 @@ class NSInputStream extends NSStream { /// initWithData: NSInputStream initWithData_(NSData data) { - final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_1sotr3r(this.ref.retainAndReturnPointer(), _sel_initWithData_, data.ref.pointer); return NSInputStream.castFromPointer(_ret, retain: false, release: true); } /// initWithFileAtPath: NSInputStream? initWithFileAtPath_(NSString path) { - final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_1sotr3r(this.ref.retainAndReturnPointer(), _sel_initWithFileAtPath_, path.ref.pointer); return _ret.address == 0 ? null @@ -3045,7 +3046,7 @@ class NSInputStream extends NSStream { /// initWithURL: NSInputStream? initWithURL_(NSURL url) { - final _ret = _objc_msgSend_62nh5j( + final _ret = _objc_msgSend_1sotr3r( this.ref.retainAndReturnPointer(), _sel_initWithURL_, url.ref.pointer); return _ret.address == 0 ? null @@ -3076,7 +3077,7 @@ class NSInvocation extends objc.ObjCObjectBase { /// Returns whether [obj] is an instance of [NSInvocation]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_69e0x1( + return _objc_msgSend_19nvye5( obj.ref.pointer, _sel_isKindOfClass_, _class_NSInvocation); } } @@ -3098,51 +3099,51 @@ class NSItemProvider extends NSObject { /// Returns whether [obj] is an instance of [NSItemProvider]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_69e0x1( + return _objc_msgSend_19nvye5( obj.ref.pointer, _sel_isKindOfClass_, _class_NSItemProvider); } /// alloc static NSItemProvider alloc() { - final _ret = _objc_msgSend_1x359cv(_class_NSItemProvider, _sel_alloc); + final _ret = _objc_msgSend_151sglz(_class_NSItemProvider, _sel_alloc); return NSItemProvider.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static NSItemProvider allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _objc_msgSend_hzlb60(_class_NSItemProvider, _sel_allocWithZone_, zone); + _objc_msgSend_1cwp428(_class_NSItemProvider, _sel_allocWithZone_, zone); return NSItemProvider.castFromPointer(_ret, retain: false, release: true); } /// new static NSItemProvider new1() { - final _ret = _objc_msgSend_1x359cv(_class_NSItemProvider, _sel_new); + final _ret = _objc_msgSend_151sglz(_class_NSItemProvider, _sel_new); return NSItemProvider.castFromPointer(_ret, retain: false, release: true); } /// autorelease NSItemProvider autorelease() { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_autorelease); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_autorelease); return NSItemProvider.castFromPointer(_ret, retain: true, release: true); } /// canLoadObjectOfClass: bool canLoadObjectOfClass_(objc.ObjCObjectBase aClass) { - return _objc_msgSend_69e0x1( + return _objc_msgSend_19nvye5( this.ref.pointer, _sel_canLoadObjectOfClass_, aClass.ref.pointer); } /// hasItemConformingToTypeIdentifier: bool hasItemConformingToTypeIdentifier_(NSString typeIdentifier) { - return _objc_msgSend_69e0x1(this.ref.pointer, + return _objc_msgSend_19nvye5(this.ref.pointer, _sel_hasItemConformingToTypeIdentifier_, typeIdentifier.ref.pointer); } /// hasRepresentationConformingToTypeIdentifier:fileOptions: bool hasRepresentationConformingToTypeIdentifier_fileOptions_( NSString typeIdentifier, NSItemProviderFileOptions fileOptions) { - return _objc_msgSend_5ty9km( + return _objc_msgSend_1wdb8ji( this.ref.pointer, _sel_hasRepresentationConformingToTypeIdentifier_fileOptions_, typeIdentifier.ref.pointer, @@ -3152,13 +3153,13 @@ class NSItemProvider extends NSObject { /// init NSItemProvider init() { final _ret = - _objc_msgSend_1x359cv(this.ref.retainAndReturnPointer(), _sel_init); + _objc_msgSend_151sglz(this.ref.retainAndReturnPointer(), _sel_init); return NSItemProvider.castFromPointer(_ret, retain: false, release: true); } /// initWithContentsOfURL: NSItemProvider? initWithContentsOfURL_(NSURL fileURL) { - final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_1sotr3r(this.ref.retainAndReturnPointer(), _sel_initWithContentsOfURL_, fileURL.ref.pointer); return _ret.address == 0 ? null @@ -3168,7 +3169,7 @@ class NSItemProvider extends NSObject { /// initWithItem:typeIdentifier: NSItemProvider initWithItem_typeIdentifier_( objc.ObjCObjectBase? item, NSString? typeIdentifier) { - final _ret = _objc_msgSend_rsfdlh( + final _ret = _objc_msgSend_15qeuct( this.ref.retainAndReturnPointer(), _sel_initWithItem_typeIdentifier_, item?.ref.pointer ?? ffi.nullptr, @@ -3178,7 +3179,7 @@ class NSItemProvider extends NSObject { /// initWithObject: NSItemProvider initWithObject_(objc.ObjCObjectBase object) { - final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_1sotr3r(this.ref.retainAndReturnPointer(), _sel_initWithObject_, object.ref.pointer); return NSItemProvider.castFromPointer(_ret, retain: false, release: true); } @@ -3189,7 +3190,7 @@ class NSItemProvider extends NSObject { NSDictionary? options, objc.ObjCBlock?, NSError)>? completionHandler) { - _objc_msgSend_91c9gi( + _objc_msgSend_18qun1e( this.ref.pointer, _sel_loadItemForTypeIdentifier_options_completionHandler_, typeIdentifier.ref.pointer, @@ -3200,46 +3201,46 @@ class NSItemProvider extends NSObject { /// registerObject:visibility: void registerObject_visibility_(objc.ObjCObjectBase object, NSItemProviderRepresentationVisibility visibility) { - _objc_msgSend_pww1yj(this.ref.pointer, _sel_registerObject_visibility_, + _objc_msgSend_1k745tv(this.ref.pointer, _sel_registerObject_visibility_, object.ref.pointer, visibility.value); } /// registeredTypeIdentifiers NSArray get registeredTypeIdentifiers { final _ret = - _objc_msgSend_1x359cv(this.ref.pointer, _sel_registeredTypeIdentifiers); + _objc_msgSend_151sglz(this.ref.pointer, _sel_registeredTypeIdentifiers); return NSArray.castFromPointer(_ret, retain: true, release: true); } /// registeredTypeIdentifiersWithFileOptions: NSArray registeredTypeIdentifiersWithFileOptions_( NSItemProviderFileOptions fileOptions) { - final _ret = _objc_msgSend_1ih2cte(this.ref.pointer, + final _ret = _objc_msgSend_7g3u2y(this.ref.pointer, _sel_registeredTypeIdentifiersWithFileOptions_, fileOptions.value); return NSArray.castFromPointer(_ret, retain: true, release: true); } /// retain NSItemProvider retain() { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_retain); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_retain); return NSItemProvider.castFromPointer(_ret, retain: true, release: true); } /// self NSItemProvider self() { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_self); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_self); return NSItemProvider.castFromPointer(_ret, retain: true, release: true); } /// setSuggestedName: set suggestedName(NSString? value) { - _objc_msgSend_1jdvcbf(this.ref.pointer, _sel_setSuggestedName_, + _objc_msgSend_xtuoz7(this.ref.pointer, _sel_setSuggestedName_, value?.ref.pointer ?? ffi.nullptr); } /// suggestedName NSString? get suggestedName { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_suggestedName); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_suggestedName); return _ret.address == 0 ? null : NSString.castFromPointer(_ret, retain: true, release: true); @@ -3352,7 +3353,7 @@ class NSLocale extends objc.ObjCObjectBase { /// Returns whether [obj] is an instance of [NSLocale]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_69e0x1( + return _objc_msgSend_19nvye5( obj.ref.pointer, _sel_isKindOfClass_, _class_NSLocale); } } @@ -3374,20 +3375,20 @@ class NSMethodSignature extends NSObject { /// Returns whether [obj] is an instance of [NSMethodSignature]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_69e0x1( + return _objc_msgSend_19nvye5( obj.ref.pointer, _sel_isKindOfClass_, _class_NSMethodSignature); } /// alloc static NSMethodSignature alloc() { - final _ret = _objc_msgSend_1x359cv(_class_NSMethodSignature, _sel_alloc); + final _ret = _objc_msgSend_151sglz(_class_NSMethodSignature, _sel_alloc); return NSMethodSignature.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static NSMethodSignature allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_hzlb60( + final _ret = _objc_msgSend_1cwp428( _class_NSMethodSignature, _sel_allocWithZone_, zone); return NSMethodSignature.castFromPointer(_ret, retain: false, release: true); @@ -3395,7 +3396,7 @@ class NSMethodSignature extends NSObject { /// new static NSMethodSignature new1() { - final _ret = _objc_msgSend_1x359cv(_class_NSMethodSignature, _sel_new); + final _ret = _objc_msgSend_151sglz(_class_NSMethodSignature, _sel_new); return NSMethodSignature.castFromPointer(_ret, retain: false, release: true); } @@ -3403,7 +3404,7 @@ class NSMethodSignature extends NSObject { /// signatureWithObjCTypes: static NSMethodSignature? signatureWithObjCTypes_( ffi.Pointer types) { - final _ret = _objc_msgSend_rqwdif( + final _ret = _objc_msgSend_56zxyn( _class_NSMethodSignature, _sel_signatureWithObjCTypes_, types); return _ret.address == 0 ? null @@ -3424,7 +3425,7 @@ class NSMethodSignature extends NSObject { /// init NSMethodSignature init() { final _ret = - _objc_msgSend_1x359cv(this.ref.retainAndReturnPointer(), _sel_init); + _objc_msgSend_151sglz(this.ref.retainAndReturnPointer(), _sel_init); return NSMethodSignature.castFromPointer(_ret, retain: false, release: true); } @@ -3467,53 +3468,53 @@ class NSMutableArray extends NSArray { /// Returns whether [obj] is an instance of [NSMutableArray]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_69e0x1( + return _objc_msgSend_19nvye5( obj.ref.pointer, _sel_isKindOfClass_, _class_NSMutableArray); } /// alloc static NSMutableArray alloc() { - final _ret = _objc_msgSend_1x359cv(_class_NSMutableArray, _sel_alloc); + final _ret = _objc_msgSend_151sglz(_class_NSMutableArray, _sel_alloc); return NSMutableArray.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static NSMutableArray allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _objc_msgSend_hzlb60(_class_NSMutableArray, _sel_allocWithZone_, zone); + _objc_msgSend_1cwp428(_class_NSMutableArray, _sel_allocWithZone_, zone); return NSMutableArray.castFromPointer(_ret, retain: false, release: true); } /// array static NSMutableArray array() { - final _ret = _objc_msgSend_1x359cv(_class_NSMutableArray, _sel_array); + final _ret = _objc_msgSend_151sglz(_class_NSMutableArray, _sel_array); return NSMutableArray.castFromPointer(_ret, retain: true, release: true); } /// arrayWithArray: static NSMutableArray arrayWithArray_(NSArray array) { - final _ret = _objc_msgSend_62nh5j( + final _ret = _objc_msgSend_1sotr3r( _class_NSMutableArray, _sel_arrayWithArray_, array.ref.pointer); return NSMutableArray.castFromPointer(_ret, retain: true, release: true); } /// arrayWithCapacity: static NSMutableArray arrayWithCapacity_(int numItems) { - final _ret = _objc_msgSend_1qrcblu( + final _ret = _objc_msgSend_14hpxwa( _class_NSMutableArray, _sel_arrayWithCapacity_, numItems); return NSMutableArray.castFromPointer(_ret, retain: true, release: true); } /// arrayWithObject: static NSMutableArray arrayWithObject_(objc.ObjCObjectBase anObject) { - final _ret = _objc_msgSend_62nh5j( + final _ret = _objc_msgSend_1sotr3r( _class_NSMutableArray, _sel_arrayWithObject_, anObject.ref.pointer); return NSMutableArray.castFromPointer(_ret, retain: true, release: true); } /// arrayWithObjects: static NSMutableArray arrayWithObjects_(objc.ObjCObjectBase firstObj) { - final _ret = _objc_msgSend_62nh5j( + final _ret = _objc_msgSend_1sotr3r( _class_NSMutableArray, _sel_arrayWithObjects_, firstObj.ref.pointer); return NSMutableArray.castFromPointer(_ret, retain: true, release: true); } @@ -3521,14 +3522,14 @@ class NSMutableArray extends NSArray { /// arrayWithObjects:count: static NSMutableArray arrayWithObjects_count_( ffi.Pointer> objects, int cnt) { - final _ret = _objc_msgSend_1lqqdvl( + final _ret = _objc_msgSend_zmbtbd( _class_NSMutableArray, _sel_arrayWithObjects_count_, objects, cnt); return NSMutableArray.castFromPointer(_ret, retain: true, release: true); } /// new static NSMutableArray new1() { - final _ret = _objc_msgSend_1x359cv(_class_NSMutableArray, _sel_new); + final _ret = _objc_msgSend_151sglz(_class_NSMutableArray, _sel_new); return NSMutableArray.castFromPointer(_ret, retain: false, release: true); } @@ -3540,41 +3541,41 @@ class NSMutableArray extends NSArray { /// addObject: void addObject_(objc.ObjCObjectBase anObject) { - _objc_msgSend_1jdvcbf( + _objc_msgSend_xtuoz7( this.ref.pointer, _sel_addObject_, anObject.ref.pointer); } /// init NSMutableArray init() { final _ret = - _objc_msgSend_1x359cv(this.ref.retainAndReturnPointer(), _sel_init); + _objc_msgSend_151sglz(this.ref.retainAndReturnPointer(), _sel_init); return NSMutableArray.castFromPointer(_ret, retain: false, release: true); } /// initWithArray: NSMutableArray initWithArray_(NSArray array) { - final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_1sotr3r(this.ref.retainAndReturnPointer(), _sel_initWithArray_, array.ref.pointer); return NSMutableArray.castFromPointer(_ret, retain: false, release: true); } /// initWithArray:copyItems: NSMutableArray initWithArray_copyItems_(NSArray array, bool flag) { - final _ret = _objc_msgSend_1bdmr5f(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_17amj0z(this.ref.retainAndReturnPointer(), _sel_initWithArray_copyItems_, array.ref.pointer, flag); return NSMutableArray.castFromPointer(_ret, retain: false, release: true); } /// initWithCapacity: NSMutableArray initWithCapacity_(int numItems) { - final _ret = _objc_msgSend_1qrcblu( + final _ret = _objc_msgSend_14hpxwa( this.ref.retainAndReturnPointer(), _sel_initWithCapacity_, numItems); return NSMutableArray.castFromPointer(_ret, retain: false, release: true); } /// initWithCoder: NSMutableArray? initWithCoder_(NSCoder coder) { - final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_1sotr3r(this.ref.retainAndReturnPointer(), _sel_initWithCoder_, coder.ref.pointer); return _ret.address == 0 ? null @@ -3583,7 +3584,7 @@ class NSMutableArray extends NSArray { /// initWithObjects: NSMutableArray initWithObjects_(objc.ObjCObjectBase firstObj) { - final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_1sotr3r(this.ref.retainAndReturnPointer(), _sel_initWithObjects_, firstObj.ref.pointer); return NSMutableArray.castFromPointer(_ret, retain: false, release: true); } @@ -3591,14 +3592,14 @@ class NSMutableArray extends NSArray { /// initWithObjects:count: NSMutableArray initWithObjects_count_( ffi.Pointer> objects, int cnt) { - final _ret = _objc_msgSend_1lqqdvl(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_zmbtbd(this.ref.retainAndReturnPointer(), _sel_initWithObjects_count_, objects, cnt); return NSMutableArray.castFromPointer(_ret, retain: false, release: true); } /// insertObject:atIndex: void insertObject_atIndex_(objc.ObjCObjectBase anObject, int index) { - _objc_msgSend_10i1axw(this.ref.pointer, _sel_insertObject_atIndex_, + _objc_msgSend_djsa9o(this.ref.pointer, _sel_insertObject_atIndex_, anObject.ref.pointer, index); } @@ -3615,7 +3616,7 @@ class NSMutableArray extends NSArray { /// replaceObjectAtIndex:withObject: void replaceObjectAtIndex_withObject_( int index, objc.ObjCObjectBase anObject) { - _objc_msgSend_1c7f48q(this.ref.pointer, + _objc_msgSend_1gypgok(this.ref.pointer, _sel_replaceObjectAtIndex_withObject_, index, anObject.ref.pointer); } } @@ -3637,33 +3638,33 @@ class NSMutableData extends NSData { /// Returns whether [obj] is an instance of [NSMutableData]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_69e0x1( + return _objc_msgSend_19nvye5( obj.ref.pointer, _sel_isKindOfClass_, _class_NSMutableData); } /// alloc static NSMutableData alloc() { - final _ret = _objc_msgSend_1x359cv(_class_NSMutableData, _sel_alloc); + final _ret = _objc_msgSend_151sglz(_class_NSMutableData, _sel_alloc); return NSMutableData.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static NSMutableData allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _objc_msgSend_hzlb60(_class_NSMutableData, _sel_allocWithZone_, zone); + _objc_msgSend_1cwp428(_class_NSMutableData, _sel_allocWithZone_, zone); return NSMutableData.castFromPointer(_ret, retain: false, release: true); } /// data static NSMutableData data() { - final _ret = _objc_msgSend_1x359cv(_class_NSMutableData, _sel_data); + final _ret = _objc_msgSend_151sglz(_class_NSMutableData, _sel_data); return NSMutableData.castFromPointer(_ret, retain: true, release: true); } /// dataWithBytes:length: static NSMutableData dataWithBytes_length_( ffi.Pointer bytes, int length) { - final _ret = _objc_msgSend_19qmeje( + final _ret = _objc_msgSend_3nbx5e( _class_NSMutableData, _sel_dataWithBytes_length_, bytes, length); return NSMutableData.castFromPointer(_ret, retain: true, release: true); } @@ -3671,7 +3672,7 @@ class NSMutableData extends NSData { /// dataWithBytesNoCopy:length: static NSMutableData dataWithBytesNoCopy_length_( ffi.Pointer bytes, int length) { - final _ret = _objc_msgSend_19qmeje( + final _ret = _objc_msgSend_3nbx5e( _class_NSMutableData, _sel_dataWithBytesNoCopy_length_, bytes, length); return NSMutableData.castFromPointer(_ret, retain: true, release: true); } @@ -3679,14 +3680,14 @@ class NSMutableData extends NSData { /// dataWithBytesNoCopy:length:freeWhenDone: static NSMutableData dataWithBytesNoCopy_length_freeWhenDone_( ffi.Pointer bytes, int length, bool b) { - final _ret = _objc_msgSend_1je1k7e(_class_NSMutableData, + final _ret = _objc_msgSend_161ne8y(_class_NSMutableData, _sel_dataWithBytesNoCopy_length_freeWhenDone_, bytes, length, b); return NSMutableData.castFromPointer(_ret, retain: true, release: true); } /// dataWithCapacity: static NSMutableData? dataWithCapacity_(int aNumItems) { - final _ret = _objc_msgSend_1qrcblu( + final _ret = _objc_msgSend_14hpxwa( _class_NSMutableData, _sel_dataWithCapacity_, aNumItems); return _ret.address == 0 ? null @@ -3695,7 +3696,7 @@ class NSMutableData extends NSData { /// dataWithContentsOfFile: static NSMutableData? dataWithContentsOfFile_(NSString path) { - final _ret = _objc_msgSend_62nh5j( + final _ret = _objc_msgSend_1sotr3r( _class_NSMutableData, _sel_dataWithContentsOfFile_, path.ref.pointer); return _ret.address == 0 ? null @@ -3707,7 +3708,7 @@ class NSMutableData extends NSData { NSString path, NSDataReadingOptions readOptionsMask, ffi.Pointer> errorPtr) { - final _ret = _objc_msgSend_p8i56h( + final _ret = _objc_msgSend_8321cp( _class_NSMutableData, _sel_dataWithContentsOfFile_options_error_, path.ref.pointer, @@ -3720,7 +3721,7 @@ class NSMutableData extends NSData { /// dataWithContentsOfURL: static NSMutableData? dataWithContentsOfURL_(NSURL url) { - final _ret = _objc_msgSend_62nh5j( + final _ret = _objc_msgSend_1sotr3r( _class_NSMutableData, _sel_dataWithContentsOfURL_, url.ref.pointer); return _ret.address == 0 ? null @@ -3732,7 +3733,7 @@ class NSMutableData extends NSData { NSURL url, NSDataReadingOptions readOptionsMask, ffi.Pointer> errorPtr) { - final _ret = _objc_msgSend_p8i56h( + final _ret = _objc_msgSend_8321cp( _class_NSMutableData, _sel_dataWithContentsOfURL_options_error_, url.ref.pointer, @@ -3745,14 +3746,14 @@ class NSMutableData extends NSData { /// dataWithData: static NSMutableData dataWithData_(NSData data) { - final _ret = _objc_msgSend_62nh5j( + final _ret = _objc_msgSend_1sotr3r( _class_NSMutableData, _sel_dataWithData_, data.ref.pointer); return NSMutableData.castFromPointer(_ret, retain: true, release: true); } /// dataWithLength: static NSMutableData? dataWithLength_(int length) { - final _ret = _objc_msgSend_1qrcblu( + final _ret = _objc_msgSend_14hpxwa( _class_NSMutableData, _sel_dataWithLength_, length); return _ret.address == 0 ? null @@ -3761,7 +3762,7 @@ class NSMutableData extends NSData { /// new static NSMutableData new1() { - final _ret = _objc_msgSend_1x359cv(_class_NSMutableData, _sel_new); + final _ret = _objc_msgSend_151sglz(_class_NSMutableData, _sel_new); return NSMutableData.castFromPointer(_ret, retain: false, release: true); } @@ -3775,7 +3776,7 @@ class NSMutableData extends NSData { NSMutableData? compressedDataUsingAlgorithm_error_( NSDataCompressionAlgorithm algorithm, ffi.Pointer> error) { - final _ret = _objc_msgSend_1okds6o(this.ref.pointer, + final _ret = _objc_msgSend_1vnlaqg(this.ref.pointer, _sel_compressedDataUsingAlgorithm_error_, algorithm.value, error); return _ret.address == 0 ? null @@ -3786,7 +3787,7 @@ class NSMutableData extends NSData { NSMutableData? decompressedDataUsingAlgorithm_error_( NSDataCompressionAlgorithm algorithm, ffi.Pointer> error) { - final _ret = _objc_msgSend_1okds6o(this.ref.pointer, + final _ret = _objc_msgSend_1vnlaqg(this.ref.pointer, _sel_decompressedDataUsingAlgorithm_error_, algorithm.value, error); return _ret.address == 0 ? null @@ -3796,14 +3797,14 @@ class NSMutableData extends NSData { /// init NSMutableData init() { final _ret = - _objc_msgSend_1x359cv(this.ref.retainAndReturnPointer(), _sel_init); + _objc_msgSend_151sglz(this.ref.retainAndReturnPointer(), _sel_init); return NSMutableData.castFromPointer(_ret, retain: false, release: true); } /// initWithBase64EncodedData:options: NSMutableData? initWithBase64EncodedData_options_( NSData base64Data, NSDataBase64DecodingOptions options) { - final _ret = _objc_msgSend_dnlotu( + final _ret = _objc_msgSend_7kpg7m( this.ref.retainAndReturnPointer(), _sel_initWithBase64EncodedData_options_, base64Data.ref.pointer, @@ -3816,7 +3817,7 @@ class NSMutableData extends NSData { /// initWithBase64EncodedString:options: NSMutableData? initWithBase64EncodedString_options_( NSString base64String, NSDataBase64DecodingOptions options) { - final _ret = _objc_msgSend_dnlotu( + final _ret = _objc_msgSend_7kpg7m( this.ref.retainAndReturnPointer(), _sel_initWithBase64EncodedString_options_, base64String.ref.pointer, @@ -3828,7 +3829,7 @@ class NSMutableData extends NSData { /// initWithBytes:length: NSMutableData initWithBytes_length_(ffi.Pointer bytes, int length) { - final _ret = _objc_msgSend_19qmeje(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_3nbx5e(this.ref.retainAndReturnPointer(), _sel_initWithBytes_length_, bytes, length); return NSMutableData.castFromPointer(_ret, retain: false, release: true); } @@ -3836,7 +3837,7 @@ class NSMutableData extends NSData { /// initWithBytesNoCopy:length: NSMutableData initWithBytesNoCopy_length_( ffi.Pointer bytes, int length) { - final _ret = _objc_msgSend_19qmeje(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_3nbx5e(this.ref.retainAndReturnPointer(), _sel_initWithBytesNoCopy_length_, bytes, length); return NSMutableData.castFromPointer(_ret, retain: false, release: true); } @@ -3844,14 +3845,14 @@ class NSMutableData extends NSData { /// initWithBytesNoCopy:length:freeWhenDone: NSMutableData initWithBytesNoCopy_length_freeWhenDone_( ffi.Pointer bytes, int length, bool b) { - final _ret = _objc_msgSend_1je1k7e(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_161ne8y(this.ref.retainAndReturnPointer(), _sel_initWithBytesNoCopy_length_freeWhenDone_, bytes, length, b); return NSMutableData.castFromPointer(_ret, retain: false, release: true); } /// initWithCapacity: NSMutableData? initWithCapacity_(int capacity) { - final _ret = _objc_msgSend_1qrcblu( + final _ret = _objc_msgSend_14hpxwa( this.ref.retainAndReturnPointer(), _sel_initWithCapacity_, capacity); return _ret.address == 0 ? null @@ -3860,7 +3861,7 @@ class NSMutableData extends NSData { /// initWithCoder: NSMutableData? initWithCoder_(NSCoder coder) { - final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_1sotr3r(this.ref.retainAndReturnPointer(), _sel_initWithCoder_, coder.ref.pointer); return _ret.address == 0 ? null @@ -3869,7 +3870,7 @@ class NSMutableData extends NSData { /// initWithContentsOfFile: NSMutableData? initWithContentsOfFile_(NSString path) { - final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_1sotr3r(this.ref.retainAndReturnPointer(), _sel_initWithContentsOfFile_, path.ref.pointer); return _ret.address == 0 ? null @@ -3881,7 +3882,7 @@ class NSMutableData extends NSData { NSString path, NSDataReadingOptions readOptionsMask, ffi.Pointer> errorPtr) { - final _ret = _objc_msgSend_p8i56h( + final _ret = _objc_msgSend_8321cp( this.ref.retainAndReturnPointer(), _sel_initWithContentsOfFile_options_error_, path.ref.pointer, @@ -3894,7 +3895,7 @@ class NSMutableData extends NSData { /// initWithContentsOfURL: NSMutableData? initWithContentsOfURL_(NSURL url) { - final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_1sotr3r(this.ref.retainAndReturnPointer(), _sel_initWithContentsOfURL_, url.ref.pointer); return _ret.address == 0 ? null @@ -3906,7 +3907,7 @@ class NSMutableData extends NSData { NSURL url, NSDataReadingOptions readOptionsMask, ffi.Pointer> errorPtr) { - final _ret = _objc_msgSend_p8i56h( + final _ret = _objc_msgSend_8321cp( this.ref.retainAndReturnPointer(), _sel_initWithContentsOfURL_options_error_, url.ref.pointer, @@ -3919,14 +3920,14 @@ class NSMutableData extends NSData { /// initWithData: NSMutableData initWithData_(NSData data) { - final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_1sotr3r(this.ref.retainAndReturnPointer(), _sel_initWithData_, data.ref.pointer); return NSMutableData.castFromPointer(_ret, retain: false, release: true); } /// initWithLength: NSMutableData? initWithLength_(int length) { - final _ret = _objc_msgSend_1qrcblu( + final _ret = _objc_msgSend_14hpxwa( this.ref.retainAndReturnPointer(), _sel_initWithLength_, length); return _ret.address == 0 ? null @@ -3966,20 +3967,20 @@ class NSMutableDictionary extends NSDictionary { /// Returns whether [obj] is an instance of [NSMutableDictionary]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_69e0x1( + return _objc_msgSend_19nvye5( obj.ref.pointer, _sel_isKindOfClass_, _class_NSMutableDictionary); } /// alloc static NSMutableDictionary alloc() { - final _ret = _objc_msgSend_1x359cv(_class_NSMutableDictionary, _sel_alloc); + final _ret = _objc_msgSend_151sglz(_class_NSMutableDictionary, _sel_alloc); return NSMutableDictionary.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static NSMutableDictionary allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_hzlb60( + final _ret = _objc_msgSend_1cwp428( _class_NSMutableDictionary, _sel_allocWithZone_, zone); return NSMutableDictionary.castFromPointer(_ret, retain: false, release: true); @@ -3988,14 +3989,14 @@ class NSMutableDictionary extends NSDictionary { /// dictionary static NSMutableDictionary dictionary() { final _ret = - _objc_msgSend_1x359cv(_class_NSMutableDictionary, _sel_dictionary); + _objc_msgSend_151sglz(_class_NSMutableDictionary, _sel_dictionary); return NSMutableDictionary.castFromPointer(_ret, retain: true, release: true); } /// dictionaryWithCapacity: static NSMutableDictionary dictionaryWithCapacity_(int numItems) { - final _ret = _objc_msgSend_1qrcblu( + final _ret = _objc_msgSend_14hpxwa( _class_NSMutableDictionary, _sel_dictionaryWithCapacity_, numItems); return NSMutableDictionary.castFromPointer(_ret, retain: true, release: true); @@ -4003,7 +4004,7 @@ class NSMutableDictionary extends NSDictionary { /// dictionaryWithDictionary: static NSMutableDictionary dictionaryWithDictionary_(NSDictionary dict) { - final _ret = _objc_msgSend_62nh5j(_class_NSMutableDictionary, + final _ret = _objc_msgSend_1sotr3r(_class_NSMutableDictionary, _sel_dictionaryWithDictionary_, dict.ref.pointer); return NSMutableDictionary.castFromPointer(_ret, retain: true, release: true); @@ -4012,7 +4013,7 @@ class NSMutableDictionary extends NSDictionary { /// dictionaryWithObject:forKey: static NSMutableDictionary dictionaryWithObject_forKey_( objc.ObjCObjectBase object, objc.ObjCObjectBase key) { - final _ret = _objc_msgSend_rsfdlh(_class_NSMutableDictionary, + final _ret = _objc_msgSend_15qeuct(_class_NSMutableDictionary, _sel_dictionaryWithObject_forKey_, object.ref.pointer, key.ref.pointer); return NSMutableDictionary.castFromPointer(_ret, retain: true, release: true); @@ -4021,7 +4022,7 @@ class NSMutableDictionary extends NSDictionary { /// dictionaryWithObjects:forKeys: static NSMutableDictionary dictionaryWithObjects_forKeys_( NSArray objects, NSArray keys) { - final _ret = _objc_msgSend_rsfdlh( + final _ret = _objc_msgSend_15qeuct( _class_NSMutableDictionary, _sel_dictionaryWithObjects_forKeys_, objects.ref.pointer, @@ -4035,7 +4036,7 @@ class NSMutableDictionary extends NSDictionary { ffi.Pointer> objects, ffi.Pointer> keys, int cnt) { - final _ret = _objc_msgSend_cfqbni(_class_NSMutableDictionary, + final _ret = _objc_msgSend_1dydpdi(_class_NSMutableDictionary, _sel_dictionaryWithObjects_forKeys_count_, objects, keys, cnt); return NSMutableDictionary.castFromPointer(_ret, retain: true, release: true); @@ -4044,7 +4045,7 @@ class NSMutableDictionary extends NSDictionary { /// dictionaryWithObjectsAndKeys: static NSMutableDictionary dictionaryWithObjectsAndKeys_( objc.ObjCObjectBase firstObject) { - final _ret = _objc_msgSend_62nh5j(_class_NSMutableDictionary, + final _ret = _objc_msgSend_1sotr3r(_class_NSMutableDictionary, _sel_dictionaryWithObjectsAndKeys_, firstObject.ref.pointer); return NSMutableDictionary.castFromPointer(_ret, retain: true, release: true); @@ -4052,7 +4053,7 @@ class NSMutableDictionary extends NSDictionary { /// new static NSMutableDictionary new1() { - final _ret = _objc_msgSend_1x359cv(_class_NSMutableDictionary, _sel_new); + final _ret = _objc_msgSend_151sglz(_class_NSMutableDictionary, _sel_new); return NSMutableDictionary.castFromPointer(_ret, retain: false, release: true); } @@ -4066,14 +4067,14 @@ class NSMutableDictionary extends NSDictionary { /// init NSMutableDictionary init() { final _ret = - _objc_msgSend_1x359cv(this.ref.retainAndReturnPointer(), _sel_init); + _objc_msgSend_151sglz(this.ref.retainAndReturnPointer(), _sel_init); return NSMutableDictionary.castFromPointer(_ret, retain: false, release: true); } /// initWithCapacity: NSMutableDictionary initWithCapacity_(int numItems) { - final _ret = _objc_msgSend_1qrcblu( + final _ret = _objc_msgSend_14hpxwa( this.ref.retainAndReturnPointer(), _sel_initWithCapacity_, numItems); return NSMutableDictionary.castFromPointer(_ret, retain: false, release: true); @@ -4081,7 +4082,7 @@ class NSMutableDictionary extends NSDictionary { /// initWithCoder: NSMutableDictionary? initWithCoder_(NSCoder coder) { - final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_1sotr3r(this.ref.retainAndReturnPointer(), _sel_initWithCoder_, coder.ref.pointer); return _ret.address == 0 ? null @@ -4091,7 +4092,7 @@ class NSMutableDictionary extends NSDictionary { /// initWithDictionary: NSMutableDictionary initWithDictionary_(NSDictionary otherDictionary) { - final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_1sotr3r(this.ref.retainAndReturnPointer(), _sel_initWithDictionary_, otherDictionary.ref.pointer); return NSMutableDictionary.castFromPointer(_ret, retain: false, release: true); @@ -4100,7 +4101,7 @@ class NSMutableDictionary extends NSDictionary { /// initWithDictionary:copyItems: NSMutableDictionary initWithDictionary_copyItems_( NSDictionary otherDictionary, bool flag) { - final _ret = _objc_msgSend_1bdmr5f(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_17amj0z(this.ref.retainAndReturnPointer(), _sel_initWithDictionary_copyItems_, otherDictionary.ref.pointer, flag); return NSMutableDictionary.castFromPointer(_ret, retain: false, release: true); @@ -4108,7 +4109,7 @@ class NSMutableDictionary extends NSDictionary { /// initWithObjects:forKeys: NSMutableDictionary initWithObjects_forKeys_(NSArray objects, NSArray keys) { - final _ret = _objc_msgSend_rsfdlh(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_15qeuct(this.ref.retainAndReturnPointer(), _sel_initWithObjects_forKeys_, objects.ref.pointer, keys.ref.pointer); return NSMutableDictionary.castFromPointer(_ret, retain: false, release: true); @@ -4119,7 +4120,7 @@ class NSMutableDictionary extends NSDictionary { ffi.Pointer> objects, ffi.Pointer> keys, int cnt) { - final _ret = _objc_msgSend_cfqbni(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_1dydpdi(this.ref.retainAndReturnPointer(), _sel_initWithObjects_forKeys_count_, objects, keys, cnt); return NSMutableDictionary.castFromPointer(_ret, retain: false, release: true); @@ -4127,7 +4128,7 @@ class NSMutableDictionary extends NSDictionary { /// initWithObjectsAndKeys: NSMutableDictionary initWithObjectsAndKeys_(objc.ObjCObjectBase firstObject) { - final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_1sotr3r(this.ref.retainAndReturnPointer(), _sel_initWithObjectsAndKeys_, firstObject.ref.pointer); return NSMutableDictionary.castFromPointer(_ret, retain: false, release: true); @@ -4135,14 +4136,14 @@ class NSMutableDictionary extends NSDictionary { /// removeObjectForKey: void removeObjectForKey_(objc.ObjCObjectBase aKey) { - _objc_msgSend_1jdvcbf( + _objc_msgSend_xtuoz7( this.ref.pointer, _sel_removeObjectForKey_, aKey.ref.pointer); } /// setObject:forKey: void setObject_forKey_( objc.ObjCObjectBase anObject, objc.ObjCObjectBase aKey) { - _objc_msgSend_wjvic9(this.ref.pointer, _sel_setObject_forKey_, + _objc_msgSend_pfv6jd(this.ref.pointer, _sel_setObject_forKey_, anObject.ref.pointer, aKey.ref.pointer); } } @@ -4164,20 +4165,20 @@ class NSMutableIndexSet extends NSIndexSet { /// Returns whether [obj] is an instance of [NSMutableIndexSet]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_69e0x1( + return _objc_msgSend_19nvye5( obj.ref.pointer, _sel_isKindOfClass_, _class_NSMutableIndexSet); } /// alloc static NSMutableIndexSet alloc() { - final _ret = _objc_msgSend_1x359cv(_class_NSMutableIndexSet, _sel_alloc); + final _ret = _objc_msgSend_151sglz(_class_NSMutableIndexSet, _sel_alloc); return NSMutableIndexSet.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static NSMutableIndexSet allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_hzlb60( + final _ret = _objc_msgSend_1cwp428( _class_NSMutableIndexSet, _sel_allocWithZone_, zone); return NSMutableIndexSet.castFromPointer(_ret, retain: false, release: true); @@ -4185,27 +4186,27 @@ class NSMutableIndexSet extends NSIndexSet { /// indexSet static NSMutableIndexSet indexSet() { - final _ret = _objc_msgSend_1x359cv(_class_NSMutableIndexSet, _sel_indexSet); + final _ret = _objc_msgSend_151sglz(_class_NSMutableIndexSet, _sel_indexSet); return NSMutableIndexSet.castFromPointer(_ret, retain: true, release: true); } /// indexSetWithIndex: static NSMutableIndexSet indexSetWithIndex_(int value) { - final _ret = _objc_msgSend_1qrcblu( + final _ret = _objc_msgSend_14hpxwa( _class_NSMutableIndexSet, _sel_indexSetWithIndex_, value); return NSMutableIndexSet.castFromPointer(_ret, retain: true, release: true); } /// indexSetWithIndexesInRange: static NSMutableIndexSet indexSetWithIndexesInRange_(NSRange range) { - final _ret = _objc_msgSend_83z673( + final _ret = _objc_msgSend_1k1o1s7( _class_NSMutableIndexSet, _sel_indexSetWithIndexesInRange_, range); return NSMutableIndexSet.castFromPointer(_ret, retain: true, release: true); } /// new static NSMutableIndexSet new1() { - final _ret = _objc_msgSend_1x359cv(_class_NSMutableIndexSet, _sel_new); + final _ret = _objc_msgSend_151sglz(_class_NSMutableIndexSet, _sel_new); return NSMutableIndexSet.castFromPointer(_ret, retain: false, release: true); } @@ -4223,7 +4224,7 @@ class NSMutableIndexSet extends NSIndexSet { /// addIndexes: void addIndexes_(NSIndexSet indexSet) { - _objc_msgSend_1jdvcbf( + _objc_msgSend_xtuoz7( this.ref.pointer, _sel_addIndexes_, indexSet.ref.pointer); } @@ -4235,14 +4236,14 @@ class NSMutableIndexSet extends NSIndexSet { /// init NSMutableIndexSet init() { final _ret = - _objc_msgSend_1x359cv(this.ref.retainAndReturnPointer(), _sel_init); + _objc_msgSend_151sglz(this.ref.retainAndReturnPointer(), _sel_init); return NSMutableIndexSet.castFromPointer(_ret, retain: false, release: true); } /// initWithCoder: NSMutableIndexSet? initWithCoder_(NSCoder coder) { - final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_1sotr3r(this.ref.retainAndReturnPointer(), _sel_initWithCoder_, coder.ref.pointer); return _ret.address == 0 ? null @@ -4251,7 +4252,7 @@ class NSMutableIndexSet extends NSIndexSet { /// initWithIndex: NSMutableIndexSet initWithIndex_(int value) { - final _ret = _objc_msgSend_1qrcblu( + final _ret = _objc_msgSend_14hpxwa( this.ref.retainAndReturnPointer(), _sel_initWithIndex_, value); return NSMutableIndexSet.castFromPointer(_ret, retain: false, release: true); @@ -4259,7 +4260,7 @@ class NSMutableIndexSet extends NSIndexSet { /// initWithIndexSet: NSMutableIndexSet initWithIndexSet_(NSIndexSet indexSet) { - final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_1sotr3r(this.ref.retainAndReturnPointer(), _sel_initWithIndexSet_, indexSet.ref.pointer); return NSMutableIndexSet.castFromPointer(_ret, retain: false, release: true); @@ -4267,7 +4268,7 @@ class NSMutableIndexSet extends NSIndexSet { /// initWithIndexesInRange: NSMutableIndexSet initWithIndexesInRange_(NSRange range) { - final _ret = _objc_msgSend_83z673( + final _ret = _objc_msgSend_1k1o1s7( this.ref.retainAndReturnPointer(), _sel_initWithIndexesInRange_, range); return NSMutableIndexSet.castFromPointer(_ret, retain: false, release: true); @@ -4285,7 +4286,7 @@ class NSMutableIndexSet extends NSIndexSet { /// removeIndexes: void removeIndexes_(NSIndexSet indexSet) { - _objc_msgSend_1jdvcbf( + _objc_msgSend_xtuoz7( this.ref.pointer, _sel_removeIndexes_, indexSet.ref.pointer); } @@ -4318,20 +4319,20 @@ class NSMutableOrderedSet extends NSOrderedSet { /// Returns whether [obj] is an instance of [NSMutableOrderedSet]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_69e0x1( + return _objc_msgSend_19nvye5( obj.ref.pointer, _sel_isKindOfClass_, _class_NSMutableOrderedSet); } /// alloc static NSMutableOrderedSet alloc() { - final _ret = _objc_msgSend_1x359cv(_class_NSMutableOrderedSet, _sel_alloc); + final _ret = _objc_msgSend_151sglz(_class_NSMutableOrderedSet, _sel_alloc); return NSMutableOrderedSet.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static NSMutableOrderedSet allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_hzlb60( + final _ret = _objc_msgSend_1cwp428( _class_NSMutableOrderedSet, _sel_allocWithZone_, zone); return NSMutableOrderedSet.castFromPointer(_ret, retain: false, release: true); @@ -4339,7 +4340,7 @@ class NSMutableOrderedSet extends NSOrderedSet { /// new static NSMutableOrderedSet new1() { - final _ret = _objc_msgSend_1x359cv(_class_NSMutableOrderedSet, _sel_new); + final _ret = _objc_msgSend_151sglz(_class_NSMutableOrderedSet, _sel_new); return NSMutableOrderedSet.castFromPointer(_ret, retain: false, release: true); } @@ -4347,14 +4348,14 @@ class NSMutableOrderedSet extends NSOrderedSet { /// orderedSet static NSMutableOrderedSet orderedSet() { final _ret = - _objc_msgSend_1x359cv(_class_NSMutableOrderedSet, _sel_orderedSet); + _objc_msgSend_151sglz(_class_NSMutableOrderedSet, _sel_orderedSet); return NSMutableOrderedSet.castFromPointer(_ret, retain: true, release: true); } /// orderedSetWithArray: static NSMutableOrderedSet orderedSetWithArray_(NSArray array) { - final _ret = _objc_msgSend_62nh5j(_class_NSMutableOrderedSet, + final _ret = _objc_msgSend_1sotr3r(_class_NSMutableOrderedSet, _sel_orderedSetWithArray_, array.ref.pointer); return NSMutableOrderedSet.castFromPointer(_ret, retain: true, release: true); @@ -4363,7 +4364,7 @@ class NSMutableOrderedSet extends NSOrderedSet { /// orderedSetWithArray:range:copyItems: static NSMutableOrderedSet orderedSetWithArray_range_copyItems_( NSArray array, NSRange range, bool flag) { - final _ret = _objc_msgSend_1cqd8wl( + final _ret = _objc_msgSend_w9bq5x( _class_NSMutableOrderedSet, _sel_orderedSetWithArray_range_copyItems_, array.ref.pointer, @@ -4375,7 +4376,7 @@ class NSMutableOrderedSet extends NSOrderedSet { /// orderedSetWithCapacity: static NSMutableOrderedSet orderedSetWithCapacity_(int numItems) { - final _ret = _objc_msgSend_1qrcblu( + final _ret = _objc_msgSend_14hpxwa( _class_NSMutableOrderedSet, _sel_orderedSetWithCapacity_, numItems); return NSMutableOrderedSet.castFromPointer(_ret, retain: true, release: true); @@ -4383,7 +4384,7 @@ class NSMutableOrderedSet extends NSOrderedSet { /// orderedSetWithObject: static NSMutableOrderedSet orderedSetWithObject_(objc.ObjCObjectBase object) { - final _ret = _objc_msgSend_62nh5j(_class_NSMutableOrderedSet, + final _ret = _objc_msgSend_1sotr3r(_class_NSMutableOrderedSet, _sel_orderedSetWithObject_, object.ref.pointer); return NSMutableOrderedSet.castFromPointer(_ret, retain: true, release: true); @@ -4392,7 +4393,7 @@ class NSMutableOrderedSet extends NSOrderedSet { /// orderedSetWithObjects: static NSMutableOrderedSet orderedSetWithObjects_( objc.ObjCObjectBase firstObj) { - final _ret = _objc_msgSend_62nh5j(_class_NSMutableOrderedSet, + final _ret = _objc_msgSend_1sotr3r(_class_NSMutableOrderedSet, _sel_orderedSetWithObjects_, firstObj.ref.pointer); return NSMutableOrderedSet.castFromPointer(_ret, retain: true, release: true); @@ -4401,7 +4402,7 @@ class NSMutableOrderedSet extends NSOrderedSet { /// orderedSetWithObjects:count: static NSMutableOrderedSet orderedSetWithObjects_count_( ffi.Pointer> objects, int cnt) { - final _ret = _objc_msgSend_1lqqdvl(_class_NSMutableOrderedSet, + final _ret = _objc_msgSend_zmbtbd(_class_NSMutableOrderedSet, _sel_orderedSetWithObjects_count_, objects, cnt); return NSMutableOrderedSet.castFromPointer(_ret, retain: true, release: true); @@ -4409,7 +4410,7 @@ class NSMutableOrderedSet extends NSOrderedSet { /// orderedSetWithOrderedSet: static NSMutableOrderedSet orderedSetWithOrderedSet_(NSOrderedSet set) { - final _ret = _objc_msgSend_62nh5j(_class_NSMutableOrderedSet, + final _ret = _objc_msgSend_1sotr3r(_class_NSMutableOrderedSet, _sel_orderedSetWithOrderedSet_, set.ref.pointer); return NSMutableOrderedSet.castFromPointer(_ret, retain: true, release: true); @@ -4418,7 +4419,7 @@ class NSMutableOrderedSet extends NSOrderedSet { /// orderedSetWithOrderedSet:range:copyItems: static NSMutableOrderedSet orderedSetWithOrderedSet_range_copyItems_( NSOrderedSet set, NSRange range, bool flag) { - final _ret = _objc_msgSend_1cqd8wl( + final _ret = _objc_msgSend_w9bq5x( _class_NSMutableOrderedSet, _sel_orderedSetWithOrderedSet_range_copyItems_, set.ref.pointer, @@ -4430,7 +4431,7 @@ class NSMutableOrderedSet extends NSOrderedSet { /// orderedSetWithSet: static NSMutableOrderedSet orderedSetWithSet_(objc.ObjCObjectBase set) { - final _ret = _objc_msgSend_62nh5j( + final _ret = _objc_msgSend_1sotr3r( _class_NSMutableOrderedSet, _sel_orderedSetWithSet_, set.ref.pointer); return NSMutableOrderedSet.castFromPointer(_ret, retain: true, release: true); @@ -4439,7 +4440,7 @@ class NSMutableOrderedSet extends NSOrderedSet { /// orderedSetWithSet:copyItems: static NSMutableOrderedSet orderedSetWithSet_copyItems_( objc.ObjCObjectBase set, bool flag) { - final _ret = _objc_msgSend_1bdmr5f(_class_NSMutableOrderedSet, + final _ret = _objc_msgSend_17amj0z(_class_NSMutableOrderedSet, _sel_orderedSetWithSet_copyItems_, set.ref.pointer, flag); return NSMutableOrderedSet.castFromPointer(_ret, retain: true, release: true); @@ -4453,7 +4454,7 @@ class NSMutableOrderedSet extends NSOrderedSet { /// autorelease NSMutableOrderedSet autorelease() { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_autorelease); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_autorelease); return NSMutableOrderedSet.castFromPointer(_ret, retain: true, release: true); } @@ -4461,14 +4462,14 @@ class NSMutableOrderedSet extends NSOrderedSet { /// init NSMutableOrderedSet init() { final _ret = - _objc_msgSend_1x359cv(this.ref.retainAndReturnPointer(), _sel_init); + _objc_msgSend_151sglz(this.ref.retainAndReturnPointer(), _sel_init); return NSMutableOrderedSet.castFromPointer(_ret, retain: false, release: true); } /// initWithArray: NSMutableOrderedSet initWithArray_(NSArray array) { - final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_1sotr3r(this.ref.retainAndReturnPointer(), _sel_initWithArray_, array.ref.pointer); return NSMutableOrderedSet.castFromPointer(_ret, retain: false, release: true); @@ -4476,7 +4477,7 @@ class NSMutableOrderedSet extends NSOrderedSet { /// initWithArray:copyItems: NSMutableOrderedSet initWithArray_copyItems_(NSArray set, bool flag) { - final _ret = _objc_msgSend_1bdmr5f(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_17amj0z(this.ref.retainAndReturnPointer(), _sel_initWithArray_copyItems_, set.ref.pointer, flag); return NSMutableOrderedSet.castFromPointer(_ret, retain: false, release: true); @@ -4485,7 +4486,7 @@ class NSMutableOrderedSet extends NSOrderedSet { /// initWithArray:range:copyItems: NSMutableOrderedSet initWithArray_range_copyItems_( NSArray set, NSRange range, bool flag) { - final _ret = _objc_msgSend_1cqd8wl(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_w9bq5x(this.ref.retainAndReturnPointer(), _sel_initWithArray_range_copyItems_, set.ref.pointer, range, flag); return NSMutableOrderedSet.castFromPointer(_ret, retain: false, release: true); @@ -4493,7 +4494,7 @@ class NSMutableOrderedSet extends NSOrderedSet { /// initWithCapacity: NSMutableOrderedSet initWithCapacity_(int numItems) { - final _ret = _objc_msgSend_1qrcblu( + final _ret = _objc_msgSend_14hpxwa( this.ref.retainAndReturnPointer(), _sel_initWithCapacity_, numItems); return NSMutableOrderedSet.castFromPointer(_ret, retain: false, release: true); @@ -4501,7 +4502,7 @@ class NSMutableOrderedSet extends NSOrderedSet { /// initWithCoder: NSMutableOrderedSet? initWithCoder_(NSCoder coder) { - final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_1sotr3r(this.ref.retainAndReturnPointer(), _sel_initWithCoder_, coder.ref.pointer); return _ret.address == 0 ? null @@ -4511,7 +4512,7 @@ class NSMutableOrderedSet extends NSOrderedSet { /// initWithObject: NSMutableOrderedSet initWithObject_(objc.ObjCObjectBase object) { - final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_1sotr3r(this.ref.retainAndReturnPointer(), _sel_initWithObject_, object.ref.pointer); return NSMutableOrderedSet.castFromPointer(_ret, retain: false, release: true); @@ -4519,7 +4520,7 @@ class NSMutableOrderedSet extends NSOrderedSet { /// initWithObjects: NSMutableOrderedSet initWithObjects_(objc.ObjCObjectBase firstObj) { - final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_1sotr3r(this.ref.retainAndReturnPointer(), _sel_initWithObjects_, firstObj.ref.pointer); return NSMutableOrderedSet.castFromPointer(_ret, retain: false, release: true); @@ -4528,7 +4529,7 @@ class NSMutableOrderedSet extends NSOrderedSet { /// initWithObjects:count: NSMutableOrderedSet initWithObjects_count_( ffi.Pointer> objects, int cnt) { - final _ret = _objc_msgSend_1lqqdvl(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_zmbtbd(this.ref.retainAndReturnPointer(), _sel_initWithObjects_count_, objects, cnt); return NSMutableOrderedSet.castFromPointer(_ret, retain: false, release: true); @@ -4536,7 +4537,7 @@ class NSMutableOrderedSet extends NSOrderedSet { /// initWithOrderedSet: NSMutableOrderedSet initWithOrderedSet_(NSOrderedSet set) { - final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_1sotr3r(this.ref.retainAndReturnPointer(), _sel_initWithOrderedSet_, set.ref.pointer); return NSMutableOrderedSet.castFromPointer(_ret, retain: false, release: true); @@ -4545,7 +4546,7 @@ class NSMutableOrderedSet extends NSOrderedSet { /// initWithOrderedSet:copyItems: NSMutableOrderedSet initWithOrderedSet_copyItems_( NSOrderedSet set, bool flag) { - final _ret = _objc_msgSend_1bdmr5f(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_17amj0z(this.ref.retainAndReturnPointer(), _sel_initWithOrderedSet_copyItems_, set.ref.pointer, flag); return NSMutableOrderedSet.castFromPointer(_ret, retain: false, release: true); @@ -4554,7 +4555,7 @@ class NSMutableOrderedSet extends NSOrderedSet { /// initWithOrderedSet:range:copyItems: NSMutableOrderedSet initWithOrderedSet_range_copyItems_( NSOrderedSet set, NSRange range, bool flag) { - final _ret = _objc_msgSend_1cqd8wl(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_w9bq5x(this.ref.retainAndReturnPointer(), _sel_initWithOrderedSet_range_copyItems_, set.ref.pointer, range, flag); return NSMutableOrderedSet.castFromPointer(_ret, retain: false, release: true); @@ -4562,7 +4563,7 @@ class NSMutableOrderedSet extends NSOrderedSet { /// initWithSet: NSMutableOrderedSet initWithSet_(objc.ObjCObjectBase set) { - final _ret = _objc_msgSend_62nh5j( + final _ret = _objc_msgSend_1sotr3r( this.ref.retainAndReturnPointer(), _sel_initWithSet_, set.ref.pointer); return NSMutableOrderedSet.castFromPointer(_ret, retain: false, release: true); @@ -4571,7 +4572,7 @@ class NSMutableOrderedSet extends NSOrderedSet { /// initWithSet:copyItems: NSMutableOrderedSet initWithSet_copyItems_( objc.ObjCObjectBase set, bool flag) { - final _ret = _objc_msgSend_1bdmr5f(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_17amj0z(this.ref.retainAndReturnPointer(), _sel_initWithSet_copyItems_, set.ref.pointer, flag); return NSMutableOrderedSet.castFromPointer(_ret, retain: false, release: true); @@ -4579,7 +4580,7 @@ class NSMutableOrderedSet extends NSOrderedSet { /// insertObject:atIndex: void insertObject_atIndex_(objc.ObjCObjectBase object, int idx) { - _objc_msgSend_10i1axw( + _objc_msgSend_djsa9o( this.ref.pointer, _sel_insertObject_atIndex_, object.ref.pointer, idx); } @@ -4590,20 +4591,20 @@ class NSMutableOrderedSet extends NSOrderedSet { /// replaceObjectAtIndex:withObject: void replaceObjectAtIndex_withObject_(int idx, objc.ObjCObjectBase object) { - _objc_msgSend_1c7f48q(this.ref.pointer, + _objc_msgSend_1gypgok(this.ref.pointer, _sel_replaceObjectAtIndex_withObject_, idx, object.ref.pointer); } /// retain NSMutableOrderedSet retain() { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_retain); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_retain); return NSMutableOrderedSet.castFromPointer(_ret, retain: true, release: true); } /// self NSMutableOrderedSet self() { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_self); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_self); return NSMutableOrderedSet.castFromPointer(_ret, retain: true, release: true); } @@ -4626,59 +4627,59 @@ class NSMutableSet extends NSSet { /// Returns whether [obj] is an instance of [NSMutableSet]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_69e0x1( + return _objc_msgSend_19nvye5( obj.ref.pointer, _sel_isKindOfClass_, _class_NSMutableSet); } /// alloc static NSMutableSet alloc() { - final _ret = _objc_msgSend_1x359cv(_class_NSMutableSet, _sel_alloc); + final _ret = _objc_msgSend_151sglz(_class_NSMutableSet, _sel_alloc); return NSMutableSet.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static NSMutableSet allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _objc_msgSend_hzlb60(_class_NSMutableSet, _sel_allocWithZone_, zone); + _objc_msgSend_1cwp428(_class_NSMutableSet, _sel_allocWithZone_, zone); return NSMutableSet.castFromPointer(_ret, retain: false, release: true); } /// new static NSMutableSet new1() { - final _ret = _objc_msgSend_1x359cv(_class_NSMutableSet, _sel_new); + final _ret = _objc_msgSend_151sglz(_class_NSMutableSet, _sel_new); return NSMutableSet.castFromPointer(_ret, retain: false, release: true); } /// set static NSMutableSet set1() { - final _ret = _objc_msgSend_1x359cv(_class_NSMutableSet, _sel_set); + final _ret = _objc_msgSend_151sglz(_class_NSMutableSet, _sel_set); return NSMutableSet.castFromPointer(_ret, retain: true, release: true); } /// setWithArray: static NSMutableSet setWithArray_(NSArray array) { - final _ret = _objc_msgSend_62nh5j( + final _ret = _objc_msgSend_1sotr3r( _class_NSMutableSet, _sel_setWithArray_, array.ref.pointer); return NSMutableSet.castFromPointer(_ret, retain: true, release: true); } /// setWithCapacity: static NSMutableSet setWithCapacity_(int numItems) { - final _ret = _objc_msgSend_1qrcblu( + final _ret = _objc_msgSend_14hpxwa( _class_NSMutableSet, _sel_setWithCapacity_, numItems); return NSMutableSet.castFromPointer(_ret, retain: true, release: true); } /// setWithObject: static NSMutableSet setWithObject_(objc.ObjCObjectBase object) { - final _ret = _objc_msgSend_62nh5j( + final _ret = _objc_msgSend_1sotr3r( _class_NSMutableSet, _sel_setWithObject_, object.ref.pointer); return NSMutableSet.castFromPointer(_ret, retain: true, release: true); } /// setWithObjects: static NSMutableSet setWithObjects_(objc.ObjCObjectBase firstObj) { - final _ret = _objc_msgSend_62nh5j( + final _ret = _objc_msgSend_1sotr3r( _class_NSMutableSet, _sel_setWithObjects_, firstObj.ref.pointer); return NSMutableSet.castFromPointer(_ret, retain: true, release: true); } @@ -4686,14 +4687,14 @@ class NSMutableSet extends NSSet { /// setWithObjects:count: static NSMutableSet setWithObjects_count_( ffi.Pointer> objects, int cnt) { - final _ret = _objc_msgSend_1lqqdvl( + final _ret = _objc_msgSend_zmbtbd( _class_NSMutableSet, _sel_setWithObjects_count_, objects, cnt); return NSMutableSet.castFromPointer(_ret, retain: true, release: true); } /// setWithSet: static NSMutableSet setWithSet_(NSSet set) { - final _ret = _objc_msgSend_62nh5j( + final _ret = _objc_msgSend_1sotr3r( _class_NSMutableSet, _sel_setWithSet_, set.ref.pointer); return NSMutableSet.castFromPointer(_ret, retain: true, release: true); } @@ -4705,34 +4706,33 @@ class NSMutableSet extends NSSet { /// addObject: void addObject_(objc.ObjCObjectBase object) { - _objc_msgSend_1jdvcbf( - this.ref.pointer, _sel_addObject_, object.ref.pointer); + _objc_msgSend_xtuoz7(this.ref.pointer, _sel_addObject_, object.ref.pointer); } /// init NSMutableSet init() { final _ret = - _objc_msgSend_1x359cv(this.ref.retainAndReturnPointer(), _sel_init); + _objc_msgSend_151sglz(this.ref.retainAndReturnPointer(), _sel_init); return NSMutableSet.castFromPointer(_ret, retain: false, release: true); } /// initWithArray: NSMutableSet initWithArray_(NSArray array) { - final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_1sotr3r(this.ref.retainAndReturnPointer(), _sel_initWithArray_, array.ref.pointer); return NSMutableSet.castFromPointer(_ret, retain: false, release: true); } /// initWithCapacity: NSMutableSet initWithCapacity_(int numItems) { - final _ret = _objc_msgSend_1qrcblu( + final _ret = _objc_msgSend_14hpxwa( this.ref.retainAndReturnPointer(), _sel_initWithCapacity_, numItems); return NSMutableSet.castFromPointer(_ret, retain: false, release: true); } /// initWithCoder: NSMutableSet? initWithCoder_(NSCoder coder) { - final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_1sotr3r(this.ref.retainAndReturnPointer(), _sel_initWithCoder_, coder.ref.pointer); return _ret.address == 0 ? null @@ -4741,7 +4741,7 @@ class NSMutableSet extends NSSet { /// initWithObjects: NSMutableSet initWithObjects_(objc.ObjCObjectBase firstObj) { - final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_1sotr3r(this.ref.retainAndReturnPointer(), _sel_initWithObjects_, firstObj.ref.pointer); return NSMutableSet.castFromPointer(_ret, retain: false, release: true); } @@ -4749,28 +4749,28 @@ class NSMutableSet extends NSSet { /// initWithObjects:count: NSMutableSet initWithObjects_count_( ffi.Pointer> objects, int cnt) { - final _ret = _objc_msgSend_1lqqdvl(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_zmbtbd(this.ref.retainAndReturnPointer(), _sel_initWithObjects_count_, objects, cnt); return NSMutableSet.castFromPointer(_ret, retain: false, release: true); } /// initWithSet: NSMutableSet initWithSet_(NSSet set) { - final _ret = _objc_msgSend_62nh5j( + final _ret = _objc_msgSend_1sotr3r( this.ref.retainAndReturnPointer(), _sel_initWithSet_, set.ref.pointer); return NSMutableSet.castFromPointer(_ret, retain: false, release: true); } /// initWithSet:copyItems: NSMutableSet initWithSet_copyItems_(NSSet set, bool flag) { - final _ret = _objc_msgSend_1bdmr5f(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_17amj0z(this.ref.retainAndReturnPointer(), _sel_initWithSet_copyItems_, set.ref.pointer, flag); return NSMutableSet.castFromPointer(_ret, retain: false, release: true); } /// removeObject: void removeObject_(objc.ObjCObjectBase object) { - _objc_msgSend_1jdvcbf( + _objc_msgSend_xtuoz7( this.ref.pointer, _sel_removeObject_, object.ref.pointer); } } @@ -4792,26 +4792,26 @@ class NSMutableString extends NSString { /// Returns whether [obj] is an instance of [NSMutableString]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_69e0x1( + return _objc_msgSend_19nvye5( obj.ref.pointer, _sel_isKindOfClass_, _class_NSMutableString); } /// alloc static NSMutableString alloc() { - final _ret = _objc_msgSend_1x359cv(_class_NSMutableString, _sel_alloc); + final _ret = _objc_msgSend_151sglz(_class_NSMutableString, _sel_alloc); return NSMutableString.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static NSMutableString allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_hzlb60(_class_NSMutableString, _sel_allocWithZone_, zone); + final _ret = _objc_msgSend_1cwp428( + _class_NSMutableString, _sel_allocWithZone_, zone); return NSMutableString.castFromPointer(_ret, retain: false, release: true); } /// localizedStringWithFormat: static NSMutableString localizedStringWithFormat_(NSString format) { - final _ret = _objc_msgSend_62nh5j(_class_NSMutableString, + final _ret = _objc_msgSend_1sotr3r(_class_NSMutableString, _sel_localizedStringWithFormat_, format.ref.pointer); return NSMutableString.castFromPointer(_ret, retain: true, release: true); } @@ -4822,7 +4822,7 @@ class NSMutableString extends NSString { NSString format, NSString validFormatSpecifiers, ffi.Pointer> error) { - final _ret = _objc_msgSend_bo6ep4( + final _ret = _objc_msgSend_1pnyuds( _class_NSMutableString, _sel_localizedStringWithValidatedFormat_validFormatSpecifiers_error_, format.ref.pointer, @@ -4835,7 +4835,7 @@ class NSMutableString extends NSString { /// new static NSMutableString new1() { - final _ret = _objc_msgSend_1x359cv(_class_NSMutableString, _sel_new); + final _ret = _objc_msgSend_151sglz(_class_NSMutableString, _sel_new); return NSMutableString.castFromPointer(_ret, retain: false, release: true); } @@ -4844,7 +4844,7 @@ class NSMutableString extends NSString { NSData data, NSString typeIdentifier, ffi.Pointer> outError) { - final _ret = _objc_msgSend_bo6ep4( + final _ret = _objc_msgSend_1pnyuds( _class_NSMutableString, _sel_objectWithItemProviderData_typeIdentifier_error_, data.ref.pointer, @@ -4857,14 +4857,14 @@ class NSMutableString extends NSString { /// string static NSMutableString string() { - final _ret = _objc_msgSend_1x359cv(_class_NSMutableString, _sel_string); + final _ret = _objc_msgSend_151sglz(_class_NSMutableString, _sel_string); return NSMutableString.castFromPointer(_ret, retain: true, release: true); } /// stringWithCString:encoding: static NSMutableString? stringWithCString_encoding_( ffi.Pointer cString, int enc) { - final _ret = _objc_msgSend_a15xhc( + final _ret = _objc_msgSend_erqryg( _class_NSMutableString, _sel_stringWithCString_encoding_, cString, enc); return _ret.address == 0 ? null @@ -4874,7 +4874,7 @@ class NSMutableString extends NSString { /// stringWithCharacters:length: static NSMutableString stringWithCharacters_length_( ffi.Pointer characters, int length) { - final _ret = _objc_msgSend_13z9dkp(_class_NSMutableString, + final _ret = _objc_msgSend_9x4k8x(_class_NSMutableString, _sel_stringWithCharacters_length_, characters, length); return NSMutableString.castFromPointer(_ret, retain: true, release: true); } @@ -4882,7 +4882,7 @@ class NSMutableString extends NSString { /// stringWithContentsOfFile:encoding:error: static NSMutableString? stringWithContentsOfFile_encoding_error_( NSString path, int enc, ffi.Pointer> error) { - final _ret = _objc_msgSend_94cet5( + final _ret = _objc_msgSend_1nomli1( _class_NSMutableString, _sel_stringWithContentsOfFile_encoding_error_, path.ref.pointer, @@ -4898,7 +4898,7 @@ class NSMutableString extends NSString { NSString path, ffi.Pointer enc, ffi.Pointer> error) { - final _ret = _objc_msgSend_1gxo8gv( + final _ret = _objc_msgSend_1alewu7( _class_NSMutableString, _sel_stringWithContentsOfFile_usedEncoding_error_, path.ref.pointer, @@ -4912,7 +4912,7 @@ class NSMutableString extends NSString { /// stringWithContentsOfURL:encoding:error: static NSMutableString? stringWithContentsOfURL_encoding_error_( NSURL url, int enc, ffi.Pointer> error) { - final _ret = _objc_msgSend_94cet5( + final _ret = _objc_msgSend_1nomli1( _class_NSMutableString, _sel_stringWithContentsOfURL_encoding_error_, url.ref.pointer, @@ -4928,7 +4928,7 @@ class NSMutableString extends NSString { NSURL url, ffi.Pointer enc, ffi.Pointer> error) { - final _ret = _objc_msgSend_1gxo8gv( + final _ret = _objc_msgSend_1alewu7( _class_NSMutableString, _sel_stringWithContentsOfURL_usedEncoding_error_, url.ref.pointer, @@ -4941,14 +4941,14 @@ class NSMutableString extends NSString { /// stringWithFormat: static NSMutableString stringWithFormat_(NSString format) { - final _ret = _objc_msgSend_62nh5j( + final _ret = _objc_msgSend_1sotr3r( _class_NSMutableString, _sel_stringWithFormat_, format.ref.pointer); return NSMutableString.castFromPointer(_ret, retain: true, release: true); } /// stringWithString: static NSMutableString stringWithString_(NSString string) { - final _ret = _objc_msgSend_62nh5j( + final _ret = _objc_msgSend_1sotr3r( _class_NSMutableString, _sel_stringWithString_, string.ref.pointer); return NSMutableString.castFromPointer(_ret, retain: true, release: true); } @@ -4956,7 +4956,7 @@ class NSMutableString extends NSString { /// stringWithUTF8String: static NSMutableString? stringWithUTF8String_( ffi.Pointer nullTerminatedCString) { - final _ret = _objc_msgSend_rqwdif(_class_NSMutableString, + final _ret = _objc_msgSend_56zxyn(_class_NSMutableString, _sel_stringWithUTF8String_, nullTerminatedCString); return _ret.address == 0 ? null @@ -4969,7 +4969,7 @@ class NSMutableString extends NSString { NSString format, NSString validFormatSpecifiers, ffi.Pointer> error) { - final _ret = _objc_msgSend_bo6ep4( + final _ret = _objc_msgSend_1pnyuds( _class_NSMutableString, _sel_stringWithValidatedFormat_validFormatSpecifiers_error_, format.ref.pointer, @@ -4988,21 +4988,21 @@ class NSMutableString extends NSString { /// autorelease NSMutableString autorelease() { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_autorelease); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_autorelease); return NSMutableString.castFromPointer(_ret, retain: true, release: true); } /// init NSMutableString init() { final _ret = - _objc_msgSend_1x359cv(this.ref.retainAndReturnPointer(), _sel_init); + _objc_msgSend_151sglz(this.ref.retainAndReturnPointer(), _sel_init); return NSMutableString.castFromPointer(_ret, retain: false, release: true); } /// initWithBytes:length:encoding: NSMutableString? initWithBytes_length_encoding_( ffi.Pointer bytes, int len, int encoding) { - final _ret = _objc_msgSend_i38ton(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_9b3h4v(this.ref.retainAndReturnPointer(), _sel_initWithBytes_length_encoding_, bytes, len, encoding); return _ret.address == 0 ? null @@ -5012,7 +5012,7 @@ class NSMutableString extends NSString { /// initWithBytesNoCopy:length:encoding:freeWhenDone: NSMutableString? initWithBytesNoCopy_length_encoding_freeWhenDone_( ffi.Pointer bytes, int len, int encoding, bool freeBuffer) { - final _ret = _objc_msgSend_o2ktnn( + final _ret = _objc_msgSend_k4j8m3( this.ref.retainAndReturnPointer(), _sel_initWithBytesNoCopy_length_encoding_freeWhenDone_, bytes, @@ -5027,7 +5027,7 @@ class NSMutableString extends NSString { /// initWithCString:encoding: NSMutableString? initWithCString_encoding_( ffi.Pointer nullTerminatedCString, int encoding) { - final _ret = _objc_msgSend_a15xhc(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_erqryg(this.ref.retainAndReturnPointer(), _sel_initWithCString_encoding_, nullTerminatedCString, encoding); return _ret.address == 0 ? null @@ -5037,7 +5037,7 @@ class NSMutableString extends NSString { /// initWithCharacters:length: NSMutableString initWithCharacters_length_( ffi.Pointer characters, int length) { - final _ret = _objc_msgSend_13z9dkp(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_9x4k8x(this.ref.retainAndReturnPointer(), _sel_initWithCharacters_length_, characters, length); return NSMutableString.castFromPointer(_ret, retain: false, release: true); } @@ -5045,7 +5045,7 @@ class NSMutableString extends NSString { /// initWithCharactersNoCopy:length:freeWhenDone: NSMutableString initWithCharactersNoCopy_length_freeWhenDone_( ffi.Pointer characters, int length, bool freeBuffer) { - final _ret = _objc_msgSend_zsd8q9( + final _ret = _objc_msgSend_lh0jh5( this.ref.retainAndReturnPointer(), _sel_initWithCharactersNoCopy_length_freeWhenDone_, characters, @@ -5056,7 +5056,7 @@ class NSMutableString extends NSString { /// initWithCoder: NSMutableString? initWithCoder_(NSCoder coder) { - final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_1sotr3r(this.ref.retainAndReturnPointer(), _sel_initWithCoder_, coder.ref.pointer); return _ret.address == 0 ? null @@ -5066,7 +5066,7 @@ class NSMutableString extends NSString { /// initWithContentsOfFile:encoding:error: NSMutableString? initWithContentsOfFile_encoding_error_( NSString path, int enc, ffi.Pointer> error) { - final _ret = _objc_msgSend_94cet5( + final _ret = _objc_msgSend_1nomli1( this.ref.retainAndReturnPointer(), _sel_initWithContentsOfFile_encoding_error_, path.ref.pointer, @@ -5082,7 +5082,7 @@ class NSMutableString extends NSString { NSString path, ffi.Pointer enc, ffi.Pointer> error) { - final _ret = _objc_msgSend_1gxo8gv( + final _ret = _objc_msgSend_1alewu7( this.ref.retainAndReturnPointer(), _sel_initWithContentsOfFile_usedEncoding_error_, path.ref.pointer, @@ -5096,7 +5096,7 @@ class NSMutableString extends NSString { /// initWithContentsOfURL:encoding:error: NSMutableString? initWithContentsOfURL_encoding_error_( NSURL url, int enc, ffi.Pointer> error) { - final _ret = _objc_msgSend_94cet5( + final _ret = _objc_msgSend_1nomli1( this.ref.retainAndReturnPointer(), _sel_initWithContentsOfURL_encoding_error_, url.ref.pointer, @@ -5112,7 +5112,7 @@ class NSMutableString extends NSString { NSURL url, ffi.Pointer enc, ffi.Pointer> error) { - final _ret = _objc_msgSend_1gxo8gv( + final _ret = _objc_msgSend_1alewu7( this.ref.retainAndReturnPointer(), _sel_initWithContentsOfURL_usedEncoding_error_, url.ref.pointer, @@ -5125,7 +5125,7 @@ class NSMutableString extends NSString { /// initWithData:encoding: NSMutableString? initWithData_encoding_(NSData data, int encoding) { - final _ret = _objc_msgSend_dcd68g(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_1k4kd9s(this.ref.retainAndReturnPointer(), _sel_initWithData_encoding_, data.ref.pointer, encoding); return _ret.address == 0 ? null @@ -5134,7 +5134,7 @@ class NSMutableString extends NSString { /// initWithFormat: NSMutableString initWithFormat_(NSString format) { - final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_1sotr3r(this.ref.retainAndReturnPointer(), _sel_initWithFormat_, format.ref.pointer); return NSMutableString.castFromPointer(_ret, retain: false, release: true); } @@ -5142,7 +5142,7 @@ class NSMutableString extends NSString { /// initWithFormat:locale: NSMutableString initWithFormat_locale_( NSString format, objc.ObjCObjectBase? locale) { - final _ret = _objc_msgSend_rsfdlh( + final _ret = _objc_msgSend_15qeuct( this.ref.retainAndReturnPointer(), _sel_initWithFormat_locale_, format.ref.pointer, @@ -5152,7 +5152,7 @@ class NSMutableString extends NSString { /// initWithString: NSMutableString initWithString_(NSString aString) { - final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_1sotr3r(this.ref.retainAndReturnPointer(), _sel_initWithString_, aString.ref.pointer); return NSMutableString.castFromPointer(_ret, retain: false, release: true); } @@ -5160,7 +5160,7 @@ class NSMutableString extends NSString { /// initWithUTF8String: NSMutableString? initWithUTF8String_( ffi.Pointer nullTerminatedCString) { - final _ret = _objc_msgSend_rqwdif(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_56zxyn(this.ref.retainAndReturnPointer(), _sel_initWithUTF8String_, nullTerminatedCString); return _ret.address == 0 ? null @@ -5172,7 +5172,7 @@ class NSMutableString extends NSString { NSString format, NSString validFormatSpecifiers, ffi.Pointer> error) { - final _ret = _objc_msgSend_bo6ep4( + final _ret = _objc_msgSend_1pnyuds( this.ref.retainAndReturnPointer(), _sel_initWithValidatedFormat_validFormatSpecifiers_error_, format.ref.pointer, @@ -5189,7 +5189,7 @@ class NSMutableString extends NSString { NSString validFormatSpecifiers, objc.ObjCObjectBase? locale, ffi.Pointer> error) { - final _ret = _objc_msgSend_2izev6( + final _ret = _objc_msgSend_1k0ezzm( this.ref.retainAndReturnPointer(), _sel_initWithValidatedFormat_validFormatSpecifiers_locale_error_, format.ref.pointer, @@ -5203,19 +5203,19 @@ class NSMutableString extends NSString { /// replaceCharactersInRange:withString: void replaceCharactersInRange_withString_(NSRange range, NSString aString) { - _objc_msgSend_i4ny2p(this.ref.pointer, + _objc_msgSend_1tv4uax(this.ref.pointer, _sel_replaceCharactersInRange_withString_, range, aString.ref.pointer); } /// retain NSMutableString retain() { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_retain); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_retain); return NSMutableString.castFromPointer(_ret, retain: true, release: true); } /// self NSMutableString self() { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_self); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_self); return NSMutableString.castFromPointer(_ret, retain: true, release: true); } } @@ -5237,33 +5237,33 @@ class NSNotification extends NSObject { /// Returns whether [obj] is an instance of [NSNotification]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_69e0x1( + return _objc_msgSend_19nvye5( obj.ref.pointer, _sel_isKindOfClass_, _class_NSNotification); } /// alloc static NSNotification alloc() { - final _ret = _objc_msgSend_1x359cv(_class_NSNotification, _sel_alloc); + final _ret = _objc_msgSend_151sglz(_class_NSNotification, _sel_alloc); return NSNotification.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static NSNotification allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _objc_msgSend_hzlb60(_class_NSNotification, _sel_allocWithZone_, zone); + _objc_msgSend_1cwp428(_class_NSNotification, _sel_allocWithZone_, zone); return NSNotification.castFromPointer(_ret, retain: false, release: true); } /// new static NSNotification new1() { - final _ret = _objc_msgSend_1x359cv(_class_NSNotification, _sel_new); + final _ret = _objc_msgSend_151sglz(_class_NSNotification, _sel_new); return NSNotification.castFromPointer(_ret, retain: false, release: true); } /// notificationWithName:object: static NSNotification notificationWithName_object_( NSString aName, objc.ObjCObjectBase? anObject) { - final _ret = _objc_msgSend_rsfdlh( + final _ret = _objc_msgSend_15qeuct( _class_NSNotification, _sel_notificationWithName_object_, aName.ref.pointer, @@ -5274,7 +5274,7 @@ class NSNotification extends NSObject { /// notificationWithName:object:userInfo: static NSNotification notificationWithName_object_userInfo_( NSString aName, objc.ObjCObjectBase? anObject, NSDictionary? aUserInfo) { - final _ret = _objc_msgSend_582s3n( + final _ret = _objc_msgSend_11spmsz( _class_NSNotification, _sel_notificationWithName_object_userInfo_, aName.ref.pointer, @@ -5285,26 +5285,26 @@ class NSNotification extends NSObject { /// autorelease NSNotification autorelease() { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_autorelease); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_autorelease); return NSNotification.castFromPointer(_ret, retain: true, release: true); } /// encodeWithCoder: void encodeWithCoder_(NSCoder coder) { - _objc_msgSend_1jdvcbf( + _objc_msgSend_xtuoz7( this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); } /// init NSNotification init() { final _ret = - _objc_msgSend_1x359cv(this.ref.retainAndReturnPointer(), _sel_init); + _objc_msgSend_151sglz(this.ref.retainAndReturnPointer(), _sel_init); return NSNotification.castFromPointer(_ret, retain: false, release: true); } /// initWithCoder: NSNotification? initWithCoder_(NSCoder coder) { - final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_1sotr3r(this.ref.retainAndReturnPointer(), _sel_initWithCoder_, coder.ref.pointer); return _ret.address == 0 ? null @@ -5314,7 +5314,7 @@ class NSNotification extends NSObject { /// initWithName:object:userInfo: NSNotification initWithName_object_userInfo_( NSString name, objc.ObjCObjectBase? object, NSDictionary? userInfo) { - final _ret = _objc_msgSend_582s3n( + final _ret = _objc_msgSend_11spmsz( this.ref.retainAndReturnPointer(), _sel_initWithName_object_userInfo_, name.ref.pointer, @@ -5325,13 +5325,13 @@ class NSNotification extends NSObject { /// name NSString get name { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_name); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_name); return NSString.castFromPointer(_ret, retain: true, release: true); } /// object objc.ObjCObjectBase? get object { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_object); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_object); return _ret.address == 0 ? null : objc.ObjCObjectBase(_ret, retain: true, release: true); @@ -5339,19 +5339,19 @@ class NSNotification extends NSObject { /// retain NSNotification retain() { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_retain); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_retain); return NSNotification.castFromPointer(_ret, retain: true, release: true); } /// self NSNotification self() { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_self); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_self); return NSNotification.castFromPointer(_ret, retain: true, release: true); } /// userInfo NSDictionary? get userInfo { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_userInfo); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_userInfo); return _ret.address == 0 ? null : NSDictionary.castFromPointer(_ret, retain: true, release: true); @@ -5375,26 +5375,26 @@ class NSNumber extends NSValue { /// Returns whether [obj] is an instance of [NSNumber]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_69e0x1( + return _objc_msgSend_19nvye5( obj.ref.pointer, _sel_isKindOfClass_, _class_NSNumber); } /// alloc static NSNumber alloc() { - final _ret = _objc_msgSend_1x359cv(_class_NSNumber, _sel_alloc); + final _ret = _objc_msgSend_151sglz(_class_NSNumber, _sel_alloc); return NSNumber.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static NSNumber allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _objc_msgSend_hzlb60(_class_NSNumber, _sel_allocWithZone_, zone); + _objc_msgSend_1cwp428(_class_NSNumber, _sel_allocWithZone_, zone); return NSNumber.castFromPointer(_ret, retain: false, release: true); } /// new static NSNumber new1() { - final _ret = _objc_msgSend_1x359cv(_class_NSNumber, _sel_new); + final _ret = _objc_msgSend_151sglz(_class_NSNumber, _sel_new); return NSNumber.castFromPointer(_ret, retain: false, release: true); } @@ -5415,14 +5415,14 @@ class NSNumber extends NSValue { /// compare: NSComparisonResult compare_(NSNumber otherNumber) { - final _ret = _objc_msgSend_1wpduvy( + final _ret = _objc_msgSend_1ym6zyw( this.ref.pointer, _sel_compare_, otherNumber.ref.pointer); return NSComparisonResult.fromValue(_ret); } /// descriptionWithLocale: NSString descriptionWithLocale_(objc.ObjCObjectBase? locale) { - final _ret = _objc_msgSend_62nh5j(this.ref.pointer, + final _ret = _objc_msgSend_1sotr3r(this.ref.pointer, _sel_descriptionWithLocale_, locale?.ref.pointer ?? ffi.nullptr); return NSString.castFromPointer(_ret, retain: true, release: true); } @@ -5444,13 +5444,13 @@ class NSNumber extends NSValue { /// init NSNumber init() { final _ret = - _objc_msgSend_1x359cv(this.ref.retainAndReturnPointer(), _sel_init); + _objc_msgSend_151sglz(this.ref.retainAndReturnPointer(), _sel_init); return NSNumber.castFromPointer(_ret, retain: false, release: true); } /// initWithBool: NSNumber initWithBool_(bool value) { - final _ret = _objc_msgSend_1l3kbc1( + final _ret = _objc_msgSend_1t6aok9( this.ref.retainAndReturnPointer(), _sel_initWithBool_, value); return NSNumber.castFromPointer(_ret, retain: false, release: true); } @@ -5458,21 +5458,21 @@ class NSNumber extends NSValue { /// initWithBytes:objCType: NSNumber initWithBytes_objCType_( ffi.Pointer value, ffi.Pointer type) { - final _ret = _objc_msgSend_qtxoq7(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_e9mncn(this.ref.retainAndReturnPointer(), _sel_initWithBytes_objCType_, value, type); return NSNumber.castFromPointer(_ret, retain: false, release: true); } /// initWithChar: NSNumber initWithChar_(int value) { - final _ret = _objc_msgSend_vx1f2d( + final _ret = _objc_msgSend_13mclwd( this.ref.retainAndReturnPointer(), _sel_initWithChar_, value); return NSNumber.castFromPointer(_ret, retain: false, release: true); } /// initWithCoder: NSNumber? initWithCoder_(NSCoder coder) { - final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_1sotr3r(this.ref.retainAndReturnPointer(), _sel_initWithCoder_, coder.ref.pointer); return _ret.address == 0 ? null @@ -5481,91 +5481,91 @@ class NSNumber extends NSValue { /// initWithDouble: NSNumber initWithDouble_(double value) { - final _ret = _objc_msgSend_1x911p2( + final _ret = _objc_msgSend_oa8mke( this.ref.retainAndReturnPointer(), _sel_initWithDouble_, value); return NSNumber.castFromPointer(_ret, retain: false, release: true); } /// initWithFloat: NSNumber initWithFloat_(double value) { - final _ret = _objc_msgSend_1f4qa0h( + final _ret = _objc_msgSend_et8cuh( this.ref.retainAndReturnPointer(), _sel_initWithFloat_, value); return NSNumber.castFromPointer(_ret, retain: false, release: true); } /// initWithInt: NSNumber initWithInt_(int value) { - final _ret = _objc_msgSend_1a0iyvk( + final _ret = _objc_msgSend_14hvw5k( this.ref.retainAndReturnPointer(), _sel_initWithInt_, value); return NSNumber.castFromPointer(_ret, retain: false, release: true); } /// initWithInteger: NSNumber initWithInteger_(int value) { - final _ret = _objc_msgSend_8o14b( + final _ret = _objc_msgSend_qugqlf( this.ref.retainAndReturnPointer(), _sel_initWithInteger_, value); return NSNumber.castFromPointer(_ret, retain: false, release: true); } /// initWithLong: NSNumber initWithLong_(int value) { - final _ret = _objc_msgSend_8o14b( + final _ret = _objc_msgSend_qugqlf( this.ref.retainAndReturnPointer(), _sel_initWithLong_, value); return NSNumber.castFromPointer(_ret, retain: false, release: true); } /// initWithLongLong: NSNumber initWithLongLong_(int value) { - final _ret = _objc_msgSend_94zdgv( + final _ret = _objc_msgSend_16f0drb( this.ref.retainAndReturnPointer(), _sel_initWithLongLong_, value); return NSNumber.castFromPointer(_ret, retain: false, release: true); } /// initWithShort: NSNumber initWithShort_(int value) { - final _ret = _objc_msgSend_cvzqr9( + final _ret = _objc_msgSend_68x6r1( this.ref.retainAndReturnPointer(), _sel_initWithShort_, value); return NSNumber.castFromPointer(_ret, retain: false, release: true); } /// initWithUnsignedChar: NSNumber initWithUnsignedChar_(int value) { - final _ret = _objc_msgSend_uzucl8( + final _ret = _objc_msgSend_7uautw( this.ref.retainAndReturnPointer(), _sel_initWithUnsignedChar_, value); return NSNumber.castFromPointer(_ret, retain: false, release: true); } /// initWithUnsignedInt: NSNumber initWithUnsignedInt_(int value) { - final _ret = _objc_msgSend_12mhqtk( + final _ret = _objc_msgSend_degb40( this.ref.retainAndReturnPointer(), _sel_initWithUnsignedInt_, value); return NSNumber.castFromPointer(_ret, retain: false, release: true); } /// initWithUnsignedInteger: NSNumber initWithUnsignedInteger_(int value) { - final _ret = _objc_msgSend_1qrcblu(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_14hpxwa(this.ref.retainAndReturnPointer(), _sel_initWithUnsignedInteger_, value); return NSNumber.castFromPointer(_ret, retain: false, release: true); } /// initWithUnsignedLong: NSNumber initWithUnsignedLong_(int value) { - final _ret = _objc_msgSend_1qrcblu( + final _ret = _objc_msgSend_14hpxwa( this.ref.retainAndReturnPointer(), _sel_initWithUnsignedLong_, value); return NSNumber.castFromPointer(_ret, retain: false, release: true); } /// initWithUnsignedLongLong: NSNumber initWithUnsignedLongLong_(int value) { - final _ret = _objc_msgSend_98pnic(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_1x2hskc(this.ref.retainAndReturnPointer(), _sel_initWithUnsignedLongLong_, value); return NSNumber.castFromPointer(_ret, retain: false, release: true); } /// initWithUnsignedShort: NSNumber initWithUnsignedShort_(int value) { - final _ret = _objc_msgSend_onx6bi( + final _ret = _objc_msgSend_1njucl2( this.ref.retainAndReturnPointer(), _sel_initWithUnsignedShort_, value); return NSNumber.castFromPointer(_ret, retain: false, release: true); } @@ -5582,7 +5582,7 @@ class NSNumber extends NSValue { /// isEqualToNumber: bool isEqualToNumber_(NSNumber number) { - return _objc_msgSend_69e0x1( + return _objc_msgSend_19nvye5( this.ref.pointer, _sel_isEqualToNumber_, number.ref.pointer); } @@ -5603,7 +5603,7 @@ class NSNumber extends NSValue { /// stringValue NSString get stringValue { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_stringValue); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_stringValue); return NSString.castFromPointer(_ret, retain: true, release: true); } @@ -5643,104 +5643,104 @@ extension NSNumberCreation on NSNumber { /// numberWithBool: static NSNumber numberWithBool_(bool value) { final _ret = - _objc_msgSend_1l3kbc1(_class_NSNumber, _sel_numberWithBool_, value); + _objc_msgSend_1t6aok9(_class_NSNumber, _sel_numberWithBool_, value); return NSNumber.castFromPointer(_ret, retain: true, release: true); } /// numberWithChar: static NSNumber numberWithChar_(int value) { final _ret = - _objc_msgSend_vx1f2d(_class_NSNumber, _sel_numberWithChar_, value); + _objc_msgSend_13mclwd(_class_NSNumber, _sel_numberWithChar_, value); return NSNumber.castFromPointer(_ret, retain: true, release: true); } /// numberWithDouble: static NSNumber numberWithDouble_(double value) { final _ret = - _objc_msgSend_1x911p2(_class_NSNumber, _sel_numberWithDouble_, value); + _objc_msgSend_oa8mke(_class_NSNumber, _sel_numberWithDouble_, value); return NSNumber.castFromPointer(_ret, retain: true, release: true); } /// numberWithFloat: static NSNumber numberWithFloat_(double value) { final _ret = - _objc_msgSend_1f4qa0h(_class_NSNumber, _sel_numberWithFloat_, value); + _objc_msgSend_et8cuh(_class_NSNumber, _sel_numberWithFloat_, value); return NSNumber.castFromPointer(_ret, retain: true, release: true); } /// numberWithInt: static NSNumber numberWithInt_(int value) { final _ret = - _objc_msgSend_1a0iyvk(_class_NSNumber, _sel_numberWithInt_, value); + _objc_msgSend_14hvw5k(_class_NSNumber, _sel_numberWithInt_, value); return NSNumber.castFromPointer(_ret, retain: true, release: true); } /// numberWithInteger: static NSNumber numberWithInteger_(int value) { final _ret = - _objc_msgSend_8o14b(_class_NSNumber, _sel_numberWithInteger_, value); + _objc_msgSend_qugqlf(_class_NSNumber, _sel_numberWithInteger_, value); return NSNumber.castFromPointer(_ret, retain: true, release: true); } /// numberWithLong: static NSNumber numberWithLong_(int value) { final _ret = - _objc_msgSend_8o14b(_class_NSNumber, _sel_numberWithLong_, value); + _objc_msgSend_qugqlf(_class_NSNumber, _sel_numberWithLong_, value); return NSNumber.castFromPointer(_ret, retain: true, release: true); } /// numberWithLongLong: static NSNumber numberWithLongLong_(int value) { final _ret = - _objc_msgSend_94zdgv(_class_NSNumber, _sel_numberWithLongLong_, value); + _objc_msgSend_16f0drb(_class_NSNumber, _sel_numberWithLongLong_, value); return NSNumber.castFromPointer(_ret, retain: true, release: true); } /// numberWithShort: static NSNumber numberWithShort_(int value) { final _ret = - _objc_msgSend_cvzqr9(_class_NSNumber, _sel_numberWithShort_, value); + _objc_msgSend_68x6r1(_class_NSNumber, _sel_numberWithShort_, value); return NSNumber.castFromPointer(_ret, retain: true, release: true); } /// numberWithUnsignedChar: static NSNumber numberWithUnsignedChar_(int value) { - final _ret = _objc_msgSend_uzucl8( + final _ret = _objc_msgSend_7uautw( _class_NSNumber, _sel_numberWithUnsignedChar_, value); return NSNumber.castFromPointer(_ret, retain: true, release: true); } /// numberWithUnsignedInt: static NSNumber numberWithUnsignedInt_(int value) { - final _ret = _objc_msgSend_12mhqtk( + final _ret = _objc_msgSend_degb40( _class_NSNumber, _sel_numberWithUnsignedInt_, value); return NSNumber.castFromPointer(_ret, retain: true, release: true); } /// numberWithUnsignedInteger: static NSNumber numberWithUnsignedInteger_(int value) { - final _ret = _objc_msgSend_1qrcblu( + final _ret = _objc_msgSend_14hpxwa( _class_NSNumber, _sel_numberWithUnsignedInteger_, value); return NSNumber.castFromPointer(_ret, retain: true, release: true); } /// numberWithUnsignedLong: static NSNumber numberWithUnsignedLong_(int value) { - final _ret = _objc_msgSend_1qrcblu( + final _ret = _objc_msgSend_14hpxwa( _class_NSNumber, _sel_numberWithUnsignedLong_, value); return NSNumber.castFromPointer(_ret, retain: true, release: true); } /// numberWithUnsignedLongLong: static NSNumber numberWithUnsignedLongLong_(int value) { - final _ret = _objc_msgSend_98pnic( + final _ret = _objc_msgSend_1x2hskc( _class_NSNumber, _sel_numberWithUnsignedLongLong_, value); return NSNumber.castFromPointer(_ret, retain: true, release: true); } /// numberWithUnsignedShort: static NSNumber numberWithUnsignedShort_(int value) { - final _ret = _objc_msgSend_onx6bi( + final _ret = _objc_msgSend_1njucl2( _class_NSNumber, _sel_numberWithUnsignedShort_, value); return NSNumber.castFromPointer(_ret, retain: true, release: true); } @@ -5763,51 +5763,51 @@ class NSObject extends objc.ObjCObjectBase { /// Returns whether [obj] is an instance of [NSObject]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_69e0x1( + return _objc_msgSend_19nvye5( obj.ref.pointer, _sel_isKindOfClass_, _class_NSObject); } /// alloc static NSObject alloc() { - final _ret = _objc_msgSend_1x359cv(_class_NSObject, _sel_alloc); + final _ret = _objc_msgSend_151sglz(_class_NSObject, _sel_alloc); return NSObject.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static NSObject allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _objc_msgSend_hzlb60(_class_NSObject, _sel_allocWithZone_, zone); + _objc_msgSend_1cwp428(_class_NSObject, _sel_allocWithZone_, zone); return NSObject.castFromPointer(_ret, retain: false, release: true); } /// class static objc.ObjCObjectBase class1() { - final _ret = _objc_msgSend_1x359cv(_class_NSObject, _sel_class); + final _ret = _objc_msgSend_151sglz(_class_NSObject, _sel_class); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// conformsToProtocol: static bool conformsToProtocol_(Protocol protocol) { - return _objc_msgSend_69e0x1( + return _objc_msgSend_19nvye5( _class_NSObject, _sel_conformsToProtocol_, protocol.ref.pointer); } /// copyWithZone: static objc.ObjCObjectBase copyWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _objc_msgSend_hzlb60(_class_NSObject, _sel_copyWithZone_, zone); + _objc_msgSend_1cwp428(_class_NSObject, _sel_copyWithZone_, zone); return objc.ObjCObjectBase(_ret, retain: false, release: true); } /// debugDescription static NSString debugDescription() { - final _ret = _objc_msgSend_1x359cv(_class_NSObject, _sel_debugDescription); + final _ret = _objc_msgSend_151sglz(_class_NSObject, _sel_debugDescription); return NSString.castFromPointer(_ret, retain: true, release: true); } /// description static NSString description() { - final _ret = _objc_msgSend_1x359cv(_class_NSObject, _sel_description); + final _ret = _objc_msgSend_151sglz(_class_NSObject, _sel_description); return NSString.castFromPointer(_ret, retain: true, release: true); } @@ -5831,7 +5831,7 @@ class NSObject extends objc.ObjCObjectBase { /// instanceMethodSignatureForSelector: static NSMethodSignature instanceMethodSignatureForSelector_( ffi.Pointer aSelector) { - final _ret = _objc_msgSend_19hbqky( + final _ret = _objc_msgSend_3ctkt6( _class_NSObject, _sel_instanceMethodSignatureForSelector_, aSelector); return NSMethodSignature.castFromPointer(_ret, retain: true, release: true); } @@ -5845,7 +5845,7 @@ class NSObject extends objc.ObjCObjectBase { /// isSubclassOfClass: static bool isSubclassOfClass_(objc.ObjCObjectBase aClass) { - return _objc_msgSend_69e0x1( + return _objc_msgSend_19nvye5( _class_NSObject, _sel_isSubclassOfClass_, aClass.ref.pointer); } @@ -5857,13 +5857,13 @@ class NSObject extends objc.ObjCObjectBase { /// mutableCopyWithZone: static objc.ObjCObjectBase mutableCopyWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _objc_msgSend_hzlb60(_class_NSObject, _sel_mutableCopyWithZone_, zone); + _objc_msgSend_1cwp428(_class_NSObject, _sel_mutableCopyWithZone_, zone); return objc.ObjCObjectBase(_ret, retain: false, release: true); } /// new static NSObject new1() { - final _ret = _objc_msgSend_1x359cv(_class_NSObject, _sel_new); + final _ret = _objc_msgSend_151sglz(_class_NSObject, _sel_new); return NSObject.castFromPointer(_ret, retain: false, release: true); } @@ -5881,31 +5881,31 @@ class NSObject extends objc.ObjCObjectBase { /// superclass static objc.ObjCObjectBase superclass() { - final _ret = _objc_msgSend_1x359cv(_class_NSObject, _sel_superclass); + final _ret = _objc_msgSend_151sglz(_class_NSObject, _sel_superclass); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// autorelease NSObject autorelease() { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_autorelease); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_autorelease); return NSObject.castFromPointer(_ret, retain: true, release: true); } /// class objc.ObjCObjectBase class2() { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_class); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_class); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// conformsToProtocol: bool conformsToProtocol_1(Protocol aProtocol) { - return _objc_msgSend_69e0x1( + return _objc_msgSend_19nvye5( this.ref.pointer, _sel_conformsToProtocol_, aProtocol.ref.pointer); } /// copy objc.ObjCObjectBase copy() { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_copy); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_copy); return objc.ObjCObjectBase(_ret, retain: false, release: true); } @@ -5920,13 +5920,13 @@ class NSObject extends objc.ObjCObjectBase { throw objc.UnimplementedOptionalMethodException( 'NSObject', 'debugDescription'); } - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_debugDescription); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_debugDescription); return NSString.castFromPointer(_ret, retain: true, release: true); } /// description NSString get description1 { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_description); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_description); return NSString.castFromPointer(_ret, retain: true, release: true); } @@ -5938,14 +5938,14 @@ class NSObject extends objc.ObjCObjectBase { /// forwardInvocation: void forwardInvocation_(NSInvocation anInvocation) { - _objc_msgSend_1jdvcbf( + _objc_msgSend_xtuoz7( this.ref.pointer, _sel_forwardInvocation_, anInvocation.ref.pointer); } /// forwardingTargetForSelector: objc.ObjCObjectBase forwardingTargetForSelector_( ffi.Pointer aSelector) { - final _ret = _objc_msgSend_19hbqky( + final _ret = _objc_msgSend_3ctkt6( this.ref.pointer, _sel_forwardingTargetForSelector_, aSelector); return objc.ObjCObjectBase(_ret, retain: true, release: true); } @@ -5958,25 +5958,25 @@ class NSObject extends objc.ObjCObjectBase { /// init NSObject init() { final _ret = - _objc_msgSend_1x359cv(this.ref.retainAndReturnPointer(), _sel_init); + _objc_msgSend_151sglz(this.ref.retainAndReturnPointer(), _sel_init); return NSObject.castFromPointer(_ret, retain: false, release: true); } /// isEqual: bool isEqual_(objc.ObjCObjectBase object) { - return _objc_msgSend_69e0x1( + return _objc_msgSend_19nvye5( this.ref.pointer, _sel_isEqual_, object.ref.pointer); } /// isKindOfClass: bool isKindOfClass_(objc.ObjCObjectBase aClass) { - return _objc_msgSend_69e0x1( + return _objc_msgSend_19nvye5( this.ref.pointer, _sel_isKindOfClass_, aClass.ref.pointer); } /// isMemberOfClass: bool isMemberOfClass_(objc.ObjCObjectBase aClass) { - return _objc_msgSend_69e0x1( + return _objc_msgSend_19nvye5( this.ref.pointer, _sel_isMemberOfClass_, aClass.ref.pointer); } @@ -5995,21 +5995,21 @@ class NSObject extends objc.ObjCObjectBase { /// methodSignatureForSelector: NSMethodSignature methodSignatureForSelector_( ffi.Pointer aSelector) { - final _ret = _objc_msgSend_19hbqky( + final _ret = _objc_msgSend_3ctkt6( this.ref.pointer, _sel_methodSignatureForSelector_, aSelector); return NSMethodSignature.castFromPointer(_ret, retain: true, release: true); } /// mutableCopy objc.ObjCObjectBase mutableCopy() { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_mutableCopy); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_mutableCopy); return objc.ObjCObjectBase(_ret, retain: false, release: true); } /// performSelector: objc.ObjCObjectBase performSelector_( ffi.Pointer aSelector) { - final _ret = _objc_msgSend_19hbqky( + final _ret = _objc_msgSend_3ctkt6( this.ref.pointer, _sel_performSelector_, aSelector); return objc.ObjCObjectBase(_ret, retain: true, release: true); } @@ -6017,7 +6017,7 @@ class NSObject extends objc.ObjCObjectBase { /// performSelector:withObject: objc.ObjCObjectBase performSelector_withObject_( ffi.Pointer aSelector, objc.ObjCObjectBase object) { - final _ret = _objc_msgSend_1wlgx7q(this.ref.pointer, + final _ret = _objc_msgSend_gx50so(this.ref.pointer, _sel_performSelector_withObject_, aSelector, object.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } @@ -6027,7 +6027,7 @@ class NSObject extends objc.ObjCObjectBase { ffi.Pointer aSelector, objc.ObjCObjectBase object1, objc.ObjCObjectBase object2) { - final _ret = _objc_msgSend_189974q( + final _ret = _objc_msgSend_cfx8ce( this.ref.pointer, _sel_performSelector_withObject_withObject_, aSelector, @@ -6049,7 +6049,7 @@ class NSObject extends objc.ObjCObjectBase { /// retain NSObject retain() { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_retain); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_retain); return NSObject.castFromPointer(_ret, retain: true, release: true); } @@ -6060,13 +6060,13 @@ class NSObject extends objc.ObjCObjectBase { /// self NSObject self() { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_self); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_self); return NSObject.castFromPointer(_ret, retain: true, release: true); } /// superclass objc.ObjCObjectBase get superclass1 { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_superclass); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_superclass); return objc.ObjCObjectBase(_ret, retain: true, release: true); } @@ -6095,14 +6095,14 @@ class NSOrderedCollectionDifference extends NSObject { /// Returns whether [obj] is an instance of [NSOrderedCollectionDifference]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_69e0x1(obj.ref.pointer, _sel_isKindOfClass_, + return _objc_msgSend_19nvye5(obj.ref.pointer, _sel_isKindOfClass_, _class_NSOrderedCollectionDifference); } /// alloc static NSOrderedCollectionDifference alloc() { final _ret = - _objc_msgSend_1x359cv(_class_NSOrderedCollectionDifference, _sel_alloc); + _objc_msgSend_151sglz(_class_NSOrderedCollectionDifference, _sel_alloc); return NSOrderedCollectionDifference.castFromPointer(_ret, retain: false, release: true); } @@ -6110,7 +6110,7 @@ class NSOrderedCollectionDifference extends NSObject { /// allocWithZone: static NSOrderedCollectionDifference allocWithZone_( ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_hzlb60( + final _ret = _objc_msgSend_1cwp428( _class_NSOrderedCollectionDifference, _sel_allocWithZone_, zone); return NSOrderedCollectionDifference.castFromPointer(_ret, retain: false, release: true); @@ -6119,7 +6119,7 @@ class NSOrderedCollectionDifference extends NSObject { /// new static NSOrderedCollectionDifference new1() { final _ret = - _objc_msgSend_1x359cv(_class_NSOrderedCollectionDifference, _sel_new); + _objc_msgSend_151sglz(_class_NSOrderedCollectionDifference, _sel_new); return NSOrderedCollectionDifference.castFromPointer(_ret, retain: false, release: true); } @@ -6141,14 +6141,14 @@ class NSOrderedCollectionDifference extends NSObject { /// init NSOrderedCollectionDifference init() { final _ret = - _objc_msgSend_1x359cv(this.ref.retainAndReturnPointer(), _sel_init); + _objc_msgSend_151sglz(this.ref.retainAndReturnPointer(), _sel_init); return NSOrderedCollectionDifference.castFromPointer(_ret, retain: false, release: true); } /// initWithChanges: NSOrderedCollectionDifference initWithChanges_(objc.ObjCObjectBase changes) { - final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_1sotr3r(this.ref.retainAndReturnPointer(), _sel_initWithChanges_, changes.ref.pointer); return NSOrderedCollectionDifference.castFromPointer(_ret, retain: false, release: true); @@ -6161,7 +6161,7 @@ class NSOrderedCollectionDifference extends NSObject { objc.ObjCObjectBase? insertedObjects, NSIndexSet removes, objc.ObjCObjectBase? removedObjects) { - final _ret = _objc_msgSend_1ghpoap( + final _ret = _objc_msgSend_s92gih( this.ref.retainAndReturnPointer(), _sel_initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects_, inserts.ref.pointer, @@ -6180,7 +6180,7 @@ class NSOrderedCollectionDifference extends NSObject { NSIndexSet removes, objc.ObjCObjectBase? removedObjects, objc.ObjCObjectBase changes) { - final _ret = _objc_msgSend_1aoxlyn( + final _ret = _objc_msgSend_3cbdpb( this.ref.retainAndReturnPointer(), _sel_initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects_additionalChanges_, inserts.ref.pointer, @@ -6194,21 +6194,21 @@ class NSOrderedCollectionDifference extends NSObject { /// insertions objc.ObjCObjectBase get insertions { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_insertions); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_insertions); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// inverseDifference NSOrderedCollectionDifference inverseDifference() { final _ret = - _objc_msgSend_1x359cv(this.ref.pointer, _sel_inverseDifference); + _objc_msgSend_151sglz(this.ref.pointer, _sel_inverseDifference); return NSOrderedCollectionDifference.castFromPointer(_ret, retain: true, release: true); } /// removals objc.ObjCObjectBase get removals { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_removals); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_removals); return objc.ObjCObjectBase(_ret, retain: true, release: true); } } @@ -6248,38 +6248,38 @@ class NSOrderedSet extends NSObject { /// Returns whether [obj] is an instance of [NSOrderedSet]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_69e0x1( + return _objc_msgSend_19nvye5( obj.ref.pointer, _sel_isKindOfClass_, _class_NSOrderedSet); } /// alloc static NSOrderedSet alloc() { - final _ret = _objc_msgSend_1x359cv(_class_NSOrderedSet, _sel_alloc); + final _ret = _objc_msgSend_151sglz(_class_NSOrderedSet, _sel_alloc); return NSOrderedSet.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static NSOrderedSet allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _objc_msgSend_hzlb60(_class_NSOrderedSet, _sel_allocWithZone_, zone); + _objc_msgSend_1cwp428(_class_NSOrderedSet, _sel_allocWithZone_, zone); return NSOrderedSet.castFromPointer(_ret, retain: false, release: true); } /// new static NSOrderedSet new1() { - final _ret = _objc_msgSend_1x359cv(_class_NSOrderedSet, _sel_new); + final _ret = _objc_msgSend_151sglz(_class_NSOrderedSet, _sel_new); return NSOrderedSet.castFromPointer(_ret, retain: false, release: true); } /// orderedSet static NSOrderedSet orderedSet() { - final _ret = _objc_msgSend_1x359cv(_class_NSOrderedSet, _sel_orderedSet); + final _ret = _objc_msgSend_151sglz(_class_NSOrderedSet, _sel_orderedSet); return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } /// orderedSetWithArray: static NSOrderedSet orderedSetWithArray_(NSArray array) { - final _ret = _objc_msgSend_62nh5j( + final _ret = _objc_msgSend_1sotr3r( _class_NSOrderedSet, _sel_orderedSetWithArray_, array.ref.pointer); return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } @@ -6287,7 +6287,7 @@ class NSOrderedSet extends NSObject { /// orderedSetWithArray:range:copyItems: static NSOrderedSet orderedSetWithArray_range_copyItems_( NSArray array, NSRange range, bool flag) { - final _ret = _objc_msgSend_1cqd8wl( + final _ret = _objc_msgSend_w9bq5x( _class_NSOrderedSet, _sel_orderedSetWithArray_range_copyItems_, array.ref.pointer, @@ -6298,14 +6298,14 @@ class NSOrderedSet extends NSObject { /// orderedSetWithObject: static NSOrderedSet orderedSetWithObject_(objc.ObjCObjectBase object) { - final _ret = _objc_msgSend_62nh5j( + final _ret = _objc_msgSend_1sotr3r( _class_NSOrderedSet, _sel_orderedSetWithObject_, object.ref.pointer); return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } /// orderedSetWithObjects: static NSOrderedSet orderedSetWithObjects_(objc.ObjCObjectBase firstObj) { - final _ret = _objc_msgSend_62nh5j( + final _ret = _objc_msgSend_1sotr3r( _class_NSOrderedSet, _sel_orderedSetWithObjects_, firstObj.ref.pointer); return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } @@ -6313,14 +6313,14 @@ class NSOrderedSet extends NSObject { /// orderedSetWithObjects:count: static NSOrderedSet orderedSetWithObjects_count_( ffi.Pointer> objects, int cnt) { - final _ret = _objc_msgSend_1lqqdvl( + final _ret = _objc_msgSend_zmbtbd( _class_NSOrderedSet, _sel_orderedSetWithObjects_count_, objects, cnt); return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } /// orderedSetWithOrderedSet: static NSOrderedSet orderedSetWithOrderedSet_(NSOrderedSet set) { - final _ret = _objc_msgSend_62nh5j( + final _ret = _objc_msgSend_1sotr3r( _class_NSOrderedSet, _sel_orderedSetWithOrderedSet_, set.ref.pointer); return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } @@ -6328,7 +6328,7 @@ class NSOrderedSet extends NSObject { /// orderedSetWithOrderedSet:range:copyItems: static NSOrderedSet orderedSetWithOrderedSet_range_copyItems_( NSOrderedSet set, NSRange range, bool flag) { - final _ret = _objc_msgSend_1cqd8wl( + final _ret = _objc_msgSend_w9bq5x( _class_NSOrderedSet, _sel_orderedSetWithOrderedSet_range_copyItems_, set.ref.pointer, @@ -6339,7 +6339,7 @@ class NSOrderedSet extends NSObject { /// orderedSetWithSet: static NSOrderedSet orderedSetWithSet_(objc.ObjCObjectBase set) { - final _ret = _objc_msgSend_62nh5j( + final _ret = _objc_msgSend_1sotr3r( _class_NSOrderedSet, _sel_orderedSetWithSet_, set.ref.pointer); return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } @@ -6347,7 +6347,7 @@ class NSOrderedSet extends NSObject { /// orderedSetWithSet:copyItems: static NSOrderedSet orderedSetWithSet_copyItems_( objc.ObjCObjectBase set, bool flag) { - final _ret = _objc_msgSend_1bdmr5f(_class_NSOrderedSet, + final _ret = _objc_msgSend_17amj0z(_class_NSOrderedSet, _sel_orderedSetWithSet_copyItems_, set.ref.pointer, flag); return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } @@ -6359,7 +6359,7 @@ class NSOrderedSet extends NSObject { /// autorelease NSOrderedSet autorelease() { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_autorelease); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_autorelease); return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } @@ -6379,33 +6379,33 @@ class NSOrderedSet extends NSObject { /// encodeWithCoder: void encodeWithCoder_(NSCoder coder) { - _objc_msgSend_1jdvcbf( + _objc_msgSend_xtuoz7( this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); } /// indexOfObject: int indexOfObject_(objc.ObjCObjectBase object) { - return _objc_msgSend_1p4b7x4( + return _objc_msgSend_1vd1c5m( this.ref.pointer, _sel_indexOfObject_, object.ref.pointer); } /// init NSOrderedSet init() { final _ret = - _objc_msgSend_1x359cv(this.ref.retainAndReturnPointer(), _sel_init); + _objc_msgSend_151sglz(this.ref.retainAndReturnPointer(), _sel_init); return NSOrderedSet.castFromPointer(_ret, retain: false, release: true); } /// initWithArray: NSOrderedSet initWithArray_(NSArray array) { - final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_1sotr3r(this.ref.retainAndReturnPointer(), _sel_initWithArray_, array.ref.pointer); return NSOrderedSet.castFromPointer(_ret, retain: false, release: true); } /// initWithArray:copyItems: NSOrderedSet initWithArray_copyItems_(NSArray set, bool flag) { - final _ret = _objc_msgSend_1bdmr5f(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_17amj0z(this.ref.retainAndReturnPointer(), _sel_initWithArray_copyItems_, set.ref.pointer, flag); return NSOrderedSet.castFromPointer(_ret, retain: false, release: true); } @@ -6413,14 +6413,14 @@ class NSOrderedSet extends NSObject { /// initWithArray:range:copyItems: NSOrderedSet initWithArray_range_copyItems_( NSArray set, NSRange range, bool flag) { - final _ret = _objc_msgSend_1cqd8wl(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_w9bq5x(this.ref.retainAndReturnPointer(), _sel_initWithArray_range_copyItems_, set.ref.pointer, range, flag); return NSOrderedSet.castFromPointer(_ret, retain: false, release: true); } /// initWithCoder: NSOrderedSet? initWithCoder_(NSCoder coder) { - final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_1sotr3r(this.ref.retainAndReturnPointer(), _sel_initWithCoder_, coder.ref.pointer); return _ret.address == 0 ? null @@ -6429,14 +6429,14 @@ class NSOrderedSet extends NSObject { /// initWithObject: NSOrderedSet initWithObject_(objc.ObjCObjectBase object) { - final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_1sotr3r(this.ref.retainAndReturnPointer(), _sel_initWithObject_, object.ref.pointer); return NSOrderedSet.castFromPointer(_ret, retain: false, release: true); } /// initWithObjects: NSOrderedSet initWithObjects_(objc.ObjCObjectBase firstObj) { - final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_1sotr3r(this.ref.retainAndReturnPointer(), _sel_initWithObjects_, firstObj.ref.pointer); return NSOrderedSet.castFromPointer(_ret, retain: false, release: true); } @@ -6444,21 +6444,21 @@ class NSOrderedSet extends NSObject { /// initWithObjects:count: NSOrderedSet initWithObjects_count_( ffi.Pointer> objects, int cnt) { - final _ret = _objc_msgSend_1lqqdvl(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_zmbtbd(this.ref.retainAndReturnPointer(), _sel_initWithObjects_count_, objects, cnt); return NSOrderedSet.castFromPointer(_ret, retain: false, release: true); } /// initWithOrderedSet: NSOrderedSet initWithOrderedSet_(NSOrderedSet set) { - final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_1sotr3r(this.ref.retainAndReturnPointer(), _sel_initWithOrderedSet_, set.ref.pointer); return NSOrderedSet.castFromPointer(_ret, retain: false, release: true); } /// initWithOrderedSet:copyItems: NSOrderedSet initWithOrderedSet_copyItems_(NSOrderedSet set, bool flag) { - final _ret = _objc_msgSend_1bdmr5f(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_17amj0z(this.ref.retainAndReturnPointer(), _sel_initWithOrderedSet_copyItems_, set.ref.pointer, flag); return NSOrderedSet.castFromPointer(_ret, retain: false, release: true); } @@ -6466,21 +6466,21 @@ class NSOrderedSet extends NSObject { /// initWithOrderedSet:range:copyItems: NSOrderedSet initWithOrderedSet_range_copyItems_( NSOrderedSet set, NSRange range, bool flag) { - final _ret = _objc_msgSend_1cqd8wl(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_w9bq5x(this.ref.retainAndReturnPointer(), _sel_initWithOrderedSet_range_copyItems_, set.ref.pointer, range, flag); return NSOrderedSet.castFromPointer(_ret, retain: false, release: true); } /// initWithSet: NSOrderedSet initWithSet_(objc.ObjCObjectBase set) { - final _ret = _objc_msgSend_62nh5j( + final _ret = _objc_msgSend_1sotr3r( this.ref.retainAndReturnPointer(), _sel_initWithSet_, set.ref.pointer); return NSOrderedSet.castFromPointer(_ret, retain: false, release: true); } /// initWithSet:copyItems: NSOrderedSet initWithSet_copyItems_(objc.ObjCObjectBase set, bool flag) { - final _ret = _objc_msgSend_1bdmr5f(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_17amj0z(this.ref.retainAndReturnPointer(), _sel_initWithSet_copyItems_, set.ref.pointer, flag); return NSOrderedSet.castFromPointer(_ret, retain: false, release: true); } @@ -6488,19 +6488,19 @@ class NSOrderedSet extends NSObject { /// objectAtIndex: objc.ObjCObjectBase objectAtIndex_(int idx) { final _ret = - _objc_msgSend_1qrcblu(this.ref.pointer, _sel_objectAtIndex_, idx); + _objc_msgSend_14hpxwa(this.ref.pointer, _sel_objectAtIndex_, idx); return objc.ObjCObjectBase(_ret, retain: true, release: true); } /// retain NSOrderedSet retain() { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_retain); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_retain); return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } /// self NSOrderedSet self() { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_self); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_self); return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } } @@ -6522,14 +6522,14 @@ class NSOutputStream extends NSStream { /// Returns whether [obj] is an instance of [NSOutputStream]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_69e0x1( + return _objc_msgSend_19nvye5( obj.ref.pointer, _sel_isKindOfClass_, _class_NSOutputStream); } /// outputStreamToBuffer:capacity: static NSOutputStream outputStreamToBuffer_capacity_( ffi.Pointer buffer, int capacity) { - final _ret = _objc_msgSend_7ukip1(_class_NSOutputStream, + final _ret = _objc_msgSend_158ju31(_class_NSOutputStream, _sel_outputStreamToBuffer_capacity_, buffer, capacity); return NSOutputStream.castFromPointer(_ret, retain: true, release: true); } @@ -6537,7 +6537,7 @@ class NSOutputStream extends NSStream { /// outputStreamToFileAtPath:append: static NSOutputStream outputStreamToFileAtPath_append_( NSString path, bool shouldAppend) { - final _ret = _objc_msgSend_1bdmr5f(_class_NSOutputStream, + final _ret = _objc_msgSend_17amj0z(_class_NSOutputStream, _sel_outputStreamToFileAtPath_append_, path.ref.pointer, shouldAppend); return NSOutputStream.castFromPointer(_ret, retain: true, release: true); } @@ -6545,14 +6545,14 @@ class NSOutputStream extends NSStream { /// outputStreamToMemory static NSOutputStream outputStreamToMemory() { final _ret = - _objc_msgSend_1x359cv(_class_NSOutputStream, _sel_outputStreamToMemory); + _objc_msgSend_151sglz(_class_NSOutputStream, _sel_outputStreamToMemory); return NSOutputStream.castFromPointer(_ret, retain: true, release: true); } /// outputStreamWithURL:append: static NSOutputStream? outputStreamWithURL_append_( NSURL url, bool shouldAppend) { - final _ret = _objc_msgSend_1bdmr5f(_class_NSOutputStream, + final _ret = _objc_msgSend_17amj0z(_class_NSOutputStream, _sel_outputStreamWithURL_append_, url.ref.pointer, shouldAppend); return _ret.address == 0 ? null @@ -6567,14 +6567,14 @@ class NSOutputStream extends NSStream { /// initToBuffer:capacity: NSOutputStream initToBuffer_capacity_( ffi.Pointer buffer, int capacity) { - final _ret = _objc_msgSend_7ukip1(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_158ju31(this.ref.retainAndReturnPointer(), _sel_initToBuffer_capacity_, buffer, capacity); return NSOutputStream.castFromPointer(_ret, retain: false, release: true); } /// initToFileAtPath:append: NSOutputStream? initToFileAtPath_append_(NSString path, bool shouldAppend) { - final _ret = _objc_msgSend_1bdmr5f(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_17amj0z(this.ref.retainAndReturnPointer(), _sel_initToFileAtPath_append_, path.ref.pointer, shouldAppend); return _ret.address == 0 ? null @@ -6583,14 +6583,14 @@ class NSOutputStream extends NSStream { /// initToMemory NSOutputStream initToMemory() { - final _ret = _objc_msgSend_1x359cv( + final _ret = _objc_msgSend_151sglz( this.ref.retainAndReturnPointer(), _sel_initToMemory); return NSOutputStream.castFromPointer(_ret, retain: false, release: true); } /// initWithURL:append: NSOutputStream? initWithURL_append_(NSURL url, bool shouldAppend) { - final _ret = _objc_msgSend_1bdmr5f(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_17amj0z(this.ref.retainAndReturnPointer(), _sel_initWithURL_append_, url.ref.pointer, shouldAppend); return _ret.address == 0 ? null @@ -6621,26 +6621,26 @@ class NSProxy extends objc.ObjCObjectBase { /// Returns whether [obj] is an instance of [NSProxy]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_69e0x1( + return _objc_msgSend_19nvye5( obj.ref.pointer, _sel_isKindOfClass_, _class_NSProxy); } /// alloc static objc.ObjCObjectBase alloc() { - final _ret = _objc_msgSend_1x359cv(_class_NSProxy, _sel_alloc); + final _ret = _objc_msgSend_151sglz(_class_NSProxy, _sel_alloc); return objc.ObjCObjectBase(_ret, retain: false, release: true); } /// allocWithZone: static objc.ObjCObjectBase allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _objc_msgSend_hzlb60(_class_NSProxy, _sel_allocWithZone_, zone); + _objc_msgSend_1cwp428(_class_NSProxy, _sel_allocWithZone_, zone); return objc.ObjCObjectBase(_ret, retain: false, release: true); } /// class static objc.ObjCObjectBase class1() { - final _ret = _objc_msgSend_1x359cv(_class_NSProxy, _sel_class); + final _ret = _objc_msgSend_151sglz(_class_NSProxy, _sel_class); return objc.ObjCObjectBase(_ret, retain: true, release: true); } @@ -6652,7 +6652,7 @@ class NSProxy extends objc.ObjCObjectBase { /// autorelease NSProxy autorelease() { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_autorelease); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_autorelease); return NSProxy.castFromPointer(_ret, retain: true, release: true); } @@ -6663,13 +6663,13 @@ class NSProxy extends objc.ObjCObjectBase { /// debugDescription NSString get debugDescription { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_debugDescription); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_debugDescription); return NSString.castFromPointer(_ret, retain: true, release: true); } /// description NSString get description { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_description); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_description); return NSString.castFromPointer(_ret, retain: true, release: true); } @@ -6680,25 +6680,25 @@ class NSProxy extends objc.ObjCObjectBase { /// forwardInvocation: void forwardInvocation_(NSInvocation invocation) { - _objc_msgSend_1jdvcbf( + _objc_msgSend_xtuoz7( this.ref.pointer, _sel_forwardInvocation_, invocation.ref.pointer); } /// isEqual: bool isEqual_(objc.ObjCObjectBase object) { - return _objc_msgSend_69e0x1( + return _objc_msgSend_19nvye5( this.ref.pointer, _sel_isEqual_, object.ref.pointer); } /// isKindOfClass: bool isKindOfClass_(objc.ObjCObjectBase aClass) { - return _objc_msgSend_69e0x1( + return _objc_msgSend_19nvye5( this.ref.pointer, _sel_isKindOfClass_, aClass.ref.pointer); } /// isMemberOfClass: bool isMemberOfClass_(objc.ObjCObjectBase aClass) { - return _objc_msgSend_69e0x1( + return _objc_msgSend_19nvye5( this.ref.pointer, _sel_isMemberOfClass_, aClass.ref.pointer); } @@ -6710,7 +6710,7 @@ class NSProxy extends objc.ObjCObjectBase { /// methodSignatureForSelector: NSMethodSignature? methodSignatureForSelector_( ffi.Pointer sel) { - final _ret = _objc_msgSend_19hbqky( + final _ret = _objc_msgSend_3ctkt6( this.ref.pointer, _sel_methodSignatureForSelector_, sel); return _ret.address == 0 ? null @@ -6720,7 +6720,7 @@ class NSProxy extends objc.ObjCObjectBase { /// performSelector: objc.ObjCObjectBase performSelector_( ffi.Pointer aSelector) { - final _ret = _objc_msgSend_19hbqky( + final _ret = _objc_msgSend_3ctkt6( this.ref.pointer, _sel_performSelector_, aSelector); return objc.ObjCObjectBase(_ret, retain: true, release: true); } @@ -6728,7 +6728,7 @@ class NSProxy extends objc.ObjCObjectBase { /// performSelector:withObject: objc.ObjCObjectBase performSelector_withObject_( ffi.Pointer aSelector, objc.ObjCObjectBase object) { - final _ret = _objc_msgSend_1wlgx7q(this.ref.pointer, + final _ret = _objc_msgSend_gx50so(this.ref.pointer, _sel_performSelector_withObject_, aSelector, object.ref.pointer); return objc.ObjCObjectBase(_ret, retain: true, release: true); } @@ -6738,7 +6738,7 @@ class NSProxy extends objc.ObjCObjectBase { ffi.Pointer aSelector, objc.ObjCObjectBase object1, objc.ObjCObjectBase object2) { - final _ret = _objc_msgSend_189974q( + final _ret = _objc_msgSend_cfx8ce( this.ref.pointer, _sel_performSelector_withObject_withObject_, aSelector, @@ -6754,7 +6754,7 @@ class NSProxy extends objc.ObjCObjectBase { /// retain NSProxy retain() { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_retain); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_retain); return NSProxy.castFromPointer(_ret, retain: true, release: true); } @@ -6765,7 +6765,7 @@ class NSProxy extends objc.ObjCObjectBase { /// self NSProxy self() { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_self); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_self); return NSProxy.castFromPointer(_ret, retain: true, release: true); } @@ -6800,7 +6800,7 @@ class NSRunLoop extends objc.ObjCObjectBase { /// Returns whether [obj] is an instance of [NSRunLoop]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_69e0x1( + return _objc_msgSend_19nvye5( obj.ref.pointer, _sel_isKindOfClass_, _class_NSRunLoop); } } @@ -6822,51 +6822,51 @@ class NSSet extends NSObject { /// Returns whether [obj] is an instance of [NSSet]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_69e0x1( + return _objc_msgSend_19nvye5( obj.ref.pointer, _sel_isKindOfClass_, _class_NSSet); } /// alloc static NSSet alloc() { - final _ret = _objc_msgSend_1x359cv(_class_NSSet, _sel_alloc); + final _ret = _objc_msgSend_151sglz(_class_NSSet, _sel_alloc); return NSSet.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static NSSet allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_hzlb60(_class_NSSet, _sel_allocWithZone_, zone); + final _ret = _objc_msgSend_1cwp428(_class_NSSet, _sel_allocWithZone_, zone); return NSSet.castFromPointer(_ret, retain: false, release: true); } /// new static NSSet new1() { - final _ret = _objc_msgSend_1x359cv(_class_NSSet, _sel_new); + final _ret = _objc_msgSend_151sglz(_class_NSSet, _sel_new); return NSSet.castFromPointer(_ret, retain: false, release: true); } /// set static NSSet set1() { - final _ret = _objc_msgSend_1x359cv(_class_NSSet, _sel_set); + final _ret = _objc_msgSend_151sglz(_class_NSSet, _sel_set); return NSSet.castFromPointer(_ret, retain: true, release: true); } /// setWithArray: static NSSet setWithArray_(NSArray array) { - final _ret = _objc_msgSend_62nh5j( + final _ret = _objc_msgSend_1sotr3r( _class_NSSet, _sel_setWithArray_, array.ref.pointer); return NSSet.castFromPointer(_ret, retain: true, release: true); } /// setWithObject: static NSSet setWithObject_(objc.ObjCObjectBase object) { - final _ret = _objc_msgSend_62nh5j( + final _ret = _objc_msgSend_1sotr3r( _class_NSSet, _sel_setWithObject_, object.ref.pointer); return NSSet.castFromPointer(_ret, retain: true, release: true); } /// setWithObjects: static NSSet setWithObjects_(objc.ObjCObjectBase firstObj) { - final _ret = _objc_msgSend_62nh5j( + final _ret = _objc_msgSend_1sotr3r( _class_NSSet, _sel_setWithObjects_, firstObj.ref.pointer); return NSSet.castFromPointer(_ret, retain: true, release: true); } @@ -6874,7 +6874,7 @@ class NSSet extends NSObject { /// setWithObjects:count: static NSSet setWithObjects_count_( ffi.Pointer> objects, int cnt) { - final _ret = _objc_msgSend_1lqqdvl( + final _ret = _objc_msgSend_zmbtbd( _class_NSSet, _sel_setWithObjects_count_, objects, cnt); return NSSet.castFromPointer(_ret, retain: true, release: true); } @@ -6882,7 +6882,7 @@ class NSSet extends NSObject { /// setWithSet: static NSSet setWithSet_(NSSet set) { final _ret = - _objc_msgSend_62nh5j(_class_NSSet, _sel_setWithSet_, set.ref.pointer); + _objc_msgSend_1sotr3r(_class_NSSet, _sel_setWithSet_, set.ref.pointer); return NSSet.castFromPointer(_ret, retain: true, release: true); } @@ -6907,27 +6907,27 @@ class NSSet extends NSObject { /// encodeWithCoder: void encodeWithCoder_(NSCoder coder) { - _objc_msgSend_1jdvcbf( + _objc_msgSend_xtuoz7( this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); } /// init NSSet init() { final _ret = - _objc_msgSend_1x359cv(this.ref.retainAndReturnPointer(), _sel_init); + _objc_msgSend_151sglz(this.ref.retainAndReturnPointer(), _sel_init); return NSSet.castFromPointer(_ret, retain: false, release: true); } /// initWithArray: NSSet initWithArray_(NSArray array) { - final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_1sotr3r(this.ref.retainAndReturnPointer(), _sel_initWithArray_, array.ref.pointer); return NSSet.castFromPointer(_ret, retain: false, release: true); } /// initWithCoder: NSSet? initWithCoder_(NSCoder coder) { - final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_1sotr3r(this.ref.retainAndReturnPointer(), _sel_initWithCoder_, coder.ref.pointer); return _ret.address == 0 ? null @@ -6936,7 +6936,7 @@ class NSSet extends NSObject { /// initWithObjects: NSSet initWithObjects_(objc.ObjCObjectBase firstObj) { - final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_1sotr3r(this.ref.retainAndReturnPointer(), _sel_initWithObjects_, firstObj.ref.pointer); return NSSet.castFromPointer(_ret, retain: false, release: true); } @@ -6944,28 +6944,28 @@ class NSSet extends NSObject { /// initWithObjects:count: NSSet initWithObjects_count_( ffi.Pointer> objects, int cnt) { - final _ret = _objc_msgSend_1lqqdvl(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_zmbtbd(this.ref.retainAndReturnPointer(), _sel_initWithObjects_count_, objects, cnt); return NSSet.castFromPointer(_ret, retain: false, release: true); } /// initWithSet: NSSet initWithSet_(NSSet set) { - final _ret = _objc_msgSend_62nh5j( + final _ret = _objc_msgSend_1sotr3r( this.ref.retainAndReturnPointer(), _sel_initWithSet_, set.ref.pointer); return NSSet.castFromPointer(_ret, retain: false, release: true); } /// initWithSet:copyItems: NSSet initWithSet_copyItems_(NSSet set, bool flag) { - final _ret = _objc_msgSend_1bdmr5f(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_17amj0z(this.ref.retainAndReturnPointer(), _sel_initWithSet_copyItems_, set.ref.pointer, flag); return NSSet.castFromPointer(_ret, retain: false, release: true); } /// member: objc.ObjCObjectBase? member_(objc.ObjCObjectBase object) { - final _ret = _objc_msgSend_62nh5j( + final _ret = _objc_msgSend_1sotr3r( this.ref.pointer, _sel_member_, object.ref.pointer); return _ret.address == 0 ? null @@ -6974,7 +6974,7 @@ class NSSet extends NSObject { /// objectEnumerator NSEnumerator objectEnumerator() { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_objectEnumerator); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_objectEnumerator); return NSEnumerator.castFromPointer(_ret, retain: true, release: true); } } @@ -7010,32 +7010,32 @@ class NSStream extends NSObject { /// Returns whether [obj] is an instance of [NSStream]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_69e0x1( + return _objc_msgSend_19nvye5( obj.ref.pointer, _sel_isKindOfClass_, _class_NSStream); } /// alloc static NSStream alloc() { - final _ret = _objc_msgSend_1x359cv(_class_NSStream, _sel_alloc); + final _ret = _objc_msgSend_151sglz(_class_NSStream, _sel_alloc); return NSStream.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static NSStream allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _objc_msgSend_hzlb60(_class_NSStream, _sel_allocWithZone_, zone); + _objc_msgSend_1cwp428(_class_NSStream, _sel_allocWithZone_, zone); return NSStream.castFromPointer(_ret, retain: false, release: true); } /// new static NSStream new1() { - final _ret = _objc_msgSend_1x359cv(_class_NSStream, _sel_new); + final _ret = _objc_msgSend_151sglz(_class_NSStream, _sel_new); return NSStream.castFromPointer(_ret, retain: false, release: true); } /// autorelease NSStream autorelease() { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_autorelease); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_autorelease); return NSStream.castFromPointer(_ret, retain: true, release: true); } @@ -7046,7 +7046,7 @@ class NSStream extends NSObject { /// delegate objc.ObjCObjectBase? get delegate { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_delegate); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_delegate); return _ret.address == 0 ? null : objc.ObjCObjectBase(_ret, retain: true, release: true); @@ -7055,7 +7055,7 @@ class NSStream extends NSObject { /// init NSStream init() { final _ret = - _objc_msgSend_1x359cv(this.ref.retainAndReturnPointer(), _sel_init); + _objc_msgSend_151sglz(this.ref.retainAndReturnPointer(), _sel_init); return NSStream.castFromPointer(_ret, retain: false, release: true); } @@ -7066,7 +7066,7 @@ class NSStream extends NSObject { /// propertyForKey: objc.ObjCObjectBase? propertyForKey_(NSString key) { - final _ret = _objc_msgSend_62nh5j( + final _ret = _objc_msgSend_1sotr3r( this.ref.pointer, _sel_propertyForKey_, key.ref.pointer); return _ret.address == 0 ? null @@ -7075,43 +7075,43 @@ class NSStream extends NSObject { /// removeFromRunLoop:forMode: void removeFromRunLoop_forMode_(NSRunLoop aRunLoop, NSString mode) { - _objc_msgSend_wjvic9(this.ref.pointer, _sel_removeFromRunLoop_forMode_, + _objc_msgSend_pfv6jd(this.ref.pointer, _sel_removeFromRunLoop_forMode_, aRunLoop.ref.pointer, mode.ref.pointer); } /// retain NSStream retain() { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_retain); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_retain); return NSStream.castFromPointer(_ret, retain: true, release: true); } /// scheduleInRunLoop:forMode: void scheduleInRunLoop_forMode_(NSRunLoop aRunLoop, NSString mode) { - _objc_msgSend_wjvic9(this.ref.pointer, _sel_scheduleInRunLoop_forMode_, + _objc_msgSend_pfv6jd(this.ref.pointer, _sel_scheduleInRunLoop_forMode_, aRunLoop.ref.pointer, mode.ref.pointer); } /// self NSStream self() { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_self); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_self); return NSStream.castFromPointer(_ret, retain: true, release: true); } /// setDelegate: set delegate(objc.ObjCObjectBase? value) { - _objc_msgSend_1jdvcbf( + _objc_msgSend_xtuoz7( this.ref.pointer, _sel_setDelegate_, value?.ref.pointer ?? ffi.nullptr); } /// setProperty:forKey: bool setProperty_forKey_(objc.ObjCObjectBase? property, NSString key) { - return _objc_msgSend_1lqxdg3(this.ref.pointer, _sel_setProperty_forKey_, + return _objc_msgSend_1lsax7n(this.ref.pointer, _sel_setProperty_forKey_, property?.ref.pointer ?? ffi.nullptr, key.ref.pointer); } /// streamError NSError? get streamError { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_streamError); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_streamError); return _ret.address == 0 ? null : NSError.castFromPointer(_ret, retain: true, release: true); @@ -7265,26 +7265,26 @@ class NSString extends NSObject { /// Returns whether [obj] is an instance of [NSString]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_69e0x1( + return _objc_msgSend_19nvye5( obj.ref.pointer, _sel_isKindOfClass_, _class_NSString); } /// alloc static NSString alloc() { - final _ret = _objc_msgSend_1x359cv(_class_NSString, _sel_alloc); + final _ret = _objc_msgSend_151sglz(_class_NSString, _sel_alloc); return NSString.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static NSString allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _objc_msgSend_hzlb60(_class_NSString, _sel_allocWithZone_, zone); + _objc_msgSend_1cwp428(_class_NSString, _sel_allocWithZone_, zone); return NSString.castFromPointer(_ret, retain: false, release: true); } /// localizedStringWithFormat: static NSString localizedStringWithFormat_(NSString format) { - final _ret = _objc_msgSend_62nh5j( + final _ret = _objc_msgSend_1sotr3r( _class_NSString, _sel_localizedStringWithFormat_, format.ref.pointer); return NSString.castFromPointer(_ret, retain: true, release: true); } @@ -7295,7 +7295,7 @@ class NSString extends NSObject { NSString format, NSString validFormatSpecifiers, ffi.Pointer> error) { - final _ret = _objc_msgSend_bo6ep4( + final _ret = _objc_msgSend_1pnyuds( _class_NSString, _sel_localizedStringWithValidatedFormat_validFormatSpecifiers_error_, format.ref.pointer, @@ -7308,7 +7308,7 @@ class NSString extends NSObject { /// new static NSString new1() { - final _ret = _objc_msgSend_1x359cv(_class_NSString, _sel_new); + final _ret = _objc_msgSend_151sglz(_class_NSString, _sel_new); return NSString.castFromPointer(_ret, retain: false, release: true); } @@ -7317,7 +7317,7 @@ class NSString extends NSObject { NSData data, NSString typeIdentifier, ffi.Pointer> outError) { - final _ret = _objc_msgSend_bo6ep4( + final _ret = _objc_msgSend_1pnyuds( _class_NSString, _sel_objectWithItemProviderData_typeIdentifier_error_, data.ref.pointer, @@ -7330,14 +7330,14 @@ class NSString extends NSObject { /// string static NSString string() { - final _ret = _objc_msgSend_1x359cv(_class_NSString, _sel_string); + final _ret = _objc_msgSend_151sglz(_class_NSString, _sel_string); return NSString.castFromPointer(_ret, retain: true, release: true); } /// stringWithCString:encoding: static NSString? stringWithCString_encoding_( ffi.Pointer cString, int enc) { - final _ret = _objc_msgSend_a15xhc( + final _ret = _objc_msgSend_erqryg( _class_NSString, _sel_stringWithCString_encoding_, cString, enc); return _ret.address == 0 ? null @@ -7347,7 +7347,7 @@ class NSString extends NSObject { /// stringWithCharacters:length: static NSString stringWithCharacters_length_( ffi.Pointer characters, int length) { - final _ret = _objc_msgSend_13z9dkp( + final _ret = _objc_msgSend_9x4k8x( _class_NSString, _sel_stringWithCharacters_length_, characters, length); return NSString.castFromPointer(_ret, retain: true, release: true); } @@ -7355,7 +7355,7 @@ class NSString extends NSObject { /// stringWithContentsOfFile:encoding:error: static NSString? stringWithContentsOfFile_encoding_error_( NSString path, int enc, ffi.Pointer> error) { - final _ret = _objc_msgSend_94cet5( + final _ret = _objc_msgSend_1nomli1( _class_NSString, _sel_stringWithContentsOfFile_encoding_error_, path.ref.pointer, @@ -7371,7 +7371,7 @@ class NSString extends NSObject { NSString path, ffi.Pointer enc, ffi.Pointer> error) { - final _ret = _objc_msgSend_1gxo8gv( + final _ret = _objc_msgSend_1alewu7( _class_NSString, _sel_stringWithContentsOfFile_usedEncoding_error_, path.ref.pointer, @@ -7385,7 +7385,7 @@ class NSString extends NSObject { /// stringWithContentsOfURL:encoding:error: static NSString? stringWithContentsOfURL_encoding_error_( NSURL url, int enc, ffi.Pointer> error) { - final _ret = _objc_msgSend_94cet5( + final _ret = _objc_msgSend_1nomli1( _class_NSString, _sel_stringWithContentsOfURL_encoding_error_, url.ref.pointer, @@ -7401,7 +7401,7 @@ class NSString extends NSObject { NSURL url, ffi.Pointer enc, ffi.Pointer> error) { - final _ret = _objc_msgSend_1gxo8gv( + final _ret = _objc_msgSend_1alewu7( _class_NSString, _sel_stringWithContentsOfURL_usedEncoding_error_, url.ref.pointer, @@ -7414,14 +7414,14 @@ class NSString extends NSObject { /// stringWithFormat: static NSString stringWithFormat_(NSString format) { - final _ret = _objc_msgSend_62nh5j( + final _ret = _objc_msgSend_1sotr3r( _class_NSString, _sel_stringWithFormat_, format.ref.pointer); return NSString.castFromPointer(_ret, retain: true, release: true); } /// stringWithString: static NSString stringWithString_(NSString string) { - final _ret = _objc_msgSend_62nh5j( + final _ret = _objc_msgSend_1sotr3r( _class_NSString, _sel_stringWithString_, string.ref.pointer); return NSString.castFromPointer(_ret, retain: true, release: true); } @@ -7429,7 +7429,7 @@ class NSString extends NSObject { /// stringWithUTF8String: static NSString? stringWithUTF8String_( ffi.Pointer nullTerminatedCString) { - final _ret = _objc_msgSend_rqwdif( + final _ret = _objc_msgSend_56zxyn( _class_NSString, _sel_stringWithUTF8String_, nullTerminatedCString); return _ret.address == 0 ? null @@ -7441,7 +7441,7 @@ class NSString extends NSObject { NSString format, NSString validFormatSpecifiers, ffi.Pointer> error) { - final _ret = _objc_msgSend_bo6ep4( + final _ret = _objc_msgSend_1pnyuds( _class_NSString, _sel_stringWithValidatedFormat_validFormatSpecifiers_error_, format.ref.pointer, @@ -7459,7 +7459,7 @@ class NSString extends NSObject { /// autorelease NSString autorelease() { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_autorelease); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_autorelease); return NSString.castFromPointer(_ret, retain: true, release: true); } @@ -7471,21 +7471,21 @@ class NSString extends NSObject { /// encodeWithCoder: void encodeWithCoder_(NSCoder coder) { - _objc_msgSend_1jdvcbf( + _objc_msgSend_xtuoz7( this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); } /// init NSString init() { final _ret = - _objc_msgSend_1x359cv(this.ref.retainAndReturnPointer(), _sel_init); + _objc_msgSend_151sglz(this.ref.retainAndReturnPointer(), _sel_init); return NSString.castFromPointer(_ret, retain: false, release: true); } /// initWithBytes:length:encoding: NSString? initWithBytes_length_encoding_( ffi.Pointer bytes, int len, int encoding) { - final _ret = _objc_msgSend_i38ton(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_9b3h4v(this.ref.retainAndReturnPointer(), _sel_initWithBytes_length_encoding_, bytes, len, encoding); return _ret.address == 0 ? null @@ -7495,7 +7495,7 @@ class NSString extends NSObject { /// initWithBytesNoCopy:length:encoding:freeWhenDone: NSString? initWithBytesNoCopy_length_encoding_freeWhenDone_( ffi.Pointer bytes, int len, int encoding, bool freeBuffer) { - final _ret = _objc_msgSend_o2ktnn( + final _ret = _objc_msgSend_k4j8m3( this.ref.retainAndReturnPointer(), _sel_initWithBytesNoCopy_length_encoding_freeWhenDone_, bytes, @@ -7510,7 +7510,7 @@ class NSString extends NSObject { /// initWithCString:encoding: NSString? initWithCString_encoding_( ffi.Pointer nullTerminatedCString, int encoding) { - final _ret = _objc_msgSend_a15xhc(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_erqryg(this.ref.retainAndReturnPointer(), _sel_initWithCString_encoding_, nullTerminatedCString, encoding); return _ret.address == 0 ? null @@ -7520,7 +7520,7 @@ class NSString extends NSObject { /// initWithCharacters:length: NSString initWithCharacters_length_( ffi.Pointer characters, int length) { - final _ret = _objc_msgSend_13z9dkp(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_9x4k8x(this.ref.retainAndReturnPointer(), _sel_initWithCharacters_length_, characters, length); return NSString.castFromPointer(_ret, retain: false, release: true); } @@ -7528,7 +7528,7 @@ class NSString extends NSObject { /// initWithCharactersNoCopy:length:freeWhenDone: NSString initWithCharactersNoCopy_length_freeWhenDone_( ffi.Pointer characters, int length, bool freeBuffer) { - final _ret = _objc_msgSend_zsd8q9( + final _ret = _objc_msgSend_lh0jh5( this.ref.retainAndReturnPointer(), _sel_initWithCharactersNoCopy_length_freeWhenDone_, characters, @@ -7539,7 +7539,7 @@ class NSString extends NSObject { /// initWithCoder: NSString? initWithCoder_(NSCoder coder) { - final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_1sotr3r(this.ref.retainAndReturnPointer(), _sel_initWithCoder_, coder.ref.pointer); return _ret.address == 0 ? null @@ -7549,7 +7549,7 @@ class NSString extends NSObject { /// initWithContentsOfFile:encoding:error: NSString? initWithContentsOfFile_encoding_error_( NSString path, int enc, ffi.Pointer> error) { - final _ret = _objc_msgSend_94cet5( + final _ret = _objc_msgSend_1nomli1( this.ref.retainAndReturnPointer(), _sel_initWithContentsOfFile_encoding_error_, path.ref.pointer, @@ -7565,7 +7565,7 @@ class NSString extends NSObject { NSString path, ffi.Pointer enc, ffi.Pointer> error) { - final _ret = _objc_msgSend_1gxo8gv( + final _ret = _objc_msgSend_1alewu7( this.ref.retainAndReturnPointer(), _sel_initWithContentsOfFile_usedEncoding_error_, path.ref.pointer, @@ -7579,7 +7579,7 @@ class NSString extends NSObject { /// initWithContentsOfURL:encoding:error: NSString? initWithContentsOfURL_encoding_error_( NSURL url, int enc, ffi.Pointer> error) { - final _ret = _objc_msgSend_94cet5( + final _ret = _objc_msgSend_1nomli1( this.ref.retainAndReturnPointer(), _sel_initWithContentsOfURL_encoding_error_, url.ref.pointer, @@ -7595,7 +7595,7 @@ class NSString extends NSObject { NSURL url, ffi.Pointer enc, ffi.Pointer> error) { - final _ret = _objc_msgSend_1gxo8gv( + final _ret = _objc_msgSend_1alewu7( this.ref.retainAndReturnPointer(), _sel_initWithContentsOfURL_usedEncoding_error_, url.ref.pointer, @@ -7608,7 +7608,7 @@ class NSString extends NSObject { /// initWithData:encoding: NSString? initWithData_encoding_(NSData data, int encoding) { - final _ret = _objc_msgSend_dcd68g(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_1k4kd9s(this.ref.retainAndReturnPointer(), _sel_initWithData_encoding_, data.ref.pointer, encoding); return _ret.address == 0 ? null @@ -7617,7 +7617,7 @@ class NSString extends NSObject { /// initWithFormat: NSString initWithFormat_(NSString format) { - final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_1sotr3r(this.ref.retainAndReturnPointer(), _sel_initWithFormat_, format.ref.pointer); return NSString.castFromPointer(_ret, retain: false, release: true); } @@ -7625,7 +7625,7 @@ class NSString extends NSObject { /// initWithFormat:locale: NSString initWithFormat_locale_( NSString format, objc.ObjCObjectBase? locale) { - final _ret = _objc_msgSend_rsfdlh( + final _ret = _objc_msgSend_15qeuct( this.ref.retainAndReturnPointer(), _sel_initWithFormat_locale_, format.ref.pointer, @@ -7635,14 +7635,14 @@ class NSString extends NSObject { /// initWithString: NSString initWithString_(NSString aString) { - final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_1sotr3r(this.ref.retainAndReturnPointer(), _sel_initWithString_, aString.ref.pointer); return NSString.castFromPointer(_ret, retain: false, release: true); } /// initWithUTF8String: NSString? initWithUTF8String_(ffi.Pointer nullTerminatedCString) { - final _ret = _objc_msgSend_rqwdif(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_56zxyn(this.ref.retainAndReturnPointer(), _sel_initWithUTF8String_, nullTerminatedCString); return _ret.address == 0 ? null @@ -7654,7 +7654,7 @@ class NSString extends NSObject { NSString format, NSString validFormatSpecifiers, ffi.Pointer> error) { - final _ret = _objc_msgSend_bo6ep4( + final _ret = _objc_msgSend_1pnyuds( this.ref.retainAndReturnPointer(), _sel_initWithValidatedFormat_validFormatSpecifiers_error_, format.ref.pointer, @@ -7671,7 +7671,7 @@ class NSString extends NSObject { NSString validFormatSpecifiers, objc.ObjCObjectBase? locale, ffi.Pointer> error) { - final _ret = _objc_msgSend_2izev6( + final _ret = _objc_msgSend_1k0ezzm( this.ref.retainAndReturnPointer(), _sel_initWithValidatedFormat_validFormatSpecifiers_locale_error_, format.ref.pointer, @@ -7690,13 +7690,13 @@ class NSString extends NSObject { /// retain NSString retain() { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_retain); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_retain); return NSString.castFromPointer(_ret, retain: true, release: true); } /// self NSString self() { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_self); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_self); return NSString.castFromPointer(_ret, retain: true, release: true); } } @@ -7792,7 +7792,7 @@ extension NSStringExtensionMethods on NSString { /// localizedNameOfStringEncoding: static NSString localizedNameOfStringEncoding_(int encoding) { - final _ret = _objc_msgSend_1qrcblu( + final _ret = _objc_msgSend_14hpxwa( _class_NSString, _sel_localizedNameOfStringEncoding_, encoding); return NSString.castFromPointer(_ret, retain: true, release: true); } @@ -7822,20 +7822,20 @@ extension NSStringExtensionMethods on NSString { /// capitalizedString NSString get capitalizedString { final _ret = - _objc_msgSend_1x359cv(this.ref.pointer, _sel_capitalizedString); + _objc_msgSend_151sglz(this.ref.pointer, _sel_capitalizedString); return NSString.castFromPointer(_ret, retain: true, release: true); } /// capitalizedStringWithLocale: NSString capitalizedStringWithLocale_(NSLocale? locale) { - final _ret = _objc_msgSend_62nh5j(this.ref.pointer, + final _ret = _objc_msgSend_1sotr3r(this.ref.pointer, _sel_capitalizedStringWithLocale_, locale?.ref.pointer ?? ffi.nullptr); return NSString.castFromPointer(_ret, retain: true, release: true); } /// caseInsensitiveCompare: NSComparisonResult caseInsensitiveCompare_(NSString string) { - final _ret = _objc_msgSend_1wpduvy( + final _ret = _objc_msgSend_1ym6zyw( this.ref.pointer, _sel_caseInsensitiveCompare_, string.ref.pointer); return NSComparisonResult.fromValue(_ret); } @@ -7843,14 +7843,14 @@ extension NSStringExtensionMethods on NSString { /// commonPrefixWithString:options: NSString commonPrefixWithString_options_( NSString str, NSStringCompareOptions mask) { - final _ret = _objc_msgSend_fcs5vo(this.ref.pointer, + final _ret = _objc_msgSend_diypgk(this.ref.pointer, _sel_commonPrefixWithString_options_, str.ref.pointer, mask.value); return NSString.castFromPointer(_ret, retain: true, release: true); } /// compare: NSComparisonResult compare_(NSString string) { - final _ret = _objc_msgSend_1wpduvy( + final _ret = _objc_msgSend_1ym6zyw( this.ref.pointer, _sel_compare_, string.ref.pointer); return NSComparisonResult.fromValue(_ret); } @@ -7858,7 +7858,7 @@ extension NSStringExtensionMethods on NSString { /// compare:options: NSComparisonResult compare_options_( NSString string, NSStringCompareOptions mask) { - final _ret = _objc_msgSend_16ydezh(this.ref.pointer, _sel_compare_options_, + final _ret = _objc_msgSend_pg1fnv(this.ref.pointer, _sel_compare_options_, string.ref.pointer, mask.value); return NSComparisonResult.fromValue(_ret); } @@ -7866,7 +7866,7 @@ extension NSStringExtensionMethods on NSString { /// compare:options:range: NSComparisonResult compare_options_range_(NSString string, NSStringCompareOptions mask, NSRange rangeOfReceiverToCompare) { - final _ret = _objc_msgSend_eeuxub( + final _ret = _objc_msgSend_xrqic1( this.ref.pointer, _sel_compare_options_range_, string.ref.pointer, @@ -7881,7 +7881,7 @@ extension NSStringExtensionMethods on NSString { NSStringCompareOptions mask, NSRange rangeOfReceiverToCompare, objc.ObjCObjectBase? locale) { - final _ret = _objc_msgSend_i4hdht( + final _ret = _objc_msgSend_1895u4n( this.ref.pointer, _sel_compare_options_range_locale_, string.ref.pointer, @@ -7893,27 +7893,27 @@ extension NSStringExtensionMethods on NSString { /// componentsSeparatedByCharactersInSet: NSArray componentsSeparatedByCharactersInSet_(NSCharacterSet separator) { - final _ret = _objc_msgSend_62nh5j(this.ref.pointer, + final _ret = _objc_msgSend_1sotr3r(this.ref.pointer, _sel_componentsSeparatedByCharactersInSet_, separator.ref.pointer); return NSArray.castFromPointer(_ret, retain: true, release: true); } /// componentsSeparatedByString: NSArray componentsSeparatedByString_(NSString separator) { - final _ret = _objc_msgSend_62nh5j(this.ref.pointer, + final _ret = _objc_msgSend_1sotr3r(this.ref.pointer, _sel_componentsSeparatedByString_, separator.ref.pointer); return NSArray.castFromPointer(_ret, retain: true, release: true); } /// containsString: bool containsString_(NSString str) { - return _objc_msgSend_69e0x1( + return _objc_msgSend_19nvye5( this.ref.pointer, _sel_containsString_, str.ref.pointer); } /// dataUsingEncoding: NSData? dataUsingEncoding_(int encoding) { - final _ret = _objc_msgSend_1qrcblu( + final _ret = _objc_msgSend_14hpxwa( this.ref.pointer, _sel_dataUsingEncoding_, encoding); return _ret.address == 0 ? null @@ -7922,7 +7922,7 @@ extension NSStringExtensionMethods on NSString { /// dataUsingEncoding:allowLossyConversion: NSData? dataUsingEncoding_allowLossyConversion_(int encoding, bool lossy) { - final _ret = _objc_msgSend_rubz6a(this.ref.pointer, + final _ret = _objc_msgSend_hiwitm(this.ref.pointer, _sel_dataUsingEncoding_allowLossyConversion_, encoding, lossy); return _ret.address == 0 ? null @@ -7931,21 +7931,21 @@ extension NSStringExtensionMethods on NSString { /// decomposedStringWithCanonicalMapping NSString get decomposedStringWithCanonicalMapping { - final _ret = _objc_msgSend_1x359cv( + final _ret = _objc_msgSend_151sglz( this.ref.pointer, _sel_decomposedStringWithCanonicalMapping); return NSString.castFromPointer(_ret, retain: true, release: true); } /// decomposedStringWithCompatibilityMapping NSString get decomposedStringWithCompatibilityMapping { - final _ret = _objc_msgSend_1x359cv( + final _ret = _objc_msgSend_151sglz( this.ref.pointer, _sel_decomposedStringWithCompatibilityMapping); return NSString.castFromPointer(_ret, retain: true, release: true); } /// description NSString get description { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_description); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_description); return NSString.castFromPointer(_ret, retain: true, release: true); } @@ -8035,13 +8035,13 @@ extension NSStringExtensionMethods on NSString { /// hasPrefix: bool hasPrefix_(NSString str) { - return _objc_msgSend_69e0x1( + return _objc_msgSend_19nvye5( this.ref.pointer, _sel_hasPrefix_, str.ref.pointer); } /// hasSuffix: bool hasSuffix_(NSString str) { - return _objc_msgSend_69e0x1( + return _objc_msgSend_19nvye5( this.ref.pointer, _sel_hasSuffix_, str.ref.pointer); } @@ -8062,7 +8062,7 @@ extension NSStringExtensionMethods on NSString { /// isEqualToString: bool isEqualToString_(NSString aString) { - return _objc_msgSend_69e0x1( + return _objc_msgSend_19nvye5( this.ref.pointer, _sel_isEqualToString_, aString.ref.pointer); } @@ -8088,27 +8088,27 @@ extension NSStringExtensionMethods on NSString { /// localizedCapitalizedString NSString get localizedCapitalizedString { - final _ret = _objc_msgSend_1x359cv( + final _ret = _objc_msgSend_151sglz( this.ref.pointer, _sel_localizedCapitalizedString); return NSString.castFromPointer(_ret, retain: true, release: true); } /// localizedCaseInsensitiveCompare: NSComparisonResult localizedCaseInsensitiveCompare_(NSString string) { - final _ret = _objc_msgSend_1wpduvy(this.ref.pointer, + final _ret = _objc_msgSend_1ym6zyw(this.ref.pointer, _sel_localizedCaseInsensitiveCompare_, string.ref.pointer); return NSComparisonResult.fromValue(_ret); } /// localizedCaseInsensitiveContainsString: bool localizedCaseInsensitiveContainsString_(NSString str) { - return _objc_msgSend_69e0x1(this.ref.pointer, + return _objc_msgSend_19nvye5(this.ref.pointer, _sel_localizedCaseInsensitiveContainsString_, str.ref.pointer); } /// localizedCompare: NSComparisonResult localizedCompare_(NSString string) { - final _ret = _objc_msgSend_1wpduvy( + final _ret = _objc_msgSend_1ym6zyw( this.ref.pointer, _sel_localizedCompare_, string.ref.pointer); return NSComparisonResult.fromValue(_ret); } @@ -8116,20 +8116,20 @@ extension NSStringExtensionMethods on NSString { /// localizedLowercaseString NSString get localizedLowercaseString { final _ret = - _objc_msgSend_1x359cv(this.ref.pointer, _sel_localizedLowercaseString); + _objc_msgSend_151sglz(this.ref.pointer, _sel_localizedLowercaseString); return NSString.castFromPointer(_ret, retain: true, release: true); } /// localizedStandardCompare: NSComparisonResult localizedStandardCompare_(NSString string) { - final _ret = _objc_msgSend_1wpduvy( + final _ret = _objc_msgSend_1ym6zyw( this.ref.pointer, _sel_localizedStandardCompare_, string.ref.pointer); return NSComparisonResult.fromValue(_ret); } /// localizedStandardContainsString: bool localizedStandardContainsString_(NSString str) { - return _objc_msgSend_69e0x1(this.ref.pointer, + return _objc_msgSend_19nvye5(this.ref.pointer, _sel_localizedStandardContainsString_, str.ref.pointer); } @@ -8137,9 +8137,9 @@ extension NSStringExtensionMethods on NSString { NSRange localizedStandardRangeOfString_(NSString str) { final _ptr = pkg_ffi.calloc(); objc.useMsgSendVariants - ? _objc_msgSend_x4muu7Stret(_ptr, this.ref.pointer, + ? _objc_msgSend_182fzonStret(_ptr, this.ref.pointer, _sel_localizedStandardRangeOfString_, str.ref.pointer) - : _ptr.ref = _objc_msgSend_x4muu7(this.ref.pointer, + : _ptr.ref = _objc_msgSend_182fzon(this.ref.pointer, _sel_localizedStandardRangeOfString_, str.ref.pointer); final _finalizable = _ptr.cast().asTypedList( ffi.sizeOf(), @@ -8150,7 +8150,7 @@ extension NSStringExtensionMethods on NSString { /// localizedUppercaseString NSString get localizedUppercaseString { final _ret = - _objc_msgSend_1x359cv(this.ref.pointer, _sel_localizedUppercaseString); + _objc_msgSend_151sglz(this.ref.pointer, _sel_localizedUppercaseString); return NSString.castFromPointer(_ret, retain: true, release: true); } @@ -8161,13 +8161,13 @@ extension NSStringExtensionMethods on NSString { /// lowercaseString NSString get lowercaseString { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_lowercaseString); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_lowercaseString); return NSString.castFromPointer(_ret, retain: true, release: true); } /// lowercaseStringWithLocale: NSString lowercaseStringWithLocale_(NSLocale? locale) { - final _ret = _objc_msgSend_62nh5j(this.ref.pointer, + final _ret = _objc_msgSend_1sotr3r(this.ref.pointer, _sel_lowercaseStringWithLocale_, locale?.ref.pointer ?? ffi.nullptr); return NSString.castFromPointer(_ret, retain: true, release: true); } @@ -8194,14 +8194,14 @@ extension NSStringExtensionMethods on NSString { /// precomposedStringWithCanonicalMapping NSString get precomposedStringWithCanonicalMapping { - final _ret = _objc_msgSend_1x359cv( + final _ret = _objc_msgSend_151sglz( this.ref.pointer, _sel_precomposedStringWithCanonicalMapping); return NSString.castFromPointer(_ret, retain: true, release: true); } /// precomposedStringWithCompatibilityMapping NSString get precomposedStringWithCompatibilityMapping { - final _ret = _objc_msgSend_1x359cv( + final _ret = _objc_msgSend_151sglz( this.ref.pointer, _sel_precomposedStringWithCompatibilityMapping); return NSString.castFromPointer(_ret, retain: true, release: true); } @@ -8210,9 +8210,9 @@ extension NSStringExtensionMethods on NSString { NSRange rangeOfCharacterFromSet_(NSCharacterSet searchSet) { final _ptr = pkg_ffi.calloc(); objc.useMsgSendVariants - ? _objc_msgSend_x4muu7Stret(_ptr, this.ref.pointer, + ? _objc_msgSend_182fzonStret(_ptr, this.ref.pointer, _sel_rangeOfCharacterFromSet_, searchSet.ref.pointer) - : _ptr.ref = _objc_msgSend_x4muu7(this.ref.pointer, + : _ptr.ref = _objc_msgSend_182fzon(this.ref.pointer, _sel_rangeOfCharacterFromSet_, searchSet.ref.pointer); final _finalizable = _ptr.cast().asTypedList( ffi.sizeOf(), @@ -8225,13 +8225,13 @@ extension NSStringExtensionMethods on NSString { NSCharacterSet searchSet, NSStringCompareOptions mask) { final _ptr = pkg_ffi.calloc(); objc.useMsgSendVariants - ? _objc_msgSend_1kwndnwStret( + ? _objc_msgSend_102xxo4Stret( _ptr, this.ref.pointer, _sel_rangeOfCharacterFromSet_options_, searchSet.ref.pointer, mask.value) - : _ptr.ref = _objc_msgSend_1kwndnw( + : _ptr.ref = _objc_msgSend_102xxo4( this.ref.pointer, _sel_rangeOfCharacterFromSet_options_, searchSet.ref.pointer, @@ -8247,14 +8247,14 @@ extension NSStringExtensionMethods on NSString { NSStringCompareOptions mask, NSRange rangeOfReceiverToSearch) { final _ptr = pkg_ffi.calloc(); objc.useMsgSendVariants - ? _objc_msgSend_ackzikStret( + ? _objc_msgSend_1nmlvqcStret( _ptr, this.ref.pointer, _sel_rangeOfCharacterFromSet_options_range_, searchSet.ref.pointer, mask.value, rangeOfReceiverToSearch) - : _ptr.ref = _objc_msgSend_ackzik( + : _ptr.ref = _objc_msgSend_1nmlvqc( this.ref.pointer, _sel_rangeOfCharacterFromSet_options_range_, searchSet.ref.pointer, @@ -8298,9 +8298,9 @@ extension NSStringExtensionMethods on NSString { NSRange rangeOfString_(NSString searchString) { final _ptr = pkg_ffi.calloc(); objc.useMsgSendVariants - ? _objc_msgSend_x4muu7Stret(_ptr, this.ref.pointer, _sel_rangeOfString_, - searchString.ref.pointer) - : _ptr.ref = _objc_msgSend_x4muu7( + ? _objc_msgSend_182fzonStret(_ptr, this.ref.pointer, + _sel_rangeOfString_, searchString.ref.pointer) + : _ptr.ref = _objc_msgSend_182fzon( this.ref.pointer, _sel_rangeOfString_, searchString.ref.pointer); final _finalizable = _ptr.cast().asTypedList( ffi.sizeOf(), @@ -8313,9 +8313,9 @@ extension NSStringExtensionMethods on NSString { NSString searchString, NSStringCompareOptions mask) { final _ptr = pkg_ffi.calloc(); objc.useMsgSendVariants - ? _objc_msgSend_1kwndnwStret(_ptr, this.ref.pointer, + ? _objc_msgSend_102xxo4Stret(_ptr, this.ref.pointer, _sel_rangeOfString_options_, searchString.ref.pointer, mask.value) - : _ptr.ref = _objc_msgSend_1kwndnw(this.ref.pointer, + : _ptr.ref = _objc_msgSend_102xxo4(this.ref.pointer, _sel_rangeOfString_options_, searchString.ref.pointer, mask.value); final _finalizable = _ptr.cast().asTypedList( ffi.sizeOf(), @@ -8328,14 +8328,14 @@ extension NSStringExtensionMethods on NSString { NSStringCompareOptions mask, NSRange rangeOfReceiverToSearch) { final _ptr = pkg_ffi.calloc(); objc.useMsgSendVariants - ? _objc_msgSend_ackzikStret( + ? _objc_msgSend_1nmlvqcStret( _ptr, this.ref.pointer, _sel_rangeOfString_options_range_, searchString.ref.pointer, mask.value, rangeOfReceiverToSearch) - : _ptr.ref = _objc_msgSend_ackzik( + : _ptr.ref = _objc_msgSend_1nmlvqc( this.ref.pointer, _sel_rangeOfString_options_range_, searchString.ref.pointer, @@ -8355,7 +8355,7 @@ extension NSStringExtensionMethods on NSString { NSLocale? locale) { final _ptr = pkg_ffi.calloc(); objc.useMsgSendVariants - ? _objc_msgSend_198mga8Stret( + ? _objc_msgSend_gg0462Stret( _ptr, this.ref.pointer, _sel_rangeOfString_options_range_locale_, @@ -8363,7 +8363,7 @@ extension NSStringExtensionMethods on NSString { mask.value, rangeOfReceiverToSearch, locale?.ref.pointer ?? ffi.nullptr) - : _ptr.ref = _objc_msgSend_198mga8( + : _ptr.ref = _objc_msgSend_gg0462( this.ref.pointer, _sel_rangeOfString_options_range_locale_, searchString.ref.pointer, @@ -8383,14 +8383,14 @@ extension NSStringExtensionMethods on NSString { /// stringByAppendingFormat: NSString stringByAppendingFormat_(NSString format) { - final _ret = _objc_msgSend_62nh5j( + final _ret = _objc_msgSend_1sotr3r( this.ref.pointer, _sel_stringByAppendingFormat_, format.ref.pointer); return NSString.castFromPointer(_ret, retain: true, release: true); } /// stringByAppendingString: NSString stringByAppendingString_(NSString aString) { - final _ret = _objc_msgSend_62nh5j( + final _ret = _objc_msgSend_1sotr3r( this.ref.pointer, _sel_stringByAppendingString_, aString.ref.pointer); return NSString.castFromPointer(_ret, retain: true, release: true); } @@ -8398,7 +8398,7 @@ extension NSStringExtensionMethods on NSString { /// stringByApplyingTransform:reverse: NSString? stringByApplyingTransform_reverse_( NSString transform, bool reverse) { - final _ret = _objc_msgSend_1bdmr5f( + final _ret = _objc_msgSend_17amj0z( this.ref.pointer, _sel_stringByApplyingTransform_reverse_, transform.ref.pointer, @@ -8411,7 +8411,7 @@ extension NSStringExtensionMethods on NSString { /// stringByFoldingWithOptions:locale: NSString stringByFoldingWithOptions_locale_( NSStringCompareOptions options, NSLocale? locale) { - final _ret = _objc_msgSend_146986e( + final _ret = _objc_msgSend_11cbyu0( this.ref.pointer, _sel_stringByFoldingWithOptions_locale_, options.value, @@ -8422,7 +8422,7 @@ extension NSStringExtensionMethods on NSString { /// stringByPaddingToLength:withString:startingAtIndex: NSString stringByPaddingToLength_withString_startingAtIndex_( int newLength, NSString padString, int padIndex) { - final _ret = _objc_msgSend_exgdqb( + final _ret = _objc_msgSend_1tfztp( this.ref.pointer, _sel_stringByPaddingToLength_withString_startingAtIndex_, newLength, @@ -8434,7 +8434,7 @@ extension NSStringExtensionMethods on NSString { /// stringByReplacingCharactersInRange:withString: NSString stringByReplacingCharactersInRange_withString_( NSRange range, NSString replacement) { - final _ret = _objc_msgSend_197wcu5( + final _ret = _objc_msgSend_bstjp9( this.ref.pointer, _sel_stringByReplacingCharactersInRange_withString_, range, @@ -8445,7 +8445,7 @@ extension NSStringExtensionMethods on NSString { /// stringByReplacingOccurrencesOfString:withString: NSString stringByReplacingOccurrencesOfString_withString_( NSString target, NSString replacement) { - final _ret = _objc_msgSend_rsfdlh( + final _ret = _objc_msgSend_15qeuct( this.ref.pointer, _sel_stringByReplacingOccurrencesOfString_withString_, target.ref.pointer, @@ -8459,7 +8459,7 @@ extension NSStringExtensionMethods on NSString { NSString replacement, NSStringCompareOptions options, NSRange searchRange) { - final _ret = _objc_msgSend_1wrs2o6( + final _ret = _objc_msgSend_2u4jm6( this.ref.pointer, _sel_stringByReplacingOccurrencesOfString_withString_options_range_, target.ref.pointer, @@ -8471,7 +8471,7 @@ extension NSStringExtensionMethods on NSString { /// stringByTrimmingCharactersInSet: NSString stringByTrimmingCharactersInSet_(NSCharacterSet set) { - final _ret = _objc_msgSend_62nh5j(this.ref.pointer, + final _ret = _objc_msgSend_1sotr3r(this.ref.pointer, _sel_stringByTrimmingCharactersInSet_, set.ref.pointer); return NSString.castFromPointer(_ret, retain: true, release: true); } @@ -8479,33 +8479,33 @@ extension NSStringExtensionMethods on NSString { /// substringFromIndex: NSString substringFromIndex_(int from) { final _ret = - _objc_msgSend_1qrcblu(this.ref.pointer, _sel_substringFromIndex_, from); + _objc_msgSend_14hpxwa(this.ref.pointer, _sel_substringFromIndex_, from); return NSString.castFromPointer(_ret, retain: true, release: true); } /// substringToIndex: NSString substringToIndex_(int to) { final _ret = - _objc_msgSend_1qrcblu(this.ref.pointer, _sel_substringToIndex_, to); + _objc_msgSend_14hpxwa(this.ref.pointer, _sel_substringToIndex_, to); return NSString.castFromPointer(_ret, retain: true, release: true); } /// substringWithRange: NSString substringWithRange_(NSRange range) { - final _ret = - _objc_msgSend_83z673(this.ref.pointer, _sel_substringWithRange_, range); + final _ret = _objc_msgSend_1k1o1s7( + this.ref.pointer, _sel_substringWithRange_, range); return NSString.castFromPointer(_ret, retain: true, release: true); } /// uppercaseString NSString get uppercaseString { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_uppercaseString); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_uppercaseString); return NSString.castFromPointer(_ret, retain: true, release: true); } /// uppercaseStringWithLocale: NSString uppercaseStringWithLocale_(NSLocale? locale) { - final _ret = _objc_msgSend_62nh5j(this.ref.pointer, + final _ret = _objc_msgSend_1sotr3r(this.ref.pointer, _sel_uppercaseStringWithLocale_, locale?.ref.pointer ?? ffi.nullptr); return NSString.castFromPointer(_ret, retain: true, release: true); } @@ -8516,7 +8516,7 @@ extension NSStringExtensionMethods on NSString { bool useAuxiliaryFile, int enc, ffi.Pointer> error) { - return _objc_msgSend_1140663( + return _objc_msgSend_dv3z6r( this.ref.pointer, _sel_writeToFile_atomically_encoding_error_, path.ref.pointer, @@ -8528,7 +8528,7 @@ extension NSStringExtensionMethods on NSString { /// writeToURL:atomically:encoding:error: bool writeToURL_atomically_encoding_error_(NSURL url, bool useAuxiliaryFile, int enc, ffi.Pointer> error) { - return _objc_msgSend_1140663( + return _objc_msgSend_dv3z6r( this.ref.pointer, _sel_writeToURL_atomically_encoding_error_, url.ref.pointer, @@ -8555,7 +8555,7 @@ class NSURL extends NSObject { /// Returns whether [obj] is an instance of [NSURL]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_69e0x1( + return _objc_msgSend_19nvye5( obj.ref.pointer, _sel_isKindOfClass_, _class_NSURL); } @@ -8564,7 +8564,7 @@ class NSURL extends NSObject { NSURL url, NSURLBookmarkResolutionOptions options, ffi.Pointer> error) { - final _ret = _objc_msgSend_pdn1fa( + final _ret = _objc_msgSend_1tiux5i( _class_NSURL, _sel_URLByResolvingAliasFileAtURL_options_error_, url.ref.pointer, @@ -8583,7 +8583,7 @@ class NSURL extends NSObject { NSURL? relativeURL, ffi.Pointer isStale, ffi.Pointer> error) { - final _ret = _objc_msgSend_3ems5q( + final _ret = _objc_msgSend_1ceswyu( _class_NSURL, _sel_URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_, bookmarkData.ref.pointer, @@ -8599,7 +8599,7 @@ class NSURL extends NSObject { /// URLWithDataRepresentation:relativeToURL: static NSURL URLWithDataRepresentation_relativeToURL_( NSData data, NSURL? baseURL) { - final _ret = _objc_msgSend_rsfdlh( + final _ret = _objc_msgSend_15qeuct( _class_NSURL, _sel_URLWithDataRepresentation_relativeToURL_, data.ref.pointer, @@ -8609,7 +8609,7 @@ class NSURL extends NSObject { /// URLWithString: static NSURL? URLWithString_(NSString URLString) { - final _ret = _objc_msgSend_62nh5j( + final _ret = _objc_msgSend_1sotr3r( _class_NSURL, _sel_URLWithString_, URLString.ref.pointer); return _ret.address == 0 ? null @@ -8619,7 +8619,7 @@ class NSURL extends NSObject { /// URLWithString:encodingInvalidCharacters: static NSURL? URLWithString_encodingInvalidCharacters_( NSString URLString, bool encodingInvalidCharacters) { - final _ret = _objc_msgSend_1bdmr5f( + final _ret = _objc_msgSend_17amj0z( _class_NSURL, _sel_URLWithString_encodingInvalidCharacters_, URLString.ref.pointer, @@ -8632,7 +8632,7 @@ class NSURL extends NSObject { /// URLWithString:relativeToURL: static NSURL? URLWithString_relativeToURL_( NSString URLString, NSURL? baseURL) { - final _ret = _objc_msgSend_rsfdlh( + final _ret = _objc_msgSend_15qeuct( _class_NSURL, _sel_URLWithString_relativeToURL_, URLString.ref.pointer, @@ -8645,7 +8645,7 @@ class NSURL extends NSObject { /// absoluteURLWithDataRepresentation:relativeToURL: static NSURL absoluteURLWithDataRepresentation_relativeToURL_( NSData data, NSURL? baseURL) { - final _ret = _objc_msgSend_rsfdlh( + final _ret = _objc_msgSend_15qeuct( _class_NSURL, _sel_absoluteURLWithDataRepresentation_relativeToURL_, data.ref.pointer, @@ -8655,20 +8655,20 @@ class NSURL extends NSObject { /// alloc static NSURL alloc() { - final _ret = _objc_msgSend_1x359cv(_class_NSURL, _sel_alloc); + final _ret = _objc_msgSend_151sglz(_class_NSURL, _sel_alloc); return NSURL.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static NSURL allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_hzlb60(_class_NSURL, _sel_allocWithZone_, zone); + final _ret = _objc_msgSend_1cwp428(_class_NSURL, _sel_allocWithZone_, zone); return NSURL.castFromPointer(_ret, retain: false, release: true); } /// bookmarkDataWithContentsOfURL:error: static NSData? bookmarkDataWithContentsOfURL_error_( NSURL bookmarkFileURL, ffi.Pointer> error) { - final _ret = _objc_msgSend_1705co6( + final _ret = _objc_msgSend_1lhpu4m( _class_NSURL, _sel_bookmarkDataWithContentsOfURL_error_, bookmarkFileURL.ref.pointer, @@ -8681,7 +8681,7 @@ class NSURL extends NSObject { /// fileURLWithFileSystemRepresentation:isDirectory:relativeToURL: static NSURL fileURLWithFileSystemRepresentation_isDirectory_relativeToURL_( ffi.Pointer path, bool isDir, NSURL? baseURL) { - final _ret = _objc_msgSend_qid8e9( + final _ret = _objc_msgSend_1n40f6p( _class_NSURL, _sel_fileURLWithFileSystemRepresentation_isDirectory_relativeToURL_, path, @@ -8692,14 +8692,14 @@ class NSURL extends NSObject { /// fileURLWithPath: static NSURL fileURLWithPath_(NSString path) { - final _ret = _objc_msgSend_62nh5j( + final _ret = _objc_msgSend_1sotr3r( _class_NSURL, _sel_fileURLWithPath_, path.ref.pointer); return NSURL.castFromPointer(_ret, retain: true, release: true); } /// fileURLWithPath:isDirectory: static NSURL fileURLWithPath_isDirectory_(NSString path, bool isDir) { - final _ret = _objc_msgSend_1bdmr5f(_class_NSURL, + final _ret = _objc_msgSend_17amj0z(_class_NSURL, _sel_fileURLWithPath_isDirectory_, path.ref.pointer, isDir); return NSURL.castFromPointer(_ret, retain: true, release: true); } @@ -8707,7 +8707,7 @@ class NSURL extends NSObject { /// fileURLWithPath:isDirectory:relativeToURL: static NSURL fileURLWithPath_isDirectory_relativeToURL_( NSString path, bool isDir, NSURL? baseURL) { - final _ret = _objc_msgSend_19v53ht( + final _ret = _objc_msgSend_1ged0jd( _class_NSURL, _sel_fileURLWithPath_isDirectory_relativeToURL_, path.ref.pointer, @@ -8718,7 +8718,7 @@ class NSURL extends NSObject { /// fileURLWithPath:relativeToURL: static NSURL fileURLWithPath_relativeToURL_(NSString path, NSURL? baseURL) { - final _ret = _objc_msgSend_rsfdlh( + final _ret = _objc_msgSend_15qeuct( _class_NSURL, _sel_fileURLWithPath_relativeToURL_, path.ref.pointer, @@ -8728,7 +8728,7 @@ class NSURL extends NSObject { /// new static NSURL new1() { - final _ret = _objc_msgSend_1x359cv(_class_NSURL, _sel_new); + final _ret = _objc_msgSend_151sglz(_class_NSURL, _sel_new); return NSURL.castFromPointer(_ret, retain: false, release: true); } @@ -8737,7 +8737,7 @@ class NSURL extends NSObject { NSData data, NSString typeIdentifier, ffi.Pointer> outError) { - final _ret = _objc_msgSend_bo6ep4( + final _ret = _objc_msgSend_1pnyuds( _class_NSURL, _sel_objectWithItemProviderData_typeIdentifier_error_, data.ref.pointer, @@ -8751,7 +8751,7 @@ class NSURL extends NSObject { /// resourceValuesForKeys:fromBookmarkData: static objc.ObjCObjectBase? resourceValuesForKeys_fromBookmarkData_( NSArray keys, NSData bookmarkData) { - final _ret = _objc_msgSend_rsfdlh( + final _ret = _objc_msgSend_15qeuct( _class_NSURL, _sel_resourceValuesForKeys_fromBookmarkData_, keys.ref.pointer, @@ -8772,7 +8772,7 @@ class NSURL extends NSObject { NSURL bookmarkFileURL, int options, ffi.Pointer> error) { - return _objc_msgSend_vdkl2d( + return _objc_msgSend_1vxoo9h( _class_NSURL, _sel_writeBookmarkData_toURL_options_error_, bookmarkData.ref.pointer, @@ -8783,7 +8783,7 @@ class NSURL extends NSObject { /// absoluteString NSString? get absoluteString { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_absoluteString); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_absoluteString); return _ret.address == 0 ? null : NSString.castFromPointer(_ret, retain: true, release: true); @@ -8791,7 +8791,7 @@ class NSURL extends NSObject { /// absoluteURL NSURL? get absoluteURL { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_absoluteURL); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_absoluteURL); return _ret.address == 0 ? null : NSURL.castFromPointer(_ret, retain: true, release: true); @@ -8799,7 +8799,7 @@ class NSURL extends NSObject { /// baseURL NSURL? get baseURL { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_baseURL); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_baseURL); return _ret.address == 0 ? null : NSURL.castFromPointer(_ret, retain: true, release: true); @@ -8812,7 +8812,7 @@ class NSURL extends NSObject { NSArray? keys, NSURL? relativeURL, ffi.Pointer> error) { - final _ret = _objc_msgSend_1uj57oj( + final _ret = _objc_msgSend_1wt9a7r( this.ref.pointer, _sel_bookmarkDataWithOptions_includingResourceValuesForKeys_relativeToURL_error_, options.value, @@ -8827,19 +8827,19 @@ class NSURL extends NSObject { /// dataRepresentation NSData get dataRepresentation { final _ret = - _objc_msgSend_1x359cv(this.ref.pointer, _sel_dataRepresentation); + _objc_msgSend_151sglz(this.ref.pointer, _sel_dataRepresentation); return NSData.castFromPointer(_ret, retain: true, release: true); } /// encodeWithCoder: void encodeWithCoder_(NSCoder coder) { - _objc_msgSend_1jdvcbf( + _objc_msgSend_xtuoz7( this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); } /// filePathURL NSURL? get filePathURL { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_filePathURL); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_filePathURL); return _ret.address == 0 ? null : NSURL.castFromPointer(_ret, retain: true, release: true); @@ -8847,7 +8847,7 @@ class NSURL extends NSObject { /// fileReferenceURL NSURL? fileReferenceURL() { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_fileReferenceURL); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_fileReferenceURL); return _ret.address == 0 ? null : NSURL.castFromPointer(_ret, retain: true, release: true); @@ -8861,7 +8861,7 @@ class NSURL extends NSObject { /// fragment NSString? get fragment { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_fragment); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_fragment); return _ret.address == 0 ? null : NSString.castFromPointer(_ret, retain: true, release: true); @@ -8879,7 +8879,7 @@ class NSURL extends NSObject { ffi.Pointer> value, NSString key, ffi.Pointer> error) { - return _objc_msgSend_7iv28v(this.ref.pointer, + return _objc_msgSend_1j9bhml(this.ref.pointer, _sel_getResourceValue_forKey_error_, value, key.ref.pointer, error); } @@ -8890,7 +8890,7 @@ class NSURL extends NSObject { /// host NSString? get host { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_host); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_host); return _ret.address == 0 ? null : NSString.castFromPointer(_ret, retain: true, release: true); @@ -8899,14 +8899,14 @@ class NSURL extends NSObject { /// init NSURL init() { final _ret = - _objc_msgSend_1x359cv(this.ref.retainAndReturnPointer(), _sel_init); + _objc_msgSend_151sglz(this.ref.retainAndReturnPointer(), _sel_init); return NSURL.castFromPointer(_ret, retain: false, release: true); } /// initAbsoluteURLWithDataRepresentation:relativeToURL: NSURL initAbsoluteURLWithDataRepresentation_relativeToURL_( NSData data, NSURL? baseURL) { - final _ret = _objc_msgSend_rsfdlh( + final _ret = _objc_msgSend_15qeuct( this.ref.retainAndReturnPointer(), _sel_initAbsoluteURLWithDataRepresentation_relativeToURL_, data.ref.pointer, @@ -8922,7 +8922,7 @@ class NSURL extends NSObject { NSURL? relativeURL, ffi.Pointer isStale, ffi.Pointer> error) { - final _ret = _objc_msgSend_3ems5q( + final _ret = _objc_msgSend_1ceswyu( this.ref.retainAndReturnPointer(), _sel_initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_, bookmarkData.ref.pointer, @@ -8938,7 +8938,7 @@ class NSURL extends NSObject { /// initFileURLWithFileSystemRepresentation:isDirectory:relativeToURL: NSURL initFileURLWithFileSystemRepresentation_isDirectory_relativeToURL_( ffi.Pointer path, bool isDir, NSURL? baseURL) { - final _ret = _objc_msgSend_qid8e9( + final _ret = _objc_msgSend_1n40f6p( this.ref.retainAndReturnPointer(), _sel_initFileURLWithFileSystemRepresentation_isDirectory_relativeToURL_, path, @@ -8949,14 +8949,14 @@ class NSURL extends NSObject { /// initFileURLWithPath: NSURL initFileURLWithPath_(NSString path) { - final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_1sotr3r(this.ref.retainAndReturnPointer(), _sel_initFileURLWithPath_, path.ref.pointer); return NSURL.castFromPointer(_ret, retain: false, release: true); } /// initFileURLWithPath:isDirectory: NSURL initFileURLWithPath_isDirectory_(NSString path, bool isDir) { - final _ret = _objc_msgSend_1bdmr5f(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_17amj0z(this.ref.retainAndReturnPointer(), _sel_initFileURLWithPath_isDirectory_, path.ref.pointer, isDir); return NSURL.castFromPointer(_ret, retain: false, release: true); } @@ -8964,7 +8964,7 @@ class NSURL extends NSObject { /// initFileURLWithPath:isDirectory:relativeToURL: NSURL initFileURLWithPath_isDirectory_relativeToURL_( NSString path, bool isDir, NSURL? baseURL) { - final _ret = _objc_msgSend_19v53ht( + final _ret = _objc_msgSend_1ged0jd( this.ref.retainAndReturnPointer(), _sel_initFileURLWithPath_isDirectory_relativeToURL_, path.ref.pointer, @@ -8975,7 +8975,7 @@ class NSURL extends NSObject { /// initFileURLWithPath:relativeToURL: NSURL initFileURLWithPath_relativeToURL_(NSString path, NSURL? baseURL) { - final _ret = _objc_msgSend_rsfdlh( + final _ret = _objc_msgSend_15qeuct( this.ref.retainAndReturnPointer(), _sel_initFileURLWithPath_relativeToURL_, path.ref.pointer, @@ -8985,7 +8985,7 @@ class NSURL extends NSObject { /// initWithCoder: NSURL? initWithCoder_(NSCoder coder) { - final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_1sotr3r(this.ref.retainAndReturnPointer(), _sel_initWithCoder_, coder.ref.pointer); return _ret.address == 0 ? null @@ -8994,7 +8994,7 @@ class NSURL extends NSObject { /// initWithDataRepresentation:relativeToURL: NSURL initWithDataRepresentation_relativeToURL_(NSData data, NSURL? baseURL) { - final _ret = _objc_msgSend_rsfdlh( + final _ret = _objc_msgSend_15qeuct( this.ref.retainAndReturnPointer(), _sel_initWithDataRepresentation_relativeToURL_, data.ref.pointer, @@ -9004,7 +9004,7 @@ class NSURL extends NSObject { /// initWithString: NSURL? initWithString_(NSString URLString) { - final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_1sotr3r(this.ref.retainAndReturnPointer(), _sel_initWithString_, URLString.ref.pointer); return _ret.address == 0 ? null @@ -9014,7 +9014,7 @@ class NSURL extends NSObject { /// initWithString:encodingInvalidCharacters: NSURL? initWithString_encodingInvalidCharacters_( NSString URLString, bool encodingInvalidCharacters) { - final _ret = _objc_msgSend_1bdmr5f( + final _ret = _objc_msgSend_17amj0z( this.ref.retainAndReturnPointer(), _sel_initWithString_encodingInvalidCharacters_, URLString.ref.pointer, @@ -9026,7 +9026,7 @@ class NSURL extends NSObject { /// initWithString:relativeToURL: NSURL? initWithString_relativeToURL_(NSString URLString, NSURL? baseURL) { - final _ret = _objc_msgSend_rsfdlh( + final _ret = _objc_msgSend_15qeuct( this.ref.retainAndReturnPointer(), _sel_initWithString_relativeToURL_, URLString.ref.pointer, @@ -9048,7 +9048,7 @@ class NSURL extends NSObject { /// parameterString NSString? get parameterString { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_parameterString); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_parameterString); return _ret.address == 0 ? null : NSString.castFromPointer(_ret, retain: true, release: true); @@ -9056,7 +9056,7 @@ class NSURL extends NSObject { /// password NSString? get password { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_password); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_password); return _ret.address == 0 ? null : NSString.castFromPointer(_ret, retain: true, release: true); @@ -9064,7 +9064,7 @@ class NSURL extends NSObject { /// path NSString? get path { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_path); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_path); return _ret.address == 0 ? null : NSString.castFromPointer(_ret, retain: true, release: true); @@ -9072,7 +9072,7 @@ class NSURL extends NSObject { /// port NSNumber? get port { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_port); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_port); return _ret.address == 0 ? null : NSNumber.castFromPointer(_ret, retain: true, release: true); @@ -9080,7 +9080,7 @@ class NSURL extends NSObject { /// query NSString? get query { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_query); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_query); return _ret.address == 0 ? null : NSString.castFromPointer(_ret, retain: true, release: true); @@ -9088,7 +9088,7 @@ class NSURL extends NSObject { /// relativePath NSString? get relativePath { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_relativePath); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_relativePath); return _ret.address == 0 ? null : NSString.castFromPointer(_ret, retain: true, release: true); @@ -9096,7 +9096,7 @@ class NSURL extends NSObject { /// relativeString NSString get relativeString { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_relativeString); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_relativeString); return NSString.castFromPointer(_ret, retain: true, release: true); } @@ -9107,14 +9107,14 @@ class NSURL extends NSObject { /// removeCachedResourceValueForKey: void removeCachedResourceValueForKey_(NSString key) { - _objc_msgSend_1jdvcbf(this.ref.pointer, + _objc_msgSend_xtuoz7(this.ref.pointer, _sel_removeCachedResourceValueForKey_, key.ref.pointer); } /// resourceSpecifier NSString? get resourceSpecifier { final _ret = - _objc_msgSend_1x359cv(this.ref.pointer, _sel_resourceSpecifier); + _objc_msgSend_151sglz(this.ref.pointer, _sel_resourceSpecifier); return _ret.address == 0 ? null : NSString.castFromPointer(_ret, retain: true, release: true); @@ -9123,7 +9123,7 @@ class NSURL extends NSObject { /// resourceValuesForKeys:error: objc.ObjCObjectBase? resourceValuesForKeys_error_( NSArray keys, ffi.Pointer> error) { - final _ret = _objc_msgSend_1705co6(this.ref.pointer, + final _ret = _objc_msgSend_1lhpu4m(this.ref.pointer, _sel_resourceValuesForKeys_error_, keys.ref.pointer, error); return _ret.address == 0 ? null @@ -9132,7 +9132,7 @@ class NSURL extends NSObject { /// scheme NSString? get scheme { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_scheme); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_scheme); return _ret.address == 0 ? null : NSString.castFromPointer(_ret, retain: true, release: true); @@ -9141,7 +9141,7 @@ class NSURL extends NSObject { /// setResourceValue:forKey:error: bool setResourceValue_forKey_error_(objc.ObjCObjectBase? value, NSString key, ffi.Pointer> error) { - return _objc_msgSend_6h48uq( + return _objc_msgSend_6z4k82( this.ref.pointer, _sel_setResourceValue_forKey_error_, value?.ref.pointer ?? ffi.nullptr, @@ -9152,14 +9152,14 @@ class NSURL extends NSObject { /// setResourceValues:error: bool setResourceValues_error_(objc.ObjCObjectBase keyedValues, ffi.Pointer> error) { - return _objc_msgSend_blqzg8(this.ref.pointer, _sel_setResourceValues_error_, + return _objc_msgSend_l9p60w(this.ref.pointer, _sel_setResourceValues_error_, keyedValues.ref.pointer, error); } /// setTemporaryResourceValue:forKey: void setTemporaryResourceValue_forKey_( objc.ObjCObjectBase? value, NSString key) { - _objc_msgSend_wjvic9( + _objc_msgSend_pfv6jd( this.ref.pointer, _sel_setTemporaryResourceValue_forKey_, value?.ref.pointer ?? ffi.nullptr, @@ -9168,7 +9168,7 @@ class NSURL extends NSObject { /// standardizedURL NSURL? get standardizedURL { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_standardizedURL); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_standardizedURL); return _ret.address == 0 ? null : NSURL.castFromPointer(_ret, retain: true, release: true); @@ -9188,7 +9188,7 @@ class NSURL extends NSObject { /// user NSString? get user { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_user); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_user); return _ret.address == 0 ? null : NSString.castFromPointer(_ret, retain: true, release: true); @@ -9254,51 +9254,51 @@ class NSURLHandle extends NSObject { /// Returns whether [obj] is an instance of [NSURLHandle]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_69e0x1( + return _objc_msgSend_19nvye5( obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLHandle); } /// alloc static NSURLHandle alloc() { - final _ret = _objc_msgSend_1x359cv(_class_NSURLHandle, _sel_alloc); + final _ret = _objc_msgSend_151sglz(_class_NSURLHandle, _sel_alloc); return NSURLHandle.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static NSURLHandle allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _objc_msgSend_hzlb60(_class_NSURLHandle, _sel_allocWithZone_, zone); + _objc_msgSend_1cwp428(_class_NSURLHandle, _sel_allocWithZone_, zone); return NSURLHandle.castFromPointer(_ret, retain: false, release: true); } /// new static NSURLHandle new1() { - final _ret = _objc_msgSend_1x359cv(_class_NSURLHandle, _sel_new); + final _ret = _objc_msgSend_151sglz(_class_NSURLHandle, _sel_new); return NSURLHandle.castFromPointer(_ret, retain: false, release: true); } /// autorelease NSURLHandle autorelease() { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_autorelease); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_autorelease); return NSURLHandle.castFromPointer(_ret, retain: true, release: true); } /// init NSURLHandle init() { final _ret = - _objc_msgSend_1x359cv(this.ref.retainAndReturnPointer(), _sel_init); + _objc_msgSend_151sglz(this.ref.retainAndReturnPointer(), _sel_init); return NSURLHandle.castFromPointer(_ret, retain: false, release: true); } /// retain NSURLHandle retain() { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_retain); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_retain); return NSURLHandle.castFromPointer(_ret, retain: true, release: true); } /// self NSURLHandle self() { - final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_self); + final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_self); return NSURLHandle.castFromPointer(_ret, retain: true, release: true); } } @@ -9338,26 +9338,26 @@ class NSValue extends NSObject { /// Returns whether [obj] is an instance of [NSValue]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_69e0x1( + return _objc_msgSend_19nvye5( obj.ref.pointer, _sel_isKindOfClass_, _class_NSValue); } /// alloc static NSValue alloc() { - final _ret = _objc_msgSend_1x359cv(_class_NSValue, _sel_alloc); + final _ret = _objc_msgSend_151sglz(_class_NSValue, _sel_alloc); return NSValue.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static NSValue allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _objc_msgSend_hzlb60(_class_NSValue, _sel_allocWithZone_, zone); + _objc_msgSend_1cwp428(_class_NSValue, _sel_allocWithZone_, zone); return NSValue.castFromPointer(_ret, retain: false, release: true); } /// new static NSValue new1() { - final _ret = _objc_msgSend_1x359cv(_class_NSValue, _sel_new); + final _ret = _objc_msgSend_151sglz(_class_NSValue, _sel_new); return NSValue.castFromPointer(_ret, retain: false, release: true); } @@ -9368,7 +9368,7 @@ class NSValue extends NSObject { /// encodeWithCoder: void encodeWithCoder_(NSCoder coder) { - _objc_msgSend_1jdvcbf( + _objc_msgSend_xtuoz7( this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); } @@ -9380,21 +9380,21 @@ class NSValue extends NSObject { /// init NSValue init() { final _ret = - _objc_msgSend_1x359cv(this.ref.retainAndReturnPointer(), _sel_init); + _objc_msgSend_151sglz(this.ref.retainAndReturnPointer(), _sel_init); return NSValue.castFromPointer(_ret, retain: false, release: true); } /// initWithBytes:objCType: NSValue initWithBytes_objCType_( ffi.Pointer value, ffi.Pointer type) { - final _ret = _objc_msgSend_qtxoq7(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_e9mncn(this.ref.retainAndReturnPointer(), _sel_initWithBytes_objCType_, value, type); return NSValue.castFromPointer(_ret, retain: false, release: true); } /// initWithCoder: NSValue? initWithCoder_(NSCoder coder) { - final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_1sotr3r(this.ref.retainAndReturnPointer(), _sel_initWithCoder_, coder.ref.pointer); return _ret.address == 0 ? null @@ -9456,7 +9456,7 @@ abstract final class ObjCBlock_NSString_ffiVoid { ffi.Pointer arg0)>> ptr) => objc.ObjCBlock)>( - _ObjectiveCBindings_newPointerBlock_1yesha9( + _ObjectiveCBindings_newPointerBlock_1mbt9g9( _ObjCBlock_NSString_ffiVoid_fnPtrCallable.cast(), ptr.cast()), retain: false, release: true); @@ -9473,7 +9473,7 @@ abstract final class ObjCBlock_NSString_ffiVoid { (ffi.Pointer arg0) => fn(arg0).ref.retainAndAutorelease(), _ObjCBlock_NSString_ffiVoid_closureCallable.cast(), - _ObjectiveCBindings_newClosureBlock_1yesha9), + _ObjectiveCBindings_newClosureBlock_1mbt9g9), retain: false, release: true); } @@ -9482,7 +9482,7 @@ abstract final class ObjCBlock_NSString_ffiVoid { extension ObjCBlock_NSString_ffiVoid_CallExtension on objc.ObjCBlock)> { NSString call(ffi.Pointer arg0) => NSString.castFromPointer( - _ObjectiveCBindings_invokeBlock_1yesha9(ref.pointer, arg0), + _ObjectiveCBindings_invokeBlock_1mbt9g9(ref.pointer, arg0), retain: true, release: true); } @@ -9894,7 +9894,7 @@ abstract final class ObjCBlock_bool_ffiVoid_Protocol { ffi.Pointer arg0, ffi.Pointer arg1)>> ptr) => objc.ObjCBlock, Protocol)>( - _ObjectiveCBindings_newPointerBlock_ozkafd( + _ObjectiveCBindings_newPointerBlock_3su7tt( _ObjCBlock_bool_ffiVoid_Protocol_fnPtrCallable.cast(), ptr.cast()), retain: false, @@ -9915,7 +9915,7 @@ abstract final class ObjCBlock_bool_ffiVoid_Protocol { Protocol.castFromPointer(arg1, retain: true, release: true)), _ObjCBlock_bool_ffiVoid_Protocol_closureCallable.cast(), - _ObjectiveCBindings_newClosureBlock_ozkafd), + _ObjectiveCBindings_newClosureBlock_3su7tt), retain: false, release: true); } @@ -9924,7 +9924,7 @@ abstract final class ObjCBlock_bool_ffiVoid_Protocol { extension ObjCBlock_bool_ffiVoid_Protocol_CallExtension on objc.ObjCBlock, Protocol)> { bool call(ffi.Pointer arg0, Protocol arg1) => - _ObjectiveCBindings_invokeBlock_ozkafd( + _ObjectiveCBindings_invokeBlock_3su7tt( ref.pointer, arg0, arg1.ref.pointer); } @@ -9988,7 +9988,7 @@ abstract final class ObjCBlock_bool_ffiVoid_objcObjCObject { ffi.Pointer arg0, ffi.Pointer arg1)>> ptr) => objc.ObjCBlock, ffi.Pointer)>( - _ObjectiveCBindings_newPointerBlock_ozkafd( + _ObjectiveCBindings_newPointerBlock_3su7tt( _ObjCBlock_bool_ffiVoid_objcObjCObject_fnPtrCallable.cast(), ptr.cast()), retain: false, @@ -10009,7 +10009,7 @@ abstract final class ObjCBlock_bool_ffiVoid_objcObjCObject { (ffi.Pointer arg0, ffi.Pointer arg1) => fn(arg0, objc.ObjCObjectBase(arg1, retain: true, release: true)), _ObjCBlock_bool_ffiVoid_objcObjCObject_closureCallable.cast(), - _ObjectiveCBindings_newClosureBlock_ozkafd), + _ObjectiveCBindings_newClosureBlock_3su7tt), retain: false, release: true); } @@ -10018,7 +10018,7 @@ abstract final class ObjCBlock_bool_ffiVoid_objcObjCObject { extension ObjCBlock_bool_ffiVoid_objcObjCObject_CallExtension on objc.ObjCBlock< ffi.Bool Function(ffi.Pointer, ffi.Pointer)> { bool call(ffi.Pointer arg0, objc.ObjCObjectBase arg1) => - _ObjectiveCBindings_invokeBlock_ozkafd( + _ObjectiveCBindings_invokeBlock_3su7tt( ref.pointer, arg0, arg1.ref.pointer); } @@ -10287,7 +10287,7 @@ abstract final class ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCO ffi.Pointer?, NSError)>, ffi.Pointer, NSDictionary)>( - _ObjectiveCBindings_newPointerBlock_1j2nt86( + _ObjectiveCBindings_newPointerBlock_1b3bb6a( _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObject_NSDictionary_fnPtrCallable.cast(), ptr.cast()), retain: false, release: true); @@ -10309,7 +10309,7 @@ abstract final class ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCO objc.ObjCObjectBase(arg1, retain: true, release: true), NSDictionary.castFromPointer(arg2, retain: true, release: true)), _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObject_NSDictionary_closureCallable.cast(), - _ObjectiveCBindings_newClosureBlock_1j2nt86), + _ObjectiveCBindings_newClosureBlock_1b3bb6a), retain: false, release: true); @@ -10334,7 +10334,7 @@ abstract final class ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCO objc.ObjCObjectBase(arg1, retain: false, release: true), NSDictionary.castFromPointer(arg2, retain: false, release: true)), _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObject_NSDictionary_listenerCallable.nativeFunction.cast(), - _ObjectiveCBindings_newListenerBlock_1j2nt86), + _ObjectiveCBindings_newListenerBlock_1b3bb6a), retain: false, release: true); @@ -10360,7 +10360,7 @@ abstract final class ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCO NSDictionary.castFromPointer(arg2, retain: false, release: true)), _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObject_NSDictionary_blockingCallable.nativeFunction.cast(), _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObject_NSDictionary_blockingListenerCallable.nativeFunction.cast(), - _ObjectiveCBindings_newBlockingBlock_1j2nt86), + _ObjectiveCBindings_newBlockingBlock_1b3bb6a), retain: false, release: true); } @@ -10379,7 +10379,7 @@ extension ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObject_NSDic arg0, objc.ObjCObjectBase arg1, NSDictionary arg2) => - _ObjectiveCBindings_invokeBlock_1j2nt86( + _ObjectiveCBindings_invokeBlock_1b3bb6a( ref.pointer, arg0.ref.pointer, arg1.ref.pointer, arg2.ref.pointer); } @@ -10663,7 +10663,7 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSCoder { ffi.Pointer arg0, ffi.Pointer arg1)>> ptr) => objc.ObjCBlock, NSCoder)>( - _ObjectiveCBindings_newPointerBlock_wjovn7( + _ObjectiveCBindings_newPointerBlock_18v1jvf( _ObjCBlock_ffiVoid_ffiVoid_NSCoder_fnPtrCallable.cast(), ptr.cast()), retain: false, @@ -10683,7 +10683,7 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSCoder { fn(arg0, NSCoder.castFromPointer(arg1, retain: true, release: true)), _ObjCBlock_ffiVoid_ffiVoid_NSCoder_closureCallable.cast(), - _ObjectiveCBindings_newClosureBlock_wjovn7), + _ObjectiveCBindings_newClosureBlock_18v1jvf), retain: false, release: true); @@ -10705,7 +10705,7 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSCoder { NSCoder.castFromPointer(arg1, retain: false, release: true)), _ObjCBlock_ffiVoid_ffiVoid_NSCoder_listenerCallable.nativeFunction .cast(), - _ObjectiveCBindings_newListenerBlock_wjovn7), + _ObjectiveCBindings_newListenerBlock_18v1jvf), retain: false, release: true); @@ -10730,7 +10730,7 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSCoder { _ObjCBlock_ffiVoid_ffiVoid_NSCoder_blockingListenerCallable .nativeFunction .cast(), - _ObjectiveCBindings_newBlockingBlock_wjovn7), + _ObjectiveCBindings_newBlockingBlock_18v1jvf), retain: false, release: true); } @@ -10739,7 +10739,7 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSCoder { extension ObjCBlock_ffiVoid_ffiVoid_NSCoder_CallExtension on objc.ObjCBlock, NSCoder)> { void call(ffi.Pointer arg0, NSCoder arg1) => - _ObjectiveCBindings_invokeBlock_wjovn7( + _ObjectiveCBindings_invokeBlock_18v1jvf( ref.pointer, arg0, arg1.ref.pointer); } @@ -10893,7 +10893,7 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent { ffi.Pointer arg0, ffi.Pointer arg1, ffi.UnsignedLong arg2)>> ptr) => objc.ObjCBlock, NSStream, ffi.UnsignedLong)>( - _ObjectiveCBindings_newPointerBlock_18d6mda( + _ObjectiveCBindings_newPointerBlock_hoampi( _ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent_fnPtrCallable.cast(), ptr.cast()), retain: false, @@ -10915,7 +10915,7 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent { NSStream.castFromPointer(arg1, retain: true, release: true), NSStreamEvent.fromValue(arg2)), _ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent_closureCallable.cast(), - _ObjectiveCBindings_newClosureBlock_18d6mda), + _ObjectiveCBindings_newClosureBlock_hoampi), retain: false, release: true); @@ -10939,7 +10939,7 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent { _ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent_listenerCallable .nativeFunction .cast(), - _ObjectiveCBindings_newListenerBlock_18d6mda), + _ObjectiveCBindings_newListenerBlock_hoampi), retain: false, release: true); @@ -10964,7 +10964,7 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent { .nativeFunction .cast(), _ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent_blockingListenerCallable.nativeFunction.cast(), - _ObjectiveCBindings_newBlockingBlock_18d6mda), + _ObjectiveCBindings_newBlockingBlock_hoampi), retain: false, release: true); } @@ -10974,7 +10974,7 @@ extension ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent_CallExtension on objc.ObjCBlock< ffi.Void Function(ffi.Pointer, NSStream, ffi.UnsignedLong)> { void call(ffi.Pointer arg0, NSStream arg1, NSStreamEvent arg2) => - _ObjectiveCBindings_invokeBlock_18d6mda( + _ObjectiveCBindings_invokeBlock_hoampi( ref.pointer, arg0, arg1.ref.pointer, arg2.value); } @@ -11107,7 +11107,7 @@ abstract final class ObjCBlock_ffiVoid_objcObjCObject_NSError { ffi.Pointer arg0, ffi.Pointer arg1)>> ptr) => objc.ObjCBlock?, NSError)>( - _ObjectiveCBindings_newPointerBlock_wjvic9( + _ObjectiveCBindings_newPointerBlock_pfv6jd( _ObjCBlock_ffiVoid_objcObjCObject_NSError_fnPtrCallable.cast(), ptr.cast()), retain: false, @@ -11130,7 +11130,7 @@ abstract final class ObjCBlock_ffiVoid_objcObjCObject_NSError { : objc.ObjCObjectBase(arg0, retain: true, release: true), NSError.castFromPointer(arg1, retain: true, release: true)), _ObjCBlock_ffiVoid_objcObjCObject_NSError_closureCallable.cast(), - _ObjectiveCBindings_newClosureBlock_wjvic9), + _ObjectiveCBindings_newClosureBlock_pfv6jd), retain: false, release: true); @@ -11155,7 +11155,7 @@ abstract final class ObjCBlock_ffiVoid_objcObjCObject_NSError { _ObjCBlock_ffiVoid_objcObjCObject_NSError_listenerCallable .nativeFunction .cast(), - _ObjectiveCBindings_newListenerBlock_wjvic9), + _ObjectiveCBindings_newListenerBlock_pfv6jd), retain: false, release: true); @@ -11181,7 +11181,7 @@ abstract final class ObjCBlock_ffiVoid_objcObjCObject_NSError { .nativeFunction .cast(), _ObjCBlock_ffiVoid_objcObjCObject_NSError_blockingListenerCallable.nativeFunction.cast(), - _ObjectiveCBindings_newBlockingBlock_wjvic9), + _ObjectiveCBindings_newBlockingBlock_pfv6jd), retain: false, release: true); } @@ -11190,7 +11190,7 @@ abstract final class ObjCBlock_ffiVoid_objcObjCObject_NSError { extension ObjCBlock_ffiVoid_objcObjCObject_NSError_CallExtension on objc .ObjCBlock?, NSError)> { void call(objc.ObjCObjectBase? arg0, NSError arg1) => - _ObjectiveCBindings_invokeBlock_wjvic9( + _ObjectiveCBindings_invokeBlock_pfv6jd( ref.pointer, arg0?.ref.pointer ?? ffi.nullptr, arg1.ref.pointer); } @@ -11253,7 +11253,7 @@ abstract final class ObjCBlock_instancetype_ffiVoid_NSCoder { objc.ObjCBlock< objc.Retained?> Function( ffi.Pointer, NSCoder)>( - _ObjectiveCBindings_newPointerBlock_1m9h2n( + _ObjectiveCBindings_newPointerBlock_xr62hr( _ObjCBlock_instancetype_ffiVoid_NSCoder_fnPtrCallable.cast(), ptr.cast()), retain: false, release: true); @@ -11275,7 +11275,7 @@ abstract final class ObjCBlock_instancetype_ffiVoid_NSCoder { .retainAndReturnPointer() ?? ffi.nullptr, _ObjCBlock_instancetype_ffiVoid_NSCoder_closureCallable.cast(), - _ObjectiveCBindings_newClosureBlock_1m9h2n), + _ObjectiveCBindings_newClosureBlock_xr62hr), retain: false, release: true); } @@ -11286,13 +11286,13 @@ extension ObjCBlock_instancetype_ffiVoid_NSCoder_CallExtension objc.Retained?> Function( ffi.Pointer, NSCoder)> { Dartinstancetype? call(ffi.Pointer arg0, NSCoder arg1) => - _ObjectiveCBindings_invokeBlock_1m9h2n( + _ObjectiveCBindings_invokeBlock_xr62hr( ref.pointer, arg0, arg1.ref.pointer) .address == 0 ? null : objc.ObjCObjectBase( - _ObjectiveCBindings_invokeBlock_1m9h2n( + _ObjectiveCBindings_invokeBlock_xr62hr( ref.pointer, arg0, arg1.ref.pointer), retain: false, release: true); @@ -11389,7 +11389,7 @@ abstract final class ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError { NSData, NSString, ffi.Pointer>)>( - _ObjectiveCBindings_newPointerBlock_e2pkq8(_ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError_fnPtrCallable.cast(), ptr.cast()), + _ObjectiveCBindings_newPointerBlock_10z9f5k(_ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError_fnPtrCallable.cast(), ptr.cast()), retain: false, release: true); @@ -11409,7 +11409,7 @@ abstract final class ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError { ffi.Pointer> arg3) => fn(arg0, NSData.castFromPointer(arg1, retain: true, release: true), NSString.castFromPointer(arg2, retain: true, release: true), arg3)?.ref.retainAndAutorelease() ?? ffi.nullptr, _ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError_closureCallable.cast(), - _ObjectiveCBindings_newClosureBlock_e2pkq8), + _ObjectiveCBindings_newClosureBlock_10z9f5k), retain: false, release: true); } @@ -11421,13 +11421,13 @@ extension ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError_CallExtension NSString, ffi.Pointer>)> { Dartinstancetype? call(ffi.Pointer arg0, NSData arg1, NSString arg2, ffi.Pointer> arg3) => - _ObjectiveCBindings_invokeBlock_e2pkq8(ref.pointer, arg0, + _ObjectiveCBindings_invokeBlock_10z9f5k(ref.pointer, arg0, arg1.ref.pointer, arg2.ref.pointer, arg3) .address == 0 ? null : objc.ObjCObjectBase( - _ObjectiveCBindings_invokeBlock_e2pkq8( + _ObjectiveCBindings_invokeBlock_10z9f5k( ref.pointer, arg0, arg1.ref.pointer, arg2.ref.pointer, arg3), retain: true, release: true); @@ -11490,7 +11490,7 @@ abstract final class ObjCBlock_objcObjCObject_ffiVoid { ptr) => objc.ObjCBlock< ffi.Pointer Function(ffi.Pointer)>( - _ObjectiveCBindings_newPointerBlock_1yesha9( + _ObjectiveCBindings_newPointerBlock_1mbt9g9( _ObjCBlock_objcObjCObject_ffiVoid_fnPtrCallable.cast(), ptr.cast()), retain: false, @@ -11510,7 +11510,7 @@ abstract final class ObjCBlock_objcObjCObject_ffiVoid { (ffi.Pointer arg0) => fn(arg0).ref.retainAndAutorelease(), _ObjCBlock_objcObjCObject_ffiVoid_closureCallable.cast(), - _ObjectiveCBindings_newClosureBlock_1yesha9), + _ObjectiveCBindings_newClosureBlock_1mbt9g9), retain: false, release: true); } @@ -11519,7 +11519,7 @@ abstract final class ObjCBlock_objcObjCObject_ffiVoid { extension ObjCBlock_objcObjCObject_ffiVoid_CallExtension on objc .ObjCBlock Function(ffi.Pointer)> { objc.ObjCObjectBase call(ffi.Pointer arg0) => objc.ObjCObjectBase( - _ObjectiveCBindings_invokeBlock_1yesha9(ref.pointer, arg0), + _ObjectiveCBindings_invokeBlock_1mbt9g9(ref.pointer, arg0), retain: true, release: true); } @@ -11592,7 +11592,7 @@ abstract final class ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector { objc.ObjCBlock< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>( - _ObjectiveCBindings_newPointerBlock_ykn0t6( + _ObjectiveCBindings_newPointerBlock_50as9u( _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_fnPtrCallable.cast(), ptr.cast()), retain: false, @@ -11612,7 +11612,7 @@ abstract final class ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector { (ffi.Pointer arg0, ffi.Pointer arg1) => fn(arg0, arg1).ref.retainAndAutorelease(), _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_closureCallable.cast(), - _ObjectiveCBindings_newClosureBlock_ykn0t6), + _ObjectiveCBindings_newClosureBlock_50as9u), retain: false, release: true); } @@ -11625,7 +11625,7 @@ extension ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_CallExtension objc.ObjCObjectBase call( ffi.Pointer arg0, ffi.Pointer arg1) => objc.ObjCObjectBase( - _ObjectiveCBindings_invokeBlock_ykn0t6(ref.pointer, arg0, arg1), + _ObjectiveCBindings_invokeBlock_50as9u(ref.pointer, arg0, arg1), retain: true, release: true); } @@ -11711,7 +11711,7 @@ abstract final class ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCO ffi.Pointer, ffi.Pointer, ffi.Pointer)>( - _ObjectiveCBindings_newPointerBlock_1c0c70u(_ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_fnPtrCallable.cast(), ptr.cast()), + _ObjectiveCBindings_newPointerBlock_1mllhpc(_ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_fnPtrCallable.cast(), ptr.cast()), retain: false, release: true); @@ -11731,7 +11731,7 @@ abstract final class ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCO .ref .retainAndAutorelease(), _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_closureCallable.cast(), - _ObjectiveCBindings_newClosureBlock_1c0c70u), + _ObjectiveCBindings_newClosureBlock_1mllhpc), retain: false, release: true); } @@ -11744,7 +11744,7 @@ extension ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_CallE objc.ObjCObjectBase call(ffi.Pointer arg0, ffi.Pointer arg1, objc.ObjCObjectBase arg2) => objc.ObjCObjectBase( - _ObjectiveCBindings_invokeBlock_1c0c70u( + _ObjectiveCBindings_invokeBlock_1mllhpc( ref.pointer, arg0, arg1, arg2.ref.pointer), retain: true, release: true); @@ -11846,7 +11846,7 @@ abstract final class ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCO ffi.Pointer, ffi.Pointer, ffi.Pointer)>( - _ObjectiveCBindings_newPointerBlock_u8b97m(_ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_fnPtrCallable.cast(), ptr.cast()), + _ObjectiveCBindings_newPointerBlock_c7gk2u(_ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_fnPtrCallable.cast(), ptr.cast()), retain: false, release: true); @@ -11867,7 +11867,7 @@ abstract final class ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCO .ref .retainAndAutorelease(), _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_closureCallable.cast(), - _ObjectiveCBindings_newClosureBlock_u8b97m), + _ObjectiveCBindings_newClosureBlock_c7gk2u), retain: false, release: true); } @@ -11886,7 +11886,7 @@ extension ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcO objc.ObjCObjectBase arg2, objc.ObjCObjectBase arg3) => objc.ObjCObjectBase( - _ObjectiveCBindings_invokeBlock_u8b97m( + _ObjectiveCBindings_invokeBlock_c7gk2u( ref.pointer, arg0, arg1, arg2.ref.pointer, arg3.ref.pointer), retain: true, release: true); @@ -11909,7 +11909,7 @@ class Protocol extends objc.ObjCObjectBase { /// Returns whether [obj] is an instance of [Protocol]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_69e0x1( + return _objc_msgSend_19nvye5( obj.ref.pointer, _sel_isKindOfClass_, _class_Protocol); } } @@ -11958,38 +11958,50 @@ late final _class_NSURL = objc.getClass("NSURL"); late final _class_NSURLHandle = objc.getClass("NSURLHandle"); late final _class_NSValue = objc.getClass("NSValue"); late final _class_Protocol = objc.getClass("Protocol"); -final _objc_msgSend_10i1axw = objc.msgSendPointer +final _objc_msgSend_102xxo4 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + NSRange Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>>() + .asFunction< + NSRange Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +final _objc_msgSend_102xxo4Stret = objc.msgSendStretPointer .cast< ffi.NativeFunction< ffi.Void Function( + ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.UnsignedLong)>>() .asFunction< void Function( + ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, int)>(); -final _objc_msgSend_1140663 = objc.msgSendPointer +final _objc_msgSend_11cbyu0 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Bool Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Bool, ffi.UnsignedLong, - ffi.Pointer>)>>() + ffi.Pointer)>>() .asFunction< - bool Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - bool, int, - ffi.Pointer>)>(); + ffi.Pointer)>(); final _objc_msgSend_11e9f5x = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -12001,14 +12013,22 @@ final _objc_msgSend_11e9f5x = objc.msgSendPointer .asFunction< int Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int)>(); -final _objc_msgSend_12mhqtk = objc.msgSendPointer +final _objc_msgSend_11spmsz = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedInt)>>() + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); final _objc_msgSend_12py2ux = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -12017,6 +12037,14 @@ final _objc_msgSend_12py2ux = objc.msgSendPointer .asFunction< int Function(ffi.Pointer, ffi.Pointer, int)>(); +final _objc_msgSend_13mclwd = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Char)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); final _objc_msgSend_13yqbb6 = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -12025,131 +12053,134 @@ final _objc_msgSend_13yqbb6 = objc.msgSendPointer .asFunction< int Function( ffi.Pointer, ffi.Pointer)>(); -final _objc_msgSend_13z9dkp = objc.msgSendPointer +final _objc_msgSend_140ec04 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong)>>() + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( + void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - int)>(); -final _objc_msgSend_146986e = objc.msgSendPointer + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +final _objc_msgSend_14hpxwa = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer)>>() + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); -final _objc_msgSend_16ydezh = objc.msgSendPointer + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +final _objc_msgSend_14hvw5k = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Long Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong)>>() + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int)>>() .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); -final _objc_msgSend_1705co6 = objc.msgSendPointer + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +final _objc_msgSend_151sglz = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>() + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() .asFunction< ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); -final _objc_msgSend_17xjpl7 = objc.msgSendPointer + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_158ju31 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Long, - ffi.Pointer)>>() + ffi.Pointer, + ffi.UnsignedLong)>>() .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); -final _objc_msgSend_189974q = objc.msgSendPointer + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, int)>(); +final _objc_msgSend_15qeuct = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); -final _objc_msgSend_197wcu5 = objc.msgSendPointer +final _objc_msgSend_161ne8y = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - NSRange, - ffi.Pointer)>>() + ffi.Pointer, + ffi.UnsignedLong, + ffi.Bool)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - NSRange, - ffi.Pointer)>(); -final _objc_msgSend_198mga8 = objc.msgSendPointer + ffi.Pointer, + int, + bool)>(); +final _objc_msgSend_16f0drb = objc.msgSendPointer .cast< ffi.NativeFunction< - NSRange Function( + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.LongLong)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +final _objc_msgSend_17amj0z = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.UnsignedLong, - NSRange, - ffi.Pointer)>>() + ffi.Bool)>>() .asFunction< - NSRange Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - int, - NSRange, - ffi.Pointer)>(); -final _objc_msgSend_198mga8Stret = objc.msgSendStretPointer + bool)>(); +final _objc_msgSend_182fzon = objc.msgSendPointer + .cast< + ffi.NativeFunction< + NSRange Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + NSRange Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_182fzonStret = objc.msgSendStretPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_1895u4n = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Long Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, @@ -12157,24 +12188,29 @@ final _objc_msgSend_198mga8Stret = objc.msgSendStretPointer NSRange, ffi.Pointer)>>() .asFunction< - void Function( - ffi.Pointer, + int Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, int, NSRange, ffi.Pointer)>(); -final _objc_msgSend_19hbqky = objc.msgSendPointer +final _objc_msgSend_18qun1e = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); final _objc_msgSend_19lrthf = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -12189,61 +12225,32 @@ final _objc_msgSend_19lrthf = objc.msgSendPointer ffi.Pointer, ffi.Pointer>, ffi.Pointer)>(); -final _objc_msgSend_19qmeje = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int)>(); -final _objc_msgSend_19v53ht = objc.msgSendPointer +final _objc_msgSend_19nvye5 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Bool Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Bool, ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool, - ffi.Pointer)>(); -final _objc_msgSend_1a0iyvk = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int)>(); -final _objc_msgSend_1aoxlyn = objc.msgSendPointer + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_1alewu7 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer, + ffi.Pointer>)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer, + ffi.Pointer>)>(); final _objc_msgSend_1b5ysjl = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -12260,34 +12267,26 @@ final _objc_msgSend_1b5ysjl = objc.msgSendPointer ffi.Pointer, ffi.Pointer>, int)>(); -final _objc_msgSend_1bdmr5f = objc.msgSendPointer +final _objc_msgSend_1ceswyu = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Bool)>>() + ffi.UnsignedLong, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - bool)>(); -final _objc_msgSend_1c7f48q = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, int, - ffi.Pointer)>(); + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); final _objc_msgSend_1co9mn4 = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -12296,22 +12295,14 @@ final _objc_msgSend_1co9mn4 = objc.msgSendPointer .asFunction< bool Function(ffi.Pointer, ffi.Pointer, int)>(); -final _objc_msgSend_1cqd8wl = objc.msgSendPointer +final _objc_msgSend_1cwp428 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSRange, - ffi.Bool)>>() + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<_NSZone>)>>() .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSRange, - bool)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<_NSZone>)>(); final _objc_msgSend_1d9e4oe = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -12330,6 +12321,22 @@ final _objc_msgSend_1deg8x = objc.msgSendPointer .asFunction< int Function(ffi.Pointer, ffi.Pointer, int)>(); +final _objc_msgSend_1dydpdi = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>, + ffi.UnsignedLong)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>, + int)>(); final _objc_msgSend_1e3pm0z = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -12346,14 +12353,6 @@ final _objc_msgSend_1efxbd8 = objc.msgSendPointer .asFunction< int Function( ffi.Pointer, ffi.Pointer)>(); -final _objc_msgSend_1f4qa0h = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Float)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, double)>(); final _objc_msgSend_1fuqfwb = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -12362,40 +12361,36 @@ final _objc_msgSend_1fuqfwb = objc.msgSendPointer .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); -final _objc_msgSend_1ghpoap = objc.msgSendPointer +final _objc_msgSend_1ged0jd = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, + ffi.Bool, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, + bool, ffi.Pointer)>(); -final _objc_msgSend_1gxo8gv = objc.msgSendPointer +final _objc_msgSend_1gypgok = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>() + ffi.UnsignedLong, + ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( + void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); + int, + ffi.Pointer)>(); final _objc_msgSend_1h2q612 = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -12420,40 +12415,22 @@ final _objc_msgSend_1i9r4xy = objc.msgSendPointer .asFunction< void Function(ffi.Pointer, ffi.Pointer, int)>(); -final _objc_msgSend_1ih2cte = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Long)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int)>(); -final _objc_msgSend_1jdvcbf = objc.msgSendPointer +final _objc_msgSend_1j9bhml = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + ffi.Bool Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -final _objc_msgSend_1je1k7e = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( + ffi.Pointer>, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Bool)>>() + ffi.Pointer>)>>() .asFunction< - ffi.Pointer Function( + bool Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - int, - bool)>(); + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer>)>(); final _objc_msgSend_1jtxufi = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -12470,6 +12447,24 @@ final _objc_msgSend_1jwityx = objc.msgSendPointer .asFunction< int Function( ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_1k0ezzm = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); final _objc_msgSend_1k101e3 = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -12478,67 +12473,65 @@ final _objc_msgSend_1k101e3 = objc.msgSendPointer .asFunction< int Function( ffi.Pointer, ffi.Pointer)>(); -final _objc_msgSend_1ko4qka = objc.msgSendPointer +final _objc_msgSend_1k1o1s7 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.UnsignedChar Function(ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSRange)>>() .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -final _objc_msgSend_1kwndnw = objc.msgSendPointer + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSRange)>(); +final _objc_msgSend_1k4kd9s = objc.msgSendPointer .cast< ffi.NativeFunction< - NSRange Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.UnsignedLong)>>() .asFunction< - NSRange Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, int)>(); -final _objc_msgSend_1kwndnwStret = objc.msgSendStretPointer +final _objc_msgSend_1k745tv = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( - ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.UnsignedLong)>>() + ffi.Long)>>() .asFunction< void Function( - ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, int)>(); -final _objc_msgSend_1l3kbc1 = objc.msgSendPointer +final _objc_msgSend_1ko4qka = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Bool)>>() + ffi.UnsignedChar Function(ffi.Pointer, + ffi.Pointer)>>() .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, bool)>(); -final _objc_msgSend_1lqqdvl = objc.msgSendPointer + int Function( + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_1lhpu4m = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer>, - ffi.UnsignedLong)>>() + ffi.Pointer, + ffi.Pointer>)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer>, - int)>(); -final _objc_msgSend_1lqxdg3 = objc.msgSendPointer + ffi.Pointer, + ffi.Pointer>)>(); +final _objc_msgSend_1lsax7n = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function( @@ -12564,30 +12557,94 @@ final _objc_msgSend_1lv8yz3 = objc.msgSendPointer .asFunction< bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int, int)>(); -final _objc_msgSend_1okds6o = objc.msgSendPointer +final _objc_msgSend_1n40f6p = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Long, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool, + ffi.Pointer)>(); +final _objc_msgSend_1njucl2 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedShort)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +final _objc_msgSend_1nmlvqc = objc.msgSendPointer + .cast< + ffi.NativeFunction< + NSRange Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + NSRange)>>() + .asFunction< + NSRange Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + NSRange)>(); +final _objc_msgSend_1nmlvqcStret = objc.msgSendStretPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + NSRange)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + NSRange)>(); +final _objc_msgSend_1nomli1 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, ffi.Pointer>)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, ffi.Pointer>)>(); -final _objc_msgSend_1p4b7x4 = objc.msgSendPointer +final _objc_msgSend_1ozwf6k = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.UnsignedLong Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, + ffi.Double, ffi.Pointer)>>() .asFunction< - int Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + double, + ffi.Pointer)>(); final _objc_msgSend_1p4gbjy = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -12616,14 +12673,32 @@ final _objc_msgSend_1pl9qdv = objc.msgSendPointer .asFunction< void Function( ffi.Pointer, ffi.Pointer)>(); -final _objc_msgSend_1qrcblu = objc.msgSendPointer +final _objc_msgSend_1pnyuds = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>() + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +final _objc_msgSend_1sotr3r = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() .asFunction< ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int)>(); + ffi.Pointer, ffi.Pointer)>(); final _objc_msgSend_1srf6wk = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -12634,7 +12709,15 @@ final _objc_msgSend_1srf6wk = objc.msgSendPointer .asFunction< bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); -final _objc_msgSend_1uj57oj = objc.msgSendPointer +final _objc_msgSend_1t6aok9 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Bool)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, bool)>(); +final _objc_msgSend_1tfztp = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( @@ -12642,16 +12725,44 @@ final _objc_msgSend_1uj57oj = objc.msgSendPointer ffi.Pointer, ffi.UnsignedLong, ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>() + ffi.UnsignedLong)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, int, ffi.Pointer, + int)>(); +final _objc_msgSend_1tiux5i = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer>)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, ffi.Pointer, + int, ffi.Pointer>)>(); +final _objc_msgSend_1tv4uax = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + NSRange, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + NSRange, + ffi.Pointer)>(); final _objc_msgSend_1ukqyt8 = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -12668,64 +12779,106 @@ final _objc_msgSend_1ukqyt8Fpret = objc.msgSendFpretPointer .asFunction< double Function( ffi.Pointer, ffi.Pointer)>(); -final _objc_msgSend_1wlgx7q = objc.msgSendPointer +final _objc_msgSend_1vd1c5m = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.UnsignedLong Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>() + .asFunction< + int Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_1vnlaqg = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Long, + ffi.Pointer>)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, + int, + ffi.Pointer>)>(); +final _objc_msgSend_1vxoo9h = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); -final _objc_msgSend_1wpduvy = objc.msgSendPointer + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); +final _objc_msgSend_1wdb8ji = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Long Function( + ffi.Bool Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer, + ffi.Long)>>() .asFunction< - int Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -final _objc_msgSend_1wrs2o6 = objc.msgSendPointer + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +final _objc_msgSend_1wt9a7r = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, + ffi.UnsignedLong, ffi.Pointer, ffi.Pointer, - ffi.UnsignedLong, - NSRange)>>() + ffi.Pointer>)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, + int, ffi.Pointer, ffi.Pointer, - int, - NSRange)>(); -final _objc_msgSend_1x359cv = objc.msgSendPointer + ffi.Pointer>)>(); +final _objc_msgSend_1x2hskc = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer, ffi.UnsignedLongLong)>>() .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -final _objc_msgSend_1x911p2 = objc.msgSendPointer + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +final _objc_msgSend_1ya1kjn = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Double)>>() + ffi.Pointer, ffi.Int64)>>() .asFunction< ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, double)>(); + ffi.Pointer, int)>(); +final _objc_msgSend_1ym6zyw = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Long Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); final _objc_msgSend_2cgrxl = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -12742,7 +12895,7 @@ final _objc_msgSend_2cgrxlFpret = objc.msgSendFpretPointer .asFunction< double Function( ffi.Pointer, ffi.Pointer)>(); -final _objc_msgSend_2izev6 = objc.msgSendPointer +final _objc_msgSend_2u4jm6 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( @@ -12750,94 +12903,95 @@ final _objc_msgSend_2izev6 = objc.msgSendPointer ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>() + ffi.UnsignedLong, + NSRange)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); -final _objc_msgSend_3ems5q = objc.msgSendPointer + int, + NSRange)>(); +final _objc_msgSend_3cbdpb = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.UnsignedLong, ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>() + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - int, ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); -final _objc_msgSend_3pyzne = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.UnsignedInt Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -final _objc_msgSend_582s3n = objc.msgSendPointer + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +final _objc_msgSend_3ctkt6 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); -final _objc_msgSend_5ty9km = objc.msgSendPointer + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_3l8zum = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Bool Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Long)>>() + ffi.UnsignedLong)>>() .asFunction< - bool Function( + void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, int)>(); -final _objc_msgSend_62nh5j = objc.msgSendPointer +final _objc_msgSend_3nbx5e = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer, + ffi.UnsignedLong)>>() .asFunction< ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -final _objc_msgSend_69e0x1 = objc.msgSendPointer + ffi.Pointer, ffi.Pointer, int)>(); +final _objc_msgSend_3pyzne = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + ffi.UnsignedInt Function(ffi.Pointer, + ffi.Pointer)>>() .asFunction< - bool Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + int Function( + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_56zxyn = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_68x6r1 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Short)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); final _objc_msgSend_6ex6p5 = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -12846,7 +13000,15 @@ final _objc_msgSend_6ex6p5 = objc.msgSendPointer .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); -final _objc_msgSend_6h48uq = objc.msgSendPointer +final _objc_msgSend_6peh6o = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, int)>(); +final _objc_msgSend_6z4k82 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function( @@ -12862,49 +13024,52 @@ final _objc_msgSend_6h48uq = objc.msgSendPointer ffi.Pointer, ffi.Pointer, ffi.Pointer>)>(); -final _objc_msgSend_6peh6o = objc.msgSendPointer +final _objc_msgSend_7g3u2y = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>() + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Long)>>() .asFunction< - bool Function(ffi.Pointer, + ffi.Pointer Function(ffi.Pointer, ffi.Pointer, int)>(); -final _objc_msgSend_7iv28v = objc.msgSendPointer +final _objc_msgSend_7kpg7m = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Bool Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer>, ffi.Pointer, - ffi.Pointer>)>>() + ffi.UnsignedLong)>>() .asFunction< - bool Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer>, ffi.Pointer, - ffi.Pointer>)>(); -final _objc_msgSend_7ukip1 = objc.msgSendPointer + int)>(); +final _objc_msgSend_7uautw = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong)>>() + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedChar)>>() .asFunction< ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int)>(); -final _objc_msgSend_83z673 = objc.msgSendPointer + ffi.Pointer, int)>(); +final _objc_msgSend_8321cp = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSRange)>>() + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer>)>>() .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSRange)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); final _objc_msgSend_898fog = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -12946,30 +13111,6 @@ final _objc_msgSend_8cymbm = objc.msgSendPointer .asFunction< bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int)>(); -final _objc_msgSend_8o14b = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Long)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int)>(); -final _objc_msgSend_91c9gi = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); final _objc_msgSend_91o635 = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -12978,113 +13119,46 @@ final _objc_msgSend_91o635 = objc.msgSendPointer .asFunction< bool Function( ffi.Pointer, ffi.Pointer)>(); -final _objc_msgSend_94cet5 = objc.msgSendPointer +final _objc_msgSend_9b3h4v = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong, - ffi.Pointer>)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); -final _objc_msgSend_94zdgv = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.LongLong)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int)>(); -final _objc_msgSend_98pnic = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLongLong)>>() + ffi.UnsignedLong)>>() .asFunction< ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int)>(); -final _objc_msgSend_a15xhc = objc.msgSendPointer + ffi.Pointer, ffi.Pointer, int, int)>(); +final _objc_msgSend_9x4k8x = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int)>(); -final _objc_msgSend_ackzik = objc.msgSendPointer - .cast< - ffi.NativeFunction< - NSRange Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - NSRange)>>() - .asFunction< - NSRange Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - NSRange)>(); -final _objc_msgSend_ackzikStret = objc.msgSendStretPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - NSRange)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - NSRange)>(); -final _objc_msgSend_blqzg8 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>() - .asFunction< - bool Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); -final _objc_msgSend_bo6ep4 = objc.msgSendPointer + ffi.Pointer, + int)>(); +final _objc_msgSend_bstjp9 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>() + NSRange, + ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); + NSRange, + ffi.Pointer)>(); final _objc_msgSend_c0vg4w = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -13101,30 +13175,22 @@ final _objc_msgSend_c0vg4w = objc.msgSendPointer NSRange, ffi.Pointer, int)>(); -final _objc_msgSend_cfqbni = objc.msgSendPointer +final _objc_msgSend_cfx8ce = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>, - ffi.UnsignedLong)>>() + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>, - int)>(); -final _objc_msgSend_cvzqr9 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Short)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int)>(); + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); final _objc_msgSend_d3i1uy = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -13144,7 +13210,15 @@ final _objc_msgSend_d3i1uyStret = objc.msgSendStretPointer .asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int)>(); -final _objc_msgSend_dcd68g = objc.msgSendPointer +final _objc_msgSend_degb40 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedInt)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +final _objc_msgSend_diypgk = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( @@ -13158,36 +13232,52 @@ final _objc_msgSend_dcd68g = objc.msgSendPointer ffi.Pointer, ffi.Pointer, int)>(); -final _objc_msgSend_dnlotu = objc.msgSendPointer +final _objc_msgSend_djsa9o = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.UnsignedLong)>>() .asFunction< - ffi.Pointer Function( + void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, int)>(); -final _objc_msgSend_eeuxub = objc.msgSendPointer +final _objc_msgSend_dv3z6r = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Long Function( + ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, + ffi.Bool, ffi.UnsignedLong, - NSRange)>>() + ffi.Pointer>)>>() .asFunction< - int Function( + bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, + bool, int, - NSRange)>(); + ffi.Pointer>)>(); +final _objc_msgSend_e9mncn = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); final _objc_msgSend_eh32gn = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -13199,36 +13289,25 @@ final _objc_msgSend_eh32gn = objc.msgSendPointer .asFunction< void Function(ffi.Pointer, ffi.Pointer, NSRange, ffi.Pointer)>(); -final _objc_msgSend_exgdqb = objc.msgSendPointer +final _objc_msgSend_erqryg = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - int)>(); -final _objc_msgSend_fcs5vo = objc.msgSendPointer + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, int)>(); +final _objc_msgSend_et8cuh = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong)>>() + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Float)>>() .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, double)>(); final _objc_msgSend_gerswc = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -13237,28 +13316,66 @@ final _objc_msgSend_gerswc = objc.msgSendPointer .asFunction< bool Function(ffi.Pointer, ffi.Pointer, int)>(); -final _objc_msgSend_hglvhy = objc.msgSendPointer +final _objc_msgSend_gg0462 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + NSRange Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + NSRange, + ffi.Pointer)>>() + .asFunction< + NSRange Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + NSRange, + ffi.Pointer)>(); +final _objc_msgSend_gg0462Stret = objc.msgSendStretPointer .cast< ffi.NativeFunction< ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + NSRange, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + NSRange, + ffi.Pointer)>(); +final _objc_msgSend_gx50so = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong)>>() + ffi.Pointer, + ffi.Pointer)>>() .asFunction< - void Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - int)>(); -final _objc_msgSend_hzlb60 = objc.msgSendPointer + ffi.Pointer, + ffi.Pointer)>(); +final _objc_msgSend_hiwitm = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_NSZone>)>>() + ffi.Pointer, ffi.UnsignedLong, ffi.Bool)>>() .asFunction< ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_NSZone>)>(); + ffi.Pointer, int, bool)>(); final _objc_msgSend_i30zh3 = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -13283,100 +13400,70 @@ final _objc_msgSend_i30zh3 = objc.msgSendPointer int, NSRange, ffi.Pointer)>(); -final _objc_msgSend_i38ton = objc.msgSendPointer +final _objc_msgSend_jsclrq = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.UnsignedLong)>>() + ffi.Bool Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedInt)>>() .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int, int)>(); -final _objc_msgSend_i4hdht = objc.msgSendPointer + bool Function(ffi.Pointer, + ffi.Pointer, int)>(); +final _objc_msgSend_k4j8m3 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Long Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong, - NSRange, - ffi.Pointer)>>() + ffi.UnsignedLong, + ffi.Bool)>>() .asFunction< - int Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, + ffi.Pointer, int, - NSRange, - ffi.Pointer)>(); -final _objc_msgSend_i4ny2p = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - NSRange, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - NSRange, - ffi.Pointer)>(); -final _objc_msgSend_jsclrq = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedInt)>>() - .asFunction< - bool Function(ffi.Pointer, - ffi.Pointer, int)>(); -final _objc_msgSend_kq0sbq = objc.msgSendPointer + int, + bool)>(); +final _objc_msgSend_l9p60w = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + ffi.Bool Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer>)>>() .asFunction< - void Function( + bool Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); -final _objc_msgSend_o2ktnn = objc.msgSendPointer + ffi.Pointer>)>(); +final _objc_msgSend_lh0jh5 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, + ffi.Pointer, ffi.UnsignedLong, ffi.Bool)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - int, + ffi.Pointer, int, bool)>(); -final _objc_msgSend_onx6bi = objc.msgSendPointer +final _objc_msgSend_oa8mke = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedShort)>>() + ffi.Pointer, ffi.Double)>>() .asFunction< ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int)>(); + ffi.Pointer, double)>(); final _objc_msgSend_otx1t4 = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -13411,68 +13498,34 @@ final _objc_msgSend_p4nurx = objc.msgSendPointer .asFunction< bool Function(ffi.Pointer, ffi.Pointer, NSRange)>(); -final _objc_msgSend_p8i56h = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer>)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); -final _objc_msgSend_pdn1fa = objc.msgSendPointer +final _objc_msgSend_pfv6jd = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer>)>>() + ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( + void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - int, - ffi.Pointer>)>(); -final _objc_msgSend_pww1yj = objc.msgSendPointer + ffi.Pointer)>(); +final _objc_msgSend_pg1fnv = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + ffi.Long Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Long)>>() + ffi.UnsignedLong)>>() .asFunction< - void Function( + int Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, int)>(); -final _objc_msgSend_qid8e9 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool, - ffi.Pointer)>(); final _objc_msgSend_qm9f5w = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -13481,58 +13534,48 @@ final _objc_msgSend_qm9f5w = objc.msgSendPointer .asFunction< int Function(ffi.Pointer, ffi.Pointer, NSRange)>(); -final _objc_msgSend_qtxoq7 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); -final _objc_msgSend_r25hnf = objc.msgSendPointer +final _objc_msgSend_qugqlf = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int64)>>() + ffi.Pointer, ffi.Long)>>() .asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, int)>(); -final _objc_msgSend_rqwdif = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -final _objc_msgSend_rsfdlh = objc.msgSendPointer +final _objc_msgSend_rc4ypv = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, + ffi.Long, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, + int, ffi.Pointer)>(); -final _objc_msgSend_rubz6a = objc.msgSendPointer +final _objc_msgSend_s92gih = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong, ffi.Bool)>>() + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, bool)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); final _objc_msgSend_sz90oi = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -13568,97 +13611,56 @@ final _objc_msgSend_uimyc7Stret = objc.msgSendStretPointer .asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, NSRange)>(); -final _objc_msgSend_uzucl8 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedChar)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int)>(); -final _objc_msgSend_vdkl2d = objc.msgSendPointer +final _objc_msgSend_w9bq5x = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Bool Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer>)>>() + NSRange, + ffi.Bool)>>() .asFunction< - bool Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); -final _objc_msgSend_vx1f2d = objc.msgSendPointer + NSRange, + bool)>(); +final _objc_msgSend_xmlz1t = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Char)>>() + ffi.Char Function(ffi.Pointer, + ffi.Pointer)>>() .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int)>(); -final _objc_msgSend_wjvic9 = objc.msgSendPointer + int Function( + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_xrqic1 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + ffi.Long Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() + ffi.UnsignedLong, + NSRange)>>() .asFunction< - void Function( + int Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); -final _objc_msgSend_x4muu7 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - NSRange Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - NSRange Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -final _objc_msgSend_x4muu7Stret = objc.msgSendStretPointer + int, + NSRange)>(); +final _objc_msgSend_xtuoz7 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( - ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< - void Function(ffi.Pointer, ffi.Pointer, + void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); -final _objc_msgSend_xh7c7e = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Double, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - double, - ffi.Pointer)>(); -final _objc_msgSend_xmlz1t = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Char Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); final _objc_msgSend_xw2lbc = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -13667,22 +13669,20 @@ final _objc_msgSend_xw2lbc = objc.msgSendPointer .asFunction< int Function( ffi.Pointer, ffi.Pointer)>(); -final _objc_msgSend_zsd8q9 = objc.msgSendPointer +final _objc_msgSend_zmbtbd = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Bool)>>() + ffi.Pointer>, + ffi.UnsignedLong)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - int, - bool)>(); + ffi.Pointer>, + int)>(); final _objc_msgSend_zuf90e = objc.msgSendPointer .cast< ffi.NativeFunction< diff --git a/pkgs/objective_c/src/objective_c_bindings_generated.m b/pkgs/objective_c/src/objective_c_bindings_generated.m index 1f13d71c3..9857c2230 100644 --- a/pkgs/objective_c/src/objective_c_bindings_generated.m +++ b/pkgs/objective_c/src/objective_c_bindings_generated.m @@ -8,7 +8,6 @@ #error "This file must be compiled with ARC enabled" #endif -id objc_retain(id); id objc_retainBlock(id); @interface _ObjectiveCBindings_BlockDestroyer : NSObject {} @@ -35,20 +34,20 @@ - (void)dealloc { self.dtor(self.dispose_port, self.closure_id); } typedef id (^_BlockType)(void * arg0); __attribute__((visibility("default"))) __attribute__((used)) -id _ObjectiveCBindings_invokeBlock_1yesha9( +id _ObjectiveCBindings_invokeBlock_1mbt9g9( _BlockType block, void * arg0) { return block(arg0); } __attribute__((visibility("default"))) __attribute__((used)) -_BlockType _ObjectiveCBindings_newPointerBlock_1yesha9(id (*trampoline)(id (*)(void * ), void * ), id (*func)(void * )) NS_RETURNS_RETAINED { +_BlockType _ObjectiveCBindings_newPointerBlock_1mbt9g9(id (*trampoline)(id (*)(void * ), void * ), id (*func)(void * )) NS_RETURNS_RETAINED { return ^id (void * arg0) { return trampoline(func, arg0); }; } __attribute__((visibility("default"))) __attribute__((used)) -_BlockType _ObjectiveCBindings_newClosureBlock_1yesha9( +_BlockType _ObjectiveCBindings_newClosureBlock_1mbt9g9( id (*trampoline)(id , int64_t , void * ), int64_t closure_id, int64_t dispose_port, void (*dtor)(int64_t, int64_t)) NS_RETURNS_RETAINED { _ObjectiveCBindings_BlockDestroyer* obj = [_ObjectiveCBindings_BlockDestroyer @@ -175,20 +174,20 @@ _BlockType4 _ObjectiveCBindings_newClosureBlock_e3qsqz( typedef BOOL (^_BlockType5)(void * arg0, id arg1); __attribute__((visibility("default"))) __attribute__((used)) -BOOL _ObjectiveCBindings_invokeBlock_ozkafd( +BOOL _ObjectiveCBindings_invokeBlock_3su7tt( _BlockType5 block, void * arg0, id arg1) { return block(arg0, arg1); } __attribute__((visibility("default"))) __attribute__((used)) -_BlockType5 _ObjectiveCBindings_newPointerBlock_ozkafd(BOOL (*trampoline)(BOOL (*)(void * , id ), void * , id ), BOOL (*func)(void * , id )) NS_RETURNS_RETAINED { +_BlockType5 _ObjectiveCBindings_newPointerBlock_3su7tt(BOOL (*trampoline)(BOOL (*)(void * , id ), void * , id ), BOOL (*func)(void * , id )) NS_RETURNS_RETAINED { return ^BOOL (void * arg0, id arg1) { return trampoline(func, arg0, arg1); }; } __attribute__((visibility("default"))) __attribute__((used)) -_BlockType5 _ObjectiveCBindings_newClosureBlock_ozkafd( +_BlockType5 _ObjectiveCBindings_newClosureBlock_3su7tt( BOOL (*trampoline)(id , int64_t , void * , id ), int64_t closure_id, int64_t dispose_port, void (*dtor)(int64_t, int64_t)) NS_RETURNS_RETAINED { _ObjectiveCBindings_BlockDestroyer* obj = [_ObjectiveCBindings_BlockDestroyer @@ -231,20 +230,20 @@ _BlockType6 _ObjectiveCBindings_newClosureBlock_w1e3k0( typedef void (^_BlockType7)(id arg0, id arg1, id arg2); __attribute__((visibility("default"))) __attribute__((used)) -void _ObjectiveCBindings_invokeBlock_1j2nt86( +void _ObjectiveCBindings_invokeBlock_1b3bb6a( _BlockType7 block, id arg0, id arg1, id arg2) { return block(arg0, arg1, arg2); } __attribute__((visibility("default"))) __attribute__((used)) -_BlockType7 _ObjectiveCBindings_newPointerBlock_1j2nt86(void (*trampoline)(void (*)(id , id , id ), id , id , id ), void (*func)(id , id , id )) NS_RETURNS_RETAINED { +_BlockType7 _ObjectiveCBindings_newPointerBlock_1b3bb6a(void (*trampoline)(void (*)(id , id , id ), id , id , id ), void (*func)(id , id , id )) NS_RETURNS_RETAINED { return ^void (id arg0, id arg1, id arg2) { return trampoline(func, arg0, arg1, arg2); }; } __attribute__((visibility("default"))) __attribute__((used)) -_BlockType7 _ObjectiveCBindings_newClosureBlock_1j2nt86( +_BlockType7 _ObjectiveCBindings_newClosureBlock_1b3bb6a( void (*trampoline)(id , int64_t , id , id , id ), int64_t closure_id, int64_t dispose_port, void (*dtor)(int64_t, int64_t)) NS_RETURNS_RETAINED { _ObjectiveCBindings_BlockDestroyer* obj = [_ObjectiveCBindings_BlockDestroyer @@ -258,7 +257,7 @@ _BlockType7 _ObjectiveCBindings_newClosureBlock_1j2nt86( } __attribute__((visibility("default"))) __attribute__((used)) -_BlockType7 _ObjectiveCBindings_newListenerBlock_1j2nt86( +_BlockType7 _ObjectiveCBindings_newListenerBlock_1b3bb6a( void (*trampoline)(id , int64_t , id , id , id ), int64_t closure_id, int64_t dispose_port, void (*dtor)(int64_t, int64_t)) NS_RETURNS_RETAINED { _ObjectiveCBindings_BlockDestroyer* obj = [_ObjectiveCBindings_BlockDestroyer @@ -266,7 +265,7 @@ _BlockType7 _ObjectiveCBindings_newListenerBlock_1j2nt86( __weak __block _BlockType7 weakBlk; _BlockType7 blk = ^void (id arg0, id arg1, id arg2) { objc_retainBlock(weakBlk); - return trampoline(weakBlk, obj.closure_id, objc_retainBlock(arg0), objc_retain(arg1), objc_retain(arg2)); + return trampoline(weakBlk, obj.closure_id, objc_retainBlock(arg0), (__bridge id)(__bridge_retained void*)(arg1), (__bridge id)(__bridge_retained void*)(arg2)); }; weakBlk = blk; return blk; @@ -274,7 +273,7 @@ _BlockType7 _ObjectiveCBindings_newListenerBlock_1j2nt86( typedef void (^_BlockingTrampoline7)(void * waiter, id arg0, id arg1, id arg2); __attribute__((visibility("default"))) __attribute__((used)) -_BlockType7 _ObjectiveCBindings_newBlockingBlock_1j2nt86( +_BlockType7 _ObjectiveCBindings_newBlockingBlock_1b3bb6a( void (*tramp)(id , int64_t , void * , id , id , id ), void (*listener_tramp)(id , int64_t , void * , id , id , id ), int64_t closure_id, int64_t dispose_port, void (*dtor)(int64_t, int64_t), void* (*newWaiter)(), void (*awaitWaiter)(void*)) NS_RETURNS_RETAINED { @@ -285,10 +284,10 @@ _BlockType7 _ObjectiveCBindings_newBlockingBlock_1j2nt86( _BlockType7 blk = ^void (id arg0, id arg1, id arg2) { objc_retainBlock(weakBlk); if ([NSThread currentThread] == targetThread) { - tramp(weakBlk, obj.closure_id, nil, objc_retainBlock(arg0), objc_retain(arg1), objc_retain(arg2)); + tramp(weakBlk, obj.closure_id, nil, objc_retainBlock(arg0), (__bridge id)(__bridge_retained void*)(arg1), (__bridge id)(__bridge_retained void*)(arg2)); } else { void* waiter = newWaiter(); - listener_tramp(weakBlk, obj.closure_id, waiter, objc_retainBlock(arg0), objc_retain(arg1), objc_retain(arg2)); + listener_tramp(weakBlk, obj.closure_id, waiter, objc_retainBlock(arg0), (__bridge id)(__bridge_retained void*)(arg1), (__bridge id)(__bridge_retained void*)(arg2)); awaitWaiter(waiter); } }; @@ -365,20 +364,20 @@ _BlockType8 _ObjectiveCBindings_newBlockingBlock_ovsamd( typedef void (^_BlockType9)(void * arg0, id arg1); __attribute__((visibility("default"))) __attribute__((used)) -void _ObjectiveCBindings_invokeBlock_wjovn7( +void _ObjectiveCBindings_invokeBlock_18v1jvf( _BlockType9 block, void * arg0, id arg1) { return block(arg0, arg1); } __attribute__((visibility("default"))) __attribute__((used)) -_BlockType9 _ObjectiveCBindings_newPointerBlock_wjovn7(void (*trampoline)(void (*)(void * , id ), void * , id ), void (*func)(void * , id )) NS_RETURNS_RETAINED { +_BlockType9 _ObjectiveCBindings_newPointerBlock_18v1jvf(void (*trampoline)(void (*)(void * , id ), void * , id ), void (*func)(void * , id )) NS_RETURNS_RETAINED { return ^void (void * arg0, id arg1) { return trampoline(func, arg0, arg1); }; } __attribute__((visibility("default"))) __attribute__((used)) -_BlockType9 _ObjectiveCBindings_newClosureBlock_wjovn7( +_BlockType9 _ObjectiveCBindings_newClosureBlock_18v1jvf( void (*trampoline)(id , int64_t , void * , id ), int64_t closure_id, int64_t dispose_port, void (*dtor)(int64_t, int64_t)) NS_RETURNS_RETAINED { _ObjectiveCBindings_BlockDestroyer* obj = [_ObjectiveCBindings_BlockDestroyer @@ -392,7 +391,7 @@ _BlockType9 _ObjectiveCBindings_newClosureBlock_wjovn7( } __attribute__((visibility("default"))) __attribute__((used)) -_BlockType9 _ObjectiveCBindings_newListenerBlock_wjovn7( +_BlockType9 _ObjectiveCBindings_newListenerBlock_18v1jvf( void (*trampoline)(id , int64_t , void * , id ), int64_t closure_id, int64_t dispose_port, void (*dtor)(int64_t, int64_t)) NS_RETURNS_RETAINED { _ObjectiveCBindings_BlockDestroyer* obj = [_ObjectiveCBindings_BlockDestroyer @@ -400,7 +399,7 @@ _BlockType9 _ObjectiveCBindings_newListenerBlock_wjovn7( __weak __block _BlockType9 weakBlk; _BlockType9 blk = ^void (void * arg0, id arg1) { objc_retainBlock(weakBlk); - return trampoline(weakBlk, obj.closure_id, arg0, objc_retain(arg1)); + return trampoline(weakBlk, obj.closure_id, arg0, (__bridge id)(__bridge_retained void*)(arg1)); }; weakBlk = blk; return blk; @@ -408,7 +407,7 @@ _BlockType9 _ObjectiveCBindings_newListenerBlock_wjovn7( typedef void (^_BlockingTrampoline9)(void * waiter, void * arg0, id arg1); __attribute__((visibility("default"))) __attribute__((used)) -_BlockType9 _ObjectiveCBindings_newBlockingBlock_wjovn7( +_BlockType9 _ObjectiveCBindings_newBlockingBlock_18v1jvf( void (*tramp)(id , int64_t , void * , void * , id ), void (*listener_tramp)(id , int64_t , void * , void * , id ), int64_t closure_id, int64_t dispose_port, void (*dtor)(int64_t, int64_t), void* (*newWaiter)(), void (*awaitWaiter)(void*)) NS_RETURNS_RETAINED { @@ -419,10 +418,10 @@ _BlockType9 _ObjectiveCBindings_newBlockingBlock_wjovn7( _BlockType9 blk = ^void (void * arg0, id arg1) { objc_retainBlock(weakBlk); if ([NSThread currentThread] == targetThread) { - tramp(weakBlk, obj.closure_id, nil, arg0, objc_retain(arg1)); + tramp(weakBlk, obj.closure_id, nil, arg0, (__bridge id)(__bridge_retained void*)(arg1)); } else { void* waiter = newWaiter(); - listener_tramp(weakBlk, obj.closure_id, waiter, arg0, objc_retain(arg1)); + listener_tramp(weakBlk, obj.closure_id, waiter, arg0, (__bridge id)(__bridge_retained void*)(arg1)); awaitWaiter(waiter); } }; @@ -432,20 +431,20 @@ _BlockType9 _ObjectiveCBindings_newBlockingBlock_wjovn7( typedef void (^_BlockType10)(void * arg0, id arg1, NSStreamEvent arg2); __attribute__((visibility("default"))) __attribute__((used)) -void _ObjectiveCBindings_invokeBlock_18d6mda( +void _ObjectiveCBindings_invokeBlock_hoampi( _BlockType10 block, void * arg0, id arg1, NSStreamEvent arg2) { return block(arg0, arg1, arg2); } __attribute__((visibility("default"))) __attribute__((used)) -_BlockType10 _ObjectiveCBindings_newPointerBlock_18d6mda(void (*trampoline)(void (*)(void * , id , NSStreamEvent ), void * , id , NSStreamEvent ), void (*func)(void * , id , NSStreamEvent )) NS_RETURNS_RETAINED { +_BlockType10 _ObjectiveCBindings_newPointerBlock_hoampi(void (*trampoline)(void (*)(void * , id , NSStreamEvent ), void * , id , NSStreamEvent ), void (*func)(void * , id , NSStreamEvent )) NS_RETURNS_RETAINED { return ^void (void * arg0, id arg1, NSStreamEvent arg2) { return trampoline(func, arg0, arg1, arg2); }; } __attribute__((visibility("default"))) __attribute__((used)) -_BlockType10 _ObjectiveCBindings_newClosureBlock_18d6mda( +_BlockType10 _ObjectiveCBindings_newClosureBlock_hoampi( void (*trampoline)(id , int64_t , void * , id , NSStreamEvent ), int64_t closure_id, int64_t dispose_port, void (*dtor)(int64_t, int64_t)) NS_RETURNS_RETAINED { _ObjectiveCBindings_BlockDestroyer* obj = [_ObjectiveCBindings_BlockDestroyer @@ -459,7 +458,7 @@ _BlockType10 _ObjectiveCBindings_newClosureBlock_18d6mda( } __attribute__((visibility("default"))) __attribute__((used)) -_BlockType10 _ObjectiveCBindings_newListenerBlock_18d6mda( +_BlockType10 _ObjectiveCBindings_newListenerBlock_hoampi( void (*trampoline)(id , int64_t , void * , id , NSStreamEvent ), int64_t closure_id, int64_t dispose_port, void (*dtor)(int64_t, int64_t)) NS_RETURNS_RETAINED { _ObjectiveCBindings_BlockDestroyer* obj = [_ObjectiveCBindings_BlockDestroyer @@ -467,7 +466,7 @@ _BlockType10 _ObjectiveCBindings_newListenerBlock_18d6mda( __weak __block _BlockType10 weakBlk; _BlockType10 blk = ^void (void * arg0, id arg1, NSStreamEvent arg2) { objc_retainBlock(weakBlk); - return trampoline(weakBlk, obj.closure_id, arg0, objc_retain(arg1), arg2); + return trampoline(weakBlk, obj.closure_id, arg0, (__bridge id)(__bridge_retained void*)(arg1), arg2); }; weakBlk = blk; return blk; @@ -475,7 +474,7 @@ _BlockType10 _ObjectiveCBindings_newListenerBlock_18d6mda( typedef void (^_BlockingTrampoline10)(void * waiter, void * arg0, id arg1, NSStreamEvent arg2); __attribute__((visibility("default"))) __attribute__((used)) -_BlockType10 _ObjectiveCBindings_newBlockingBlock_18d6mda( +_BlockType10 _ObjectiveCBindings_newBlockingBlock_hoampi( void (*tramp)(id , int64_t , void * , void * , id , NSStreamEvent ), void (*listener_tramp)(id , int64_t , void * , void * , id , NSStreamEvent ), int64_t closure_id, int64_t dispose_port, void (*dtor)(int64_t, int64_t), void* (*newWaiter)(), void (*awaitWaiter)(void*)) NS_RETURNS_RETAINED { @@ -486,10 +485,10 @@ _BlockType10 _ObjectiveCBindings_newBlockingBlock_18d6mda( _BlockType10 blk = ^void (void * arg0, id arg1, NSStreamEvent arg2) { objc_retainBlock(weakBlk); if ([NSThread currentThread] == targetThread) { - tramp(weakBlk, obj.closure_id, nil, arg0, objc_retain(arg1), arg2); + tramp(weakBlk, obj.closure_id, nil, arg0, (__bridge id)(__bridge_retained void*)(arg1), arg2); } else { void* waiter = newWaiter(); - listener_tramp(weakBlk, obj.closure_id, waiter, arg0, objc_retain(arg1), arg2); + listener_tramp(weakBlk, obj.closure_id, waiter, arg0, (__bridge id)(__bridge_retained void*)(arg1), arg2); awaitWaiter(waiter); } }; @@ -499,20 +498,20 @@ _BlockType10 _ObjectiveCBindings_newBlockingBlock_18d6mda( typedef void (^_BlockType11)(id arg0, id arg1); __attribute__((visibility("default"))) __attribute__((used)) -void _ObjectiveCBindings_invokeBlock_wjvic9( +void _ObjectiveCBindings_invokeBlock_pfv6jd( _BlockType11 block, id arg0, id arg1) { return block(arg0, arg1); } __attribute__((visibility("default"))) __attribute__((used)) -_BlockType11 _ObjectiveCBindings_newPointerBlock_wjvic9(void (*trampoline)(void (*)(id , id ), id , id ), void (*func)(id , id )) NS_RETURNS_RETAINED { +_BlockType11 _ObjectiveCBindings_newPointerBlock_pfv6jd(void (*trampoline)(void (*)(id , id ), id , id ), void (*func)(id , id )) NS_RETURNS_RETAINED { return ^void (id arg0, id arg1) { return trampoline(func, arg0, arg1); }; } __attribute__((visibility("default"))) __attribute__((used)) -_BlockType11 _ObjectiveCBindings_newClosureBlock_wjvic9( +_BlockType11 _ObjectiveCBindings_newClosureBlock_pfv6jd( void (*trampoline)(id , int64_t , id , id ), int64_t closure_id, int64_t dispose_port, void (*dtor)(int64_t, int64_t)) NS_RETURNS_RETAINED { _ObjectiveCBindings_BlockDestroyer* obj = [_ObjectiveCBindings_BlockDestroyer @@ -526,7 +525,7 @@ _BlockType11 _ObjectiveCBindings_newClosureBlock_wjvic9( } __attribute__((visibility("default"))) __attribute__((used)) -_BlockType11 _ObjectiveCBindings_newListenerBlock_wjvic9( +_BlockType11 _ObjectiveCBindings_newListenerBlock_pfv6jd( void (*trampoline)(id , int64_t , id , id ), int64_t closure_id, int64_t dispose_port, void (*dtor)(int64_t, int64_t)) NS_RETURNS_RETAINED { _ObjectiveCBindings_BlockDestroyer* obj = [_ObjectiveCBindings_BlockDestroyer @@ -534,7 +533,7 @@ _BlockType11 _ObjectiveCBindings_newListenerBlock_wjvic9( __weak __block _BlockType11 weakBlk; _BlockType11 blk = ^void (id arg0, id arg1) { objc_retainBlock(weakBlk); - return trampoline(weakBlk, obj.closure_id, objc_retain(arg0), objc_retain(arg1)); + return trampoline(weakBlk, obj.closure_id, (__bridge id)(__bridge_retained void*)(arg0), (__bridge id)(__bridge_retained void*)(arg1)); }; weakBlk = blk; return blk; @@ -542,7 +541,7 @@ _BlockType11 _ObjectiveCBindings_newListenerBlock_wjvic9( typedef void (^_BlockingTrampoline11)(void * waiter, id arg0, id arg1); __attribute__((visibility("default"))) __attribute__((used)) -_BlockType11 _ObjectiveCBindings_newBlockingBlock_wjvic9( +_BlockType11 _ObjectiveCBindings_newBlockingBlock_pfv6jd( void (*tramp)(id , int64_t , void * , id , id ), void (*listener_tramp)(id , int64_t , void * , id , id ), int64_t closure_id, int64_t dispose_port, void (*dtor)(int64_t, int64_t), void* (*newWaiter)(), void (*awaitWaiter)(void*)) NS_RETURNS_RETAINED { @@ -553,10 +552,10 @@ _BlockType11 _ObjectiveCBindings_newBlockingBlock_wjvic9( _BlockType11 blk = ^void (id arg0, id arg1) { objc_retainBlock(weakBlk); if ([NSThread currentThread] == targetThread) { - tramp(weakBlk, obj.closure_id, nil, objc_retain(arg0), objc_retain(arg1)); + tramp(weakBlk, obj.closure_id, nil, (__bridge id)(__bridge_retained void*)(arg0), (__bridge id)(__bridge_retained void*)(arg1)); } else { void* waiter = newWaiter(); - listener_tramp(weakBlk, obj.closure_id, waiter, objc_retain(arg0), objc_retain(arg1)); + listener_tramp(weakBlk, obj.closure_id, waiter, (__bridge id)(__bridge_retained void*)(arg0), (__bridge id)(__bridge_retained void*)(arg1)); awaitWaiter(waiter); } }; @@ -566,20 +565,20 @@ _BlockType11 _ObjectiveCBindings_newBlockingBlock_wjvic9( typedef id (^_BlockType12)(void * arg0, id arg1); __attribute__((visibility("default"))) __attribute__((used)) -id _ObjectiveCBindings_invokeBlock_1m9h2n( +id _ObjectiveCBindings_invokeBlock_xr62hr( _BlockType12 block, void * arg0, id arg1) NS_RETURNS_RETAINED { return block(arg0, arg1); } __attribute__((visibility("default"))) __attribute__((used)) -_BlockType12 _ObjectiveCBindings_newPointerBlock_1m9h2n(id (*trampoline)(id (*)(void * , id ), void * , id ), id (*func)(void * , id )) NS_RETURNS_RETAINED { +_BlockType12 _ObjectiveCBindings_newPointerBlock_xr62hr(id (*trampoline)(id (*)(void * , id ), void * , id ), id (*func)(void * , id )) NS_RETURNS_RETAINED { return ^id (void * arg0, id arg1) { return trampoline(func, arg0, arg1); }; } __attribute__((visibility("default"))) __attribute__((used)) -_BlockType12 _ObjectiveCBindings_newClosureBlock_1m9h2n( +_BlockType12 _ObjectiveCBindings_newClosureBlock_xr62hr( id (*trampoline)(id , int64_t , void * , id ), int64_t closure_id, int64_t dispose_port, void (*dtor)(int64_t, int64_t)) NS_RETURNS_RETAINED { _ObjectiveCBindings_BlockDestroyer* obj = [_ObjectiveCBindings_BlockDestroyer @@ -594,20 +593,20 @@ _BlockType12 _ObjectiveCBindings_newClosureBlock_1m9h2n( typedef id (^_BlockType13)(void * arg0, id arg1, id arg2, id * arg3); __attribute__((visibility("default"))) __attribute__((used)) -id _ObjectiveCBindings_invokeBlock_e2pkq8( +id _ObjectiveCBindings_invokeBlock_10z9f5k( _BlockType13 block, void * arg0, id arg1, id arg2, id * arg3) { return block(arg0, arg1, arg2, arg3); } __attribute__((visibility("default"))) __attribute__((used)) -_BlockType13 _ObjectiveCBindings_newPointerBlock_e2pkq8(id (*trampoline)(id (*)(void * , id , id , id * ), void * , id , id , id * ), id (*func)(void * , id , id , id * )) NS_RETURNS_RETAINED { +_BlockType13 _ObjectiveCBindings_newPointerBlock_10z9f5k(id (*trampoline)(id (*)(void * , id , id , id * ), void * , id , id , id * ), id (*func)(void * , id , id , id * )) NS_RETURNS_RETAINED { return ^id (void * arg0, id arg1, id arg2, id * arg3) { return trampoline(func, arg0, arg1, arg2, arg3); }; } __attribute__((visibility("default"))) __attribute__((used)) -_BlockType13 _ObjectiveCBindings_newClosureBlock_e2pkq8( +_BlockType13 _ObjectiveCBindings_newClosureBlock_10z9f5k( id (*trampoline)(id , int64_t , void * , id , id , id * ), int64_t closure_id, int64_t dispose_port, void (*dtor)(int64_t, int64_t)) NS_RETURNS_RETAINED { _ObjectiveCBindings_BlockDestroyer* obj = [_ObjectiveCBindings_BlockDestroyer @@ -622,20 +621,20 @@ _BlockType13 _ObjectiveCBindings_newClosureBlock_e2pkq8( typedef id (^_BlockType14)(void * arg0, struct objc_selector * arg1); __attribute__((visibility("default"))) __attribute__((used)) -id _ObjectiveCBindings_invokeBlock_ykn0t6( +id _ObjectiveCBindings_invokeBlock_50as9u( _BlockType14 block, void * arg0, struct objc_selector * arg1) { return block(arg0, arg1); } __attribute__((visibility("default"))) __attribute__((used)) -_BlockType14 _ObjectiveCBindings_newPointerBlock_ykn0t6(id (*trampoline)(id (*)(void * , struct objc_selector * ), void * , struct objc_selector * ), id (*func)(void * , struct objc_selector * )) NS_RETURNS_RETAINED { +_BlockType14 _ObjectiveCBindings_newPointerBlock_50as9u(id (*trampoline)(id (*)(void * , struct objc_selector * ), void * , struct objc_selector * ), id (*func)(void * , struct objc_selector * )) NS_RETURNS_RETAINED { return ^id (void * arg0, struct objc_selector * arg1) { return trampoline(func, arg0, arg1); }; } __attribute__((visibility("default"))) __attribute__((used)) -_BlockType14 _ObjectiveCBindings_newClosureBlock_ykn0t6( +_BlockType14 _ObjectiveCBindings_newClosureBlock_50as9u( id (*trampoline)(id , int64_t , void * , struct objc_selector * ), int64_t closure_id, int64_t dispose_port, void (*dtor)(int64_t, int64_t)) NS_RETURNS_RETAINED { _ObjectiveCBindings_BlockDestroyer* obj = [_ObjectiveCBindings_BlockDestroyer @@ -650,20 +649,20 @@ _BlockType14 _ObjectiveCBindings_newClosureBlock_ykn0t6( typedef id (^_BlockType15)(void * arg0, struct objc_selector * arg1, id arg2); __attribute__((visibility("default"))) __attribute__((used)) -id _ObjectiveCBindings_invokeBlock_1c0c70u( +id _ObjectiveCBindings_invokeBlock_1mllhpc( _BlockType15 block, void * arg0, struct objc_selector * arg1, id arg2) { return block(arg0, arg1, arg2); } __attribute__((visibility("default"))) __attribute__((used)) -_BlockType15 _ObjectiveCBindings_newPointerBlock_1c0c70u(id (*trampoline)(id (*)(void * , struct objc_selector * , id ), void * , struct objc_selector * , id ), id (*func)(void * , struct objc_selector * , id )) NS_RETURNS_RETAINED { +_BlockType15 _ObjectiveCBindings_newPointerBlock_1mllhpc(id (*trampoline)(id (*)(void * , struct objc_selector * , id ), void * , struct objc_selector * , id ), id (*func)(void * , struct objc_selector * , id )) NS_RETURNS_RETAINED { return ^id (void * arg0, struct objc_selector * arg1, id arg2) { return trampoline(func, arg0, arg1, arg2); }; } __attribute__((visibility("default"))) __attribute__((used)) -_BlockType15 _ObjectiveCBindings_newClosureBlock_1c0c70u( +_BlockType15 _ObjectiveCBindings_newClosureBlock_1mllhpc( id (*trampoline)(id , int64_t , void * , struct objc_selector * , id ), int64_t closure_id, int64_t dispose_port, void (*dtor)(int64_t, int64_t)) NS_RETURNS_RETAINED { _ObjectiveCBindings_BlockDestroyer* obj = [_ObjectiveCBindings_BlockDestroyer @@ -678,20 +677,20 @@ _BlockType15 _ObjectiveCBindings_newClosureBlock_1c0c70u( typedef id (^_BlockType16)(void * arg0, struct objc_selector * arg1, id arg2, id arg3); __attribute__((visibility("default"))) __attribute__((used)) -id _ObjectiveCBindings_invokeBlock_u8b97m( +id _ObjectiveCBindings_invokeBlock_c7gk2u( _BlockType16 block, void * arg0, struct objc_selector * arg1, id arg2, id arg3) { return block(arg0, arg1, arg2, arg3); } __attribute__((visibility("default"))) __attribute__((used)) -_BlockType16 _ObjectiveCBindings_newPointerBlock_u8b97m(id (*trampoline)(id (*)(void * , struct objc_selector * , id , id ), void * , struct objc_selector * , id , id ), id (*func)(void * , struct objc_selector * , id , id )) NS_RETURNS_RETAINED { +_BlockType16 _ObjectiveCBindings_newPointerBlock_c7gk2u(id (*trampoline)(id (*)(void * , struct objc_selector * , id , id ), void * , struct objc_selector * , id , id ), id (*func)(void * , struct objc_selector * , id , id )) NS_RETURNS_RETAINED { return ^id (void * arg0, struct objc_selector * arg1, id arg2, id arg3) { return trampoline(func, arg0, arg1, arg2, arg3); }; } __attribute__((visibility("default"))) __attribute__((used)) -_BlockType16 _ObjectiveCBindings_newClosureBlock_u8b97m( +_BlockType16 _ObjectiveCBindings_newClosureBlock_c7gk2u( id (*trampoline)(id , int64_t , void * , struct objc_selector * , id , id ), int64_t closure_id, int64_t dispose_port, void (*dtor)(int64_t, int64_t)) NS_RETURNS_RETAINED { _ObjectiveCBindings_BlockDestroyer* obj = [_ObjectiveCBindings_BlockDestroyer