Harold Brenes
9f5bde4a6f
Perform type kind check before making use relevant fields in objc_superclass check
2025-10-08 11:38:20 -04:00
Harold Brenes
e79e53dbbd
Use module-prefixed naming scheme for tracking
...
objc block instead of shared id counter.
2025-10-05 16:14:32 -04:00
Harold Brenes
86f9c920da
Fix Objective-C block symbols naming conflict across modules.
...
Fix assert triggered when there's checker errors and
Objective-C method implementations.
2025-10-05 15:53:42 -04:00
Harold Brenes
2daaf57ad1
Correct signature (missing return value) for objc_msgSendSuper2
2025-09-30 14:16:43 -04:00
Harold Brenes
a769e341cb
Preempt field checking on signature_parameter_similar_enough with a type ptr equality check
2025-09-30 11:50:30 -04:00
Harold Brenes
fc44b10431
Include objc runtime type dependencies only on darwin
2025-09-29 20:38:16 -04:00
Harold Brenes
481deee4ae
Fix entity nullptr check
2025-09-29 20:38:16 -04:00
Harold Brenes
9425954861
Ignore patterns for local development in CMake
2025-09-29 20:38:16 -04:00
Harold Brenes
6d9ace4a2c
Remove outdated todo
2025-09-29 20:38:16 -04:00
Harold Brenes
5af13f5d53
Automatically emit objc_msgSend calls when calling imported or implemented Objective-C methods
...
- Add intrinsics.objc_super()
- Emit objc_msgSendSuper2 calls when an objc method call is combined with objc_super(self)
- Fix objc_block return value ABI for large struct returns
- Fix objc_implement method wrappers bad ABI for large struct returns and indirect args
- Simplify parameter forwarding for objc_imlpement methods
- Add intrinsics.objc_instancetype to mimi Objective-C instancetype* returns
This facilitates returning the correct type on subclasses when calling mehtods
such as `alloc`, `init`, `retain`, etc.
- Refactor Objective-C class implementations generation so that hierarchies are properly initialized
- Better codegen for context passing with ivar-based autocontext
- Allow @superclass on imported objc-c objects
- Better codegen for block forwarding invoker, arguments are forwarded directly
2025-09-29 20:37:48 -04:00
Harold Brenes
0fdac0bd8c
Fix test inet_pton call in test_arpa_inet
2025-09-29 20:29:34 -04:00
Harold Brenes
c23d30f050
Fix printf format
2025-09-29 19:58:28 -04:00
Harold Brenes
24daa4427c
Fix various foreign signatures
2025-09-29 19:58:14 -04:00
Harold Brenes
9d8e15b3af
Implementes the block ABI.2010.3.16 natively via the objc_block intrinsic and the Objc_Block builtin type.
...
See: https://clang.llvm.org/docs/Block-ABI-Apple.html
2025-08-06 20:27:31 -04:00
Harold Brenes
7c917d56e9
Check for invalid subtargets.
...
- Add 'ios' pseudo-subtarget which triggets with either iPhone or iPhoneSimulator subtargets.
- Treat an explicit 'default' subtarget as exclusive only to the default subtarget, not an other platform-compatible subtargets.
- 'generic' continues to resolve to true for any platform-compatible subtarget as it names appears to imply such behavior.
2025-07-20 14:35:06 -04:00
Harold Brenes
edc01293b2
Allow objective-c procedures to have their @objc_name attribute inferred.
...
The `@objc_name` is automatically inferred if it is not specified and
the procedure name is prefixed with type name specified in `@objc_type`,
followed by an `_`. What followed the `_` is interpreted as the `@objc_name`.
2025-07-16 17:14:57 -04:00
Harold Brenes
efe4f40974
Fix @objc_implement methods not respecting @objc_is_class_method
...
Fix incorrect type encoding for objc_class
2025-07-15 23:47:13 -04:00
Harold Brenes
63b9cb18ef
Missing rename in panic string
2025-07-14 22:32:06 -04:00
Harold Brenes
bab4ce11fc
Rename iOS subtarget to iPhone for consistency.
...
Add `ODIN_PLATFORM_SUBTARGET_IOS` builtin constant which evaluated to
`true` when the platform is `Darwin` and the subtarget it either `iPhone` or `iPhoneSimulator`
2025-07-14 21:55:28 -04:00
Harold Brenes
77e5c71414
Fix correct versioned target triplet for iphonesimulator subtarget
...
- Always set the `-m*-version-min` linker flag for non-macOS Darwin subtargets
2025-07-14 14:28:07 -04:00
Harold Brenes
070943aa98
Provide default minimum version for iOS and apply its target triplet.
...
- Fix incorrect clang_path override for iOS during link stage.
2025-07-14 12:59:25 -04:00
Harold Brenes
4d2d890b4c
Fix accidental incorrect assignment
2025-07-13 20:29:54 -04:00
Harold Brenes
0e245fb40f
Updated iOS/iPhoneSimulator build support
2025-07-13 20:17:30 -04:00
Harold Brenes
219b0fe535
Replace system:System.framework imports with system:System
...
This makes the linker work for both macOS and iOS targets
2025-07-13 15:45:21 -04:00
Harold Brenes
9a87611609
Fix leftover poor indentation for objc_ivars MPSCQueue
2025-07-13 15:39:41 -04:00
Harold Brenes
b811414ed1
Use fi.is_dir instead of path_is_directory() when checking if an import is a directory with a .odin extension.
2025-07-13 15:24:53 -04:00
Harold Brenes
14e25c0f2a
Fix lb_get_objc_type_encoding missing matrix and simdvec encodings and minor fixes.
2025-05-05 09:07:50 -04:00
Harold Brenes
be2e4dec7d
Resolve other TODOs
2025-05-03 13:06:57 -04:00
Harold Brenes
fc082f5ea5
Remove some TODO. Leave important note
2025-05-03 03:21:03 -04:00
Harold Brenes
6d18560ca3
Move unconditionally exporting Objective-C methods to the right location
2025-05-03 03:09:31 -04:00
Harold Brenes
cf3830a6a8
Fix checker errors.
2025-05-03 03:09:31 -04:00
Harold Brenes
33d37c72f9
Register all classes unconditionally
2025-05-03 03:09:31 -04:00
Harold Brenes
a00b91577d
Prevent multiple uses of the same Objective-C class name
2025-05-03 03:09:30 -04:00
Harold Brenes
5f0b47c373
Implement all checker specification for Objective-C class implementations and objc_ivar_get intrinsic
2025-05-03 00:59:33 -04:00
Harold Brenes
0746127654
Minor fixes in data type usage and style.
2025-04-30 22:16:53 -04:00
Harold Brenes
1505edef01
Change ivar offsets from u32 to (odin base type) int/native pointer size.
2025-04-30 22:09:33 -04:00
Harold Brenes
dc8692b504
Use correct alignment value for class_addIvar.
2025-04-30 21:52:29 -04:00
Harold Brenes
998ed79738
Go back to objc_ivar_get instead of ivar_get.
2025-04-30 20:43:05 -04:00
Harold Brenes
c2dfc4b749
Cleanup ivar generation for selector expressions.
...
Cleanup ObjC superclass resolution.
2025-04-30 20:32:34 -04:00
Harold Brenes
abfbb2f9ed
Use basic name instead of raw_name for type encoding complex and quats.
2025-04-30 20:32:28 -04:00
Harold Brenes
668a9a89b0
Complete lb_get_objc_type_encoding() implementation
2025-04-30 20:32:14 -04:00
Harold Brenes
5097e98da2
Better Objective-C object superclass cycle check
2025-04-30 20:32:05 -04:00
Harold Brenes
2dc5653fd1
Name fixes
2025-04-30 20:31:54 -04:00
Harold Brenes
89533f49e4
Fix more styling and minor issues
2025-04-27 23:05:17 -04:00
Harold Brenes
f3923ed666
Fix indentations
...
Fix Objective-C wrapper procs not forwarding return value
2025-04-27 22:55:53 -04:00
Harold Brenes
6c9c239a5e
Fix styling issues
2025-04-27 22:55:53 -04:00
Harold Brenes
974a197ce1
Allow the class's ivar to be used as a context provider receiver as well.
2025-04-23 02:06:01 -04:00
Harold Brenes
47abea1229
Add support for Objective-C method implementation with Odin calling convention.
...
Use @objc_context_provider to provide a context for a type.
2025-04-23 02:05:51 -04:00
Harold Brenes
730c844fc6
Fix bug in @encode implementation.
2025-04-23 02:05:43 -04:00
Harold Brenes
53adff38f0
Fixes to Ivar pseudo fields.
2025-04-23 02:05:33 -04:00
Harold Brenes
bca02f81cd
Include the ivar in the Objective-C class unconditionally of it being used or not.
...
Allow pseudo-fields for ivar access.
2025-04-22 19:18:53 -04:00
Harold Brenes
b3b4d501ca
Fix ivar in multi-module mode.
2025-04-21 02:43:16 -04:00
Harold Brenes
a3de9c8de4
Add initial support for Objective-C class implementation
2025-04-20 21:53:46 -04:00
Harold Brenes
040d8b1d48
Fix 2 selectors in NSDictionary
2025-04-17 15:22:10 -04:00
Harold Brenes
c5980ba6c4
Add linux build tag to core/sys/linux/sys.odin
2025-04-02 16:39:25 -04:00
Harold Brenes
6fda041e17
Add ~{memory} clobber to syscall intrinsics for platforms where it was not yet added.
...
This fixes #4972 and #4588 .
As laytan asserts, there is no guarantee that a syscall will not modify memory that it just obtained from the user, or held onto via a previous syscall. Therefore this constraint should be required for all syscalls.
2025-03-26 19:25:06 -04:00
Harold Brenes
794e812932
Fixes crash when unused defines are used in conjunction with -ignore-warnings.
2025-01-15 02:04:49 -05:00
Harold Brenes
2ecf909be0
Fix open() foreign libc signature on Darwin
2024-05-27 11:55:58 -04:00
Harold Brenes
cfd4fc835b
Fix a few darwin libc signatures with incorrect parameters.
2024-05-26 19:40:08 -04:00
Harold Brenes
f1b291ed62
Attempt to automatically resolve the sysroot on build_odin.sh on macOS
2024-05-16 17:53:41 -04:00
Harold Brenes
13b8a5b73d
Reverting to calculated frequency timings method on macOS, but fixed
2024-03-29 05:04:40 -04:00
Harold Brenes
b84a660806
Fix incorrect timings on macOS
2024-03-28 21:09:37 -04:00
Harold Brenes
b543be0d15
Copy file names fromdirent into FileInfo during read_directory
2024-03-11 18:09:41 -04:00