Commit graph

2855 commits

Author SHA1 Message Date
Ayaz Hafiz
e89f5ad6e5
Mark a couple functions as crate-exposed 2022-12-27 10:28:00 -06:00
Ayaz Hafiz
0b57d2f74f
Remove unneeded import 2022-12-27 10:27:19 -06:00
Ayaz Hafiz
198417c183
Remove ProcLayout::from_raw 2022-12-27 10:25:43 -06:00
Ayaz Hafiz
7a6e68861c
Account for non-capturing functions in larger lambda sets passed to HOLLs
Previously, if the lambda set passed to a HOLL contained any function
that captured, we would assume that the specialization of the HOLL we
should make for each function in the lambda set that we dispatch to
should capture.

This is not right. Instead, we should specialize for each lambda in the
set passed to the HOLL. The present patch enforces that, making sure
that for each lambda in the set, we compute the exact proc layout needed
to call the lambda, based on the captures of the specific lambda in the
set, rather than looking at the set entirely.
2022-12-27 10:22:18 -06:00
Ayaz Hafiz
bb0493918e
Update more usages of from_raw 2022-12-27 09:54:18 -06:00
Ayaz Hafiz
38920b98fa
Debug missing lambda names 2022-12-27 09:54:12 -06:00
Ayaz Hafiz
ccd68b70e1
Do not associate top-level accessor thunks as closures
Leftover follow-up to #4645
2022-12-27 09:49:51 -06:00
Ayaz Hafiz
fe58a0591b
Migrate some more uses of from_raw 2022-12-27 09:27:29 -06:00
Ayaz Hafiz
54bb258aac
Remove stale uniqueness inference comment 2022-12-27 09:26:08 -06:00
Ayaz Hafiz
1e847efbfe
Correctly choose specialized shapes for anonymous closures 2022-12-27 09:18:41 -06:00
Ayaz Hafiz
593344f5c5
Determine the proc layout based on captures of an individual lambda
Previously, we determined whether a closure argument should be added to
the proc layout of a compiled function by checking whether the lambda
set was material at all. But, the extension for a single function should
be added if and only if the function itself captures.
2022-12-27 09:15:21 -06:00
Anton-4
c3b0295a92
Merge pull request #4813 from joshuawarner32/test_syntax
Move syntax tests to a dedicated crate
2022-12-27 13:15:01 +01:00
Anton-4
f0ea60df51
use latest cli platform, added wasm repl build test 2022-12-27 11:31:15 +01:00
Joshua Warner
bfeddc470a
Move syntax tests to a dedicated crate
* test_fmt moves out of fmt crate
* test_parse _mostly_ moves out of parse crate and into `test_snapshots.rs` (some simple tests remain)
* now there's only two fuzz targets, fuzz_expr and fuzz_module, that cover both parsing and formatting
* added a system to auto-add new snapshot entries for new test files
* took some commented-out tests in `test_parse` and converted them to snapshot tests
* moved test_fmt's verification of formatting consistency into test_snapshots
* fixed a huge derp on my part where the fmt fuzzer in #4758 was completely useless (broken by refactoring just prior to submitting the PR)
* fixed a formatting bug found by fuzzing (bound_variable.expr.roc) - that I missed earlier due to ^^^ that derp
* no longer have roc_test_utils as a dependency in fmt - which was causing problems for the wasm build
2022-12-26 22:50:24 -08:00
Richard Feldman
8c40d72a1f
Don't add exposed modules to imported_modules 2022-12-26 04:35:23 -05:00
Richard Feldman
a663634e30
Add a comment 2022-12-25 17:15:53 -05:00
Richard Feldman
e5c5ae3e3f
Make a debug_assert! more precise 2022-12-25 17:13:42 -05:00
Richard Feldman
73fa34ba31
Only add extra imported modules when it's the root 2022-12-24 22:50:47 -05:00
Richard Feldman
1e0f5c2b28
Fix missing shorthands when importing packages 2022-12-24 22:49:40 -05:00
Richard Feldman
c925686443
Add some debug_assert! checks 2022-12-24 22:40:44 -05:00
Richard Feldman
5c80657bb2
Update some comments and docs 2022-12-24 22:32:16 -05:00
Richard Feldman
52bbe0062f
Drop an unnecessary scope block 2022-12-24 22:32:16 -05:00
Richard Feldman
34417f5692
clippy 2022-12-24 22:32:16 -05:00
Richard Feldman
5e3d808a61
roc format 2022-12-24 22:32:15 -05:00
Richard Feldman
c0dd801db6
Use VecMap over MutMap to store module docs 2022-12-24 22:32:15 -05:00
Richard Feldman
361d930f46
Load exposes entries in addition to imports 2022-12-24 22:32:15 -05:00
Richard Feldman
56470dfb1b
Don't print interns in docs gen error 2022-12-24 22:32:15 -05:00
Richard Feldman
39f60be377
Add builtins/main.roc for docs generation 2022-12-24 22:32:14 -05:00
Richard Feldman
4452b06b6d
Fix some builtin docs 2022-12-24 22:32:14 -05:00
Richard Feldman
d8d517d6f9
Support generating docs for packages too 2022-12-24 22:32:14 -05:00
Richard Feldman
e5a0509380
Fix merge issue 2022-12-24 22:32:14 -05:00
Richard Feldman
15d4c2ad68
Don't render undexposed types in docs 2022-12-24 22:32:13 -05:00
Richard Feldman
15590fb31b
Generate docs basde on package root .roc file 2022-12-24 22:32:13 -05:00
Richard Feldman
e549456668
Store exposed module IDs in file loading state 2022-12-24 22:32:13 -05:00
Richard Feldman
ab45d6c632
Fix docs generation of types 2022-12-24 22:32:12 -05:00
Folkert de Vries
4022b44ff9
Merge pull request #4798 from JTeeuwissen/main
Replace DeclarationToIndex elements with a hash map.
2022-12-22 17:19:37 +01:00
J.Teeuwissen
1caafbc131
Feedback 2022-12-22 15:42:26 +01:00
Ayaz
dbdf4acdd7
Merge pull request #4758 from joshuawarner32/fuzzing-take-2
Add fuzzing for the formatter and fix bugs
2022-12-22 06:35:34 -07:00
Ayaz
017e48625c
Merge pull request #4797 from roc-lang/dbg-refcounting
make dbg transparent to refcounting
2022-12-22 06:34:53 -07:00
J.Teeuwissen
5229edd742
Use hash instead of binary search 2022-12-22 14:08:41 +01:00
Folkert de Vries
3682e7db6c
Merge pull request #4796 from roc-lang/str-rc-fixes
fix missing decref in split and concat
2022-12-22 12:00:53 +01:00
Folkert
4ef541395a
remove dbg lowlevel 2022-12-22 02:45:09 +01:00
Folkert
1481aea40c
fix missing decref in split and concat 2022-12-22 01:08:31 +01:00
Folkert
f76df8a356
make dbg transparent to refcounting 2022-12-22 01:03:03 +01:00
Folkert
6c7d434f81
fix lifetime issue in RocStr.asU8Ptr 2022-12-21 01:43:38 +01:00
Folkert
7536a5b8b0
remove some commented code 2022-12-20 16:46:45 +01:00
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
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