Commit Graph
374 Commits
Author SHA1 Message Date
gingerBill 70ca5c0936 Validate the names of mnemonics, prefixes, and registers for amd64 2026-08-11 10:44:34 +01:00
gingerBill 3f3e69897a Check for duplicate register pinning 2026-08-10 15:03:17 +01:00
gingerBill ebc21aad72 Fix displacement check 2026-08-10 13:50:15 +01:00
gingerBill cee5bd79e0 Fix pinning logic for asm registers 2026-08-10 12:06:28 +01:00
gingerBill 22f2e2ac78 Try to lower to LLVM IR from Odin's asm template syntax 2026-08-09 23:38:36 +01:00
gingerBill 25ce7e87de Correctly type check asm template parameters 2026-08-09 18:52:57 +01:00
gingerBill 5ac28cdecd Begin work on semantically type checking asm templates 2026-08-09 18:24:56 +01:00
gingerBill 40e54a97ed Merge branch 'master' into bill/bedrock 2026-06-24 11:07:02 +01: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 8ffcdf172a Odin_Calling_Convention defined in compiler; Allow for main :: proc "contextless" () {} with -bedrock; intrinsics.type_proc_calling_convention 2026-05-05 15:07:42 +01:00
gingerBill 942c1bff17 Merge branch 'master' into bill/bedrock 2026-05-05 13:57:14 +01:00
gingerBill b083b980f7 Fix variable based procedure groups 2026-05-05 12:09:27 +01:00
gingerBill 781b71e6ea -disable-init-fini 2026-05-04 11:31:56 +01:00
gingerBill ea00291519 Begin work on -bedrock mode
Currently disables 128-bit integers, `map` type, and RTTI
2026-05-02 15:06:01 +01:00
gingerBill 7b97530443 Add intrinsics.c_var_* 2026-04-28 15:00:53 +01:00
Nikolay Hadzhiev 48e83ad003 gh 6594
prevent compiler crash from self-referential global initialisation
2026-04-22 13:14:08 +02: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 55b3ea7c2d Allow @(deprecated=<string>) on types 2026-03-15 18:58:48 +00:00
gingerBill 8a92ba74fc Make defer_use_checked and where_clauses_evaluated atomic 2026-02-02 10:56:30 +00:00
gingerBill f4a7e0b279 Add @(no_sanitize_thread) 2026-01-15 18:06:25 +00:00
Harold Brenes 3a07a32411 Don't check procedure signature similarity when a foreign import proc is an Objective-C method. 2025-11-07 21:38:34 -05:00
Harold Brenes 9f5bde4a6f Perform type kind check before making use relevant fields in objc_superclass check 2025-10-08 11:38:20 -04:00
gingerBill 810ca89253 Merge pull request #5727 from harold-b/hb.intrinsics.objc_super
Add intrinsics.objc_super and Automatically emit objc_msgSend calls
2025-10-05 20:27:01 +01:00
Harold Brenes a769e341cb Preempt field checking on signature_parameter_similar_enough with a type ptr equality check 2025-09-30 11:50:30 -04:00
gingerBill 4945168e6d Short circuit for #raw_union in signature_parameter_similar_enough 2025-09-30 10:48:05 +01:00
gingerBill 668df4a571 Improve signature_parameter_similar_enough for structs 2025-09-30 10:47:31 +01: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
Harold Brenes 24daa4427c Fix various foreign signatures 2025-09-29 19:58:14 -04:00
gingerBill 8be18d9a40 Allow for constant []typeid 2025-09-28 21:47:56 +01:00
gingerBill 6338e0a8a3 Allow unions with one variant to be constant 2025-09-19 11:56:44 +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 5ea2e1fe60 Minimize mutex usage when in single threaded mode. 2025-09-10 21:41:52 +01:00
gingerBill 992cad101c Minor mutex rearrangement 2025-09-10 21:16:56 +01:00
gingerBill bc36ea4170 Use macro instead of a C++ iterator - for speed
C++ iterators are bad.
2025-09-10 20:11:36 +01:00
gingerBill a36a8722dc Minimize more thread contention 2025-09-10 19:30:32 +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 983f3ec423 Add #+feature global-context
This allows to use of `context` in the global scope on a per file basis.
2025-08-10 15:03:30 +01:00
gingerBill b86932c03c Disallow proc "odin" procedures to be called in the global scope in variable declarations 2025-08-08 12:21:50 +01:00
gingerBill 2561427dd3 Add string16 and cstring16 (UTF-16 based strings) 2025-08-02 11:00:15 +01:00
gingerBill 7057fc8dfc Remove the semantics of #no_copy, keep the grammar 2025-07-30 23:14:29 +01:00
Harold Brenes edc01293b2 Allow objective-c procedures to have their @objc_name attribute inferred.
The `@objc_name` is automatically inferred if it is not specified and
the procedure name is prefixed with type name specified in `@objc_type`,
followed by an `_`. What followed the `_` is interpreted as the `@objc_name`.
2025-07-16 17:14:57 -04:00
Feoramund 3608297e0b Forbid nested declaration of instrumentation procedures
Fixes #3774
2025-06-23 09:11:16 -04:00
Feoramund d343f54d6d Fix spurious failure to compile procedures marked @instrumentation_enter
The type `Source_Code_Location` may not be available yet, which causes
the compiler to not recognize the procedure type correctly.
2025-06-23 09:03:50 -04: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
Harold Brenes be2e4dec7d Resolve other TODOs 2025-05-03 13:06:57 -04:00
Harold Brenes fc082f5ea5 Remove some TODO. Leave important note 2025-05-03 03:21:03 -04:00
Harold Brenes 6d18560ca3 Move unconditionally exporting Objective-C methods to the right location 2025-05-03 03:09:31 -04:00