Commit Graph

345 Commits

Author SHA1 Message Date
gingerBill
e6a62c4bb0 Minor optimization to map_probe_distance 2026-02-03 12:19:20 +00:00
gingerBill
bb7496a2fc Add intrinsics.count_trailing_ones and intrinsics.count_leading_ones 2026-02-02 14:28:16 +00:00
Jeroen van Rijn
b1122284f1 Fix #6197 2026-01-31 10:19:00 +01:00
gingerBill
07d814d9cf Add struct #simple to force a struct to use simple comparison if all of the fields "nearly simply comparable". 2026-01-29 10:49:26 +00:00
gingerBill
7135bbdd67 Rename try_copy_* to write_* 2026-01-28 11:54:17 +00:00
gingerBill
0d8b1481ea Improve try_copy_* logic 2026-01-28 11:53:40 +00:00
gingerBill
117e74cb8b Fix typo in try_copy_caller_location 2026-01-28 11:43:29 +00:00
gingerBill
b85f29d979 Rename to type_assertion_trap_contextless 2026-01-26 18:31:04 +00:00
gingerBill
96f1069e4a Fix type_assertion_check2* for -no-rtti 2026-01-26 18:29:39 +00:00
gingerBill
3586bda6ae Use context.assertion_failure_proc with type assertions when the context is available, otherwise use a trivial trap. 2026-01-26 18:23:29 +00:00
Laytan
792e6c75ee Merge branch 'master' into nbio 2026-01-13 21:29:41 +01:00
Faker-09
9d72025a0b Remove duplicate assingment of array.allocator = allocator in _make_dynamic_array_len_cap(...) (#6095) 2026-01-13 21:25:17 +01:00
Laytan Laats
d1fa640549 runtime: use alloc_non_zeroed in new_clone; zeroing is not needed 2026-01-11 20:21:25 +01:00
Laytan
40267e3a7a Merge pull request #6024 from blob1807/master
[`base:runtime`] fix `print_i64` using an OOB index when `min(i64)` is given.
2025-12-20 21:18:33 +01:00
Sylphrena
205bead9d2 Add @builtin to missing builtin procedure group procs 2025-12-19 15:57:25 +01:00
Laytan
3567c64d7a Fix spacing in RUNTIME_LINKAGE declaration 2025-12-17 22:56:08 +01:00
gingerBill
51438ed0c0 Redefine RUNTIME_LINKAGE when -no-entry-point is set in certain circumstances. 2025-12-17 10:46:43 +00:00
blob1807
cbe164c596 print_i64 fix getting an OOB index
fixes https://github.com/odin-lang/Odin/issues/6018
2025-12-15 21:00:27 +10:00
DuchGhast
1ed1fefc27 Fix default temp allocator under flow bug 2025-12-08 17:30:52 +00:00
Yawning Angel
ea1f1e275d base/runtime: Add chacha8rand as the default RNG 2025-11-29 16:16:52 +09:00
Yawning Angel
e1ba69ea51 base/runtime: Add rand_bytes and HAS_RAND_BYTES
Having the OS/runtime provide a cryptographic entropy source is the
right thing to do, and we need it to initialize the default random
number generator.
2025-11-29 10:45:53 +09:00
gingerBill
d380b0877d Add intrinsics.type_is_superset_of 2025-11-17 10:03:05 +00:00
gingerBill
fc2cb8fb39 Remove #no_copy 2025-11-05 13:44:14 +00:00
gingerBill
593d2e6daa Add #all_or_none 2025-11-05 13:30:40 +00:00
gingerBill
e5153a937b Merge pull request #5859 from odin-lang/bill/change-license
Change Odin's LICENSE to zlib from BSD 3-clause
2025-11-04 13:53:13 +00:00
thetarnav
72754962ab Use resize_soa instead of resize proc group in soa procs 2025-11-02 14:20:55 +01:00
thetarnav
e364e76f7f Add inject_at_soa and append_nothing_soa procedures 2025-11-02 12:13:11 +01:00
gingerBill
da1d599326 Bodge runtime.exit for haiku 2025-10-31 15:19:08 +00:00
Jeroen van Rijn
338733d9ef Remove duplicate import 2025-10-30 17:54:02 +01:00
gingerBill
91a9875077 Correct cast to uintptr 2025-10-30 16:32:26 +00:00
gingerBill
efb553afad Add runtime.exit 2025-10-30 16:29:23 +00:00
gingerBill
074a8d7df5 constant_truncate -> constant_trunc to be consistent with other intrinsics 2025-10-30 09:37:09 +00:00
gingerBill
99520d82fd Add intrinsics.constant_(floor|truncate|ceil|round) 2025-10-30 08:52:21 +00:00
gingerBill
842cfee0f3 Change Odin's LICENSE to zlib from BSD 3-clause
This change was made in order to allow things produced with Odin and using Odin's core library, to not require the LICENSE to also be distributed alongside the binary form.
2025-10-28 14:38:25 +00:00
samwega
45f2822dd0 fix: typo 2025-10-14 19:11:49 +03:00
gingerBill
98dac324e9 Add to intrinsics.odin 2025-10-10 12:13:49 +01:00
gingerBill
0b2c0f785c Add type_is_nearly_simple_compare to intrinsics.odin 2025-10-09 10:06:39 +01:00
gingerBill
7870e6d68b Update intrinsics.odin 2025-10-09 09:56:30 +01:00
gingerBill
20e67f2ad9 Add some more docs 2025-10-07 14:27:19 +01:00
gingerBill
a4a74442ce Add some basic docs to Default_Temp_Allocator 2025-10-07 10:41:52 +01:00
gingerBill
47cfee1f62 Add docs to nil_allocator and panic_allocator 2025-10-07 10:38:50 +01:00
gingerBill
d343afbad5 Improve core_builtin.odin docs 2025-10-07 10:34:48 +01:00
Harold Brenes
2daaf57ad1 Correct signature (missing return value) for objc_msgSendSuper2 2025-09-30 14:16:43 -04: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
9b4c0ea492 Type erase the internals of runtime.copy_* 2025-09-29 15:12:55 +01:00
gingerBill
2baa19f73c Remove unused variable 2025-09-27 10:10:25 +01:00
gingerBill
ac01d1b5bf Add runtime.conditional_mem_zero to improve heap_allocator performance on non-Windows systems 2025-09-27 09:58:28 +01:00
gingerBill
286e3eafe6 Change inlining semantics for some builtin calls 2025-09-25 08:55:03 +01:00
gingerBill
4d2854f561 Merge pull request #5632 from kalsprite/x386
windows i386 support
2025-09-18 22:01:14 +01:00
gingerBill
9cf69576ab More improvements to minimize code gen size 2025-09-18 20:58:24 +01:00