Ayaz Hafiz
6714a6fd92
Use LayoutRepr directly when possible
2023-05-10 15:28:11 -05:00
Ayaz Hafiz
7b2d149deb
Move repr-specific functions to LayoutRepr and impl deref
2023-05-10 15:26:31 -05:00
Ayaz Hafiz
58fe2bb4e0
Ignore all semantic layouts for now
2023-05-10 15:21:01 -05:00
Ayaz Hafiz
f100e8753c
Introduce the concept of SemanticRepr
2023-05-10 13:51:04 -05:00
Ayaz Hafiz
c3eeb5e2cc
Wrap layouts in a LayoutRepr
constructor
...
Part 1 of support semantic layout representations.
2023-05-10 13:22:10 -05:00
Folkert
6091ccd3b0
enable list_ends_with test for dev backend
2023-05-07 20:31:47 +02:00
Folkert
72a997f1bf
move ptr equality check under length equality check
2023-05-07 20:31:47 +02:00
Folkert
a4be750a3a
properly load pointers before comparison
2023-05-07 20:31:47 +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
Folkert de Vries
ec21f19826
Merge pull request #5374 from GabrielDertoni/remove-needless-string-alloc
...
refactor: remove needless string allocation in pretty printer
2023-05-06 00:34:48 +02:00
Folkert
6ed899d8be
indirec inc/dec generation in mono helpers
2023-05-05 15:02:21 +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
Gabriel Dertoni
7d0027f428
refactor: remove needles string allocation in pretty printer
...
Many times, in order to create a `ven_pretty::Doc` containing a text
node, the pattern `alloc.text(format!(...))` would be used. This code
then creates a fresh string that is then used in the `Doc`. However,
many times only a small string is necessary and so the allocation could
be optimized. The `ven_pretty` crate supports this through a `SmallString`
type. Allocating a fresh string with `format!` also moves control away
from the `DocAllocator` which isn't ideal, since it could also handle
the string allocations. So, instead of creating a fresh string, one can
simply call `alloc.as_string(format_args!(...))` and delegate the
allocation to the `DocAllocator` without any loss in expressivity. So,
in order to encorage this pattern, this commit also introduces the
`text!` macro.
In order to find all instances of the code pattern, the following
tree-sitter query was used:
```scm
(call_expression
function: (field_expression
field: (field_identifier) @field.name
(#eq? @field.name "text"))
arguments: (arguments
(macro_invocation
macro: (identifier) @macro.name
(#eq? @macro.name "format")))) @reference.call
```
2023-05-03 21:28:36 -03:00
Ayaz Hafiz
0744ef946b
Determine host-exposed lambda sets once based on proc variable
...
Rather than calculating the HELS for each host-exposed layout (of which
there may be multiple), we only need to calculate the HELS based on the
top-level type of the host-exposed function.
Also renamed `GlueProcs.extern_names` to
`GlueProcs.legacy_layout_based_extern_names` since they are still
currently generated based on the layout, but I think we want to generate
all HELS via type variable.
Fixes false-interpreter builds in debug.
2023-05-03 10:00:50 -05: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
cb4b726c7e
don't refcount the empty tag union
2023-05-02 22:31:57 +02:00
Ayaz Hafiz
a9975b1f7f
Crash at runtime rather than panicking when if condition is erroneous
...
Closes #5318
2023-05-01 15:48:05 -05:00
Folkert
f9f4d5eb49
infra for exposed_generic in the dev backend
2023-05-01 18:39:10 +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 de Vries
5183bf0196
Merge pull request #5335 from JTeeuwissen/drop_specialization
...
Drop specialization
2023-04-30 21:14:06 +02:00
J.Teeuwissen
362bdb97ea
using correct id
2023-04-30 16:55:08 +02:00
J.Teeuwissen
297658caba
Merge branch 'main' into symbol_tags
2023-04-30 16:35:22 +02:00
J.Teeuwissen
e2042debfd
feedback
2023-04-30 12:01:01 +02:00
J.Teeuwissen
b8a2ea1bf2
Merge branch 'main' into drop_specialization
2023-04-29 18:31:12 +02:00
Anton-4
ff6ec21a09
Merge pull request #5324 from roc-lang/rust_version_upgrade
...
WIP Rust version upgrade
2023-04-29 18:01:04 +02:00
J.Teeuwissen
042482a19f
pipeline
2023-04-29 17:59:17 +02:00
J.Teeuwissen
231feb2fe2
assuming recursive rc
2023-04-29 15:31:27 +02:00
J.Teeuwissen
dbab89cc64
start
2023-04-29 15:28:25 +02:00
J.Teeuwissen
c1ced3c5d2
inc lowlevel return value
2023-04-29 14:30:14 +02:00
Folkert de Vries
3018ee6ec3
Merge pull request #5298 from roc-lang/externs-using-variables
...
find extern names using the variables (not layouts)
2023-04-29 05:44:30 +02:00
Folkert
2e6c632fb4
make only used fields pub(crate)
2023-04-28 22:08:55 +02:00
Folkert
4d681821bf
use get_lambda_set helper
2023-04-28 22:01:57 +02:00
Folkert
45b881d553
cleanup
2023-04-28 21:16:48 +02:00
Folkert
b9cc3b7823
don't check a non-recursive tag union for uniqueness
2023-04-28 18:46:07 +02:00
J.Teeuwissen
5d1349973e
removed recursive decrement wasm
2023-04-28 18:40:58 +02:00
Folkert
2ea69f07ef
fix decref returning incorrect address in some cases
2023-04-28 17:58:39 +02:00
Folkert
a7c7ad2d17
fix and optimize tail-recursive decrement
2023-04-28 17:50:30 +02:00
Folkert
755c294d90
only recursively decrement when unique
2023-04-28 17:10:22 +02:00
Folkert
a5862a9398
use data ptr instead of rc pointer to shrink IR size
2023-04-28 15:51:38 +02:00
Folkert
cf54304cf4
add lowlevel to inc/dec a data pointer
2023-04-28 15:30:23 +02:00
Folkert
a61e7a696d
use Box instead of a tag to read the refcount
2023-04-28 15:11:14 +02:00
J.Teeuwissen
ca7ba45955
chase_recursive_in
2023-04-27 10:37:09 +02:00
Folkert
64130dbbbc
use bool literals for bools
2023-04-26 23:33:52 +02:00
J.Teeuwissen
a7fe85bfeb
more clippy
2023-04-26 20:47:30 +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
b0a4dd3e52
newlines
2023-04-26 20:25:15 +02:00
J.Teeuwissen
b4f65ad8cf
clippy
2023-04-26 20:23:30 +02:00
J.Teeuwissen
804e617497
undo mono unique
2023-04-26 20:17:19 +02:00
J.Teeuwissen
4de6369e6a
simplified join + mono
2023-04-26 20:11:44 +02:00