Commit Graph
192 Commits
Author SHA1 Message Date
gingerBill bdb0364739 Remove the missing procedures fallback from the backend: the checker adds the Objective-C runtime procedures the backend calls, local foreign procedures with a duplicate name are bound to the existing declaration, and local procedures passed to a $ parameter are created up front 2026-10-03 22:26:08 +01:00
gingerBill c494c7a503 Check global entity groups in parallel
* CAS-claimed entities, cycle-safe waits for entities and records, lazy entities without lazy_mutex
* Build union type names only on error, take the error block only to report proc group overload errors
2026-10-01 23:17:34 +01:00
gingerBill 73c3a96de1 Make global checking state thread-safe: read-only global scopes, per-group untyped and #soa, deferred link-name checks, fresh contexts for on-demand globals 2026-10-01 21:07:41 +01:00
gingerBill 654b3a8895 asm: Generalize memory operand syntax to a flat term list
Parse `[...]` as `term { (+|-) term }` where each term is `operand [ (*|<<|>>) operand ]`.

This allows for constant-only terms to be folded in-place, especially for things like displacement.

e.g. `[p + 8*32]` means `[p + 256]`.

Term order is also free: `[8 + p]` == `[p + 8]`
2026-09-07 18:39:59 +01:00
gingerBill 94aba2bd6b Support #reserve for asm registers 2026-09-07 14:43:58 +01:00
gingerBill 322f59dae0 Implement a CFG for the assembler to improve the soundness of the checks 2026-08-24 21:49:32 +01:00
gingerBill 3e159a4e10 Add #no_init suffix directive for asm specifications. 2026-08-24 19:10:32 +01:00
gingerBill c3c3aa1533 Add #pure directive for asm templates 2026-08-24 11:46:07 +01:00
gingerBill 75c91feb36 Check for output parameters not used but pinned; Check for templates with observable effects but not marked as #volatile 2026-08-19 12:56:03 +01:00
gingerBill c3b2029f64 Support asm template groups 2026-08-17 19:54:21 +01:00
gingerBill db94c5a6cb Begin work in %flags.zf et al 2026-08-17 12:25:17 +01:00
gingerBill 344e8afa36 #clobber cc -> #clobber flags 2026-08-17 12:10:08 +01:00
gingerBill 1f2234a4b2 Merge branch 'master' into bill/inline-asm 2026-08-17 11:44:14 +01:00
gingerBill cb903df235 #side_effects -> #volatile; Remove dead code 2026-08-13 10:03:00 +01:00
gingerBill c085a46185 Move #side_effects and #align_stack to the specification list 2026-08-12 23:40:57 +01:00
gingerBill 2300a48782 Infer #clobber memory and #clobber cc from the mnemonics directly 2026-08-12 12:45:48 +01:00
gingerBill b9a7ed9942 Add amd64 clobber table to asm_tables_amd64.cpp 2026-08-12 11:33:07 +01:00
gingerBill bef386b1fb Implement asm view-of parameters pred: i64, predb: u8 = pred 2026-08-12 10:33:53 +01:00
gingerBill c717cb4ae9 Implement check_asm_operand_size_class 2026-08-11 13:08:39 +01:00
Franz Hoeltermann a311d8f6df Use enum value init expression instead of numeric value in doc format 2026-08-11 13:51:06 +02:00
gingerBill 22f2e2ac78 Try to lower to LLVM IR from Odin's asm template syntax 2026-08-09 23:38:36 +01:00
gingerBill 5ac28cdecd Begin work on semantically type checking asm templates 2026-08-09 18:24:56 +01:00
Brody 91e0e6ce47 fix: record resolved entity for proc-typed default values 2026-08-04 19:12:08 +10:00
gingerBill a479eb7775 Support @(link_section=<string>) for procedures 2026-06-02 13:09:40 +01:00
gingerBill b0ee0bb635 Add @(fast_math={...}) + intrinsics.Fast_Math_Flags 2026-05-11 11:55:07 +01:00
gingerBill 25c10c18cc Remove tilde backend 2026-03-26 11:49:39 +00:00
gingerBill 46936e0e52 General improvements 2026-03-17 12:55:25 +00:00
gingerBill b19e89578f Improve check_struct_fields performance; use CheckerTypePath free list 2026-03-17 11:42:03 +00:00
gingerBill 04cb889aed Begin interning ScopeMap strings 2026-03-17 11:04:32 +00:00
gingerBill 36d5a19115 Replace Scope.elements to use a custom hash map ScopeMap
This hash map is robin hood based with a inline slot amount for small scopes
2026-03-16 17:41:58 +00:00
gingerBill 1744f57d01 Use permanent_alloc_item directly rather than through the gb_alloc_item generic interface 2026-03-16 16:03:27 +00:00
gingerBill acabae8644 Make Entity.parent_proc_decl atomic 2026-02-02 10:58:25 +00:00
gingerBill 74347f3069 Make Entity.code_gen_* atomic 2026-02-02 10:53:18 +00:00
gingerBill f4a7e0b279 Add @(no_sanitize_thread) 2026-01-15 18:06:25 +00: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
gingerBill 01c10f3f5e Use RecursiveMutex to fix a race condition with parapoly records 2025-09-26 10:18:46 +01:00
gingerBill a36a8722dc Minimize more thread contention 2025-09-10 19:30:32 +01:00
gingerBill 1e0902677f Multithread min dep set by removing the set itself 2025-09-10 17:29:11 +01:00
Feoramund 9c5640886d Add @(no_sanitize_memory) proc attribute with MSan additions to base:sanitizer 2025-06-05 16:06:40 -04: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
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 f3923ed666 Fix indentations
Fix Objective-C wrapper procs not forwarding return value
2025-04-27 22:55:53 -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 a3de9c8de4 Add initial support for Objective-C class implementation 2025-04-20 21:53:46 -04:00
gingerBill 99d91ccd31 Work on making name mangling deterministic 2025-02-17 11:32:49 +00:00
gingerBill 868ab27720 Add @(ignore_duplicates) for foreign import declarations 2025-01-28 10:31:46 +00:00
gingerBill 7b334d2bd9 Add #branch_location 2025-01-01 17:26:15 +00:00
Laytan Laats 603efa860a add '#caller_expression' 2024-09-14 22:13:37 +02:00
gingerBill edc793d7c1 Add #no_capture args: ..T to reuse the backing array stack memory 2024-07-14 11:39:05 +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