Commit Graph

279 Commits

Author SHA1 Message Date
gingerBill 236b08cb49 Fix #1356 2022-01-03 12:51:32 +00:00
Joakim Hentula 8255481204 Allow enums to pass #any_int checks 2021-11-25 11:20:40 +00:00
gingerBill 3f038428a7 Begin minimizing Ast size 2021-11-14 15:12:37 +00:00
gingerBill 6646348e1a Increase usage of PtrMap 2021-11-05 17:03:02 +00:00
Jeroen van Rijn dcc5697a48 Fix error message. 2021-11-03 11:01:18 +01:00
gingerBill 141299eb02 Change the behaviour change is for when a bit_set of range/enum and the underlying type has been specified
* If the lower bound is greater than zero, it will become zero (thus removing the compatification)
* If the lower bound is negative, it is an error

This means that an integer value N, maps directly to the N-th bit.

Example
```
foo :: enum u8 {
    a = 2,
    b = 3,
    c = 4,
}

set0: bit_set[foo]
set0 += {.a, .b}
// internally set0 == 1<<(2-2) | 1<<(3-2)

set1: bit_set[foo; u32]
set1 += {.a, .b}
// internally set1 == 1<<(2-0) | 1<<(3-0)
```
2021-10-31 19:39:01 +00:00
gingerBill 306bdf8869 Update alignment rules for matrix types as a compromise to keep zero padding 2021-10-25 00:46:50 +01:00
gingerBill e0b9475378 Allow casting between square matrices of the same element type 2021-10-21 01:14:44 +01:00
gingerBill cee45c1b15 Add hadamard_product 2021-10-20 02:18:30 +01:00
gingerBill 4c655865e5 Begin work on matrix type 2021-10-18 16:52:19 +01:00
gingerBill d386563344 Correct issue with the generated map type internals; Simplify map rehash logic to utilize resize 2021-10-07 21:23:37 +01:00
gingerBill 00671a59a0 Minor code cleanup for backend; add struct_fields_index_by_increasing_offset for future use 2021-10-02 17:22:56 +01:00
gingerBill 71f2289c20 Fix #1174 2021-09-18 15:10:29 +01:00
Jeroen van Rijn 0d12432d3f VS: Fix compilation using VS 2022. 2021-09-16 13:24:20 +02:00
gingerBill 526a42c6ca Remove custom alignment limit 2021-09-13 16:44:01 +01:00
gingerBill be68bf9f26 Only store field_index remove field_src_index (for the time being) 2021-09-13 11:29:46 +01:00
gingerBill 042dbda47f Replace many uses of heap_allocator() with permanent_allocator() 2021-09-13 01:30:30 +01:00
gingerBill 2d7aea79b9 Make TypeStructl.tags a pointer from a slice (reduce memory usage) 2021-09-13 01:23:37 +01:00
gingerBill 71bffd46dc Reduce size of Type 2021-09-13 01:14:17 +01:00
gingerBill f5bc95eb34 More culling 2021-09-13 01:07:24 +01:00
gingerBill fb8fa5217d Begin minimize Type size by replacing Array with Slice etc 2021-09-13 00:58:39 +01:00
gingerBill 6a77fc4cdd Add multi-pointer types [^]T 2021-08-21 23:10:21 +01:00
gingerBill 38841dd46e Fix race condition from add_entity_use due to Entity.identifier 2021-08-19 17:38:18 +01:00
gingerBill 7845769d4b Remove unused code 2021-08-19 15:03:10 +01:00
gingerBill fce86ff3d5 Correct struct tag bug 2021-08-16 18:17:26 +01:00
gingerBill 7bbc9a4634 Add #any_int directive to replace auto_cast uses on parameters. 2021-08-15 12:56:59 +01:00
gingerBill 0e84e06756 Fix lower and upper values for a bit_set[Enum] type. 2021-08-13 14:17:27 +01:00
gingerBill 8ff9f2e44f Fix #1077 2021-08-13 11:49:52 +01:00
gingerBill a5d6fda433 Define which mutexes are blocking and recursive explicitly 2021-07-27 23:14:01 +01:00
gingerBill 116e98b378 Improve default scope size 2021-07-27 10:59:39 +01:00
gingerBill 76707e1d2f Add sanity casts for 32/64 bit correctness 2021-07-12 11:03:12 +01:00
gingerBill 63b572a0ab Clean up big int to LLVM integer code 2021-07-11 16:18:30 +01:00
gingerBill 460e14e586 Change the compiler's big integer library to use libTomMath
This now replaces Bill's crappy big int implementation
2021-07-11 16:08:16 +01:00
gingerBill d9e6ade030 Add experimental support for a threaded semantic checker to -threaded-checker 2021-07-10 23:51:37 +01:00
gingerBill 9f7154a039 Prepare for multithreading the semantic checker by giving mutexes to variables of contention
NOTE(bill): I know this is dodgy, but I want to make sure it is correct logic before improve those data structures
2021-07-10 15:14:25 +01:00
gingerBill 4a932616fc Improve CheckerContext usage 2021-07-10 13:02:13 +01:00
gingerBill d6125f05d4 Correct does_field_type_allow_using 2021-06-29 12:35:15 +01:00
gingerBill e79fb68291 Correct #soa type creation 2021-06-08 11:23:23 +01:00
gingerBill 9491c13a5c Fix #1011 by unifying the logic 2021-06-08 11:09:41 +01:00
gingerBill 4d80f8598d Fix polymorphic record "too few" lacking error message 2021-05-31 20:33:14 +01:00
gingerBill 9c54ed5792 Add range-based error messages to -verbose-errors
Example:
Cannot convert '(1 + 2)' to 'untyped bool' from 'untyped integer'

	x := (1 + 2) * true;
	     ^~~~~~^
2021-05-19 14:15:57 +01:00
gingerBill ce08e832f7 Allow ..= alongside .. as a "full range" operator; Update core:odin/parser etc 2021-05-16 12:34:35 +01:00
gingerBill 7b7081d607 Remove old dead code 2021-05-15 18:59:54 +01:00
gingerBill d4ee1a9e19 Correct default procedure parameter logic 2021-05-13 10:07:28 +01:00
gingerBill 2e5f57d8a1 Fix #741 2021-05-13 00:44:33 +01:00
gingerBill da9cabc334 Fix #682 2021-05-12 23:02:57 +01:00
gingerBill d962cfdc6b Fix #713 2021-05-12 22:38:37 +01:00
gingerBill 278de3a92f Unify AstTernaryExpr with AstTernaryIfExpr
Allow for both syntaxes `x if cond else y` and `cond ? x : y`
Removes the confusing semantics behind `?:` which could be `if` or `when` depending on the context.
2021-05-05 15:22:54 +01:00
gingerBill 1a3784c4df Allow unions which are comparable to also be valid map keys (i.e. hashable) 2021-05-03 13:38:15 +01:00
gingerBill 6383714bff Remove old procedure ABI code 2021-04-25 19:56:46 +01:00