Commit Graph

21938 Commits

Author SHA1 Message Date
Folkert de Vries
e1f7dfb3e6
Merge pull request #4649 from roc-lang/wasm_interp_imports
Wasm interp imports
2022-12-02 11:08:23 +01:00
Anton-4
2bf58a5bc3
fix take examples 2022-12-02 10:10:40 +01:00
Brian Carroll
c6e446da8d
wasm_interp: don't expose internal types 2022-12-02 08:02:27 +00:00
Brian Carroll
4714b4599a
wasm_interp: move test_utils into tests/mod.rs 2022-12-02 08:02:23 +00:00
Brian Carroll
ffd35f5884
wasm_interp: move tests inside the crate 2022-12-02 07:54:13 +00:00
Brian Carroll
42a15d07b3
wasm_interp: Just don't support non-function imports! I've never seen them anyway. 2022-12-02 07:47:49 +00:00
Brian Carroll
c38164ce8a
wasm_interp: cache import indices instead of signatures 2022-12-02 07:47:49 +00:00
Richard Feldman
2d8b8678d5
If renaming tmpdir for package fails, deep copy it 2022-12-01 22:39:40 -05:00
Richard Feldman
84eb82b815
Make fs_extra a workspace dependency 2022-12-01 22:33:04 -05:00
Ayaz
0d80e741c2
Merge pull request #4648 from roc-lang/i4636 2022-12-01 18:36:43 -06:00
Ayaz
9b4552608f
Merge pull request #4644 from roc-lang/i4594
Unify ranged numbers with flex able, modulo obligation checking
2022-12-01 16:52:32 -06:00
Ayaz Hafiz
42e8e409d4
Address lint 2022-12-01 15:59:01 -06:00
Brian Carroll
0cf2f4f9e4
clippy 2022-12-01 21:56:59 +00:00
Ayaz Hafiz
9181ed8092
Correctly compile rvalue closures defined in nested defines to lvalues
Previously, a program like

```
main =
  f =
    n = 1
    \{} -[#lam]-> n  # suppose lambda set = #lam
  f {}
```

would be transformed to

```
main =
  n = 1
  f = \{} -[#lam]-> n
  f {}
```

However, the IR lowering procedure is such that we would then associate
`f` as definining the procedure given the lambda set `#lam`. This is not
correct, as `f` is really a function pointer in this circumstance,
rather than the definer of `#lam`.

Instead, the transformation we want to perform is

```
main =
  n = 1
  #lam = \{} -[#lam]-> n
  f = #lam
  f {}
```

Which is what this patch does

Closes #2403
2022-12-01 15:47:18 -06:00
Brian Carroll
04d493c49e
Merge branch 'main' of github.com:rtfeldman/roc into wasm_interp_imports 2022-12-01 21:33:31 +00:00
Brian Carroll
c0f840542a
wasm_interp: test import calls 2022-12-01 21:31:46 +00:00
Ayaz Hafiz
68e364d897
Do not attempt to handle aliasing of procs in variable assignments
Please see the comment in the diff to explain the rationale of this
change.

Closes #4636
2022-12-01 15:20:58 -06:00
Ayaz Hafiz
2dfe0276e4
Make sure to assign and update program holes correctly when specializing symbols
Previously this was a bit hacky, we worked around having to update
symbol substitutions by special-casing the rest of the program. There's
not need to do that.
2022-12-01 14:57:01 -06:00
Brian Carroll
c866ce6b09
wasm_interp: Handle calls to imports 2022-12-01 20:41:38 +00:00
Ayaz Hafiz
f49b0cd207
Update repl expect test to work around Dec copy bug 2022-12-01 13:26:08 -06:00
Ayaz
9f12de38c1
Merge pull request #4643 from roc-lang/i4622
Do not mark whether a module has specialization deps incrementally
2022-12-01 11:49:27 -06:00
Ayaz Hafiz
3d34e158e3
Merge branch 'i4594' of https://github.com/roc-lang/roc into i4594 2022-12-01 11:43:03 -06:00
Ayaz Hafiz
34236654af
Revert "Fix gen_compare::record test"
This reverts commit e8492f279e.
2022-12-01 11:42:27 -06:00
Ayaz Hafiz
3605008fce
Update tests to check eq unbound float is resolved to dec 2022-12-01 11:41:42 -06:00
Ayaz Hafiz
ed7d4f8f63
Obligation checking of floating point for Eq succeeds only with Dec 2022-12-01 11:31:41 -06:00
Ayaz Hafiz
e8492f279e
Fix gen_compare::record test
Unbound floating point numbers cannot be compared for Eq as of
obligation checking - this test is a correction to enforce that!
2022-12-01 11:12:50 -06:00
Ayaz Hafiz
a79e90af6c
Update lockfile 2022-12-01 10:14:03 -06:00
Ayaz Hafiz
d51db4c3ec
Bump wasm3 to avoid blacklist 2022-12-01 10:14:00 -06:00
Jakub Kozłowski
99e2d92f07
Remove lib copying, fix nixpkgs pinning on non-flake usage 2022-12-01 17:07:18 +01:00
Ayaz Hafiz
06d133c866
Update lockfile 2022-12-01 10:06:17 -06:00
Ayaz Hafiz
590535a42b
Obligation checking Eq for floating point types may never succeed 2022-12-01 10:02:37 -06:00
Ayaz Hafiz
6e1a6e5fa4
Bump wasm3 to avoid blacklist 2022-12-01 09:51:31 -06:00
Ayaz Hafiz
0bae0aafb6
Unify ranged numbers with flex able, modulo obligation checking
Closes #4594
2022-12-01 09:50:29 -06:00
Ayaz Hafiz
a42c7c00a6
Turn on roc dev test for env.roc again 2022-12-01 09:10:26 -06:00
Ayaz Hafiz
1ab41bf6b5
Do not mark whether a module has specialization deps incrementally
Whether a module has a dependency on another module for specialization
is already accounted for when the build graph was initially populated,
and should not be modified again.

Closes #4622
2022-12-01 09:08:53 -06:00
Richard Feldman
2a27d3c05f
Merge pull request #4642 from roc-lang/dbg-parsing-problem
stop parsing dbg as a value def
2022-12-01 06:55:23 -05:00
Brian Carroll
b10ac827f1
wasm_interp: simplified ImportDispatcher
We don't really need a trait for the 'import module' concept.
2022-12-01 08:47:32 +00:00
Jakub Kozłowski
b1428041de
update rev for non-flake build 2022-12-01 04:31:39 +01:00
Jakub Kozłowski
53c129591c
fix (?) nix build 2022-12-01 04:29:42 +01:00
Brian Carroll
ec8950816a
wasm_interp: expose both call_export_from_cli and call_export (for library usage) 2022-11-30 23:20:58 +00:00
Anton-4
d2d8511f54
Merge pull request #4639 from roc-lang/wasm_bindgen_whitelist_fix
use whitelist fixed wasm3-rs
2022-11-30 19:34:53 +01:00
Anton-4
a2e296e433
update lock file 2022-11-30 18:15:24 +01:00
Anton-4
6da5c70be5
use whitelist fixed wasm3-rs 2022-11-30 18:13:56 +01:00
Richard Feldman
a0bc105ca8
Merge pull request #4616 from roc-lang/fix-pattern-equivalent
Fix missing cases in Pattern::equivalent
2022-11-30 12:10:09 -05:00
Richard Feldman
da158bca19
Merge pull request #4637 from roc-lang/check-link-exit-status
check the exit status of the link cmd
2022-11-30 12:09:14 -05:00
Folkert
b6622b71ec
stop parsing dbg as a value def 2022-11-30 14:18:48 +01:00
Brian Carroll
7ddff49691
wasm_interp: possible design for imports, using enum dispatch 2022-11-30 07:25:38 +00:00
Joshua Warner
1e47de3c65
Merge pull request #4630 from roc-lang/more-parser-refactoring
Introduce `record!` combinator
2022-11-29 17:50:11 -08:00
Brendan Hansknecht
3d4dbd916a
Merge pull request #4632 from roc-lang/fix-stub-lib-path
fix stub lib path
2022-11-29 23:11:44 +00:00
Brian Carroll
d0b2f9c6e1
Merge pull request #4631 from roc-lang/wasm_interp_final_ops
Wasm interp final ops
2022-11-29 18:18:46 +00:00