39 Commits

Author SHA1 Message Date
gingerBill
593d2e6daa Add #all_or_none 2025-11-05 13:30:40 +00:00
samwega
45f2822dd0 fix: typo 2025-10-14 19:11:49 +03:00
gingerBill
20e67f2ad9 Add some more docs 2025-10-07 14:27:19 +01:00
gingerBill
af3184adc9 Change is_utf16 field to encoding and use an enum 2025-08-05 15:12:54 +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
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
Jeroen van Rijn
bb38775fb1 Remove Type_Info_Tuple 2025-04-13 21:51:57 +02:00
gingerBill
1f814c33dc Support subtargets in build tags: #build darwin:generic and #build linux:android, darwin:ios 2025-04-10 11:36:03 +01:00
gingerBill
21a6648cde Fix #4903 2025-03-03 15:16:50 +00:00
gingerBill
614c0dd740 Fix typeid size for 32-bit platforms 2025-02-20 17:10:04 +00:00
gingerBill
4ece0617bc Keep -vet happy 2025-02-20 14:18:19 +00:00
gingerBill
5489a88983 Change typeid definition to be based around the canonical type hash
`typeid` used to be a fancy index with extra metadata stored on it. Now it is direct hash of the type.

This is safe to do in practice since any possible collisions are checked at compile time AND the chances of having a 1% collision are around 1 in 600K (see the Birthday Paradox).

Therefore accessing a `^Type_Info` is now a hash table lookup with linear probing. The table is twice the size than necessary so prevent too much probing due to an overly dense hash table.
2025-02-20 14:10:45 +00:00
gingerBill
e38a08013e Remove #relative types from the compiler 2024-11-14 16:17:24 +00:00
Karl Zylinski
19f0127e55 Moved all packages in core, base, vendor, tests and examples to use new #+ file tag syntax. 2024-09-14 18:27:49 +02:00
Damian Tarnawski
a10f988020 Move some types to runtime, use reflection instead of lut 2024-08-29 21:12:33 +02:00
gingerBill
78fa675c1a Add assert_contextless, panic_contextless, unimplemented_contextless 2024-08-14 11:18:24 +01:00
Damian Tarnawski
953ae32607 Update builtin constants 2024-07-31 18:55:04 +02:00
Laytan Laats
55e0f97cc4 help fmt with Type_Info_Struct and Type_Info_Bit_Field changes 2024-07-15 18:29:06 +02:00
gingerBill
399c3ab067 Reduce the size of runtime.Type_Info 2024-07-14 21:37:35 +01:00
Jeroen van Rijn
c49afb0039 Add hinstdll forward to runtime globals 2024-07-10 19:58:29 +02:00
gingerBill
318d5e4a7e Add Reset mode 2024-06-15 15:17:23 +01:00
gingerBill
eaec8a2bbf Add runtime.default_random_generator 2024-06-15 15:08:49 +01:00
gingerBill
dc4ec8638c Add runtime.Random_Generator interface 2024-06-15 14:45:57 +01:00
Feoramund
ff7fcb6d38 Add compilation-related constants
`ODIN_VERSION_HASH` is the `git` SHA hash of the commit the Odin
compiler was built with.

`ODIN_MICROARCH_STRING` is the string passed to `-microarch` when
the program was built.

`ODIN_OPTIMIZATION_MODE` is an enum value of which optimization mode was
used to build the program.
2024-06-10 03:47:20 -04:00
Laytan Laats
8455e159f5 improve orca target 2024-06-05 20:57:39 +02:00
Feoramund
97f1d12e04 Add missing Raw_* types for complex and quaternion 2024-06-03 15:41:14 -04:00
Feoramund
4e1dd4ced2 Move Raw_Complex/Quaternion types to base:runtime 2024-06-03 15:40:28 -04:00
Feoramund
fa6e07d976 Make ODIN_OS, ODIN_BUILD_MODE comments congruent to underlying data
Sourced from `src/checker.cpp`.
2024-05-28 01:32:20 -04:00
gingerBill
3095f46d7e Add runtime.Typeid_Bit_Field 2024-05-10 15:50:47 +01:00
Laytan Laats
af6d2480fa add bit_field parsing to core:odin/parser
Also adds it to the core type thingy like it is in the compiler.
2024-04-10 01:01:32 +02:00
gingerBill
a750fc0ba6 Add #row_major matrix[R, C]T
As well as `#column_major matrix[R, C]T` as an alias for just `matrix[R, C]T`.
This is because some libraries require a row_major internal layout but still want to be used with row or major oriented vectors.
2024-03-19 21:05:23 +00:00
gingerBill
51edf01162 Change type info table to be initializable constantly
[]Type_Info -> []^Type_Info
2024-02-27 15:07:55 +00:00
gingerBill
54515af8cc Add field tags to bit_field 2024-02-22 19:41:48 +00:00
gingerBill
a4b8c1ea17 Begin work adding bit_field 2024-02-22 15:55:54 +00:00
gingerBill
5c4485f657 Add #load_directory(path: string) > []runtime.Load_Directory_File 2024-02-09 15:18:29 +00:00
gingerBill
9e7cc8cf93 Remove core:os dependency from base:runtime; change to base:intrinsics 2024-01-28 21:59:43 +00:00
gingerBill
09fa1c29cd Move core:runtime to base:runtime; keep alias around 2024-01-28 21:05:53 +00:00