Commit graph

4263 commits

Author SHA1 Message Date
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
Agustin Zubiaga
71a2990e21 Tip replacing <- with : for static values 2023-05-09 23:37:24 -03:00
Agustin Zubiaga
088193c93b Fix clippy error 2023-05-08 22:18:56 -03:00
Agustin Zubiaga
9c614540a4 Remove unneeded todo 2023-05-08 21:15:38 -03:00
Agustin Zubiaga
d2a57112fd Unapplied record builder error 2023-05-08 20:16:38 -03:00
Agustin Zubiaga
6670fbb1ab Multiple record builder error 2023-05-08 19:26:47 -03:00
Agustin Zubiaga
20f8133b6c Test record builder desugaring 2023-05-08 18:45:25 -03:00
Richard Feldman
b42da4ae8d
Revert "remove undefined -dynamic_lookup"
This reverts commit bd6ae25cbc.
2023-05-08 15:46:53 -04:00
Agustin Zubiaga
627437c65b Handle space/parens around record builders 2023-05-07 21:56:08 -03:00
Agustin Zubiaga
dfa9c29147 Desugar Record Builder 2023-05-07 20:31:47 -03:00
Agustin Zubiaga
71c80171d4 Add record builder apply fmt test 2023-05-07 15:56:44 -03:00
Agustin Zubiaga
c2e50a22b6 Record Builder formatting 2023-05-07 15:51:08 -03: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
Agustin Zubiaga
735721769c Record Builder parsing 2023-05-05 23:26:20 -03: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