Commit graph

941 commits

Author SHA1 Message Date
Folkert
dda4f46e67
use VecSet in References 2022-04-17 19:37:10 +02:00
Ayaz Hafiz
6b4294307f
Start saving ability signature on designated variable again 2022-04-14 16:22:54 -04:00
Ayaz
6472e32173
Merge pull request #2842 from rtfeldman/abilities-typechecking2
Additional checking and reporting for abilities, behind #2838
2022-04-14 08:44:57 -04:00
Richard Feldman
4ea4aa4708
Merge pull request #2838 from rtfeldman/abilities-typechecking
Inference and checking for abilities
2022-04-13 22:03:44 -04:00
Ayaz Hafiz
8eec930260
More and smarter checking and error reporting for abilities 2022-04-13 15:25:19 -04:00
Ayaz Hafiz
0792ccbbe8
Calling ability with non-specialized type is an error 2022-04-13 11:49:33 -04:00
Ayaz Hafiz
d110fbde6c
Annotation specializes ability 2022-04-13 10:44:34 -04:00
Ayaz Hafiz
25b3aa7ca7
Typed body specializations solve 2022-04-13 10:42:46 -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
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
127d435ff2
Report incomplete ability implementations 2022-04-12 18:26:19 -04:00
Ayaz Hafiz
cbbbb8c855
Remove stray dbgs 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
7536d48a22
Remove unused function 2022-04-12 16:18:06 -04:00
Nikita Mounier
8206f345c7 Merge remote-tracking branch 'origin/trunk' into div-no-result 2022-04-11 11:45:06 +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
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
ayazhafiz
94a5cd3559 Improve shadow errors 2022-04-07 22:38:20 -04:00
ayazhafiz
02e1a98cac Remove redundant member 2022-04-07 22:19:30 -04:00
ayazhafiz
304a32ef0a Typo 2022-04-07 20:51:21 -04:00
Ayaz Hafiz
1ca3dad1e2 Allow complicated return type 2022-04-07 17:21:17 -04:00
Ayaz Hafiz
73bfff699f Handle symbols that shadow ability member definitions
Just add the shadowing symbol for now. We'll handle checking that a
specialization's type matches the member's type definition in a later
pass, during typechecking.
2022-04-07 17:21:17 -04:00
Ayaz Hafiz
884d07344e Clippy 2022-04-07 17:21:17 -04:00
Ayaz Hafiz
66ec1b4a84 Basic canonicalization and error checking for abilities 2022-04-07 17:21:17 -04:00
Richard Feldman
a4233ad661
Add LLVM implementation for toF32/64 2022-04-07 16:13:58 -04:00
Richard Feldman
cd00a98636
Add toF32/64 and checked versions 2022-04-07 16:13:57 -04:00
Ayaz Hafiz
d3b848fa46
Clippy 2022-04-06 22:24:14 -04:00
Ayaz Hafiz
a3ac68a41f
Split up Defs into TypeDef and ValueDef
Just a refactoring PR. This is useful because during canonicalization
we always process type defs first, then value defs. With abilities this
distinction continues to grow; in that case, we have patterns associated
with types that we want to process before patterns from values.
2022-04-06 22:18:57 -04:00
Ayaz Hafiz
9fbc525d02
Make sure float suffixes are parsed out after can
Before we hit mono, we need to make sure the suffixes of numeric
literals are parsed out from the literal string, so that we don't try to
parse something whose type we already know but has the extraneous
suffix.

Co'ed with @tagraves
2022-04-05 11:32:34 -04:00
Folkert
0dd2cec09a
update with new clippy lints 2022-03-31 19:34:51 +02:00
Richard Feldman
cce590dee5
Merge pull request #2761 from rtfeldman/simplify-unused-defs
Remove unneeded work in canonicalization
2022-03-23 10:10:05 -04:00
Richard Feldman
750fbf2dcf
Merge pull request #2766 from rtfeldman/simplify-identids
simplify IdentIds
2022-03-22 20:23:56 -04:00
Folkert
a67bb29a36
remove hashmap 2022-03-22 21:58:49 +01:00
Folkert
f25afe4629
skip registering of debug symbols in hot loop 2022-03-22 18:51:56 +01:00
Folkert
7029717cd0
fix missing import 2022-03-21 23:46:25 +01:00
Folkert
725eb217d8
more vecs, less sets 2022-03-21 23:20:57 +01:00
Folkert
14b53c0ccf
simplify local_successors 2022-03-21 23:16:07 +01:00
Folkert
cee1a787c9
and remove everything because it has no effect 2022-03-21 23:07:27 +01:00
Folkert
1b1a7b0385
more cleaned up 2022-03-21 22:54:24 +01:00
Folkert
a170f461e0
cleanup 2022-03-21 22:44:14 +01:00
Folkert
cc9873eb6d
exploration 2022-03-21 22:41:32 +01:00
hafiz
3f07afe3b5
Merge pull request #2750 from rtfeldman/delay-instantiating-aliases-fix-limitations
Delay instantiating aliases fix limitations
2022-03-19 20:41:14 -04:00
hafiz
418e71e95c
Merge pull request #2755 from rtfeldman/dense-let-constraints
Constraint gen tweaks
2022-03-19 20:39:55 -04:00
Folkert
f5ebc5bec9
add some Constraints statistics reporting 2022-03-19 20:50:22 +01:00
Folkert
9ac194a3b3
store Str.Str type in a compact way 2022-03-19 20:49:39 +01:00