Commit Graph

5335 Commits

Author SHA1 Message Date
gingerBill
8214892b5b Merge pull request #4893 from Barinzaya/for-bitset-ctz
Use CTZ in `for in bit_set` codegen
2025-03-04 07:51:09 +00:00
gingerBill
4170e6e6d4 Merge pull request #4900 from Barinzaya/fix-bitset-xor-changes-enum
Fix `~bit_set[Some_Enum]` altering the enum
2025-03-03 11:03:17 +00:00
Barinzaya
ef83f2115a Implemented #reverse for for in bit_set. 2025-03-02 16:24:18 -05:00
Barinzaya
6e3d17d189 Fixed ~ on bit_set[Some_Enum] altering the definition of the enum.
This was occurring for enums whose minimum values were greater than
zero.
2025-03-02 13:29:39 -05:00
gingerBill
ee84487106 Merge branch 'master' of https://github.com/odin-lang/Odin 2025-03-01 15:19:51 +00:00
gingerBill
211680569f Fix for -use-single-module 2025-03-01 15:19:46 +00:00
Laytan Laats
66540b75f5 fix hidden linkage applied to foreign symbols 2025-03-01 16:06:32 +01:00
Barinzaya
36d5e09419 Re-implemented for on bit_sets to use CTZ.
This solution is both faster at run-time and a simpler implementation
than the original solution, which required separate cases for enums and
ranges.
2025-02-28 06:51:14 -05:00
gingerBill
400348c925 Improve global array index to be on a per module basis 2025-02-25 15:06:13 +00:00
gingerBill
92f6d2745b Make lb_add_global_generated_from_procedure not use a global index but local to procedure 2025-02-25 15:01:12 +00:00
gingerBill
46c0910a77 Fix lb_add_global_generated_with_name 2025-02-25 14:59:59 +00:00
gingerBill
fd6d7d412d Use more predictable object name 2025-02-25 14:55:33 +00:00
gingerBill
5aafbc7f30 Use more deterministic module names 2025-02-25 14:35:54 +00:00
gingerBill
f9d85a7311 Try to make globally generated variables deterministic in name 2025-02-25 14:29:14 +00:00
gingerBill
faaa05536f Support -show-timings for odin doc 2025-02-24 17:42:21 +00:00
gingerBill
d0d5cf800e Fix nullptr check 2025-02-24 15:49:49 +00:00
gingerBill
344eb6cb42 Fix name canonicalization for doc writer 2025-02-24 15:44:38 +00:00
gingerBill
f56a0a80d3 Use type hash for doc writer 2025-02-24 15:37:54 +00:00
gingerBill
de70e6faa0 Use more type hashes where possible 2025-02-24 15:33:35 +00:00
gingerBill
83f1c879ec Canonicalize generated procedures (hasher/equal/map) 2025-02-24 15:18:27 +00:00
gingerBill
68731b2b50 Canonicalize global source code locations 2025-02-24 14:36:19 +00:00
gingerBill
2c86fadee1 More name canonicalization for globals 2025-02-24 14:28:24 +00:00
gingerBill
f0f395c510 Fix canonicalization 2025-02-24 14:24:06 +00:00
gingerBill
46a8991d0f Canonicalize generated procedures 2025-02-24 14:19:02 +00:00
gingerBill
533f82da24 Fix #4822 2025-02-24 14:11:47 +00:00
gingerBill
c2cafcbe14 Fix #4819 2025-02-24 14:07:39 +00:00
Barinzaya
4afedbc051 Added simd_extract_lsbs intrinsic as well.
Equivalent to the simd_extract_msbs intrinsic, except it extracts the
least significant bit of each element instead.
2025-02-24 08:49:57 -05:00
Barinzaya
33a3aab791 Added simd_extract_msbs intrinsic. 2025-02-24 08:39:32 -05:00
gingerBill
d23453811d Improve semicolon checking rules when parsing 2025-02-24 13:13:36 +00:00
gingerBill
ebda946d61 Move temporary array out of CheckerInfo 2025-02-22 18:12:43 +00:00
gingerBill
de755f95ec Minor rearrange for parsing field lists 2025-02-22 17:58:14 +00:00
gingerBill
875dbf3140 Disallow syntax: proc(x,:T) 2025-02-22 17:56:42 +00:00
gingerBill
5bd43b94ec Improve error message for matrices with no rows or columns 2025-02-22 17:50:37 +00:00
gingerBill
748a771dad Allow indirection for swizzling on procedure parameters 2025-02-21 12:38:40 +00:00
gingerBill
55e0f945a1 Merge pull request #4860 from odin-lang/bill/typeid_hash_table
Change `typeid` definition to be based around the canonical type hash
2025-02-21 10:21:28 +00:00
Barinzaya
266e84103e Fixed an issue with SIMD vector equality.
Comparing SIMD vectors with `==` was checking that the mask of elements
that matched was not 0, meaning it succeeded if *any* element was equal,
rather than if *all* elements were equal.
2025-02-20 17:05:07 -05:00
gingerBill
bf9f2e43bf Fix typeid size in LLVM 2025-02-20 18:47:41 +00:00
gingerBill
e8c38e7427 Handle any correctly for 32-bit systems 2025-02-20 17:50:56 +00:00
gingerBill
614c0dd740 Fix typeid size for 32-bit platforms 2025-02-20 17:10:04 +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
c25ac939d4 Add cast back 2025-02-20 13:27:18 +00:00
gingerBill
1d348318f2 Use PtrMap temporarily 2025-02-20 13:23:23 +00:00
gingerBill
0ab323012e Use TypeSet instead of PtrSet<Type *> 2025-02-20 11:12:59 +00:00
gingerBill
0946f6b48b Improve name canonicalization for some debuggers 2025-02-20 11:11:22 +00:00
gingerBill
90a973ccf6 Make debug symbols use the new name canonicalization rules 2025-02-20 10:27:59 +00:00
gingerBill
29456bcdea Move docs to the header 2025-02-19 11:12:32 +00:00
gingerBill
0bac34eec8 Number fields within procedures with a depth-first numbering system 2025-02-19 10:59:05 +00:00
gingerBill
827cd45f04 Add to check to fix crash 2025-02-18 17:12:58 +00:00
gingerBill
0482facdda Fix for weird builtin types 2025-02-18 15:26:59 +00:00
gingerBill
e168cea670 Add offset for nested things 2025-02-18 15:17:04 +00:00