Commit Graph

18150 Commits

Author SHA1 Message Date
Ayaz Hafiz
fc71e3df04
Add Decode to the load graph 2022-08-01 08:09:22 -05:00
Ayaz Hafiz
1f4099449d
Add Decoder module symbol 2022-08-01 08:09:22 -05:00
Ayaz Hafiz
de1588e760
Add the Decode module 2022-08-01 08:09:22 -05:00
Ayaz Hafiz
f275a943d0
Disable test on wasm3 for now 2022-08-01 08:06:44 -05:00
Ayaz Hafiz
95a439d402
Turn on all abilities tests for wasm 2022-08-01 08:06:39 -05:00
Ayaz Hafiz
922f2f5683
Update tests 2022-07-29 14:59:24 -04:00
Ayaz Hafiz
e830ed281f
Update mono tests 2022-07-29 14:55:41 -04:00
Ayaz Hafiz
4657a957f7
When storing variables, merge them directly with the target rather than unifying
When we unify two variables that end up merged, the rank of the
resulting content is the lower of the two variables being merged. But
during storage, we really do mean, take the target descriptor of the
type we're merging against, and don't try to lower to a
possibly-generalized rank! This fixes a couple bugs I didn't even
realize were present!
2022-07-29 14:53:14 -04:00
Ayaz Hafiz
5f115685e4
Make sure to name closure variables correctly 2022-07-29 14:18:47 -04:00
Ayaz Hafiz
3b38228c36
Fix infer query indentation 2022-07-29 14:18:47 -04:00
Ayaz Hafiz
a62048f799
Typo 2022-07-29 14:18:47 -04:00
Ayaz Hafiz
1851ee09f8
Add some more comments on the behavior of compaction-mode unification 2022-07-29 14:18:47 -04:00
Ayaz Hafiz
ff4b5f58ab
Avoid over-eager disjoint variable merging during lambda set compaction
During the unspecialized lambda set compaction procedure, we might end
up trying to merge too many disjoint variables during unspecialized
lambda unification. Avoid doing so, by checking if we're in the
compaction procedure.
2022-07-29 14:18:47 -04:00
Ayaz Hafiz
bda52b0d39
Implement unspecialized lambda set unification as list merging 2022-07-29 14:18:47 -04:00
Ayaz Hafiz
fe864a445d
Add a test for big encoders enabled by disjoint specialization variables 2022-07-29 14:18:47 -04:00
Ayaz Hafiz
7926499900
Implement disjoint type variable handling in the lambda set specialization algorithm
This completes the last known hole I am aware of in the current
lambda set specialization algorithm.

Closes #3421
2022-07-29 14:18:46 -04:00
Ayaz Hafiz
1976e435a0
Turn a couple more solve tests back on 2022-07-29 08:43:19 -04:00
Ayaz Hafiz
41eb3ad9a4
Separate ability members and their specializations in reference checking 2022-07-29 08:43:19 -04:00
Ayaz Hafiz
7a4c57d3dc
Clippy 2022-07-29 08:43:19 -04:00
Ayaz Hafiz
4049eb6780
Remove unused OpportunisticResolve field 2022-07-29 08:43:19 -04:00
Ayaz Hafiz
31220d5598
Fix spelling 2022-07-29 08:43:19 -04:00
Ayaz Hafiz
f145f29b1b
Make sure records don't de-generalize function types, fixing ability let-generalization
Closes #3641
2022-07-29 08:43:19 -04:00
Ayaz Hafiz
ce8c8f7264
Update solve test
Use named recursive calls for now in ability members
2022-07-29 08:43:18 -04:00
Ayaz Hafiz
f2d4bf20ba
Collect awaited lambda set specializations to be solved when a specialization is known
Despite our best efforts, sometimes we still can't specialize lambda
sets on the fly, if a specialization lambda set's specialization type
isn't yet well-known! This commit adds an `AwaitingSpecializations`
data structure to keep track of the lambda sets blocked for
specialization behind a specialization's full resolution in the module.
After the specialization is resolved, its blocked lambda sets can be
eagerly compacted.
2022-07-29 08:43:18 -04:00
Ayaz Hafiz
350d9cd59b
Simplify opportunistic resolution
We don't need to unify the type state anymore because resolved able
variables are determined only by one type variable.
2022-07-29 08:43:18 -04:00
Ayaz Hafiz
403b2b14b7
Add remove_dependent_unspecialized_lambda_sets to UlsOfVar 2022-07-29 08:43:18 -04:00
Ayaz Hafiz
5a42acc11c
Debug specialization keys 2022-07-29 08:43:18 -04:00
Ayaz Hafiz
240a48bc1c
De-duplicate unspecialized lambda sets by root var 2022-07-29 08:43:17 -04:00
Ayaz Hafiz
76fe397aa1
Consolidate exposed types and derived module in a derived environment 2022-07-29 08:43:17 -04:00
Ayaz Hafiz
0ec92c12f7
Move lambda set specialization to its own module in solve 2022-07-29 08:43:16 -04:00
Folkert de Vries
d409e5f93c
Merge pull request #3638 from rtfeldman/can-abilities5
Syntactic abilities: Part 5 - some solve refactoring
2022-07-29 10:52:43 +02:00
Ayaz Hafiz
c0e976f544
Wrap unification subs in Env 2022-07-28 08:57:33 -04:00
Ayaz Hafiz
0989b2cb82
Move solve problems to their own crate 2022-07-28 08:57:32 -04:00
Ayaz Hafiz
ae4916ceb7
Remove unused variables 2022-07-28 08:57:14 -04:00
Ayaz Hafiz
753d12e912
Eagerly resolve obligations during solving
Replaces the previously-used `DeferredObligations` structure used for
accumulating and then acting over ability obligations during module
solving in favor of just the `ObligationCache`. The `ObligationCache`
stays alive for the entirety of a module solving and provides a
convenient mechanism for answering obligation queries with a backed
cache.
2022-07-28 08:57:13 -04:00
Folkert de Vries
01eb161ffe
Merge pull request #3637 from rtfeldman/can-abilities4
Syntactic abilities: Part 4 - simplify obligation solving procedure
2022-07-28 11:32:11 +02:00
Folkert de Vries
66365fba6e
Merge pull request #3649 from rtfeldman/3640-str-split-edge-case
Fix `Str.split` edge case when string and delimiter are equal
2022-07-28 11:30:40 +02:00
Folkert de Vries
21fe0ca559
Merge pull request #3639 from rtfeldman/expect-lists
Tests for expect output
2022-07-28 08:53:58 +02:00
raleng
c7997c7c38
Fix formatting 2022-07-28 01:57:01 +02:00
raleng
17fc1a297c
Fix Str.split when string equals delimiter
countSegments and strSplitHelp check whether the length of the string is
strictly greater-than the length of the delimiter, skipping most of the
logic when this is not the case.

Changing the check to a greater-than-or-equal allows for the case when
the string and the delimiter are equal, giving the expected result of
["", ""].
2022-07-28 01:36:02 +02:00
raleng
71e83746cc
add countSegments test case
The test ensures countSegments returns a count of two when the string
and the delimiter are equal. The expected result of Str.split in that
case is ["", ""].
2022-07-28 01:35:08 +02:00
raleng
261ff3224d
Add strSplitHelp test cases
Add a test for the case when the string starts with the delimiter, and
when the string and the delimiter are equal.
2022-07-28 01:34:20 +02:00
Folkert de Vries
40fde341f3
Merge pull request #3647 from rtfeldman/fix-stack-overflow
Fix stack overflow in reporting
2022-07-27 23:55:12 +02:00
Folkert
8e5b0daa94
figured out how to serialize nested structures 2022-07-27 23:52:11 +02:00
Folkert
fc01a0ee44
ignore if set_shared_buffer is not defined 2022-07-27 23:50:06 +02:00
Folkert
e62a0ee39a
make string clone return where next extra bytes should be written 2022-07-27 22:48:41 +02:00
Folkert
283539d61a
stop updating offset in repl_expect inner functions 2022-07-27 22:42:58 +02:00
Folkert
71e9835504
add another test 2022-07-27 22:38:33 +02:00
Folkert
da1bcfc8b0
get rid of bytes_read 2022-07-27 21:34:37 +02:00
Folkert
631c642950
store the start of the value for each variable in a table 2022-07-27 21:32:49 +02:00