misc cleanup + change refcount pointer to avoid branching

This commit is contained in:
Brendan Hansknecht 2023-03-12 10:29:53 -07:00
parent 216fd3f9f6
commit dfb748fb03
No known key found for this signature in database
GPG key ID: 0EA784685083E75B
11 changed files with 108 additions and 210 deletions

View file

@ -58,6 +58,7 @@ pub const RocStr = extern struct {
}
pub fn fromByteList(list: RocList) RocStr {
// TODO: upon adding string seamless slices, I believe this branch can be changed to bit manipulation.
if (list.isSeamlessSlice()) {
// Str doesn't have seamless slices yet.
// Need to copy.