From 4db6a221a3045d2ba731c093cfcd46dbc6a2eb58 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sun, 8 Dec 2024 22:33:51 +0100 Subject: [PATCH] * added new types `NSUIntegerAtomic` and `NSIntegerAtomic` to facilitate @property code * experimental and *untested* `MulleProxy` class added * added NSAutoreleasePool debugging facility to dump contents into CSV format for postprocessing with sqlite or scripts * method `-[NSThread mulleDetach]` no longer exists! * new NSThread methods `-mulleInitWithObjectFunction:object:` for convenient ownership transfer even when using C functions * improved the teardown code of NSThread and improved the detached case * added various `Instance` functions, where previously `Object` was used exlusively to properly differentiate Class and Instance code * improved and simplified tracing with `MULLE_OBJC_TRACE_ZOMBIE` and `MULLE_OBJC_TRACE_LEAK`, which eliminates the need to use he finer grained variables a lot of times * added `MulleObjCObjectIsInstance` and a host of other introspection functions dealing with Class and Instance distinctions --- .idea/misc.xml | 5 +- .idea/workspace.xml | 111 +++--- CMakeLists.txt | 2 +- RELEASENOTES.md | 13 + cmake/reflect/_Headers.cmake | 1 + cmake/reflect/_Sources.cmake | 1 + src/MulleObjCIntegralType.h | 159 ++++++++ src/MulleObjCVersion.h | 2 +- src/class/MulleDynamicObject.m | 3 +- src/class/MulleObjCAutoreleasePool.h | 3 +- src/class/MulleObject-Private.h | 140 +++++++ src/class/MulleObject.m | 122 +----- src/class/MulleProxy.h | 78 ++++ src/class/MulleProxy.m | 363 ++++++++++++++++++ src/class/NSAutoreleasePool.h | 58 ++- src/class/NSAutoreleasePool.m | 363 ++++++++++++++++-- src/class/NSInvocation.m | 30 +- src/class/NSNull.m | 4 +- src/class/NSObject.m | 12 + src/class/NSProxy.m | 2 +- src/class/NSThread.h | 32 +- src/class/NSThread.m | 253 ++++++++---- src/function/MulleObjCAllocation.h | 40 +- src/function/MulleObjCAllocation.m | 2 + src/function/MulleObjCDebug.m | 3 + src/function/MulleObjCFunctions.h | 40 +- src/function/MulleObjCFunctions.m | 10 +- src/function/MulleObjCHashFunctions.h | 5 +- src/function/MulleObjCIvar.m | 1 + src/function/MulleObjCPrinting.h | 4 + src/function/MulleObjCProperty.m | 6 + src/function/mulle-sprintf-object.h | 5 + src/mulle-objc-atomicid.m | 4 + ...lle-objc-autoreleasepointerarray-private.h | 33 +- src/mulle-objc-threadfoundationinfo.h | 14 +- ...ulle-objc-universefoundationinfo-private.h | 1 + src/mulle-objc-universefoundationinfo.m | 38 +- src/mulle-objc.h | 48 ++- src/protocol/MulleObjCException.m | 2 +- src/protocol/MulleObjCProtocol.m | 12 +- src/protocol/MulleObjCRootObject.m | 13 +- src/protocol/MulleObjCRuntimeObject.h | 4 +- src/protocol/MulleObjCSingleton.m | 5 +- src/protocol/NSCopyingWithAllocator.h | 6 +- src/protocol/NSCopyingWithAllocator.m | 10 +- src/reflect/objc-loader.inc | 1 + test/MulleObject/30-bench/various-calls.m | 3 +- test/NSAutoreleasePool/pooldump-dot.awk | 108 ++++++ test/NSAutoreleasePool/pooldump.m | 105 +++++ test/NSAutoreleasePool/pooldump.sh | 6 + test/NSAutoreleasePool/pooldump.stdout | 7 + test/NSAutoreleasePool/pooldump_script.sql | 28 ++ test/NSThread/cfunction.m | 31 ++ test/NSThread/cfunction.stdout | 3 + test/NSThread/detached.m | 23 +- test/NSThread/detached.stdout | 2 +- test/NSThread/invokedonce.m | 55 +++ test/NSThread/invokedonce.stdout | 1 + test/NSThread/neverinvoked.m | 52 +++ test/NSThread/objectfunction.m | 47 +++ test/NSThread/objectfunction.stdout | 3 + test/TAO/README.md | 10 + test/TAO/backandforth/README.md | 1 + test/TAO/backandforth/TAOStrategyTest.inc | 72 ++++ test/TAO/backandforth/default.stdout | 0 test/TAO/backandforth/performsfinalize.m | 37 ++ test/TAO/backandforth/performsfinalize.stdout | 21 + test/TAO/backandforth/removefromallpools.m | 45 +++ .../backandforth/removefromallpools.stdout | 23 ++ test/TAO/backandforth/removefromcurrent.m | 37 ++ .../TAO/backandforth/removefromcurrent.stdout | 19 + test/TAO/backandforth/removefrompool.stdout | 21 + test/TAO/backandforth/threadsafe.m | 38 ++ test/TAO/backandforth/threadsafe.stdout | 21 + test/TAO/backandforth/threadsafemethods.m | 37 ++ .../TAO/backandforth/threadsafemethods.stdout | 21 + test/TAO/backward/README.md | 1 + test/TAO/backward/TAOStrategyTest2.inc | 87 +++++ test/TAO/backward/performsfinalize.m | 37 ++ test/TAO/backward/performsfinalize.stdout | 12 + test/TAO/backward/removefromallpools.m | 44 +++ test/TAO/backward/removefromallpools.stdout | 15 + test/TAO/backward/removefromcurrent.m | 37 ++ test/TAO/backward/removefromcurrent.stdout | 11 + test/TAO/backward/threadsafe.m | 38 ++ test/TAO/backward/threadsafe.stdout | 12 + test/TAO/backward/threadsafemethods.m | 37 ++ test/TAO/backward/threadsafemethods.stdout | 12 + test/TAO/forward/README.md | 5 + test/TAO/forward/TAOStrategyTest.inc | 270 +++++++++++++ test/TAO/forward/default.stdout | 0 test/TAO/forward/generate-animation.sh | 196 ++++++++++ test/TAO/forward/performsfinalize.m | 37 ++ test/TAO/forward/performsfinalize.stdout | 28 ++ test/TAO/forward/pooldump-dot.awk | 173 +++++++++ test/TAO/forward/removefromallpools.m | 40 ++ test/TAO/forward/removefromallpools.stdout | 26 ++ test/TAO/forward/removefromcurrent.m | 37 ++ test/TAO/forward/removefromcurrent.stdout | 26 ++ test/TAO/forward/removefrompool.stdout | 21 + test/TAO/forward/threadsafe.m | 37 ++ test/TAO/forward/threadsafe.stdout | 28 ++ test/TAO/forward/threadsafemethods.m | 36 ++ test/TAO/forward/threadsafemethods.stdout | 28 ++ 104 files changed, 3881 insertions(+), 391 deletions(-) create mode 100644 src/class/MulleProxy.h create mode 100644 src/class/MulleProxy.m create mode 100755 test/NSAutoreleasePool/pooldump-dot.awk create mode 100644 test/NSAutoreleasePool/pooldump.m create mode 100755 test/NSAutoreleasePool/pooldump.sh create mode 100644 test/NSAutoreleasePool/pooldump.stdout create mode 100644 test/NSAutoreleasePool/pooldump_script.sql create mode 100644 test/NSThread/cfunction.m create mode 100644 test/NSThread/cfunction.stdout create mode 100644 test/NSThread/invokedonce.m create mode 100644 test/NSThread/invokedonce.stdout create mode 100644 test/NSThread/neverinvoked.m create mode 100644 test/NSThread/objectfunction.m create mode 100644 test/NSThread/objectfunction.stdout create mode 100644 test/TAO/README.md create mode 100644 test/TAO/backandforth/README.md create mode 100644 test/TAO/backandforth/TAOStrategyTest.inc create mode 100644 test/TAO/backandforth/default.stdout create mode 100644 test/TAO/backandforth/performsfinalize.m create mode 100644 test/TAO/backandforth/performsfinalize.stdout create mode 100644 test/TAO/backandforth/removefromallpools.m create mode 100644 test/TAO/backandforth/removefromallpools.stdout create mode 100644 test/TAO/backandforth/removefromcurrent.m create mode 100644 test/TAO/backandforth/removefromcurrent.stdout create mode 100644 test/TAO/backandforth/removefrompool.stdout create mode 100644 test/TAO/backandforth/threadsafe.m create mode 100644 test/TAO/backandforth/threadsafe.stdout create mode 100644 test/TAO/backandforth/threadsafemethods.m create mode 100644 test/TAO/backandforth/threadsafemethods.stdout create mode 100644 test/TAO/backward/README.md create mode 100644 test/TAO/backward/TAOStrategyTest2.inc create mode 100644 test/TAO/backward/performsfinalize.m create mode 100644 test/TAO/backward/performsfinalize.stdout create mode 100644 test/TAO/backward/removefromallpools.m create mode 100644 test/TAO/backward/removefromallpools.stdout create mode 100644 test/TAO/backward/removefromcurrent.m create mode 100644 test/TAO/backward/removefromcurrent.stdout create mode 100644 test/TAO/backward/threadsafe.m create mode 100644 test/TAO/backward/threadsafe.stdout create mode 100644 test/TAO/backward/threadsafemethods.m create mode 100644 test/TAO/backward/threadsafemethods.stdout create mode 100644 test/TAO/forward/README.md create mode 100644 test/TAO/forward/TAOStrategyTest.inc create mode 100644 test/TAO/forward/default.stdout create mode 100755 test/TAO/forward/generate-animation.sh create mode 100644 test/TAO/forward/performsfinalize.m create mode 100644 test/TAO/forward/performsfinalize.stdout create mode 100755 test/TAO/forward/pooldump-dot.awk create mode 100644 test/TAO/forward/removefromallpools.m create mode 100644 test/TAO/forward/removefromallpools.stdout create mode 100644 test/TAO/forward/removefromcurrent.m create mode 100644 test/TAO/forward/removefromcurrent.stdout create mode 100644 test/TAO/forward/removefrompool.stdout create mode 100644 test/TAO/forward/threadsafe.m create mode 100644 test/TAO/forward/threadsafe.stdout create mode 100644 test/TAO/forward/threadsafemethods.m create mode 100644 test/TAO/forward/threadsafemethods.stdout diff --git a/.idea/misc.xml b/.idea/misc.xml index 9b6b4d93..da5f1b3c 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,5 +1,8 @@ + + @@ -21,4 +24,4 @@ - + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 4e41158c..db36109b 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -6,6 +6,9 @@ { "useNewFormat": true } + + @@ -13,7 +16,7 @@ - + @@ -25,86 +28,49 @@ - - - - - - - - - + - + - + + - - + - - - + + + + - + - - - - - - - - + + + + + + + - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + +