Richard Feldman
f79ff6d496
Remove unused lowlevel StrGetCapacity
2024-02-01 21:37:16 -05:00
Richard Feldman
6a6c25d32d
Update some docs and names
2024-02-01 21:30:44 -05:00
Brendan Hansknecht
fc6b519b59
Merge pull request #6463 from roc-lang/dec-pow
...
`Num.pow` for `Dec`
2024-02-01 09:17:55 -08:00
Richard Feldman
0b42a902ab
Have List.withCapacity lowlevel use u64 over usize
2024-01-31 20:29:17 -05:00
Brendan Hansknecht
47ba132905
Correct windows return by pointer calculation
...
I always thought this was wrong. Saw it again today and decided to look it up.
Windows will return by pointer for anything over 64bits on an x86_64 machine.
Note: this is wrong for windows aarch64, but I will correct that in a PR where I clean up targets.
https://learn.microsoft.com/en-us/cpp/build/x64-calling-convention?view=msvc-170#return-values
https://learn.microsoft.com/en-us/cpp/build/arm64-windows-abi-conventions?view=msvc-170#return-values
2024-01-30 21:37:51 -08:00
Richard Feldman
aabd95404f
Merge remote-tracking branch 'origin/main' into remove-nat
2024-01-30 21:42:45 -05:00
Brendan Hansknecht
e7be9d435d
Merge pull request #6460 from roc-lang/dec-div-floor
...
`floor`, `ceiling` and `round` for `Dec`
2024-01-30 16:38:12 -08:00
Folkert
e16b25c93e
Num.pow for Dec
2024-01-30 16:33:50 +01:00
Folkert
2e648cfdd5
add support in llvm/wasm backends
2024-01-29 16:16:06 +01:00
Richard Feldman
3e27e18566
Merge remote-tracking branch 'origin/main' into remove-nat
2024-01-29 07:23:58 -05:00
Folkert
b0d57587e3
List.get with negative index in repl
2024-01-28 22:21:40 +01:00
Brendan Hansknecht
d76394ac31
Fix the nonnull attribute
...
The current version will fail if run through the `opt` tool.
nonnull should have no data attached.
2024-01-27 08:36:06 -08:00
Richard Feldman
9518d76cd8
Remove Num.bytesTo___ functions
...
These may be reintroduced in some form later,
but they don't handle endianness and it's not
clear builtins are the right place for them.
2024-01-26 16:23:19 -05:00
Richard Feldman
5b2998966b
Update List.replace to no longer use Nat
2024-01-26 16:06:09 -05:00
Richard Feldman
a8918a4e3b
Update List.dropAt to no longer use Nat
2024-01-26 16:06:09 -05:00
Richard Feldman
4a870c8ee0
Update Nat to U64 in some comments
2024-01-26 16:06:09 -05:00
Richard Feldman
a71188dc30
Update List.sublist to no longer use Nat
2024-01-26 16:06:08 -05:00
Richard Feldman
2cf7b5b5ca
Update List.swap to no longer use Nat
2024-01-26 16:06:08 -05:00
Richard Feldman
27474d4ed8
Update List.reserve to no longer use Nat
2024-01-26 16:06:08 -05:00
Richard Feldman
97f21e65fe
Update ListLen and ListGetUnsafe to not use Nat
2024-01-26 16:05:56 -05:00
Richard Feldman
2970fc4384
Merge remote-tracking branch 'origin/main' into str-unicode
2024-01-21 12:30:16 -05:00
Folkert de Vries
f3930d6faf
Merge pull request #6405 from roc-lang/list-clone
...
add `List.clone`
2024-01-21 12:04:22 +01:00
Folkert
f1ffc36efe
add List.clone
2024-01-20 20:29:07 +01:00
Brendan Hansknecht
b6a5e5367c
build structs directly in the alloca
2024-01-20 09:44:46 -08:00
Richard Feldman
b48fa0698a
Remove scalars and graphemes from Str
2024-01-17 21:30:34 -05:00
Luke Boswell
6bdcc4743a
Merge pull request #6363 from roc-lang/windows-llvm-setjmp-longjmp
...
fix for bugged setjmp/longjmp on windows/llvm
2024-01-09 22:00:15 +11:00
Brendan Hansknecht
3559326996
Set debug info version
...
We just missed setting it. Set it as specified in the docs: https://thedan64.github.io/inkwell/inkwell/debug_info/index.html#setting-up-the-module-for-holding-debug-info
Not sure why it is 3, but that is the value in the llvm tutorial as well: https://llvm.org/docs/SourceLevelDebugging.html
Fixes #6367
2024-01-08 20:28:42 -08:00
Folkert
b9b19d6054
fix for bugged setjmp/longjmp on windows/llvm
2024-01-07 23:04:11 +01:00
Brendan Hansknecht
2466e2eb3b
Merge pull request #6356 from roc-lang/box-rc
...
Fix RC for unions with non-refcounted fields
2024-01-06 10:45:30 -08:00
Brendan Hansknecht
a2fcf76164
make sure that union refcounting branches to the decrement block
2024-01-06 08:34:46 -08:00
Folkert
9c94930d6a
32-bit float checked float operations assumed f64
2024-01-06 16:05:01 +01:00
Folkert
f3abb3b466
add instructions to the right block
2024-01-06 15:52:53 +01:00
Brendan Hansknecht
88bac5eba7
ensure unions get freed even if they have no RC fields (hit when using box)
2024-01-05 22:20:58 -08:00
Anton-4
cd632fe549
Merge branch 'main' of github.com:roc-lang/roc into clippy-1.74
2023-12-25 17:05:37 +01:00
Brendan Hansknecht
2955b00bb5
Merge branch 'main' into luke-windows
2023-12-14 08:59:53 -08:00
Anton-4
384cf2decf
add __udivti3 to must_keep
...
Fixes Undefined Symbol in relocation...
2023-12-13 12:09:15 +01:00
Brendan Hansknecht
ec6d8142e7
Re-enable early DCE with fix for M1 mac
...
I won't claim to know why `__muloti4` is special, but none of the other compiler-rt functions are,
but seems to work and stop tests from hanging.
It also enables early DCE again which saves a tiny bit of compile time.
2023-12-12 10:43:14 -08:00
Luke Boswell
1051ba6569
cargo fmt
2023-12-12 21:15:17 +11:00
Richard Feldman
95a4bb988c
Merge pull request #6255 from roc-lang/glue-panic-handler
...
make glue use a setjmp/longjmp panic handler
2023-12-11 16:33:26 -05:00
Richard Feldman
67d7385b9a
Clean up some obsolete asserts
2023-12-11 15:15:59 -05:00
Folkert
d2d87949c8
remove random write to pointer
2023-12-11 21:07:15 +01:00
Folkert
590282b14f
make glue use a setjmp/longjmp panic handler
2023-12-11 20:33:21 +01:00
Brendan Hansknecht
fb049b661a
Remove early DCE of builtins
...
Early DCE was sometimes cleaning up functions that we actaully still needed.
At some point we can come back to it and try to properly protect all special functions.
Until then, this still enables DCE, but it runs later with the full generated Roc module.
2023-12-11 10:44:57 -08:00
Luke Boswell
4d6546f5b0
fixes for Windows gen_num
2023-12-11 22:10:34 +11:00
Brendan Hansknecht
3120dee509
Merge pull request #6238 from roc-lang/dict-follow-up
...
Dict follow up and addition of releaseExcessCapacity
2023-12-11 02:15:44 -08:00
Brendan Hansknecht
f262102299
cleanup list and str builtin naming from refcount to allocation
2023-12-10 19:52:28 -08:00
Brendan Hansknecht
b39d604745
Dict follow up and addition of releaseExcessCapacity
2023-12-10 00:06:58 -08:00
Brendan Hansknecht
1ad9933b38
add some missed symbols that roc needs
2023-12-09 18:33:23 -08:00
Brendan Hansknecht
e621de328d
fix dce of compiler-rt
2023-12-09 18:11:23 -08:00
Brendan Hansknecht
e336aa525c
Merge pull request #6062 from JRMurr/div-0-should-crash
...
Update zig `@panic` calls to `roc_panic` for numeric errors
2023-12-05 12:28:47 -08:00