Commit Graph

8649 Commits

Author SHA1 Message Date
Folkert
c6abb0e129
fix tab position 2022-05-16 22:30:29 +02:00
Folkert
256e7adaff
move colum state over 2022-05-16 21:39:57 +02:00
Folkert
1a49930d1d
simplifications 2022-05-15 22:00:47 +02:00
Folkert
225254d7e5
fix math 2022-05-15 21:49:10 +02:00
Folkert
f92a8e900d
binary operation bitmask 2022-05-15 21:34:43 +02:00
Folkert
65e842f64a
do a fast pass first to exit early if the spaces will not be parsed 2022-05-15 21:15:02 +02:00
Folkert
c6b13984ed
direct indexing into the slice 2022-05-15 00:17:12 +02:00
Folkert
8f97c217a5
logic base 2022-05-15 00:06:33 +02:00
Folkert
dc4f8289ad
less cloning of the parse state 2022-05-14 23:54:15 +02:00
Folkert
2e3a8befc9
another inline 2022-05-14 23:51:06 +02:00
Folkert
9f2906a2f8
use while let 2022-05-14 23:46:52 +02:00
Folkert
d9977b73aa
inline function 2022-05-14 23:44:51 +02:00
Richard Feldman
d26f6f600f
Merge pull request #3065 from rtfeldman/bindgen-recursive-tag-unions
Bindgen unwrapped pointer recursive tag unions
2022-05-14 16:09:40 -04:00
Richard Feldman
83b2d2fc75
Merge pull request #3066 from rtfeldman/format-multiline-function-annotations 2022-05-14 11:40:35 -04:00
Sean Hagstrom
b91d6aa5a9 fix(formatter): ensure arguments and return value in multi-line function annotation are on separate lines
Added tests based on the examples in: Issue #2587
Removed outdated comment and debug_assert statement
Updated the tests for multi-line higher order function annotations
2022-05-14 14:23:56 +01:00
Folkert
c161140aec
Merge remote-tracking branch 'origin/trunk' into more-tyck 2022-05-14 14:48:54 +02:00
Folkert
7face320eb
move back to one loc_symbols vector 2022-05-14 14:44:37 +02:00
Richard Feldman
de14c9b979
Correctly unwrap cons list payloads in bindgen 2022-05-13 23:55:13 -04:00
Richard Feldman
c9f06a9172
Ad some docs to tag union layouts 2022-05-13 13:06:33 -04:00
Folkert de Vries
8db3a3c981
Merge pull request #3059 from rtfeldman/cleanup-let-constr
Clean up and explain recursive/non-recursive def constraining
2022-05-13 00:01:55 +02:00
Richard Feldman
e6efbdfe7c
Merge pull request #3055 from rtfeldman/bindgen-multi-tag-unions
Bindgen tag unions with payloads
2022-05-12 17:56:53 -04:00
Ayaz Hafiz
c9e8f6130b
Cleanup constrain_def_make_constraint 2022-05-11 19:28:39 -04:00
Ayaz Hafiz
1609a1a48b
Add some comments and tests showing why recursive defs are constrained this way 2022-05-11 19:16:10 -04:00
Ayaz Hafiz
697f5f7a86
Check in ignored tests 2022-05-11 18:12:37 -04:00
Ayaz Hafiz
3f0449292d
My bad 2022-05-11 14:57:03 -04:00
Ayaz Hafiz
75f7f6e681
cargo fmt 2022-05-11 14:57:03 -04:00
Ayaz Hafiz
c708c1ba07
Fix can and load tests 2022-05-11 14:57:03 -04:00
Ayaz Hafiz
710a10a29c
Check for invalid cycles after type solving recursive defs
Disallow cycles that pass through a non-function value. Since we
evaluate eagerly, having one such cycle means there is at least one path
in the program that (likely) has unbounded recursion. Of course we can't
be certain (halting problem), but it's very likely, and avoids stuff
like #1926. Also, mono (as it's done today) won't work if things in a
cycle aren't functions.

Closes #1926
2022-05-11 14:57:01 -04:00
Ayaz Hafiz
17d8545510
Remove symbols_from_pattern 2022-05-11 14:53:40 -04:00
Ayaz Hafiz
9777886376
Fill out pattern traversals, add symbol discovery 2022-05-11 14:53:39 -04:00
Ayaz
d485869954
Merge pull request #3039 from rtfeldman/specializations-at-the-front
Opportunistically resolve specializations during solving
2022-05-11 13:42:19 -04:00
Ayaz Hafiz
7420276116
Avoid an allocation 2022-05-11 11:20:17 -04:00
Richard Feldman
a380afd4dc
Merge remote-tracking branch 'origin/trunk' into bindgen-multi-tag-unions 2022-05-11 10:52:52 -04:00
Richard Feldman
8da0e219b9
Merge pull request #3049 from rtfeldman/clippy-for-tests
clippy --tests
2022-05-11 10:52:00 -04:00
Richard Feldman
b9c07aef27
Use internal_error over unreachable 2022-05-11 10:51:27 -04:00
Richard Feldman
5ff3bfbbf9
Expose the logic for choosing discriminant size 2022-05-11 10:47:56 -04:00
Richard Feldman
512e3c222e
cargo fmt 2022-05-11 10:47:55 -04:00
Richard Feldman
beda367d9f
don't say pi = 1.23 2022-05-11 10:47:55 -04:00
Richard Feldman
dbc6302681
Fix a bunch of errors from clippy --tests 2022-05-11 10:47:55 -04:00
Richard Feldman
a426a61e5d
Add some safety comments for clippy 2022-05-11 10:47:55 -04:00
Ayaz Hafiz
d0c6c06ca1
Remove KnownSizeIterator 2022-05-11 09:06:25 -04:00
Ayaz Hafiz
13441a0243
Revert "Known-size iterator"
This reverts commit f07c56a25d.
2022-05-11 08:59:12 -04:00
Ayaz Hafiz
49c61a6f4a
Fix ignored field 2022-05-11 08:56:04 -04:00
Ayaz Hafiz
eca069bb4a
Test static specializations 2022-05-11 08:53:41 -04:00
Ayaz Hafiz
afb1f826b1
Correct walking of even specialized symbols in mono 2022-05-11 08:53:16 -04:00
Ayaz Hafiz
da00c47102
Opportunistically resolve specializations during solving 2022-05-11 08:53:15 -04:00
Ayaz Hafiz
f07c56a25d
Known-size iterator 2022-05-11 08:52:49 -04:00
Ayaz Hafiz
619d9aa8b3
Decrease specialization ID size 2022-05-11 08:52:49 -04:00
Ayaz Hafiz
bdccda6cfb
Add some debug-assertions regarding what we know about specializations 2022-05-11 08:52:48 -04:00
Folkert de Vries
b2e045bf9a
Merge pull request #3042 from rtfeldman/specialization-under-let
Lift mono of let-bindings to separate function
2022-05-11 14:50:40 +02:00