Commit graph

5061 commits

Author SHA1 Message Date
Folkert
9763f9b51b WIP 2021-10-17 16:08:41 +02:00
Folkert
5084fd533b only do type checing for roc check 2021-10-10 16:32:14 +02:00
Richard Feldman
a0887da6ca
Merge pull request #1645 from rtfeldman/list-walk-flip
Reorder List.walk arguments
2021-10-10 08:38:20 -04:00
Folkert
15a2ac7410 update more List.walk uses 2021-10-10 12:35:52 +02:00
Folkert
ebcee4021c flip list.walk passed function arguments 2021-10-10 12:35:03 +02:00
Folkert
94e8c62613 make things compile, base64 has a memory leak 2021-10-06 22:57:11 +02:00
Richard Feldman
c6a8bdfdbe Swap closure indices in alias analysis 2021-10-06 08:59:38 -04:00
Richard Feldman
90401477c9 Fix List.walkUntil arg order 2021-10-06 07:32:56 -04:00
Richard Feldman
54a1a33ddf Improve unreachable error message 2021-10-05 21:19:08 -04:00
Richard Feldman
8391c337ab Merge remote-tracking branch 'origin/trunk' into list-walk-flip 2021-10-05 20:50:50 -04:00
Anton-4
ab665b7380 Merge branch 'trunk' of github.com:rtfeldman/roc into docs_markup 2021-10-05 11:58:45 +02:00
Anton-4
4324b08a30 cleanup+fmt+clippy 2021-10-05 11:58:11 +02:00
Richard Feldman
894e295b85
Merge pull request #1764 from rtfeldman/list
Some List docs changes
2021-10-04 18:08:32 -05:00
Anton-4
548d806a88 def->MarkupNode working 2021-10-04 19:26:31 +02:00
Folkert de Vries
fa4875da83
Merge pull request #1761 from rtfeldman/giesch
Add List.dropAt
2021-10-04 15:01:17 +02:00
Richard Feldman
cfe7d5afbb Document List.map2 and List.map3 2021-10-04 08:42:52 -04:00
Richard Feldman
e6ec1ded22 Add mapJoin and mapOrDrop to List 2021-10-04 08:26:23 -04:00
Richard Feldman
696a8273ee
Merge pull request #1742 from rtfeldman/test-linker
Test linker
2021-10-03 23:26:15 -04:00
Richard Feldman
c7e20e0ccc
Merge pull request #1741 from rtfeldman/nested-rigid-introduced-twice
only introduce rigid once!
2021-10-03 22:23:39 -04:00
Brian Carroll
d9c595a6c2
Merge pull request #1757 from rtfeldman/wasm_shared_stack_pointer
Wasm shared stack pointer
2021-10-03 22:57:12 +01:00
Folkert de Vries
3d82369bcd
Merge branch 'trunk' into nested-rigid-introduced-twice 2021-10-03 23:55:23 +02:00
Brian Carroll
cc6f83f284 Clearer variant names for StackMemoryLocation 2021-10-03 21:53:18 +01:00
Brian Carroll
2756425eb9 Assert storage matches when copying 2021-10-03 21:52:27 +01:00
Richard Feldman
47c52b0220
Merge pull request #1737 from rtfeldman/fix-repl-sum-crash
repl cannot handle some functions
2021-10-03 15:52:26 -05:00
Richard Feldman
1054095e1a
Merge pull request #1744 from rtfeldman/call-with-closure
Call with closure
2021-10-03 15:49:34 -05:00
Richard Feldman
e3a8d436cf
Merge pull request #1607 from rtfeldman/editor-let-value
file loading/saving/running, headers, top level defs
2021-10-03 15:45:08 -05:00
Dan Knutson
b83336d3c3 remove outdated uniqueness doc 2021-10-03 14:39:35 -05:00
Dan Knutson
25215cb3e3 cleanup mutable case, split test 2021-10-03 14:09:07 -05:00
Dan Knutson
2a72439117 WIP adding unique mutable case 2021-10-03 13:55:11 -05:00
Dan Knutson
d1ee9c90b2 fix copy/paste error in test 2021-10-03 13:55:11 -05:00
Dan Knutson
65821d6a9f remove giesch/todo tags, add List.drop doc 2021-10-03 13:55:11 -05:00
Dan Knutson
700ab20a8c add tests for List.dropAt 2021-10-03 13:55:11 -05:00
Dan Knutson
3baff93a97 add first version of List.dropAt
* adds an implementation with no uniqueness/mutability
2021-10-03 13:55:11 -05:00
Folkert
f8ac85195b fix zig test 2021-10-03 14:18:48 +02:00
Folkert
0690633116 spec for List.reverse 2021-10-03 13:34:09 +02:00
Folkert
13d480d5f3 spec for list append 2021-10-03 13:27:47 +02:00
Folkert
486f1d540f add specifications for fromUtf8 and toUtf8 2021-10-03 13:22:03 +02:00
Folkert
018348bd83 make Str.fromUtf8 in-place 2021-10-03 12:13:17 +02:00
Folkert
9e97a09a87 check if exposed function is defined already 2021-10-03 00:57:54 +02:00
Folkert
dbb8acbe67 add in-place List.swap 2021-10-03 00:25:35 +02:00
Folkert
3d7b42deba better error message for when morphic did not specialize 2021-10-03 00:17:15 +02:00
Folkert
fa57ff88a5 disable list of constants in read-only section 2021-10-03 00:16:52 +02:00
Folkert
7e6a3431e2 trick morphic into updating a value that comes from the host 2021-10-03 00:07:38 +02:00
Folkert
5a8547f2d4 trick morphic into specializing closure callers 2021-10-03 00:05:17 +02:00
Brian Carroll
79a4f2bbf7 Refactor SymbolStorage local_id code, and copy_memory
SymbolStorage had some rather ad-hoc methods for extracting pieces of data.
This change makes that more intentional and organised.

Also cleaned up the API for the related function copy_memory,
as it had lots of positional arguments with the same types.
Created a struct for this just to name them and make the code clearer.
2021-10-02 22:31:48 +01:00
Brian Carroll
6aed70978d Refactor SymbolStorage into two enums instead of one 2021-10-02 16:15:06 +01:00
Richard Feldman
7d6aca5a4e
Merge pull request #1754 from rtfeldman/www
Add 'a taste of roc' link to www
2021-10-02 09:40:19 -05:00
Brian Carroll
ffa6ff0a62 gen_wasm: Get rid of individual locals for values in stack memory
All values in stack memory can share the stack frame pointer,
with different offsets.

This avoids having to generate initialisation code for individual
pointers we used to have. It should also make things more efficient
when the runtime compiles Wasm to machine code. It can just assign
the stack frame pointer to a single CPU register and leave it there.

The original idea was to make params and local variables work the same.
(A struct param will be passed as a pointer to caller stack memory.)
But now I don't think that's worth it. Some match expressions get more
awkward this way but we might be able to refactor that to be nicer.
2021-10-02 15:12:25 +01:00
Brian Carroll
4aa2452e01 gen_wasm: Change some compiler bugs error handling from Result to panic
Result makes sense where I have something meaningful to say to the user like
"X is not implemented yet". And also for public functions that may interface
with other parts of the project like Backend.

But for private functions internal to gen_wasm, it's just unhelpful to get a stack trace
to where the Result is unwrapped! I want a stack trace to the root cause.
I always end up temporarily rewriting Err("oops") to panic!("oops") and then waiting
for it to recompile.

This feels like a more balanced approach, using each technique where it makes sense.
2021-10-02 13:40:44 +01:00
Folkert
f1ec5c30d0 make things compile 2021-10-01 20:33:34 +02:00