Commit Graph

225 Commits

Author SHA1 Message Date
gingerBill
620bf162a0 Cache const string16 in LLVM 2025-08-02 12:32:18 +01:00
gingerBill
ae02d3d02d Begin supporting string16 across the core library 2025-08-02 11:55:16 +01:00
gingerBill
2561427dd3 Add string16 and cstring16 (UTF-16 based strings) 2025-08-02 11:00:15 +01:00
Laytan
20318e7a3b concrete types to make llvm 14 happy
Fixes #5463
Fixes #5244
Fixes #5435
2025-08-01 19:27:28 +02:00
Harold Brenes
9a87611609 Fix leftover poor indentation for objc_ivars MPSCQueue 2025-07-13 15:39:41 -04:00
Hayden Gray
f72b2b1530 [source-code-locations] - added options to show, obfuscate, and hide source code locations (#5412) 2025-06-26 22:43:44 +02:00
Laytan Laats
3a86bc9c6d Fix WASM C ABI for raw unions 2025-06-20 22:04:53 +02:00
Laytan Laats
f94fc992d7 fix swizzle in for in statement
Fixes #1730
2025-06-02 20:30:48 +02:00
gingerBill
c383e550f9 Merge branch 'master' into bill/raddebugger-custom-section 2025-05-22 16:04:42 +01:00
Laytan Laats
c35a45e823 fix global and static any
Fixes #4627
2025-05-17 16:49:30 +02:00
Laytan Laats
f9b9e9e7dc some ABI fixups and improvements
Started with trying to enable asan in the CI for MacOS, noticed it wasn't enabled on the `tests/internal`
folder, it came up with a couple of issues with the abi/OdinLLVMBuildTransmute that this also solves.

- Looking at clang output for arm64, we should be promoting `{ i64, i32 }` to `{ i64, i64 }`
- after doing the previous point, I noticed this is not handled well in OdinLLVMBuildTransmute
  which was emitting loads and stores into the space of a value that was alignment, asan does not want this,
  looking at clang output again, a memcpy is the appropriate way of handling this.
- Having done this we don't need the hacky "return is packed" set anymore in the amd64 sysv ABI anymore either
2025-05-09 23:03:17 +02:00
gingerBill
23aff08556 Merge pull request #5117 from bogwi/bug/5024
Bug/5024
2025-05-09 08:35:16 +01: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
gingerBill
ea65a7b870 Move raddbg string stuff to a thread-safe queue 2025-05-07 14:26:10 +01:00
Lucas Perlind
83bc2d3c4a Add asan support for various allocators 2025-05-06 14:55:50 +10:00
bogwi
af0e067a12 CHECK 2 done
Add support for handling generic types in LLVM backend

- Updated `lb_type_internal` to return a pointer type for unspecialized generics.
- Modified `write_type_to_canonical_string` to handle specialized generics without panicking.
- Enhanced `default_type` to return the default type of specialized generics when applicable.
2025-05-05 16:58:14 +09:00
bogwi
ee8aeea381 CHECK 1 done
Fix panic in LLVM backend when using generic procedure with default arguments

- Fixed panic in `llvm_backend_proc.cpp` when using unspecialized polymorphic procedures as defaults.
- Ensured correct type inference when generic procedures are used as default parameters.
2025-05-05 16:50:40 +09: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
a3de9c8de4 Add initial support for Objective-C class implementation 2025-04-20 21:53:46 -04: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
f85db012b8 fix off by one temp cstring and put objc names on permanent allocator to be safe
Fixes #4922
2025-03-21 22:56:19 +01:00
gingerBill
fcee19434e Fix object name generation to previous behaviour 2025-03-06 09:49:30 +00:00
gingerBill
400348c925 Improve global array index to be on a per module basis 2025-02-25 15:06:13 +00:00
gingerBill
92f6d2745b Make lb_add_global_generated_from_procedure not use a global index but local to procedure 2025-02-25 15:01:12 +00:00
gingerBill
46c0910a77 Fix lb_add_global_generated_with_name 2025-02-25 14:59:59 +00:00
gingerBill
fd6d7d412d Use more predictable object name 2025-02-25 14:55:33 +00:00
gingerBill
5aafbc7f30 Use more deterministic module names 2025-02-25 14:35:54 +00:00
gingerBill
f9d85a7311 Try to make globally generated variables deterministic in name 2025-02-25 14:29:14 +00:00
gingerBill
83f1c879ec Canonicalize generated procedures (hasher/equal/map) 2025-02-24 15:18:27 +00:00
gingerBill
f0f395c510 Fix canonicalization 2025-02-24 14:24:06 +00:00
gingerBill
bf9f2e43bf Fix typeid size in LLVM 2025-02-20 18:47:41 +00:00
gingerBill
e8c38e7427 Handle any correctly for 32-bit systems 2025-02-20 17:50:56 +00:00
gingerBill
481745784f Remove debug print 2025-02-18 15:04:02 +00:00
gingerBill
23efd1bd02 Add TypeWriter stream to allow for in-place hashing and string generation 2025-02-18 14:32:41 +00:00
gingerBill
9b26bb2e6a Begin work on hash types 2025-02-17 13:10:38 +00:00
gingerBill
043f9aea61 Clean up rules for name mangling 2025-02-17 12:40:43 +00:00
gingerBill
b5cf776830 Use new name canonicalization approach 2025-02-17 11:48:54 +00:00
gingerBill
99d91ccd31 Work on making name mangling deterministic 2025-02-17 11:32:49 +00:00
Laytan Laats
b77430bea8 -obfuscate-source-code-locations on bounds checks and type assertions 2025-02-05 19:42:20 +01:00
misomosi
fdf510b7b3 Pack struct when needed, use field_align metadata 2024-12-22 10:05:13 -05:00
gingerBill
dd8e6e884c Try to fix #4553 2024-12-05 15:45:01 +00:00
gingerBill
e38a08013e Remove #relative types from the compiler 2024-11-14 16:17:24 +00:00
Laytan Laats
da1e09c95d check packed load and set alignment on all loads, not just lb_emit_load 2024-10-25 15:23:15 +02:00
laytan
50597e8691 fix erronous updating alignment of external global 2024-10-22 17:34:49 +02:00
Laytan
ca6ef95b03 add support for linux_riscv64 and freestanding_riscv64 2024-08-20 14:06:40 +02:00
gingerBill
8e52a52580 Cache the paddding filler type 2024-08-18 18:37:40 +01:00
gingerBill
f49ebae956 Correct lbAddr_SoaVariable logic 2024-08-18 12:37:15 +01:00
gingerBill
1e37eaf54d Begin work for bit_set[...; [N]T] (not working) 2024-07-15 14:49:20 +01:00
gingerBill
5cefab8229 Fix case: in type switch issue 2024-07-15 13:22:50 +01:00