Commit graph

6920 commits

Author SHA1 Message Date
Brendan Hansknecht
835d3980d5 add float methods to storage manager 2022-02-16 23:13:56 -08:00
Brendan Hansknecht
0d70a4f9f8 add symbol storage into generic64 backend 2022-02-16 23:06:31 -08:00
Brendan Hansknecht
6e10e00534 add core stack methods 2022-02-16 22:56:27 -08:00
Brendan Hansknecht
9e51148628 Add assembler and pass buffer through functions 2022-02-16 22:25:43 -08:00
Brendan Hansknecht
6025880e73 Move references out of storage and into own map 2022-02-16 22:17:02 -08:00
Brendan Hansknecht
1926c3e198 Add base general reg helpers 2022-02-16 21:18:52 -08:00
Brendan Hansknecht
1153e0833b Make symbols store as RCs 2022-02-16 20:59:51 -08:00
Brendan Hansknecht
d1bcc8d55b start storage rewrite 2022-02-16 19:19:35 -08:00
Folkert
cf89459baf Merge remote-tracking branch 'origin/trunk' into single-threaded-file-load 2022-02-16 15:09:13 +01:00
Folkert
ae998e2504 Revert "DEBUG HACKS, DO NOT MERGE"
This reverts commit e95d32e821.
2022-02-16 15:08:10 +01:00
Folkert
95bfc3b342 cleanup 2022-02-16 15:01:43 +01:00
Folkert
ff26069295 use single-threaded stepper in multithreaded file.rs 2022-02-16 14:49:00 +01:00
Folkert
400598a013 cleanup 2022-02-16 14:35:07 +01:00
Folkert
599a0e5dc7 move things out of thread scope 2022-02-16 14:18:28 +01:00
Folkert
45217b8074 pick the single-threaded load when target-family=wasm 2022-02-16 14:18:14 +01:00
Richard Feldman
c15c8d57a2
Merge pull request #2503 from rtfeldman/joshuawarner32/refactor-SpaceProblem
Refactor: introduce trait SpaceProblem
2022-02-16 08:16:57 -05:00
Joshua Warner
f440d53e7b Refactor: introduce trait SpaceProblem to remove a bunch of redundant args in ::Space errors 2022-02-15 20:48:04 -08:00
Folkert
56375ef69d check for empty string on IdentStr drop impl 2022-02-15 20:50:04 +01:00
Folkert
180be06772 check for empty string on IdentStr drop impl 2022-02-15 00:29:48 +01:00
Brian Carroll
e95d32e821 DEBUG HACKS, DO NOT MERGE 2022-02-14 22:24:51 +00:00
Brian Carroll
3e511acbcc Fix Wasm compile errors 2022-02-14 21:10:45 +00:00
Folkert
e56a5695ba initial PoC 2022-02-14 21:50:09 +01:00
Folkert
04adbe75ca fix test compilation 2022-02-14 21:09:51 +01:00
Folkert
957140df64 remove builtin lookup function being passed around 2022-02-14 20:32:31 +01:00
Folkert
154d55985b move depencency tracking out of file.rs 2022-02-14 18:16:35 +01:00
hafiz
91483dbf55
Merge pull request #2471 from rtfeldman/fix_args_order
Swap arg order in `List` builtins to put the more-complex types first
2022-02-13 23:25:05 -05:00
ayazhafiz
886e4e07f6 Update alias analysis, implementation for List.mapWithIndex 2022-02-13 22:50:27 -05:00
Jan Van Bruggen
885bfcf817
Merge pull request #2488 from rtfeldman/i/2476
Specialize `Num.toFloat` for different target float types
2022-02-13 18:49:05 -07:00
ayazhafiz
6e5c1d5914 Specialize Num.toFloat for different target float types
Closes #2476
2022-02-13 20:20:25 -05:00
Jan Van Bruggen
f328ff5661
Remove leading newlines from code files 2022-02-13 14:55:34 -07:00
ayazhafiz
c831b99432 Add test for issue #1162
This was fixed some time ago; add a regression test.

Closes #1162
2022-02-13 14:02:39 -05:00
Richard Feldman
2136233b83
Merge pull request #2469 from rtfeldman/newtype-cycles-go-brrrr
Couple of fixes related to recursive type aliases (#2458)
2022-02-13 07:37:06 -05:00
ayazhafiz
ac680d0750 Aliases should not be public 2022-02-12 21:23:44 -05:00
ayazhafiz
67bb5b14f6 Examples as code block not doc 2022-02-12 21:08:23 -05:00
ayazhafiz
e946b972f7 Only recursive tag unions are relevant in illegal cycles 2022-02-12 20:41:19 -05:00
ayazhafiz
b8defcbc75 Use freshly-instantiated lambda variables 2022-02-12 20:03:39 -05:00
ayazhafiz
4dbdf3a58b Check that instantiated lambda set vars indeed only have vars 2022-02-12 11:32:32 -05:00
ayazhafiz
33148cb1a4 Functions are compound types 2022-02-12 10:54:57 -05:00
Richard Feldman
71f2444397
s/Int/Nat in a comment 2022-02-11 21:26:39 -05:00
Richard Feldman
e1cc4cbde6
Fix comment 2022-02-11 21:25:08 -05:00
Jan Van Bruggen
f47dbb5171
Swap List.mapWithIndex arg1 args order to put the element first 2022-02-11 16:10:29 -07:00
Jan Van Bruggen
92e0f8714f
Swap List.repeat args order to put the list first 2022-02-11 16:10:29 -07:00
ayazhafiz
55769caad6 Redundant clone 2022-02-11 08:52:37 -05:00
ayazhafiz
c71854d5a4 Remove opt_rec_var 2022-02-11 08:51:08 -05:00
ayazhafiz
8c0e39211d Instantiate recursive aliases to their smallest closures
Now, when we have two aliases like

```
T a : [ A, B (U a) ]
U a : [ C, D (T a) ]
```

during the first pass, we simply canonicalize them but add neither to
the scope. This means that `T` will not be instantiated in the
definition of `U`. Only in the second pass, during correction, do we
instantiate both aliases **independently**:

```
T a : [ A, B [ C, D (T a) ] ]
U a : [ C, D [ A, B (U a) ] ]
```

and now we can mark each recursive, individually:

```
T a : [ A, B [ C, D <rec1> ] ] as <rec1>
U a : [ C, D [ A, B <rec2> ] ] as <rec2>
```

This means that the surface types shown to users might be a bit larger,
but it has the benefit that everything needed to understand a layout of
a type in later passes is stored on the type directly, and we don't need
to keep alias mappings.

Since we sort by connected components, this should be complete.

Closes #2458
2022-02-11 08:43:33 -05:00
Jan Van Bruggen
fa466cd8d8
Fix a failing test
How did this pass CI testing?

Output from `cargo test --release`:
```
failures:

---- test_parse::comment_after_def stdout ----
The source code for this test did not successfully parse!

thread 'test_parse::comment_after_def' panicked at 'assertion failed: `(left == right)`

Diff < left / right > :
 [
<    |L 0-0, C 0-7| SpaceAfter(
>    @0-7 SpaceAfter(
         SpaceBefore(
             Body(
<                |L 0-0, C 0-3| Identifier(
>                @0-3 Identifier(
                     "foo",
                 ),
<                |L 0-0, C 6-7| Num(
>                @6-7 Num(
                     "1",
                 ),
             ),
             [],
         ),
         [
             LineComment(
                 " comment after",
             ),
         ],
     ),
 ]

', compiler/parse/tests/test_parse.rs:291:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

failures:
    test_parse::comment_after_def

test result: FAILED. 164 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s

error: test failed, to rerun pass '-p roc_parse --test test_parse'
```
2022-02-11 04:20:29 -07:00
ayazhafiz
c064c50036 Catch illegal alias cycles more strictly
Part of #2458
2022-02-10 22:12:33 -05:00
ayazhafiz
13552b11a6 Check self- and mutually-recursive aliases in the same pass 2022-02-10 08:15:48 -05:00
Anton-4
d6681f4e0a
Merge pull request #2160 from rtfeldman/editor-comments
support tld comments in docs and editor(reading only)
2022-02-10 11:49:10 +01:00
Brian Carroll
c61a18a200 Use custom macros for static assertions 2022-02-09 17:16:43 +00:00