Commit Graph

16130 Commits

Author SHA1 Message Date
Richard Feldman
5de851fe4b
Merge branch 'cstr' into mutual-recursion 2022-06-10 12:17:44 -04:00
Richard Feldman
7b49c29ec8
wip 2022-06-10 00:12:22 -04:00
Richard Feldman
8f49c86698
Add with_excess_capacity test 2022-06-09 22:55:41 -04:00
Richard Feldman
4eb7e0931c
Improve some documentation 2022-06-09 22:41:59 -04:00
Richard Feldman
a668cd67e0
Add a RocBox test and pub use it 2022-06-09 22:25:06 -04:00
Richard Feldman
67bec4828e
Use ManuallyDrop::drop 2022-06-09 22:19:59 -04:00
Richard Feldman
fe5ed634db
Add some reserve() roc_std tests 2022-06-09 22:17:09 -04:00
Richard Feldman
c34db827c3
Fix RocList::reserve 2022-06-09 22:15:07 -04:00
Richard Feldman
058a9dd0e8
Drop some dbg!s 2022-06-09 08:50:47 -04:00
Folkert
d82cd51c51
fix incorrect allocation sizes in roc_str 2022-06-08 22:06:27 +02:00
Richard Feldman
2547d84e75
Drop unnecessary note about refcounts
Turns out this is not actually necessary because Clone
bumps refcount now!
2022-06-08 09:54:55 -04:00
Richard Feldman
4941fa3c37
Drop ManualyDrop from RocBox implementation 2022-06-08 09:54:55 -04:00
Richard Feldman
083603ad09
Use RocList::ptr_to_allocation more consistently 2022-06-08 09:54:55 -04:00
Richard Feldman
7537f4e4c0
Make more human-readable test strings 2022-06-08 09:54:55 -04:00
Richard Feldman
8336f118f6
Add Display impl for RocStr 2022-06-08 09:54:55 -04:00
Folkert
8e67c6a644
no_std decimal formatting 2022-06-08 15:53:39 +02:00
Richard Feldman
5a3ace1ce1
Make RocList::reserve take &mut instead of owned 2022-06-07 14:21:07 -04:00
Richard Feldman
6d259ebd45
Fix some RocList::reserve logic 2022-06-07 14:12:40 -04:00
Richard Feldman
4238e309cd
Fix RocDec::to_str implementation
Made some changes to appease clippy, and they
accidentally caused a regression.
2022-06-07 13:42:00 -04:00
Richard Feldman
091412dc4a
Have to_str_helper return &str 2022-06-07 00:51:47 -04:00
Richard Feldman
534bf35d59
Use Self::alloc_alignment to find allocation pointer
This should avoid problems where the element size is smaller
than the size of the storage (e.g. a list of u8s)
2022-06-07 00:51:47 -04:00
Richard Feldman
96fddac6eb
Improve some documentation and comments 2022-06-07 00:51:47 -04:00
Richard Feldman
4f8cea7c7a
Rename a constant 2022-06-07 00:51:47 -04:00
Richard Feldman
8755a390eb
clippy 2022-06-07 00:51:46 -04:00
Richard Feldman
0117cc8a71
Fix gen_rs tests (only cfg ordering changed) 2022-06-06 21:38:20 -04:00
Richard Feldman
c9e1fceeaf
Fix bug where types were getting built too early 2022-06-06 21:38:20 -04:00
Richard Feldman
e24d6c6517
Use roc_mono::layout more as bindgen source of truth
This also moves the `bindgen` module into `types`
2022-06-06 21:38:18 -04:00
Richard Feldman
7047e6c039
Remove some unnecessary unsafe blocks 2022-06-06 21:38:07 -04:00
Richard Feldman
704d3bba75
Use Layout over Variable for pending recursive vars
The variables are not necessarily the same!
2022-06-06 21:38:07 -04:00
Richard Feldman
34a1d63f83
Calculate size for non-nullable unwrapped unions 2022-06-06 21:38:07 -04:00
Richard Feldman
213a568c00
Add failing mutual recursion bindgen test 2022-06-06 21:38:07 -04:00
Richard Feldman
2c34d5a704
Simplify tag union size calculation 2022-06-06 21:38:06 -04:00
Richard Feldman
27a77070aa
Fix sizing calculation in tag union bindgen 2022-06-06 21:38:06 -04:00
Richard Feldman
6a416b16a0
Give better error message when decrementing refcount too far 2022-06-06 21:38:06 -04:00
Richard Feldman
bacc645799
Don't include discriminant in size for tag count < 2 2022-06-06 21:38:06 -04:00
Richard Feldman
e7f8c9b2a5
Add RocStr::capacity method 2022-06-06 21:38:06 -04:00
Richard Feldman
703594c41f
Use ManuallyDrop::drop 2022-06-06 21:38:06 -04:00
Richard Feldman
b2bba15f6a
Bindgen repr(transparent) when appropriate 2022-06-06 21:38:05 -04:00
Richard Feldman
acc542053f
Add Hash impl for RocList 2022-06-06 21:38:05 -04:00
Richard Feldman
6b46ac7797
Use Hash from core over std in roc_std 2022-06-06 21:38:05 -04:00
Richard Feldman
872bceabe4
Drop obsolete UnicodeCodePoint trait 2022-06-06 20:23:22 -04:00
Richard Feldman
d20d337dd2
Make nul terminator code work with any terminator
This is specifically useful for newline termination
2022-06-06 20:23:22 -04:00
Richard Feldman
8e28eea4ae
Panic if allocation failed 2022-06-06 20:23:21 -04:00
Richard Feldman
7d2e0d9192
Use NonNull more to verify that (re)allocations succeeded 2022-06-06 20:23:21 -04:00
Richard Feldman
f43f15bacc
Add roc_std::RocBox 2022-06-06 20:23:21 -04:00
Richard Feldman
e2012e96b7
Add RocList::reserve and RocStr::reserve 2022-06-06 20:23:21 -04:00
Richard Feldman
983f2b9fad
Add RocList::with_capacity 2022-06-06 20:23:21 -04:00
Richard Feldman
ce25929214
Add more documentation to RocStr::temp_nul_terminated 2022-06-06 20:23:21 -04:00
Richard Feldman
308cb47b26
Add generic RocStr::temp_nul_terminated function 2022-06-06 20:23:20 -04:00
Richard Feldman
38d5002c13
Refactor how RocList does alignment 2022-06-06 20:23:20 -04:00