Commit Graph

672 Commits

Author SHA1 Message Date
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
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
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
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
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
gingerBill
3dcc22fa6d Change hashing rules for float-like types to make 0 == -0 2025-04-16 10:52:35 +01:00
gingerBill
fe040d1bbd Propagate @(link_section=<string>) to nested declarations 2025-04-08 11:36:53 +01:00
gingerBill
cd5bef4f61 Rewrite objc SEL/Class register handling code 2025-04-03 09:37:38 +01:00
Laytan Laats
f80e73e036 few llvm 20 changes 2025-03-19 21:22:55 +01:00
gingerBill
4c3c3a0631 Add new LLVM 20 passes 2025-03-18 16:21:08 +00:00
gingerBill
d209af5094 Update to LLVM 20.1.0 2025-03-18 15:39:18 +00:00
gingerBill
d15be94a0f Remove debug print 2025-03-11 15:50:46 +00:00
gingerBill
6e1c21411d Fix object name generation 2025-03-11 15:50:31 +00:00
gingerBill
ee84487106 Merge branch 'master' of https://github.com/odin-lang/Odin 2025-03-01 15:19:51 +00:00
gingerBill
211680569f Fix for -use-single-module 2025-03-01 15:19:46 +00:00
Laytan Laats
66540b75f5 fix hidden linkage applied to foreign symbols 2025-03-01 16:06:32 +01:00
gingerBill
fd6d7d412d Use more predictable object name 2025-02-25 14:55:33 +00:00
gingerBill
83f1c879ec Canonicalize generated procedures (hasher/equal/map) 2025-02-24 15:18:27 +00:00
gingerBill
2c86fadee1 More name canonicalization for globals 2025-02-24 14:28:24 +00:00
gingerBill
f0f395c510 Fix canonicalization 2025-02-24 14:24:06 +00:00
gingerBill
46a8991d0f Canonicalize generated procedures 2025-02-24 14:19:02 +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
4a29d9bb84 Simplify type info table construction 2025-02-17 16:29:42 +00:00
gingerBill
9b26bb2e6a Begin work on hash types 2025-02-17 13:10:38 +00:00
Laytan Laats
1053ec3051 make corrected linkage with -use-separate-modules apply hidden visibility
Fixes #4798

The DLL was using the type info of the host/exe, causing crashes.
This PR tries fixing by applying hidden visibility to these corrected
symbols which makes sure that the DLL can't see the type table of the host/exe.
2025-02-06 20:45:58 +01:00
Laytan Laats
9dc17f4c47 optimize fix 2025-01-24 19:33:57 +01:00
Laytan Laats
b2aaf90f88 fix separate modules with objc code 2025-01-24 19:23:49 +01:00
gingerBill
bca08d3b85 Make -no-dynamic-literals the default now 2025-01-05 13:33:06 +00:00
gingerBill
a25a9e6ebe Check for LLVM_VERSION_MAJOR >= 18 2024-09-09 14:47:44 +01:00
gingerBill
0dddd2b97e Add internal flag
`-internal-fast-isel`
2024-09-09 14:39:53 +01:00
Laytan
ca6ef95b03 add support for linux_riscv64 and freestanding_riscv64 2024-08-20 14:06:40 +02:00
Laytan Laats
4d1d754cae fix specific_union_variant in map_keyed_by_union not converting to union type 2024-07-29 02:32:13 +02:00
gingerBill
bc5b41938e Fix #3964 2024-07-23 02:40:51 +01:00
gingerBill
7d643bcae3 Make linkage weak in certain places 2024-07-15 12:30:32 +01:00
gingerBill
549311fac9 Fix global variables being "missing" with -use-separate-modules 2024-07-15 12:21:42 +01:00
gingerBill
c5decd3eae Fix possible race and correct linkage _after_ generation 2024-07-15 11:49:07 +01:00
gingerBill
a867378418 Default to -o:minimal again 2024-07-14 15:55:26 +01:00
gingerBill
34c6868e78 Merge pull request #3895 from laytan/fix-optimization-mode-attribute
remove misleading @(optimization_mode) values and make "none" inhibit optimizations
2024-07-10 13:22:57 +01:00
gingerBill
87ac68fcf2 Add -internal-cached 2024-07-08 23:39:14 +01:00
Laytan Laats
1a20b78633 remove misleading @(optimization_mode) values and make "none" inhibit optimizations 2024-07-08 21:06:57 +02:00
gingerBill
2c9ef6907a Clean up timings messages showing used module count 2024-07-08 15:30:33 +01:00