Commit graph

122 commits

Author SHA1 Message Date
Prajwal S N
df7e4eea7e
builtin(str): implement Str.graphemes
Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com>
2022-10-22 19:29:49 -07:00
Ayaz
83b64c4fb3
Merge pull request #4209 from roc-lang/impl-tag-discriminant
Derive `Hash` implementations for tag unions
2022-10-10 22:23:05 -05:00
Prajwal S N
9013e4ce11
builtin(str): implement withCapacity
Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com>
2022-10-08 00:24:46 +05:30
Ayaz Hafiz
792afe5457
Remove TagDiscriminant low-level 2022-10-05 13:00:45 -05:00
Ayaz Hafiz
c7bd4e1c1c
Support upcasting bools to ints in the wasm backend 2022-10-04 18:55:45 -05:00
Ayaz Hafiz
fd54cdfdd1
Low-level to extract discriminant from a tag union 2022-10-04 16:17:05 -05:00
Ayaz Hafiz
29991654db
Make sure conversion of signed ints before shift applies to the shifted number 2022-10-04 14:23:53 -05:00
dependabot[bot]
0079048944
Bump bumpalo from 3.10.0 to 3.11.0
Bumps [bumpalo](https://github.com/fitzgen/bumpalo) from 3.10.0 to 3.11.0.
- [Release notes](https://github.com/fitzgen/bumpalo/releases)
- [Changelog](https://github.com/fitzgen/bumpalo/blob/main/CHANGELOG.md)
- [Commits](https://github.com/fitzgen/bumpalo/compare/3.10.0...3.11.0)

---
updated-dependencies:
- dependency-name: bumpalo
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-12 21:08:56 +00:00
Jan Van Bruggen
8bbfd68621
Add language to all fenced code blocks
See https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md#md040
2022-09-09 01:12:31 -06:00
Jan Van Bruggen
072a6bd002
Eliminate consecutive newlines
See https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md#md012
2022-09-09 01:12:30 -06:00
Jan Van Bruggen
26a1abfea8
Add blank lines around lists
See https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md#md032
2022-09-07 23:18:03 -06:00
Ayaz Hafiz
3b4b1838b8
Push layout interner further through Layout 2022-08-31 14:33:52 -05:00
Ayaz Hafiz
ed04c2040a
Push the layout interner through the backends 2022-08-31 14:33:52 -05:00
Folkert de Vries
51d5aa789a
Merge pull request #3870 from roc-lang/dev-backend-div
add int/float division to the dev backend
2022-08-25 09:03:19 +02:00
Folkert
a22e04361c
Merge remote-tracking branch 'origin/main' into expect-fx-codegen 2022-08-23 16:28:21 +02:00
Folkert
2d366acc6e
split out int and frac division into separate lowlevels 2022-08-23 11:07:38 +02:00
kilianv
731f10981e Swap the argument order in bitwise shift operators
The arguments were probably swapped in the first place because in Elm
they are swapped, because Elm is curried. The new order makes more sense
both with and without the pipe operator
2022-08-20 20:33:10 +02:00
Ayaz Hafiz
79a5766854
Make method private 2022-08-19 22:16:47 -05:00
Ayaz Hafiz
b7c799702f
wasm: store closure data passed to higher-order low-level in struct, not box 2022-08-19 22:16:47 -05:00
Brian Carroll
1078badd58
wasm: comment on why we don't need to modify symbol storage after clone 2022-08-19 22:16:47 -05:00
Ayaz Hafiz
f08fc43210
Remove unneeded clone 2022-08-19 22:16:42 -05:00
Ayaz Hafiz
fb4282757a
gen-wasm: Do not repoint stack memory to locals upon copy
It is possible that other code paths will use the stack memory before a
copy to a local is done. For example, if the copy happens behind a branch,
the local variable may not be assigned the stack content.
2022-08-19 22:16:41 -05:00
Ayaz Hafiz
15ef517cf2
gen-wasm: box captured data before passing it to a higher-order lowlevel
Previously, when it existed, captured data would always be represented
as a struct, and hence implicitly boxed. That meant that passing
captured data would always pass a pointer. However, now, captured data
can live unwrapped. This poses a challenge for the higher-order
lowlevels, which always expect captures data to be passed as an opaque
pointer. As such, always box captured data.

It's possible to optimize this so that only unwrapped captures data
needs to be boxed; however, that is not attempted in this patch.
2022-08-19 22:16:41 -05:00
Ayaz Hafiz
0606086eb6
Compare values with runtime representation 2022-08-19 22:16:41 -05:00
Ayaz Hafiz
89457f9faf
Add Wasm32Result for Infallible 2022-08-12 15:42:20 -07:00
Richard Feldman
97e2900bf5
s/rtfeldman/roc-lang/g in links to GitHub repos 2022-08-12 15:24:09 -04:00
Folkert
10b6f33ed2
boilerplate 2022-08-12 13:34:36 +02:00
Brian Carroll
86b5db10d5
Merge branch 'trunk' of github.com:rtfeldman/roc into wasm-stack-size-control-i2490 2022-08-08 22:39:26 +01:00
Brian Carroll
dd040d5f73
wasm: add stack_bytes field to Env 2022-08-08 21:41:25 +01:00
Brian Carroll
11929a7b6d
wasm: set memory layout after code gen, when we know the amount of const data 2022-08-07 21:34:49 +01:00
Folkert
792936066c
Merge remote-tracking branch 'origin/trunk' into roc-std-platform 2022-08-07 13:28:03 +02:00
Folkert
9574bd9928
move implementation of platform functions to use site... 2022-08-06 21:32:18 +02:00
Folkert
b4eda7c9d9
rework features for roc_std 2022-08-06 19:01:07 +02:00
Brian Carroll
50326f7e0b
Merge branch 'trunk' of github.com:rtfeldman/roc into wasm-code-gen-fixes-i3448 2022-08-06 10:12:24 +01:00
Brian Carroll
aa0e9e8d31
wasm: Get RC reset/reuse working correctly 2022-08-06 09:58:47 +01:00
Richard Feldman
26ee1a01bc
Merge pull request #3691 from rtfeldman/cargo_verson_change
changed Cargo versions from 0.1.0 to 0.0.1
2022-08-05 09:13:04 -04:00
Brian Carroll
e71a6da62d
wasm: fix refcount bug in higher order low-levels 2022-08-05 09:51:51 +01:00
Folkert de Vries
9f2ddc61d8
Merge pull request #3699 from rtfeldman/wasm-fix-uninit-capacity
Wasm: fix uninitialised capacity in List literals
2022-08-04 15:24:55 +02:00
Brian Carroll
7f44ace383
wasm: nicer debug output for Let statements 2022-08-04 12:30:25 +01:00
Brian Carroll
67f7512e6d
wasm: drop unused return value from copy_value_from_memory 2022-08-04 12:29:25 +01:00
Brian Carroll
85e5d11db4
wasm: fix List.getUnsafe trying to load a symbol before it was stored 2022-08-04 12:27:46 +01:00
Richard Feldman
9f221d7fab
Disable roc_std default features in gen_wasm and test_gen 2022-08-03 22:40:58 -04:00
Folkert de Vries
7f4e0bb0c9 gen_wasm use dummy platform functions 2022-08-03 21:35:28 +02:00
Anton-4
6a15a7b41b
changed Cargo versions from 0.1.0 to 0.0.1 2022-08-03 11:41:19 +02:00
Brian Carroll
5c6eed570d
wasm: Ensure List literals have an initialized capacity field 2022-07-29 15:18:15 +02:00
Brian Carroll
0041d4f3bc
wasm: Fix shiftRightBy for U8 and U16 2022-07-29 14:05:39 +02:00
Folkert
9bdf1f733f
Wasm32Sized for isize 2022-07-27 20:10:47 +02:00
Folkert
100e439852
fix bug with ALIGN_OF_WASM on tuples (it used the size) 2022-07-24 13:33:35 +02:00
Folkert
e1b427839b
implement wasm traits for roc_std::{I128, U128} 2022-07-24 12:07:27 +02:00
Folkert
c09cb4e3ea
fix stack size of empty tag union 2022-07-23 23:10:56 +02:00