Ayaz Hafiz
3585d5bb5b
Implement hash for Dec
2023-05-26 11:38:30 -05:00
Brendan Hansknecht
90636d14c8
add extra note on security
2023-05-26 07:31:35 -07:00
Brendan Hansknecht
b4c359588e
Seed Dict and Set
...
This changes Dict and Set to have a compilation depedent seed.
The seed is not exposed to userland in anyway.
This gets a much more DOS resistant Dict and Set with no cost.
2023-05-25 09:55:48 -07:00
Folkert
317a8880c1
better debug info if dec on invalid pointer
2023-05-14 18:01:47 +02:00
Folkert
dd8739b847
better debug info if inc on invalid pointer
2023-05-14 15:20:43 +02:00
Folkert de Vries
deb1e9952d
Merge pull request #5365 from roc-lang/dev-backend-cli
...
Dev backend list tests
2023-05-07 14:47:39 +02:00
Richard Feldman
df0ab01128
Merge pull request #5348 from basile-henry/basile/num-is-nan
...
Implement builtins for Num.isNan, Num.isInfinite, and Num.isFinite
2023-05-05 06:15:18 -04:00
Jarl André Hübenthal
e5eb5717ea
replace panic! with internal_error! in compiler modules
2023-05-03 22:11:21 +02:00
Ayaz
ba1f8ffe5f
Merge pull request #5272 from extemporalgenome/markdown-typos-20230410
...
markdown typo fixes
2023-05-03 10:24:52 -05:00
Folkert
278e2c4604
use std.debug.print
2023-05-03 14:30:03 +02:00
Folkert
85fcd71bdb
use bitcast instead of intcast
2023-05-03 14:28:22 +02:00
Basile Henry
b8aaaaabda
Implement builtins for Num.isNan, Num.isInfinite, and Num.isFinite
...
Closes #5310 and closes #5309
2023-05-03 09:33:28 +01:00
Folkert
05a9b4d601
fix that inc on list was no longer recursive
2023-05-03 01:03:09 +02:00
Folkert de Vries
a5a91d428f
Merge pull request #5336 from roc-lang/dev-backend-list-map
...
dev backend: many more builtins
2023-05-01 10:20:15 +02:00
Folkert
cf54304cf4
add lowlevel to inc/dec a data pointer
2023-04-28 15:30:23 +02:00
Folkert
0bf3eefbf2
dev backend: Num.isMultipleOf
2023-04-27 13:50:27 +02:00
Folkert
9357e1ce2b
export fn does not work for wasm/llvm
2023-04-27 10:44:54 +02:00
Folkert
c6c28e7c5d
implement Crash
2023-04-27 00:29:21 +02:00
J Teeuwissen
7439ee0c8c
Merge branch 'main' into drop_specialization
...
Signed-off-by: J Teeuwissen <jelleteeuwissen@hotmail.nl>
2023-04-26 20:26:37 +02:00
J.Teeuwissen
74f2b0afda
Updated refcount logic
2023-04-26 18:14:16 +02:00
J.Teeuwissen
ed46a1f2cb
lowlevel isUnique
2023-04-26 17:23:10 +02:00
Folkert de Vries
6d7e3ddc0c
Merge pull request #5326 from roc-lang/dev-backend-list-map
...
Dev backend list map
2023-04-26 14:06:23 +02:00
Folkert
312fb23567
add zig builtins for wrapped mul and shift right (for 128-bit ints)
2023-04-26 14:03:50 +02:00
Brendan Hansknecht
0e24403664
enable using other zig libaries in host instead of just str.zig
2023-04-25 14:14:35 -07:00
Folkert
2e41ef68b0
cleanup
2023-04-23 20:23:35 +02:00
Folkert
dd3d0a188e
string is empty for dev backend
2023-04-23 18:16:08 +02:00
Kevin Gillette
0321f91c70
Kevin Gillette: markdown typo fixes
...
Luke Boswell: move Str.md as it looks more like a design doc than rust crate
Co-authored-by: Luke Boswell <lukewilliamboswell@gmail.com>
2023-04-10 14:07:03 -06:00
Yuki Omoto
7ef166a11f
remove wrong subtraction in dec div
2023-04-09 11:34:24 +09:00
Yuki Omoto
f57085da05
refactor dec div
2023-04-09 03:52:17 +09:00
Yuki Omoto
219e72ff20
Fix dec division problem
...
Fixed dec division that envolves a number that has a hi word greater than
0 when converted into `U256` like `341dec / 341`.
This commit resolves #5259
2023-04-09 00:00:06 +09:00
Brendan Hansknecht
457725e87f
fix end offset of fromUtf8Range
2023-03-28 18:53:47 -07:00
Brendan Hansknecht
2a6c82c937
fix bug where we don't decrement elements if the list is non-unique
2023-03-16 12:12:28 -07:00
Brendan Hansknecht
a955a4937c
misc list refcounting updates
2023-03-16 12:12:28 -07:00
Brendan Hansknecht
ce29c7e92f
fix bugs from recent changes and additions
2023-03-16 12:12:27 -07:00
Brendan Hansknecht
48f17a8e2c
add Str.releaseExcessCapacity
2023-03-15 15:24:59 -07:00
Brendan Hansknecht
b8e42b05a2
misc cleanup
2023-03-15 13:25:45 -07:00
Brendan Hansknecht
19039ea5bd
fix edge cases
2023-03-15 13:25:44 -07:00
Brendan Hansknecht
70eef9141f
port string functions to seamless slices
2023-03-15 13:25:40 -07:00
Brendan Hansknecht
3978059aa2
add seamless slices for str
2023-03-15 13:23:34 -07:00
Brendan Hansknecht
0f708d7577
fix accessing bug
2023-03-15 10:06:31 -07:00
Brendan Hansknecht
88a69a23a8
fix type to work on 32bit platforms
2023-03-15 10:06:31 -07:00
Brendan Hansknecht
7f3c67ade9
use isValidUnicode in fromUtf8 to make it faster. Also fix off by one bug.
2023-03-15 10:06:31 -07:00
Brendan Hansknecht
f6677f3c1f
Add a fast path for validating ASCII charcters
...
From my quick testing using the code for testing this function in zig standard lib:
small ascii: 2.2x
small unicode: 0.9x
medium ascii: 15x
medium unicode: 1.01x
medium mix: 3.25x
large ascii: 32.8x
large unicode: 1.03x
large mixed: 3.35x
small being less than 8 bytes.
large being roughly greater than 512 bytes.
2023-03-15 10:06:31 -07:00
Brendan Hansknecht
1319ba4844
add List.releaseExcessCapacity builtin
2023-03-13 17:43:21 -07:00
Brendan Hansknecht
b94a046b0d
make sure to check raw capacity when decrementing refcounts
2023-03-13 14:08:24 -07:00
Brendan Hansknecht
dfb748fb03
misc cleanup + change refcount pointer to avoid branching
2023-03-13 14:08:24 -07:00
Brendan Hansknecht
216fd3f9f6
Update typo in comment
...
Co-authored-by: Richard Feldman <oss@rtfeldman.com>
Signed-off-by: Brendan Hansknecht <Brendan.Hansknecht@gmail.com>
2023-03-13 14:08:24 -07:00
Brendan Hansknecht
5f6910f747
add todo about upgrading to bit manipulation
2023-03-13 14:08:24 -07:00
Brendan Hansknecht
f96a63c1d4
correct case for zig naming
2023-03-13 14:08:23 -07:00
Brendan Hansknecht
146dff5446
add llvm refcounting and fix memory leak
2023-03-13 14:08:23 -07:00