Commit graph

86 commits

Author SHA1 Message Date
Folkert
655022be78 fix string debug printing 2021-12-31 15:37:53 +01:00
Folkert
9762c98355 make RocStr debug print its contents as a string 2021-12-31 14:27:27 +01:00
Folkert
36700a0c70 shrink tag width on RocResult 2021-12-27 23:59:12 +01:00
Folkert
007d777865 flesh out api for RocResult 2021-12-27 20:01:19 +01:00
Folkert
c2934a509a refactor unsafe RocResult to payload conversion 2021-12-27 19:31:22 +01:00
Richard Feldman
f536eeb919 Add From<Result> to RocResult 2021-12-27 16:34:55 +01:00
Richard Feldman
c83a9b82e7 Fix RocResult double-free, add tests 2021-12-27 16:34:43 +01:00
Richard Feldman
d6fc4ac25f Make RocResult use unions under the hood 2021-12-27 16:34:36 +01:00
Brian Carroll
79dfbae618 roc_std: set small string flag on empty string 2021-12-16 19:04:36 +00:00
Brian Hicks
048d8bf87d remove unused printf import 2021-11-19 08:13:53 -06:00
Brendan Hansknecht
d21c858ccd fix clippy lint 2021-10-29 16:03:49 -07:00
Brendan Hansknecht
5d42fe4448 Fix comparison 2021-10-24 12:05:03 -07:00
Brendan Hansknecht
31f61d81f1 Add assert related to RocList capacity of 0 2021-10-24 12:04:19 -07:00
Brendan Hansknecht
af49d9bdb2 Avoid allocation for empty list 2021-10-24 11:56:53 -07:00
Folkert
e319d1e758 make roc main return values, instead of write them into pointer 2021-09-19 22:05:48 +02:00
Folkert
e569cab167 fix segfault in RocStr dropping an empty RocStr 2021-08-29 23:05:18 +02:00
Folkert
815a4f76a7 make more tests run under wasm 2021-08-29 15:18:25 +02:00
Richard Feldman
ffeaa1ac08
Merge branch 'trunk' into store-dec-as-str 2021-08-26 21:24:56 -04:00
Folkert
95b2b41468 set the refcount... 2021-08-27 00:02:08 +02:00
Jared Ramirez
4b2a63fb30 Merge branch 'trunk' of https://github.com/rtfeldman/roc into store-dec-as-str 2021-08-26 11:23:17 -07:00
Folkert
dd24786e67 implement into iterator 2021-08-20 20:45:21 +02:00
Folkert
fa49f0368d implement 2021-08-20 20:41:20 +02:00
Jared Ramirez
d69b9173fc Also store f64 for things like pattern comparisons, etc 2021-08-18 17:18:13 -07:00
Richard Feldman
ce8a495096 Remove unnecessary unsafe annotation 2021-08-03 07:28:03 -04:00
Richard Feldman
b0acf88803 Change write_c_str API 2021-08-03 07:28:03 -04:00
Richard Feldman
1c09450103 Use ::default over ::empty for RocStr and RocList 2021-08-03 07:28:03 -04:00
Richard Feldman
91f1589f62 Use u8 alignment when copying 2021-08-02 23:30:45 -04:00
Richard Feldman
82d00beb69 Use Self in more places 2021-08-02 23:30:45 -04:00
Richard Feldman
b94d715bc9 Drop alloca from roc_std 2021-08-02 23:30:45 -04:00
Richard Feldman
fbc7984818 Drop libc dependency from roc_std 2021-08-02 22:29:23 -04:00
Richard Feldman
27d8f7b821 Use ffi::c_void over libc::c_void 2021-08-02 22:08:24 -04:00
Richard Feldman
2c7fd2a54d Drop obsolete comment 2021-08-02 22:04:47 -04:00
Richard Feldman
db6a05a6a4 Use a const function over a non-const one 2021-08-02 22:03:57 -04:00
Folkert
99bab04c1d Merge remote-tracking branch 'origin/trunk' into add-dec-types 2021-07-21 15:18:41 +02:00
Brian Hicks
45887b6d1a add a "hello-rust" example 2021-07-20 09:22:40 -05:00
Jared Ramirez
c261766681 Appease clippy 2021-07-09 09:46:40 -07:00
Jared Ramirez
a35cc321ab Address various bits of feedback 2021-07-09 09:30:45 -07:00
Jared Ramirez
0827123c88 Adding Decimals work!! 2021-06-24 11:15:52 -07:00
Jared Ramirez
4d6e5a1a4f [WIP] Add Dec/Decimal builtin types 2021-06-23 19:30:16 -07:00
Richard Feldman
53ccef0506 nightly clippy
I was on nightly for benchmarks, and these all seem reasonable.
2021-06-18 15:21:11 -04:00
Richard Feldman
6fe1d41c55 make clippy happy 2021-06-18 15:21:11 -04:00
Richard Feldman
aa687d9640 Use .add over .offset for usize pointer offsets 2021-06-18 15:21:11 -04:00
Richard Feldman
6a84902f79 Add RocList::append_slice to roc_std 2021-06-18 15:21:11 -04:00
Richard Feldman
98d0171726 Add RocStr:write_c_str to roc_std 2021-06-18 15:21:11 -04:00
Richard Feldman
3e6e55ffcc Improve roc_std storage pointer usage.
We were trying to represent Refcount as usize,
but Refcount can be isize::MIN which can't be
negated and then cast to usize without overflow.

Also made the Drop implementations for RocList and RocStr
more efficient.
2021-06-18 15:21:03 -04:00
Folkert de Vries
5724f82667
Merge branch 'trunk' into zig-list-set 2021-05-25 09:05:18 +02:00
Richard Feldman
0b3715ebee Rearrange arg order for roc_alloc etc 2021-05-24 21:01:12 -04:00
Folkert
91b49ecf98 Merge remote-tracking branch 'origin/roc_alloc' into zig-list-set 2021-05-24 18:25:18 +02:00
Richard Feldman
f9241cfa01 Use roc_alloc etc in roc_std 2021-05-23 23:46:09 -04:00
Folkert
2a0ba43515 rename var 2021-05-23 16:24:53 +02:00