Commit Graph

236 Commits

Author SHA1 Message Date
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
gingerBill
3954491393 Type erasure to minimize code generation size 2025-09-18 15:54:05 +01:00
Jon Lipstate
57bc45ae30 revert to working build 2025-09-03 22:51:28 -07:00
Jon Lipstate
e0c4c53362 add tls when we have crt 2025-09-03 22:32:33 -07:00
Damian Tarnawski
21fd7c200e Add require_results attr to procs returning an allocator 2025-09-02 13:03:15 +02:00
Jon Lipstate
231ce2da59 windows i386 support 2025-08-29 12:41:38 -07:00
Damian Tarnawski
ce0cf7076c Add missing test attr and don't zero memory when reserve already did 2025-08-26 13:03:26 +02:00
gingerBill
83a78d5d28 Merge branch 'master' into soa-resize-zero-memory 2025-08-26 11:26:15 +01:00
Damian Tarnawski
95cfad67b7 Cleanup soa resize logic—reduce nesting 2025-08-24 15:17:13 +02:00
Damian Tarnawski
66f4c93420 Handle nil old data case 2025-08-24 15:04:19 +02:00
Damian Tarnawski
ac4a89e765 Always use .Resize_Non_Zeroed in _reserve_soa 2025-08-23 17:07:57 +02:00
Damian Tarnawski
2a6dfd2545 Avoid overlap issues when correcting memory after resize in _reserve_soa 2025-08-23 16:55:12 +02:00
Damian Tarnawski
18a2980d26 Zero existing memory when using resize_soa (fixes #5614) 2025-08-23 14:28:25 +02:00
Damian Tarnawski
9d651348b5 Only zero memory when requested 2025-08-23 13:10:19 +02:00
Damian Tarnawski
05706864b7 Support using allocator resize in _reserve_soa (fixes #5615) 2025-08-23 12:55:07 +02:00
blob1807
f90d7029b4 Fix stride in memory_equal/compare_zero giving false positves
The previous stride of 8 assumed `uintptr` size is 8 which isn't the case on 32bit & wasm64p32. Skipping every other set of 4 bytes
2025-08-21 05:19:16 +10:00
Xotchkass
d60fba13df fix: throwing away the last generated byte in default_random_generator_proc 2025-08-14 13:49:59 +03:00
gingerBill
a0ff05e633 Merge pull request #5558 from odin-lang/bill/init-fini-changes
`@(init)` & `@(finit)` Changes.
2025-08-10 12:47:15 +01:00
gingerBill
804984ed35 contextless fixes for js 2025-08-08 13:29:49 +01:00
gingerBill
7642e0a0e0 Require @(init) and @(fini) to be proc "contextless" () 2025-08-08 12:10:01 +01:00
Sunagatov Denis
e6635e2508 Update runtime doc file
This updates and reformats the doc file for the runtime package. The
list of things that need to be implemented for a compiler runtime to
work has been updated in accordance with recent changes to runtime
(notably `cstring16` and `string16` types and `#load_directory`). Some
copy-paste errors around string-comparison procedures have been fixed.

The file has been renamed to `doc.odin` as per convention, the comment
has been moved to the top of the package declaration and the comment is
now markdown-formatted.

Also wrote down a little map to maybe slightly help with understanding
navigation within package runtime's files and added a few more
explanations as to why that list of declarations exists and how to use
it.

The list of declarations has been detailed to some degree, explaining
under what conditions the declarations are required.
2025-08-08 15:34:30 +11:00
Harold Brenes
9d8e15b3af Implementes the block ABI.2010.3.16 natively via the objc_block intrinsic and the Objc_Block builtin type.
See: https://clang.llvm.org/docs/Block-ABI-Apple.html
2025-08-06 20:27:31 -04:00
gingerBill
af3184adc9 Change is_utf16 field to encoding and use an enum 2025-08-05 15:12:54 +01:00
gingerBill
bb4bc316a4 for in string16; Support string16 across core 2025-08-02 12:20:35 +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
Jeroen van Rijn
393e00bec3 Placate linker 2025-07-31 16:40:40 +02:00
Jeroen van Rijn
a41500de28 Merge pull request #5520 from Mecso2/master
fix amd64 no-crt entry assembly
2025-07-31 16:38:21 +02:00
gingerBill
9b8223dd69 Remove use of .no_copy 2025-07-30 23:19:14 +01:00
gingerBill
7057fc8dfc Remove the semantics of #no_copy, keep the grammar 2025-07-30 23:14:29 +01:00
Mecso2
e54bf24746 fix amd64 no-crt entry assembly 2025-07-30 12:44:53 +02:00
gingerBill
98c2425fe0 Merge pull request #5467 from harold-b/hb.ios-subtarget-rename-iphone
Rename `iOS` subtarget to `iPhone`, add `ODIN_PLATFORM_SUBTARGET_IOS`
2025-07-20 13:22:47 +01:00
Harold Brenes
efe4f40974 Fix @objc_implement methods not respecting @objc_is_class_method
Fix incorrect type encoding for objc_class
2025-07-15 23:47:13 -04:00
Harold Brenes
bab4ce11fc Rename iOS subtarget to iPhone for consistency.
Add `ODIN_PLATFORM_SUBTARGET_IOS` builtin constant which evaluated to
`true` when the platform is `Darwin` and the subtarget it either `iPhone` or `iPhoneSimulator`
2025-07-14 21:55:28 -04:00
Harold Brenes
0e245fb40f Updated iOS/iPhoneSimulator build support 2025-07-13 20:17:30 -04:00
Feoramund
efba9a1fb7 Disable usage of AddressSanitizer pending a per-allocator review
It has been discovered that AddressSanitizer does not keep a 1:1 mapping
of which bytes are poisoned and which are not. This can cause issues for
allocations less than 8 bytes and where addresses straddle 8-byte
boundaries.

See the following link for more information:

https://github.com/google/sanitizers/wiki/AddressSanitizerAlgorithm#mapping
2025-06-15 15:06:28 -04:00
Feoramund
61f9fb7232 runtime: Remove unneeded max(0, ...)
`len` never returns negative numbers, so this was an overcautious
expression.
2025-06-13 12:09:10 -04:00
Feoramund
91111937a7 Guard against negative index in inject_at
Fixes #4595
2025-06-04 13:58:06 -04:00
Matteo
56e0da4f14 Add missing return cast in 'memory_prefix_length' on amd64 avx2 2025-06-01 10:53:28 +02:00
Jeroen van Rijn
890e923051 Vectorize strings.prefix_length.
Also add `strings.common_prefix`.
2025-05-31 20:24:21 +02:00
Feoramund
45219f240e Rename SIMD_IS_EMULATED to capability-affirmative HAS_HARDWARE_SIMD 2025-05-29 17:17:51 -04:00
Feoramund
34698288b8 Vectorize runtime.memory_* comparison procedures 2025-05-29 16:29:13 -04:00
Feoramund
827a6f9045 Move simd.IS_EMULATED to runtime.SIMD_IS_EMULATED 2025-05-29 15:12:01 -04:00
Feoramund
b5bc0fdcda Remove commented block of code 2025-05-27 15:25:30 -04:00
Laytan Laats
4d08b76372 require the __asan_unpoison_memory_region runtime symbol so empty projects with asan enabled build 2025-05-09 22:26:49 +02:00