Commit Graph

277 Commits

Author SHA1 Message Date
Simon Friis Vindum
b2032fc6fd Rust: Only normal completion of a let statement initializer steps to the pattern 2024-10-17 16:28:57 +02:00
Simon Friis Vindum
e6f1edcbb5 Rust: Conditional completion of match arm expression should now flow to next arm 2024-10-17 16:25:19 +02:00
Simon Friis Vindum
04f2062942 Rust: Label the non-return CFG edge out of question mark as match 2024-10-17 16:22:07 +02:00
Simon Friis Vindum
fd5d6255c1 Rust: Avoid creating CFG scopes for trait signatures without implementations 2024-10-17 16:20:30 +02:00
Simon Friis Vindum
b0cd44e47f Rust: Add CFG test cases 2024-10-17 16:09:17 +02:00
Simon Friis Vindum
2d1c62b6df Rust: Fix dead end in CFG for empty tuple and struct patterns 2024-10-17 10:40:34 +02:00
Simon Friis Vindum
b97ec405d0 Rust: Add CFG tests with empty tuple and struct patterns 2024-10-17 10:34:49 +02:00
Simon Friis Vindum
76e1885355 Rust: Make mutable variables that are only borrowed immutably amenable for SSA 2024-10-16 15:07:46 +02:00
Simon Friis Vindum
577afc3fd5 Rust: Support capture of mutable variables in SSA 2024-10-16 14:57:46 +02:00
Simon Friis Vindum
a1db359ba1 Rust: Add variable tests involving borrowing and capture 2024-10-16 13:05:53 +02:00
Simon Friis Vindum
cc1e33fb64 Merge pull request #17713 from hvitved/rust/ssa
Rust: Initial SSA implementation
2024-10-15 09:59:48 +02:00
Simon Friis Vindum
8e4e663739 Rust: Handle question mark operator in CFG 2024-10-14 11:38:35 +02:00
Simon Friis Vindum
2f07f1c730 Rust: Abnormal completion in scrutinee does not continue to match arms 2024-10-14 11:32:22 +02:00
Simon Friis Vindum
23ee7b955c Rust: Add CFG tests for question mark operator and scrutinee with return 2024-10-14 11:27:32 +02:00
Tom Hvitved
6290be2922 Rust: Initial SSA implementation 2024-10-11 19:39:28 +02:00
Tom Hvitved
b0ea175021 Rust: Add more variables tests 2024-10-11 19:36:04 +02:00
Arthur Baars
5f45402cf7 Merge remote-tracking branch 'upstream/main' into aibaars/rust-macros 2024-10-11 15:40:07 +02:00
Arthur Baars
9fad5410c0 Rust: implement CFG for macros 2024-10-11 10:37:24 +02:00
Tom Hvitved
756affa4aa Rust: Fix bugs in LetExprTree and MethodCallExprTree 2024-10-10 21:05:01 +02:00
Tom Hvitved
2f14ec9f2a Rust: Include patterns in the CFG 2024-10-10 21:05:00 +02:00
Tom Hvitved
f6f54c6e3b Rust: Include parameters in the CFG 2024-10-10 21:04:58 +02:00
Tom Hvitved
665da3958a Rust: Add CFG test for nested function 2024-10-10 21:04:57 +02:00
Arthur Baars
796da126b8 Rust: update expected output 2024-10-10 15:52:57 +02:00
Geoffrey White
25b3d76f71 Merge pull request #17718 from geoffw0/unusedvar4
Rust: Restrict variables to lowercase (for now).
2024-10-10 08:22:52 +01:00
Geoffrey White
5ac9c2db74 Rust: Accept variables test change. 2024-10-09 17:00:15 +01:00
Tom Hvitved
5afd2d5bf0 Rust: Account for captured variables 2024-10-09 10:17:01 +02:00
Tom Hvitved
a3a0c2b269 Rust: Add more variable tests 2024-10-09 10:17:00 +02:00
Tom Hvitved
fcf1b6d6f5 Merge pull request #17657 from hvitved/rust/cfg-conditional-splitting
Rust: Implement `ConditionalCompletionSplitting`
2024-10-08 16:21:14 +02:00
Tom Hvitved
aa5e0c39ba Rust: Implement ConditionalCompletionSplitting 2024-10-03 21:25:50 +02:00
Tom Hvitved
a9cf33ce18 Rust: &x is neither a read nor a write 2024-10-03 20:20:59 +02:00
Tom Hvitved
05f85497ed Rust: Add &mut variable tests 2024-10-03 19:55:07 +02:00
Tom Hvitved
cd04500dd9 Rust: Account for variables bound in while let expressions 2024-10-03 14:05:24 +02:00
Tom Hvitved
97c2387904 Merge pull request #17644 from hvitved/rust/break-continue-target 2024-10-03 11:38:27 +02:00
Tom Hvitved
6da3972433 Rust: Simplify break/continue CFG labels 2024-10-02 15:45:18 +02:00
Tom Hvitved
1266f9757d Rust: Add {BreakExpr,ContinueExpr}.getTarget() 2024-10-02 15:45:16 +02:00
Tom Hvitved
000dedf3e8 Rust: Output CFG for library-tests/variables 2024-10-02 15:45:14 +02:00
Tom Hvitved
fb9ec2423c Rust: Implement UnusedVariable.ql 2024-10-02 11:22:32 +02:00
Tom Hvitved
9c7216fe4f Rust: Add another CFG test 2024-10-02 10:59:26 +02:00
Tom Hvitved
c4eafb2cf3 Rust: Skip ParenExprs in the CFG 2024-10-01 21:26:49 +02:00
Tom Hvitved
8b66dc16ad Rust: Fix CFG for labelled block expressions 2024-10-01 21:03:36 +02:00
Tom Hvitved
85957767c9 Rust: Fix CFG for while let loops 2024-10-01 21:02:17 +02:00
Tom Hvitved
26c69b8f8a Rust: Add more CFG tests 2024-10-01 21:01:49 +02:00
Tom Hvitved
bbd0aa929f Rust: Add more missing CFG trees 2024-10-01 21:01:26 +02:00
Tom Hvitved
17770af491 Rust: Account for let statement else blocks in deadEnd 2024-10-01 21:00:39 +02:00
Tom Hvitved
a507854288 Rust: Fix bug in BooleanCompletion.isValidForSpecific0 2024-10-01 21:00:33 +02:00
Tom Hvitved
8c1fd8fa7a Rust: Implement CFG for ForExprs 2024-10-01 21:00:09 +02:00
Tom Hvitved
f3e3734424 Rust: Implement CFG for WhileExprs 2024-10-01 20:59:41 +02:00
Tom Hvitved
5444a5bf8a Rust: Extend while and for CFG tests 2024-10-01 20:59:13 +02:00
Tom Hvitved
91e26d0f44 Rust: Add another variable test 2024-10-01 13:45:58 +02:00
Tom Hvitved
b0efffd8f0 Rust: AST support for variables 2024-10-01 10:10:08 +02:00