Commit graph

5394 commits

Author SHA1 Message Date
Brian Carroll
39fda3e675 Add more information to SymbolStorage
SymbolStorage is function-specific, whereas WasmLayout is function-independent.

SymbolStorage used to be a single-variant enum with a LocalId and a WasmLayout,
but now we need more variants, so we can handle stack memory allocation..

- For values in stack memory, the storage needs to include an offset within the
  stack frame, but we don't need that for primitive values.

- For function parameters, the allocated stack memory is in the caller's frame
  rather than the current frame, so we don't want size or offset.

We could have kept a WasmLayout inside of SymbolStorage but that would have made
possible a lot of invalid combinations. It seemed better to copy the fields we need.
2021-09-26 20:52:17 +01:00
Brian Carroll
ecece45a83 Add a helper method local_id_from_symbol 2021-09-26 20:52:17 +01:00
Brian Carroll
ae6cfe1992 Moree implementations for Wasm32TestResult 2021-09-26 20:52:16 +01:00
Brian Carroll
286ca680e0 Tidy up load_literal 2021-09-26 20:52:16 +01:00
Brian Carroll
ab4f28fd69 Comment out a test that isn't working 2021-09-26 20:52:16 +01:00
Brian Carroll
92b1d73bd6 Refactor build_proc into smaller helpers 2021-09-26 20:52:10 +01:00
Folkert
bd6e966833 clippy 2021-09-26 13:28:03 +02:00
Folkert
e9f2fb6193 actually define the arguments 2021-09-26 13:06:06 +02:00
Folkert
ed658ca2aa ugly but working fix for passing the closure env to a function 2021-09-26 13:05:58 +02:00
Folkert
267f88626f add failing test 2021-09-26 13:05:45 +02:00
Folkert de Vries
f7c1a6e952
Merge pull request #1734 from rtfeldman/alias-analysis-const-list
alias analysis static list
2021-09-26 12:43:28 +02:00
Folkert de Vries
a263d57e62
Merge pull request #1738 from rtfeldman/list-function-unit
empty list of functions
2021-09-26 12:43:06 +02:00
Brendan Hansknecht
d9e28ed4b1 Merge branch 'trunk' into test-linker 2021-09-25 12:21:05 -07:00
Brendan Hansknecht
e6c137889a Just disable gc-sections with surgical linker for rust hosts for now 2021-09-25 12:19:56 -07:00
Brendan Hansknecht
411ed58eec Fix rust host with surgical linking 2021-09-24 21:37:58 -07:00
Folkert
72194b87df fix typo 2021-09-24 21:58:25 +02:00
Folkert
23e8f6c687 only introduce rigid once! 2021-09-24 21:53:41 +02:00
Brendan Hansknecht
c334e4d3e5 Export zig builtin version of __muloti4 as weak so it doesn't conflict if it already exists 2021-09-24 08:54:41 -07:00
Brendan Hansknecht
95f29c4d5b Remove stale comment about F16 2021-09-24 08:35:34 -07:00
Brendan Hansknecht
e546ec0c37 Add builtins to precompiled host 2021-09-24 08:31:31 -07:00
Brendan Hansknecht
d1021d652d Add StrCat support and update hello-zig to support dev backend 2021-09-24 08:31:31 -07:00
Brendan Hansknecht
2f24067267 Add small string support to the dev backend 2021-09-24 08:12:42 -07:00
Folkert
c11d89c4bf fix typo 2021-09-24 15:47:53 +02:00
Folkert
b7f26baf95 add mono test 2021-09-24 15:44:09 +02:00
Folkert
f43c10373f represent empty closure as unit (not void) 2021-09-24 15:41:00 +02:00
Folkert
34a25408c3 fix issue 2021-09-24 14:27:38 +02:00
Anton-4
67efc9bd5f Merge branch 'editor-let-value' of github.com:rtfeldman/roc into editor-let-value 2021-09-24 11:53:08 +02:00
Anton-4
bae7a12e9e Merge branch 'trunk' of github.com:rtfeldman/roc into editor-let-value 2021-09-24 11:52:27 +02:00
Brendan Hansknecht
a593713800 Fix surgical linking for C hosts with extra arg 2021-09-23 21:29:53 -07:00
Brendan Hansknecht
7d1b88b3fb Merge branch 'trunk' into integrate-linker 2021-09-23 21:12:40 -07:00
Folkert
f3fae8ea61 alias analysis static list 2021-09-23 23:18:05 +02:00
Folkert
cfdda10df4 fix argument passing 2021-09-22 21:23:53 +02:00
Folkert
3c53435e7e properly handle arguments to a closure caller 2021-09-22 21:16:50 +02:00
Folkert
b257a24edf don't canonicalize Apply arguments twice 2021-09-22 21:16:40 +02:00
Folkert
f82c4350fb handle shadowing type names 2021-09-22 21:16:29 +02:00
Folkert de Vries
9fd5ad53b5
Merge pull request #1724 from rtfeldman/gen-dev/joinpoint
Gen dev/joinpoint
2021-09-22 14:16:41 +02:00
Richard Feldman
33d9077989
Merge pull request #1720 from rtfeldman/direct-return-known-types
return values from roc
2021-09-21 21:43:51 -04:00
Brendan Hansknecht
0c6f8f308f Remove f16. It is not really supported by modern CPU hardware. 2021-09-21 16:51:47 -07:00
Brendan Hansknecht
d3c344e4da Add macros for common builtin types 2021-09-21 15:38:46 -07:00
Brendan Hansknecht
1a6ca4be59 Convert layout map to store Layouts in order to avoid unsafe mangling 2021-09-21 15:27:21 -07:00
Brendan Hansknecht
006fe3beff Remove borrow constraint, it is used for refcounting before the backend 2021-09-21 15:09:10 -07:00
Brendan Hansknecht
d710e78ab3
Merge branch 'trunk' into integrate-linker 2021-09-21 09:39:47 -07:00
Brendan Hansknecht
1fb0c8043f Optimize away unnecessary jump right before return 2021-09-21 00:14:13 -07:00
Brendan Hansknecht
54e2792b12 Fix typo 2021-09-20 23:41:20 -07:00
Brendan Hansknecht
91057ed8b5 Expand support numeric types 2021-09-20 23:28:57 -07:00
Brendan Hansknecht
16d098da5e Add join points and tail call optimization to the dev backend. 2021-09-20 23:13:30 -07:00
Folkert
a4903ccf81 fix repl 2021-09-20 23:27:20 +02:00
Folkert
85cd59dbae Merge remote-tracking branch 'origin/trunk' into direct-return-known-types 2021-09-20 23:13:13 +02:00
Folkert de Vries
e1bdb953bb
Merge branch 'trunk' into integrate-linker 2021-09-20 22:51:24 +02:00
Folkert
53c4dfb8d1 Merge remote-tracking branch 'origin/trunk' into remove-call-result 2021-09-20 22:07:54 +02:00