Commit Graph

832 Commits

Author SHA1 Message Date
gingerBill
70d396c8ad Split type and inline cycles into separate loops 2025-09-10 13:26:07 +01:00
gingerBill
629777b988 Multithread check_update_dependency_tree_for_procedures 2025-09-10 12:42:36 +01:00
smoke-y
5f60e7cdc0 formatting 2025-09-05 21:28:49 +05:30
smoke-y
c01ba41955 fix empty parentheses seg fault 2025-09-05 11:02:01 +05:30
gingerBill
9381040711 Fix parentheses for raddbg expression 2025-08-22 09:32:17 +01:00
gingerBill
46d4f22ef4 Remove debug print 2025-08-22 09:29:44 +01:00
gingerBill
23689d0c01 Improve the raddbg type views generated from fmt-based struct field tags 2025-08-22 09:29:07 +01:00
gingerBill
d5b1fc48fb Add @(raddbg_type_view=<optional-string>)
If no string parameter is provided, then one will be generated from the struct field tags.
The attribute must be applied if the automatic struct field tag approach is to be used.
2025-08-21 17:14:33 +01:00
gingerBill
2648bd8fcd Allow #+feature global-context for @(init) and @(fini) procedures as an interim measure 2025-08-12 09:51:16 +01:00
gingerBill
7642e0a0e0 Require @(init) and @(fini) to be proc "contextless" () 2025-08-08 12:10:01 +01: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
gingerBill
af3184adc9 Change is_utf16 field to encoding and use an enum 2025-08-05 15:12:54 +01:00
gingerBill
eae43f1225 Merge branch 'master' into bill/utf16-strings 2025-08-05 15:07:06 +01:00
gingerBill
7f194080e6 Fix possible race condition with struct offsets 2025-08-05 12:28:18 +01:00
gingerBill
2561427dd3 Add string16 and cstring16 (UTF-16 based strings) 2025-08-02 11:00:15 +01:00
Laytan
d343b93ef2 fix check 2025-08-01 20:31:53 +02: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
0e245fb40f Updated iOS/iPhoneSimulator build support 2025-07-13 20:17:30 -04:00
gingerBill
87247b8bb7 Merge pull request #5286 from Feoramund/no-san-mem
Add `@(no_sanitize_memory)` with additions to `base:sanitizer`
2025-06-09 12:46:22 +01:00
Feoramund
54f018ffc7 Guard against untyped nil in type cycle and type info sections
Fixes #5299
2025-06-08 17:48:01 -04:00
Feoramund
1cd1f9fec4 Add nullptr check in add_type_info_type_internal
Fixes #5215
2025-06-06 09:23:06 -04:00
Feoramund
9c5640886d Add @(no_sanitize_memory) proc attribute with MSan additions to base:sanitizer 2025-06-05 16:06:40 -04:00
Jeroen van Rijn
229c734820 Add comments to builtin.odin, documenting ODIN_* constants. (#5218)
And document constants not previously listed.
2025-05-26 18:58:59 +02:00
Feoramund
b018528833 Do not call disabled deferred procedures 2025-05-19 20:50:43 -04:00
Jeroen van Rijn
7c80df4830 @(init), @(fini) and @(export) procedures are classified as used.
For the purposes of `-vet-unused-procedures`, exported procedures and `@(init)` and `@(fini)` are now disregarded.
2025-05-17 16:22:47 +02:00
gingerBill
92df892f25 Merge pull request #5064 from harold-b/hb/objc-classes
Add support for Objective-C class implementation
2025-05-08 12:58:33 +01: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
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
Lucas Perlind
5c73b4ef58 Add attribute @(no_sanitize_address)
The purposes of this attribute is to let procedures opt-out of being
instrumented with asan. Typically an allocator that includes 'in-band'
meta-data will be accessing poisoned values (such as tlsf).

Making asan work with these allocators becomes very challenging so
just being to ignore asan within specific allocator procedures
makes it easier to reason and removes the need to temporarily
poison and unpoison allocator data.
2025-05-01 20:42:21 +10: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
Jeroen van Rijn
d463aba7d1 Warn if someone imports the same case-folded path twice 2025-04-27 14:32:26 +02: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
a3de9c8de4 Add initial support for Objective-C class implementation 2025-04-20 21:53:46 -04:00
gingerBill
a66ea9bf4a Remove warning on struct field parameters being too big for the stack 2025-04-09 13:23:15 +01:00
gingerBill
e6718fcfcc Very very rudimentary support for -target:linux_arm64 -subtarget:android 2025-03-26 13:09:39 +00:00
gingerBill
55317b0987 Fix #4914 2025-03-06 11:15:27 +00:00
gingerBill
ebda946d61 Move temporary array out of CheckerInfo 2025-02-22 18:12:43 +00:00
gingerBill
5489a88983 Change typeid definition to be based around the canonical type hash
`typeid` used to be a fancy index with extra metadata stored on it. Now it is direct hash of the type.

This is safe to do in practice since any possible collisions are checked at compile time AND the chances of having a 1% collision are around 1 in 600K (see the Birthday Paradox).

Therefore accessing a `^Type_Info` is now a hash table lookup with linear probing. The table is twice the size than necessary so prevent too much probing due to an overly dense hash table.
2025-02-20 14:10:45 +00:00
gingerBill
1d348318f2 Use PtrMap temporarily 2025-02-20 13:23:23 +00:00
gingerBill
0bac34eec8 Number fields within procedures with a depth-first numbering system 2025-02-19 10:59:05 +00:00
gingerBill
19b59461b0 Use TypeSet for DeclInfo deps 2025-02-18 13:31:34 +00:00
gingerBill
721bcf2249 Minor code clean up 2025-02-18 13:24:08 +00:00
gingerBill
d69eb57cfa Fix typos 2025-02-18 13:18:51 +00:00
gingerBill
4a29d9bb84 Simplify type info table construction 2025-02-17 16:29:42 +00:00
gingerBill
b8f057951c Begin work on TypeSet 2025-02-17 13:46:17 +00:00
gingerBill
9b26bb2e6a Begin work on hash types 2025-02-17 13:10:38 +00:00
gingerBill
99d91ccd31 Work on making name mangling deterministic 2025-02-17 11:32:49 +00:00