Richard Feldman
4ea4aa4708
Merge pull request #2838 from rtfeldman/abilities-typechecking
...
Inference and checking for abilities
2022-04-13 22:03:44 -04:00
Richard Feldman
75ed66b4a8
Merge pull request #2843 from rtfeldman/i/2812
...
Propogate errors in record fields to layout error
2022-04-13 21:56:53 -04:00
Richard Feldman
882107908e
Merge pull request #2849 from rtfeldman/i/2818
...
Specialize bodies with body var, not function var
2022-04-13 20:28:26 -04:00
Ayaz Hafiz
41dd7d0b4d
Specialize bodies with body var, not function var
...
I'm surprised code generation worked so well without this, before...
Closes #2818
2022-04-13 18:35:50 -04:00
Ayaz Hafiz
6343382af5
Propogate errors in record fields to layout error
...
Closes #2812
Unfortunately we don't have a great way to test this without scaffolding
a host since this happens while processing a variable exposed to the
host. In tests the root cause just yields a type error first and codegen
works, just bails during the runtime. But this works.
2022-04-13 16:23:13 -04:00
Ayaz Hafiz
389c46edcf
Remove unneeded var
2022-04-13 10:12:45 -04:00
Ayaz Hafiz
5e1ab8225e
Report when ability member binds >1 variable to parent
2022-04-13 10:11:24 -04:00
Ayaz Hafiz
a1c1dc1a9f
Ask rustc to please always inline
2022-04-13 08:49:27 -04:00
Kevin Gillette
2c4a83788c
Rename internal NUM_DIV_INT references to NUM_DIV_FLOOR.
...
This balances with NUM_DIV_CEIL
(which is another form of integer division).
2022-04-13 02:48:57 -06:00
Ayaz Hafiz
0336b6ad27
Clippy
2022-04-12 19:02:58 -04:00
Ayaz Hafiz
67b5ab7fe7
Add test for when specialization types conflict
2022-04-12 19:01:36 -04:00
Ayaz Hafiz
cf1a6691dd
Fix solve tests
2022-04-12 18:54:12 -04:00
Ayaz Hafiz
d94556d807
Report overly general specializations
2022-04-12 18:52:49 -04:00
Ayaz Hafiz
16d0060824
Report errors for type errors in specializations outside of ability impl
2022-04-12 18:41:20 -04:00
Ayaz Hafiz
127d435ff2
Report incomplete ability implementations
2022-04-12 18:26:19 -04:00
Ayaz Hafiz
b86bf94d92
Dev, wasm test bugs
2022-04-12 17:35:00 -04:00
Ayaz Hafiz
462f443956
Comment
2022-04-12 17:23:03 -04:00
Ayaz Hafiz
865c1f15d7
Fix test compile errors, and simply load_internal tests
2022-04-12 16:42:51 -04:00
Ayaz Hafiz
cbbbb8c855
Remove stray dbg
s
2022-04-12 16:32:50 -04:00
Ayaz Hafiz
64b559073d
Clippy
2022-04-12 16:18:07 -04:00
Ayaz Hafiz
15a040ec87
Basic type inference and solving for abilities
...
Note that is still pretty limited. We only permit opaque types to
implement abilities, abilities cannot have type arguments, and also no
other functions may depend on abilities
2022-04-12 16:18:07 -04:00
Ayaz Hafiz
913d97cab1
Add needed imports
2022-04-12 16:18:07 -04:00
Ayaz Hafiz
7536d48a22
Remove unused function
2022-04-12 16:18:06 -04:00
Richard Feldman
f39f7eda03
Merge pull request #2832 from rtfeldman/div-no-result
...
`div`, `divCeil`, `divFloor` panic + add checked versions returning `Result`
2022-04-12 15:10:06 -04:00
Nikita Mounier
c035900d64
Update test_mono test.
2022-04-12 18:15:19 +00:00
Nikita Mounier
dfba77bd04
Explicit i128 in test.
2022-04-12 16:41:29 +00:00
Nikita Mounier
0f0e9bdf14
Fix test in solve_expr.rs
2022-04-12 12:12:29 +00:00
Nikita Mounier
2a56463b74
Fix typo in test_load.
2022-04-12 01:23:49 +00:00
Nikita Mounier
895ba92239
Change expected types in test_load.
2022-04-12 01:21:24 +00:00
Kevin Gillette
1c3700e22e
Minor typo/formatting fixes
2022-04-11 19:11:37 -06:00
Nikita Mounier
6b2d1a7af6
Remove outdated comments.
2022-04-11 23:36:30 +00:00
Nikita Mounier
dbb91639e9
Revert weird changes in tests.
2022-04-11 21:33:22 +00:00
Nikita Mounier
20b9f6377c
Fix f64 ambiguity in test.
2022-04-11 19:43:21 +00:00
Nikita Mounier
799c05f183
Fix test.
2022-04-11 17:56:43 +00:00
Nikita Mounier
1d5ab1d79c
Merge remote-tracking branch 'origin/trunk' into div-no-result
2022-04-11 17:51:38 +00:00
Richard Feldman
d81228df80
cargo fmt
2022-04-11 13:17:46 -04:00
Nikita Mounier
1df1b4bc84
Fix typo.
2022-04-11 12:34:23 +00:00
Nikita Mounier
8206f345c7
Merge remote-tracking branch 'origin/trunk' into div-no-result
2022-04-11 11:45:06 +00:00
Nikita Mounier
9182bb5773
Add toF32/64 checked versions in symbol.rs to avoid conflict.
2022-04-11 11:35:56 +00:00
Nikita Mounier
4ecf2a8c24
Modify division behaviour to panic when dividing by 0, and add divChecked
, divFloorChecked and
divCeilingChecked` for safe alternatives which return a Result, mimicking the previous behaviour.
2022-04-11 11:23:33 +00:00
Folkert de Vries
7675e0232b
Merge pull request #2819 from rtfeldman/zero-arg-tag
...
Drop unused `arguments` field from `ZeroArgumentTag`
2022-04-10 15:18:03 +02:00
Ayaz Hafiz
a102a7497e
Support box/unbox for types that are typically only on the stack
...
Closes #2786
2022-04-09 16:22:01 -04:00
Richard Feldman
e9acbe983f
Use array over vec for exists_many
2022-04-09 10:09:03 -04:00
Richard Feldman
babe281b5d
Merge pull request #2780 from rtfeldman/no-link
...
Add --no-link flag for more complex linking cases
2022-04-08 23:49:48 -04:00
Richard Feldman
dd56fdb61c
Fix regression with ZeroArgumentTag constraint gen
...
Turns out it can't share quite that much code with Tag,
because doing so skips the important function-based
constraints.
2022-04-08 21:31:19 -04:00
Richard Feldman
b2ff785a5e
Another clip bites the clip
2022-04-08 19:56:43 -04:00
Folkert de Vries
5dc8c852e9
Merge pull request #2815 from rtfeldman/i/2811
...
Specialize polymorphic values before binding to pattern
2022-04-08 21:44:11 +02:00
Ayaz
69ed0b755a
Merge pull request #2804 from rtfeldman/abilities-canonicalization
...
Basic canonicalization, error checking for abilities
2022-04-08 12:00:23 -04:00
Richard Feldman
b777b88e1c
Drop unused arguments
field from ZeroArgumentTag
2022-04-08 11:53:16 -04:00
Richard Feldman
45b5df3a23
Extract constrain_tag helper function
2022-04-08 11:52:57 -04:00