Commit Graph
119 Commits
Author SHA1 Message Date
gingerBill e23e01510e Add ExactValue_Rational; Start adding some tests for big rat 2026-09-29 14:17:21 +01:00
gingerBill 0af5fd70ff Correct for finite decimal literals 2026-09-29 12:33:43 +01:00
gingerBill ae63a4a4c6 Fix big integer representation of large numbers such as 98765.0e309 2026-09-29 11:41:50 +01:00
korvahkh 02246ac6fd Implement fixes for constant unions
Note that with this commit, casting through
multiply-nested unions is forbidden, e.g.
```
U :: union {int, V}
V :: union {bool}
x: U = true
```
does not compile.
(Previously the compiler would simply crash)

This is to avoid situations where adding variants
can lead to unexpected changes in the value.

For example if `U` is changed to have a `bool`
variant of its own:
```
U :: union {int, bool, V}
```
Then `x: U = true` would equal
`U(true)` instead of `U(V(true))`.

Single-variant unions are exempt, primarily to
improve the ergonomics of `Maybe` in cases like:
```
x: Maybe(union{int, bool}) = 1
```

Fix #6100
Fix #6699
Fix #6895
Fix #6896
Fix #6897
Fix #7036
Fix #7083
Fix #7091
2026-08-19 20:12:56 -05:00
gingerBill 1f2234a4b2 Merge branch 'master' into bill/inline-asm 2026-08-17 11:44:14 +01:00
kalsprite 617293c5f0 quat/cmplx nan cmp 2026-08-15 20:08:27 -07:00
gingerBill 5ac28cdecd Begin work on semantically type checking asm templates 2026-08-09 18:24:56 +01:00
kalsprite 5393a11ee1 untyped integral float index conversion to int 2026-08-07 14:49:25 -07:00
misomosi c2dfa289f9 Use specific format to make f64 strings canonical 2026-07-04 10:47:06 -04:00
misomosi eb47032840 Add ways to diff anon procs with same signature 2026-07-01 01:49:35 -04:00
gingerBill feb9b6159e Fix pkg.Constant.field union access 2026-06-29 11:06:34 +01:00
gingerBill 55b63099a8 Fix constant x %% y evaluation 2026-06-24 10:35:36 +01:00
gingerBill 417aa0ea9e Remove 0h float panic which will have been caught previously by the tokenizer 2026-06-19 09:08:52 +01:00
gingerBill 1744f57d01 Use permanent_alloc_item directly rather than through the gb_alloc_item generic interface 2026-03-16 16:03:27 +00:00
gingerBill 2bbedda61c Remove unneeded mutex in hash_exact_value 2026-02-02 11:39:57 +00:00
Jeroen van Rijn e0ff16f98c Fix #6126
`ExactValue_Compound` wasn't handled properly.
2026-01-24 10:53:38 +01:00
gingerBill c5a54a0e52 Do naive compound literal comparison for $ parameters to parapoly procedures 2025-12-15 10:41:50 +00:00
Jeroen van Rijn 48a79a6f8c Fix #5789 2025-10-11 14:55:48 +02:00
gingerBill 2561427dd3 Add string16 and cstring16 (UTF-16 based strings) 2025-08-02 11:00:15 +01:00
mtarik34b 1d2adbb3c6 Remove reference to git issue 2025-04-15 05:26:36 +02:00
mtarik34b 313d7d84bc Ensure NaN != any_float_value evaluates to true for constant NaN values 2025-04-15 05:00:36 +02:00
Jeroen van Rijn 843467bb8f Fix #5004
Fixes constant NaN to constant NaN comparisons.
2025-04-05 14:47:30 +02:00
gingerBill e2ba8ff6e6 Fix #4530 2024-12-02 11:23:55 +00:00
Jeroen van Rijn b46b34228e match_exact_value: return when type is compound
fixes #4431
2024-10-29 13:59:11 +01:00
Laytan b0b60fe7ed fix segfault in release builds of the compiler with clang++-18 2024-05-07 16:52:46 +02:00
gingerBill 2b26384b89 Implement dumb PtrMap 2024-04-26 15:04:46 +01:00
Laytan Laats b25e85a8bb check if string could be converted from float 2024-01-17 00:15:24 +01:00
gingerBill 65206fe33e Go through loads of TODOs 2023-08-01 11:39:04 +01:00
gingerBill 349641e95f Fix #2572 2023-06-07 13:08:15 +01:00
gingerBill 1c2301e2f1 Use atof in float_from_string to allow for debug C-like semantic purposes 2023-03-06 19:52:03 +00:00
gingerBill 090e30f07b Make -verbose-errors the default; -terse-errors to disable it 2023-02-22 11:48:10 +00:00
gingerBill 55176e52fc Use heap_allocator() with -debug; Reinstate the arena guards 2023-01-23 11:38:18 +00:00
gingerBill c1f5be24e2 Remove dead code in the compiler 2022-12-18 22:49:10 +00:00
gingerBill 056ba1ed13 Even more gb_internal everywhere 2022-12-18 21:24:45 +00:00
gingerBill ac5f5a33e9 gb_internal a lot 2022-12-18 21:17:07 +00:00
Phil 7a4106077a correct compare_exact_values(x,y) for TypeId and Procedure 2022-12-02 13:13:01 -08:00
gingerBill 3b583cbac7 Add debug symbols for global constants of integers, bools, enums, runes, & pointers.
Variables are namespaced with `pkg::name` or `name` if built-in or the initial package for convenience.
2022-11-02 00:05:51 +00:00
gingerBill 3aea9a7c20 Improve error messages for compile time known bounds checking 2022-09-22 00:30:10 +01:00
Jeroen van Rijn 59f55a2119 Make big_int_from_string return an error if not an integer. 2022-05-03 13:15:49 +02:00
gingerBill 8a9f7fc684 Fix #1713 2022-04-14 15:09:03 +01:00
gingerBill 83f7a887b7 Move comment 2022-02-22 23:03:04 +00:00
gingerBill 62d232d798 Correct ExactValue_Pointer 2022-02-22 22:59:00 +00:00
gingerBill ecdaac9921 Unify are_types_identical_unique_tuples 2022-01-19 15:14:15 +00:00
gingerBill 5ff82fc113 Correct tuple name checking for doc writing 2022-01-19 15:11:42 +00:00
gingerBill 541beb615b Move more things to PtrMap 2021-11-05 17:13:07 +00:00
gingerBill 042dbda47f Replace many uses of heap_allocator() with permanent_allocator() 2021-09-13 01:30:30 +01:00
gingerBill b33bf3f704 Correct race condition and incorrect usage of condition_signal outside of a mutex lock 2021-08-26 22:17:51 +01:00
gingerBill 367bf0c7ae Fix #1076 2021-08-13 10:45:29 +01:00
gingerBill 7f3d4cb504 Remove the literal conversion logic to the parser from the tokenizer 2021-08-02 00:53:45 +01:00
gingerBill be76da2c90 Begin optimizing tokenizer; Replace gb_utf8_decode with utf8_decode (CC but easier to change later) 2021-08-01 23:56:17 +01:00