Skip to content

Commit 88e00a3

Browse files
author
Nat!
committed
feat: improve method search and TAO support
* Add TAO (Thread Affine Objects) support to improve thread safety - Add atomic thread pointer in object header - Add checks to ensure objects are accessed from owning thread - Update method calls to support TAO validation * Refactor method lookup and caching - Rename methodcache to impcache for clarity - Add callbacks to impcache for better extensibility - Improve method search tracing - Clean up lookup and refresh functions * Enhance protocol class handling - Run +initialize on adopting classes and subclasses - Support +deinitialize for protocol classes - Fix meta rootclass protocol class wrapping * Other improvements - Add support for double/float tagged pointers - Add noautorelease property attribute - Add dynamic property storage for categories - Remove -release/-retain from fast methods - Fix 32-bit system compatibility
1 parent 03984ba commit 88e00a3

File tree

138 files changed

+5898
-2076
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

138 files changed

+5898
-2076
lines changed

.github/workflows/mulle-sde-ci.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: CI
33
on:
44
push:
55
branches:
6-
- release
6+
- master
77
pull_request:
88
workflow_dispatch:
99

@@ -33,7 +33,7 @@ jobs:
3333
- name: Dump Environment
3434
run: env | sort
3535

36-
- uses: actions/checkout@v3
36+
- uses: actions/checkout@v4
3737

3838
- uses: mulle-sde/github-ci@v1
3939

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,4 @@ coverage*.html
7575
/demo/
7676
cola/wilted/
7777
*.executable
78+
perf.dat

.idea/misc.xml

+4-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/mulle-objc-runtime.iml

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/workspace.xml

+218-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.mulle/share/env/environment-plugin.sh

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.mulle/share/env/include-environment.sh

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.mulle/share/env/tool-plugin

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.mulle/share/env/version

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.mulle/share/sde/version/mulle-c/c-cmake

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.mulle/share/sde/version/mulle-objc/github-actions

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.mulle/share/sde/version/mulle-sde/cmake

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.mulle/share/sde/version/mulle-sde/vscode

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.mulle/share/sde/version/mulle-sde/vscode-clang

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CMakeLists.txt

+8-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
cmake_minimum_required( VERSION 3.14)
22

3-
project( mulle-objc-runtime C)
3+
project( mulle-objc-runtime VERSION 0.24.0 LANGUAGES C)
44

55
### mulle-sde environment
66

77
# add cmake module paths to search path
8-
list( INSERT CMAKE_MODULE_PATH 0 "${PROJECT_SOURCE_DIR}/cmake/share")
9-
list( INSERT CMAKE_MODULE_PATH 0 "${PROJECT_SOURCE_DIR}/cmake/reflect")
10-
list( INSERT CMAKE_MODULE_PATH 0 "${PROJECT_SOURCE_DIR}/cmake")
8+
list( INSERT CMAKE_MODULE_PATH 0 "${CMAKE_CURRENT_SOURCE_DIR}/cmake/share")
9+
list( INSERT CMAKE_MODULE_PATH 0 "${CMAKE_CURRENT_SOURCE_DIR}/cmake/reflect")
10+
list( INSERT CMAKE_MODULE_PATH 0 "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
1111

1212
include( Environment)
1313

@@ -51,6 +51,10 @@ endif()
5151

5252
include( InstallLibrary)
5353

54+
if( LINK_PHASE)
55+
include( InstallCMakeInclude)
56+
include( InstallCMakePackage)
57+
endif()
5458

5559

5660
set( EXECUTABLE_NAME mulle-objc-uniqueid)

README.md

+49-4
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,8 @@ If something is unclear, feel free to contact the author.
124124

125125
## Add
126126

127-
### Add as an individual component
128-
129-
Use [mulle-sde](//github.com/mulle-sde) to add mulle-objc-runtime to your project:
127+
Use [mulle-sde](//github.com/mulle-sde) to add mulle-objc-runtime to your project.
128+
As long as your sources are using `#include "include-private.h"` and your headers use `#include "include.h"`, there will nothing more to do:
130129

131130
``` sh
132131
mulle-sde add github:mulle-objc/mulle-objc-runtime
@@ -135,12 +134,58 @@ mulle-sde add github:mulle-objc/mulle-objc-runtime
135134
To only add the sources of mulle-objc-runtime with dependency
136135
sources use [clib](https://github.com/clibs/clib):
137136

137+
## Legacy adds
138+
139+
One common denominator is that you will likely have to add
140+
`#include <mulle-objc-runtime/mulle-objc-runtime.h>` to your source files.
141+
142+
143+
### Add sources to your project with clib
138144

139145
``` sh
140146
clib install --out src/mulle-objc mulle-objc/mulle-objc-runtime
141147
```
142148

143-
Add `-isystem src/mulle-objc` to your `CFLAGS` and compile all the sources that were downloaded with your project.
149+
Add `-isystem src/mulle-objc` to your `CFLAGS` and compile all the
150+
sources that were downloaded with your project. (In **cmake** add
151+
`include_directories( BEFORE SYSTEM src/mulle-objc)` to your `CMakeLists.txt`
152+
file).
153+
154+
155+
156+
157+
158+
159+
160+
### Add as subproject with cmake and git
161+
162+
``` bash
163+
git submodule add -f --name "mulle-core" \
164+
"https://github.com/mulle-core/mulle-core.git" \
165+
"stash/mulle-core"
166+
git submodule add -f --name "mulle-atinit" \
167+
"https://github.com/mulle-core/mulle-atinit.git" \
168+
"stash/mulle-atinit"
169+
git submodule add -f --name "mulle-atexit" \
170+
"https://github.com/mulle-core/mulle-atexit.git" \
171+
"stash/mulle-atexit"
172+
git submodule add -f --name "mulle-objc-runtime" \
173+
"https://github.com/mulle-objc/mulle-objc-runtime" \
174+
"stash/mulle-objc-runtime"
175+
git submodule update --init --recursive
176+
```
177+
178+
``` cmake
179+
add_subdirectory( stash/mulle-objc-runtime)
180+
add_subdirectory( stash/mulle-atexit)
181+
add_subdirectory( stash/mulle-atinit)
182+
add_subdirectory( stash/mulle-core)
183+
184+
target_link_libraries( ${PROJECT_NAME} PUBLIC mulle-objc-runtime)
185+
target_link_libraries( ${PROJECT_NAME} PUBLIC mulle-atexit)
186+
target_link_libraries( ${PROJECT_NAME} PUBLIC mulle-atinit)
187+
target_link_libraries( ${PROJECT_NAME} PUBLIC mulle-core)
188+
```
144189

145190

146191
## Install

cmake/CCompiler.cmake

+4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)