Commit graph

4123 commits

Author SHA1 Message Date
Ayaz Hafiz
94203ca6d9
Preserve semantic when fixing rec pointer 2023-05-10 17:25:15 -05:00
Ayaz Hafiz
fa787b9b48
Unused imports 2023-05-10 17:25:05 -05:00
Ayaz Hafiz
49b8886b82
Hide semantic repr in layout 2023-05-10 17:24:45 -05:00
Ayaz Hafiz
31c9cc8227
Hide away SemanticRepr definition 2023-05-10 17:10:58 -05:00
Ayaz Hafiz
a37a0f1770
DbgDeep for semantic reprs 2023-05-10 17:09:50 -05:00
Ayaz Hafiz
4296d5a349
Drop Layout::struct_no_name_order 2023-05-10 15:58:51 -05:00
Ayaz Hafiz
1170b542b6
Remove field_order_hash from struct layouts 2023-05-10 15:49:30 -05:00
Ayaz Hafiz
43d4135dc8
Semantic layouts for tuples 2023-05-10 15:40:44 -05:00
Ayaz Hafiz
c06ffc434b
Begin generating semantic reprs for records 2023-05-10 15:38:25 -05:00
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
Richard Feldman
b42da4ae8d
Revert "remove undefined -dynamic_lookup"
This reverts commit bd6ae25cbc.
2023-05-08 15:46:53 -04: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
44e5d7459e
fix lambda set case not handled 2023-05-07 20:31:45 +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
ef60be37af
fix alloca of wrong type 2023-05-06 00:42:48 +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
1c16617bec
llvm backend: fix how closure value is passed 2023-05-05 16:36:29 +02:00
Folkert
83742bc741
two more tests 2023-05-05 15:08:31 +02:00
Folkert
41583edfb2
list still increments recursively 2023-05-05 15:03:17 +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
14ac58f781
Merge pull request #5362 from jarlah/replace-panic-with-internal-error 2023-05-03 19:27:09 -05:00
Jarl André Hübenthal
e5eb5717ea
replace panic! with internal_error! in compiler modules 2023-05-03 22:11:21 +02:00
Folkert
6fe610b7fc
update mono tests 2023-05-03 18:38:20 +02:00
Folkert de Vries
27d477124d
Merge pull request #5372 from roc-lang/fix-false-debug
Determine host-exposed lambda sets once based on proc variable
2023-05-03 18:35:03 +02:00
Folkert
04081ae8b3
centralize list argument passing and dec fn pointer generation 2023-05-03 18:23:16 +02:00
Folkert
3c6c5a3e53
add windows cc implementation of new register picker 2023-05-03 17:57:54 +02:00
Ayaz
ba1f8ffe5f
Merge pull request #5272 from extemporalgenome/markdown-typos-20230410
markdown typo fixes
2023-05-03 10:24:52 -05: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
Folkert
e12a7f4f81
refactor nasty loops into recursive functions 2023-05-03 14:43:31 +02: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
9a2afbb09b gen_dev: Implement builtins Num.isNan, Num.isFinite, Num.isInfinite 2023-05-03 11:12:01 +01:00
Basile Henry
d8b658da5d gen_dev: Add is_nan_freg_reg64 2023-05-03 11:12:01 +01:00
Basile Henry
1391920d0e gen_dev: Add MOVQ/MOVD to x86 backend 2023-05-03 11:12:01 +01: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
8963cc9d45
sublist tests now work 2023-05-03 01:09:28 +02:00
Folkert
47e99a226d
enable more tests after bugfix 2023-05-03 01:06:14 +02:00
Folkert
05a9b4d601
fix that inc on list was no longer recursive 2023-05-03 01:03:09 +02:00
Ayaz Hafiz
df3bd79d4a
Simplify occurs check for aliases 2023-05-02 17:00:58 -05:00
Ayaz Hafiz
8ca1e6c866
Correct occurs cycle under alias argument but not alias real var
At times we can have alias arguments that are recursive in their
position, but whose recursiveness is not immediately visible in the real
var.

Closes #5330
2023-05-02 17:00:58 -05:00
Ayaz Hafiz
8dc86a81b8
Rename ROC_VERIFY_OCCURS_RECURSION flag 2023-05-02 17:00:58 -05:00
Ayaz Hafiz
5815807927
seen_recursion_pair is immutable 2023-05-02 17:00:58 -05:00