Commit graph

4668 commits

Author SHA1 Message Date
Folkert
12ec3189c8
and the final one 2022-12-20 16:45:53 +01:00
Folkert
acf22ebf7e
fix 32-bit wasm to num conversion 2022-12-20 16:34:24 +01:00
Folkert
af4023f116
make i386 cli tests compile 2022-12-20 16:29:01 +01:00
Folkert
d765cae620
remove get_element_type in some C abi functions 2022-12-20 16:09:59 +01:00
Folkert
bb4ff34aaa
be more precise with zig return types 2022-12-20 15:43:11 +01:00
Folkert de Vries
ec80161824
Merge pull request #4793 from roc-lang/llvm-15-zig-10-round-2
Prepare Llvm 15 update
2022-12-20 14:10:57 +01:00
J Teeuwissen
dc65298f9d
Merge branch 'roc-lang:main' into main 2022-12-20 10:19:35 +01:00
Richard Feldman
e84b3c2704
Merge pull request #4781 from roc-lang/dbg-final-expression
parse error for dbg/expect final expressions
2022-12-19 23:36:51 -05:00
Richard Feldman
205b9bc20a
Merge pull request #4736 from roc-lang/packages
Basic Packages
2022-12-19 22:37:45 -05:00
Brian Carroll
9c3f61c448
cli_run: update virtual-dom test and add a client-side test 2022-12-19 23:40:10 +00:00
Folkert
976305bda2
clippy 2022-12-20 00:24:54 +01:00
Folkert
9bf8d65170
upgrade most build_load usages 2022-12-20 00:11:45 +01:00
Folkert
f2d0953e0a
upgrade build_in_bounds_gep 2022-12-19 20:21:27 +01:00
Folkert
bc9c813fec
already do some of the llvm struct_gep conversion work 2022-12-19 19:57:31 +01:00
Folkert
0f46ea83d0
standardize WhenRecursive 2022-12-19 19:05:25 +01:00
Anton-4
3185207313
ignore virtual dom test on windows 2022-12-19 11:31:18 +01:00
Folkert de Vries
468caba3c9
Merge pull request #4785 from roc-lang/wasm_interp_rename_value_storage
Wasm interp rename value storage
2022-12-18 21:09:39 +01:00
Folkert de Vries
3f7ce97166
Merge pull request #4784 from roc-lang/wasm_interp_faster_call
Wasm interp faster calls
2022-12-18 21:08:36 +01:00
Folkert de Vries
a18197347b
Merge pull request #4767 from roc-lang/wasm_interp_repl_test
Replace Wasmer with roc_wasm_interp
2022-12-18 20:44:58 +01:00
Brian Carroll
32fcfec51d
virtual-dom: add a roc check test to cli_run 2022-12-18 16:48:20 +00:00
Richard Feldman
09764be7c3
Go back to PackageName 2022-12-18 10:11:19 -05:00
Richard Feldman
ecf7bea259
Temporarily disable an assertion.
I'm going to go back and revise all this LoadingProblem logic
later, but for now this unblocks things.
2022-12-18 06:19:33 -05:00
Ayaz
95276ceea5
Merge pull request #4786 from roc-lang/llvm-cleanup
Llvm cleanup
2022-12-17 21:19:31 -07:00
Brian Carroll
83b5607022
wasm_interp: rename various variables stack->store 2022-12-18 01:09:20 +00:00
Brian Carroll
f968999ab4
wasm_interp: rename Instance::value_stack -> value_store 2022-12-18 00:21:07 +00:00
Brian Carroll
6cfc7dc6a0
wasm_interp: comments on ValueStore 2022-12-18 00:21:07 +00:00
Brian Carroll
963e6dc6b9
wasm_interp: rename struct ValueStack -> ValueStore 2022-12-18 00:21:06 +00:00
Brian Carroll
a3c6cfbc0e
wasm_interp: rename module value_stack -> value_store 2022-12-18 00:20:29 +00:00
Brian Carroll
84e6267508
wasm_interp: re-implement stack trace printing 2022-12-18 00:17:11 +00:00
Folkert
3720c38e2b
convert to pointer_cast where we can 2022-12-17 23:21:19 +01:00
Ayaz
ac532791eb
Merge pull request #4778 from joshuawarner32/fix-record-unification 2022-12-17 16:20:51 -06:00
Folkert
8e36456765
de-duplicate tag extract value code 2022-12-17 22:56:05 +01:00
Folkert
551a0aa6db
subtle lifetime issue on a pointer 2022-12-17 22:49:36 +01:00
Folkert
8eddffeb70
clarify variable name 2022-12-17 22:24:55 +01:00
Folkert
78e0a4ca6b
use load_roc_value 2022-12-17 22:24:41 +01:00
Folkert
1d260530fb
print a prettier command string 2022-12-17 22:21:00 +01:00
Folkert
a522d49558
backport some changes needed for zig 10 2022-12-17 22:17:27 +01:00
Brian Carroll
4742033d00
wasm_interp: simplify do_return 2022-12-17 20:52:19 +00:00
Brian Carroll
6beac8d56a
wasm_interp: fix bug in position of locals block 2022-12-17 20:52:19 +00:00
Brian Carroll
b87cb69d94
wasm_interp: create a debug visualisation for values and blocks 2022-12-17 20:52:19 +00:00
Brian Carroll
b0d2e7a409
wasm_interp: store return type in frame & create SignatureParamsIter 2022-12-17 20:52:19 +00:00
Brian Carroll
d51beb073f
wasm_interp: create a block for each function and get tests working again 2022-12-17 20:52:19 +00:00
Brian Carroll
caedb9060b
wasm_interp: remove CallStack, create Frame, & share value storage for stack and locals
This allows us to do calls without moving arguments from one place to another
2022-12-17 20:52:19 +00:00
Brian Carroll
ef69170b88
wasm_interp: fix typo bug in WASI random_get 2022-12-17 20:49:25 +00:00
Joshua Warner
174f7d5e4d
Fix bug in unifying records
This was leading us to have an infinitely-recursive type, which eventually causes layout to stack-overflow

Fixes #4739
2022-12-17 11:37:19 -08:00
Joshua Warner
a046428ce6
Add fuzzing for the formatter and fix bugs
This commit adds fuzzing for the (expr) formatter, with the same invariants that we use for fmt tests:
  * We start with text, which we parse
  * We format the AST, which must succeed
  * We parse back the AST and make sure it's identical igoring whitespace+comments
  * We format the new AST and assert it's equal to the first formatted version ("idempotency")

Interestingly, while a lot of bugs this found were in the formatter, it also found some parsing bugs.

It then fixes a bunch of bugs that fell out:
* Some small oversights in RemoveSpaces
* Make sure `_a` doesn't parse as an inferred type (`_`) followed by an identifier (parsing bug!)
* Call `extract_spaces` on a parsed expr before matching on it, lest it be Expr::SpaceBefore - when parsing aliases
* A few cases where the formatter generated invalid/different code
* Numerous formatting bugs that caused the formatting to not be idempotent

The last point there is worth talking further about. There were several cases where the old code was trying to enforce strong
opinions about how to insert newlines in function types and defs. In both of those cases, it looked like the goals of
(1) idempotency, (2) giving the user some say in the output, and (3) these strong opinions - were often in conflict.

For these cases, I erred on the side of following the user's existing choices about where to put newlines.

We can go back and re-add this strong opinionation later - but this seemed the right approach for now.
2022-12-17 09:52:09 -08:00
Brian Carroll
2eea0b1adf
repl_test: fix path for compiler include_bytes 2022-12-17 16:32:17 +00:00
Richard Feldman
10c8523888
Handle FileProblem explicitly 2022-12-17 03:57:11 -05:00
Richard Feldman
ed0b07a62f
clippy 2022-12-17 03:35:39 -05:00
Richard Feldman
3e448fd2b4
Merge remote-tracking branch 'origin/main' into packages 2022-12-17 03:32:52 -05:00