Commit Graph

251 Commits

Author SHA1 Message Date
A1029384756
b55cf5f8f4 llvm 14 fixed 2025-10-07 22:58:50 -04:00
gingerBill
34d040cef1 Correct format strings 2025-09-29 16:51:38 +01:00
gingerBill
cbab97fbd7 Use memcpy for local constant slice arrays from a global constant 2025-09-28 22:50:36 +01:00
gingerBill
f743110f63 Correct union type checking for constants 2025-09-28 21:00:36 +01:00
gingerBill
ffdfbfe2c2 Begin to support constant array of unions 2025-09-28 20:20:26 +01:00
gingerBill
ad85ec765b More const union improvements 2025-09-24 10:29:32 +01:00
gingerBill
bad495519b Improve const union attemps 2025-09-24 10:08:25 +01:00
gingerBill
31f0aaa62f Try to improve const union LLVM construction 2025-09-24 09:55:22 +01:00
gingerBill
2f132b51ce Add missing gen 2025-09-23 01:23:01 +01:00
gingerBill
f36ade8c64 Remove extra checks 2025-09-19 16:44:57 +01:00
gingerBill
9b8771b475 Handle missing procedures better 2025-09-19 16:15:04 +01:00
gingerBill
655176e5e7 Remove comments of dead code 2025-09-19 15:17:38 +01:00
gingerBill
76705c6800 Convert missing_procedures_to_check to a queue 2025-09-19 14:18:09 +01:00
gingerBill
6bca1475ed Convert procedures_to_generate to a queue 2025-09-19 14:15:25 +01:00
gingerBill
a8b2b1a23b Temporarily revert anonymous procedure load balancing 2025-09-19 13:49:09 +01:00
gingerBill
6338e0a8a3 Allow unions with one variant to be constant 2025-09-19 11:56:44 +01:00
gingerBill
1a4da5cb0f Distribute anonymous procedure literals correctly across LLVM modules 2025-09-19 11:13:18 +01:00
gingerBill
6ce889f4eb Entity * to std::atomic<Entity *> to remove the need for a PtrMap+Mutex 2025-09-19 11:01:41 +01:00
gingerBill
5d14df4112 Multithread lb_module_init 2025-09-18 23:26:11 +01:00
gingerBill
9cf69576ab More improvements to minimize code gen size 2025-09-18 20:58:24 +01:00
gingerBill
5bc9d79f77 Change mutex usage for missing procedures 2025-09-18 16:56:19 +01:00
gingerBill
0f307fbc5d Use multiple modules per file in package runtime 2025-09-18 15:34:19 +01:00
gingerBill
738a72943b Try moving parapoly procs into a separate module when doing weak monomorphization 2025-09-18 15:04:16 +01:00
Jeroen van Rijn
d612f6ec07 Merge pull request #5553 from flysand7/ice-fix
Fix ICE on missing procedure in base:runtime
2025-08-07 18:44:09 +02:00
Sunagatov Denis
46b7abee9f Fix ICE on missing procedure in base:runtime
When a required built-in procedure is missing from the base:runtime
package, an assert should be triggered. However this does not happen
and instead the compiler crashes silently. The cause is the
null-dereference after scope_lookup_current returns nullptr.

This adds an assertion that the runtime procedure is found, before
proceeding to check it's type and performing further lookups.
2025-08-08 03:30:15 +11:00
gingerBill
dca9bf0b0c Fix string16 literal length set in LLVM 2025-08-02 13:11:34 +01:00
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