Commit graph

10698 commits

Author SHA1 Message Date
Richard Feldman
cdec69d8a8
Merge pull request #1777 from rtfeldman/building-pkg-config
Added pkg-config for editor sound
2021-10-11 08:01:53 -04:00
Anton-4
3bc8f525e3
Added pkg-config for editor sound 2021-10-11 09:37:35 +02:00
Brian Carroll
85ca33ddd6 tweak test script 2021-10-11 08:20:33 +01:00
Brian Carroll
403fbb362d Merge branch 'trunk' of github.com:rtfeldman/roc into wasm_reduce_set_get 2021-10-10 23:20:06 +01:00
Brian Carroll
f6685349b3 Batch local declarations to save a few bytes and make some code a little nicer 2021-10-10 22:21:13 +01:00
Brian Carroll
58549bdf07 CodeBuilder doc comments 2021-10-10 20:56:49 +01:00
Brian Carroll
041e26e807 rename CodeBuilder methods 2021-10-10 20:56:39 +01:00
Brian Carroll
c5ee41af25 rename code_builder 2021-10-10 20:56:32 +01:00
Brian Carroll
8164a14dfa rename module_builder 2021-10-10 20:56:20 +01:00
Brian Carroll
c9997f2115 Turn off output file generation & delete duplicate test 2021-10-10 20:55:53 +01:00
Richard Feldman
d02af93662
Merge pull request #1776 from rtfeldman/roc-check-only-typecheck
only do type checking for `roc check`
2021-10-10 13:06:16 -04: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
Brian Carroll
9dcc6f2bc5 size comparison tweaks 2021-10-10 12:52:53 +01: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
Brian Carroll
14f7f0f3b4 Improved test setup for size comparison 2021-10-10 10:42:02 +01:00
Brian Carroll
47f93bddea Fix & refactor create_storage 2021-10-10 10:36:23 +01:00
Brian Carroll
32b9f4fb07 Generate a .wasm file for every test, for size benchmarking 2021-10-09 18:47:37 +01:00
Brian Carroll
d166f65a31 Fix bug: Forgot to generate a local for the stack frame pointer 2021-10-09 18:16:24 +01:00
Brian Carroll
476c1664ec Add debug logging to CodeBuilder and fix a minor bug 2021-10-09 17:24:37 +01:00
Brian Carroll
3aaafdefe1 Get Join/Jump working with VM storage 2021-10-09 16:46:59 +01:00
Anton-4
03d9d41a7a debugging closure -> MarkupNode 2021-10-08 20:19:52 +02:00
Anton-4
52ac6063ca
Merge pull request #1768 from rtfeldman/1281-scale-nicely-when-code_font_size-changes
1281 font size scaling with Config::conde_font_size
2021-10-08 13:35:22 +02:00
Anton-4
664ef04e5b
Merge branch 'trunk' into 1281-scale-nicely-when-code_font_size-changes 2021-10-08 12:35:49 +02:00
Anton-4
0889bac220 fixed caret width, calculate code_txt_xy y based on START_TIP 2021-10-08 12:33:56 +02:00
Richard Feldman
c07838e87c
Merge pull request #1749 from rtfeldman/editor_sound
play sound on F12
2021-10-07 22:36:31 -04:00
Richard Feldman
ced76a6a31
Merge pull request #1759 from rtfeldman/docs_markup
re-use editor markup for docs
2021-10-07 22:31:46 -04:00
Richard Feldman
a471d61bbf
Merge pull request #1767 from rtfeldman/state-of-roc
Added State of Roc to README
2021-10-07 22:31:28 -04:00
Richard Feldman
eb614b2ab5
Merge pull request #1769 from rtfeldman/editor-title
Nice window title
2021-10-07 22:06:23 -04:00
Luiz de Oliveira
c18f4b2cc0 1281 use config code font size to draw tooltip 2021-10-07 21:56:59 -03:00
Brian Carroll
d81999045a Get Switch statements working with VM storage 2021-10-07 09:14:35 +01:00
Zeljko Nesic
1e6ec6a464 Nice window title 2021-10-06 23:32:00 +01:00
Luiz de Oliveira
3b85070e2b 1281 font size scaling with Config::conde_font_siz 2021-10-06 17:57:33 -03:00
Folkert
94e8c62613 make things compile, base64 has a memory leak 2021-10-06 22:57:11 +02:00
Brian Carroll
af823fe5a8 Get rid of unneeded local.set/get in common cases 2021-10-06 20:07:20 +01:00
Anton-4
11417c0624 refactoring, started on converting function closure to MarkNode 2021-10-06 20:27:42 +02:00
Anton-4
68512d5712 removed old comment 2021-10-06 16:52:08 +02:00
Anton-4
f41f9249f5
Added State of Roc to README 2021-10-06 15:39:29 +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
13a855f8dd Fix Bytes in benchmarks 2021-10-05 21:08:11 -04:00
Richard Feldman
81b6160815 Fix List.walk in Base64.Encode 2021-10-05 20:58:48 -04:00
Richard Feldman
8391c337ab Merge remote-tracking branch 'origin/trunk' into list-walk-flip 2021-10-05 20:50:50 -04:00
Richard Feldman
2ab5380f74
Merge pull request #1765 from rtfeldman/editor-ideas
Added many editor ideas/inspiration
2021-10-05 19:43:27 -05:00
Brendan Hansknecht
200e823ae6 Switch to List.dropAt 2021-10-05 14:15:53 -07:00
Brian Carroll
d6bba482ee Treat the Virtual Machine stack as a form of SymbolStorage
Simulate the behaviour of the stack machine, mark where Symbol values
are created, and track where they are in the stack as we emit instructions.

This will allow us to be smarter with setting and getting locals.
However that's not actually implemented yet! At the moment,
we're still generating the same code as before but in a fancier way.

What's happening:

Let's say we have a function call that takes two arguments [A,B]
and that we are lucky and just happen to have a VM stack of [A,B]
That's great, we _should_ not have to do anything, just emit 'Call'

BUT what we are doing is "load A to the top" and then "load B to the top".
This sounds good but it's actually stupid
We are saying we want A at the top of the stack when we don't!!
We want it right where it is, just beneath the top!

So we are emitting code to bring it from 2nd position to the top.
How do we do that? By inserting a local.set instruction to save it,
and a local.get instruction to load it to the top!

What should be happening:

Check the entire VM stack at once for all the symbols we are trying to load.
If they happen to be there (which is likely given the IR structure) do nothing.
If it's not quite perfect... then emit lots of local.set and local.get. Whatever.

What would be the way to solve this properly?

Build the Wasm instructions as a tree, then serialise it depth-first.
The tree encodes all of the information about what needs to be on the
stack at what point in the program. If a tree node has two children,
it consumes two items from the stack. If you do it this way, all
of the instructions get executed just at the right time.
2021-10-05 21:39:19 +01:00
Brendan Hansknecht
86699eda90 Merge branch 'trunk' into false 2021-10-05 13:23:31 -07:00
Brian Carroll
d796bbcc68 add a couple of assertions 2021-10-05 21:19:08 +01:00