Commit Graph

11 Commits

Author SHA1 Message Date
Zachary Snow 1e6fa7b858 fix looping simplification on unfolded based literals 2021-07-22 12:45:53 -04:00
Zachary Snow eda9a34ad5 add simplification assumption for reversed sized ranges 2021-07-16 16:32:11 -04:00
Zachary Snow 2f860ff220 fix trivial hash collisions
Data.Hashable can produce hashes differing little in their upper bits if
only the last character of the string is changed. Because we were using
the upper bits of the hash in shortHash, this could lead to avoidable
hash collisions. This change includes minor simplification optimizations
which surfaced this collision in the existing struct_ident_scope test.
2021-07-07 20:14:11 -04:00
Zachary Snow 465060ce4f fold concatenations of number literals 2021-02-11 17:36:05 -05:00
Zachary Snow 5c2632982e simplify substitution avoids shadowing 2021-02-07 14:08:19 -05:00
Zachary Snow b8759776ca limited progress on typeof signedness
- ensure concats and repeats stay unsigned
- defer unbased-unsized conversion to enable cast semantics
- disable inaccurate folding of binary operations of based numbers
- fix typeof and size cast binop signedness logic
- fix typeof $unsigned and $signed
- test harness allows production of `integer unsigned`
2021-02-01 10:17:50 -05:00
Zachary Snow d137fd3d68 fix premature elaboration of single element patterns 2020-12-07 16:23:29 -07:00
Zachary Snow 7f0c33ab4e constant fold adjacent adds through association 2020-08-16 14:28:13 -04:00
Zachary Snow 8a8b089a92 assume 0-based sized ranges are non-negative 2020-08-16 13:44:40 -04:00
Zachary Snow b2291a2046 use explicit size for large folded constants 2020-07-12 18:06:37 -06:00
Zachary Snow d88c516d33 enhanced handling of number literals
- number literals are parsed rather than stored as strings
- fix array query functions used on non-trivial number literals
- more efficient expression simplification recursion
- expanded constant folding scenarios
2020-07-12 15:06:27 -06:00