Commit graph

5044 commits

Author SHA1 Message Date
Anton-4
37ba50e746 bug fixes involving IdentId 2021-10-11 20:16:22 +02:00
Anton-4
03d9d41a7a debugging closure -> MarkupNode 2021-10-08 20:19:52 +02:00
Richard Feldman
894e295b85
Merge pull request #1764 from rtfeldman/list
Some List docs changes
2021-10-04 18:08:32 -05: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
Folkert de Vries
a42620ecb5
Merge pull request #1752 from rtfeldman/wasm_stack_memory
Wasm stack memory
2021-09-30 23:53:38 +02:00
Brian Carroll
304e9c904f Formatting 2021-09-30 17:28:02 +01:00
Brian Carroll
92085a0fcb README notes on reducing gets and sets 2021-09-30 17:27:56 +01:00
Brian Carroll
7ac7e16f60 Ensure stack frame is always popped when procedure returns from inside a branch 2021-09-30 17:04:16 +01:00
Brian Carroll
79ac2f04b8 Improve stack allocation code 2021-09-30 17:04:16 +01:00
Brian Carroll
f1b14c14e3 Refactor SymbolStorage to emphasise stack/non-stack params
We don't have much (any) code that cares about the difference between
heap pointers and other primitives, but we have a _lot_ of code that cares
if it's stack memory. So let's encode it that way.
2021-09-30 17:04:16 +01:00
Folkert de Vries
c4c7ecf1bc
Merge pull request #1751 from rtfeldman/str-repeat
Add Str.repeat builtin
2021-09-30 12:47:49 +02:00
Kofi Gumbs
2f574ea75e Remove extraneous .into() 2021-09-29 22:41:30 -04:00
Kofi Gumbs
b2343cb0ad Format zig 2021-09-29 21:54:14 -04:00
Kofi Gumbs
0cdafa1623 Add Str.repeat test for big strings 2021-09-29 21:54:06 -04:00
Kofi Gumbs
b32a42f05a Add Str.repeat builtin 2021-09-29 17:32:42 -04:00