Owen Mansel-Chan
0f3dd6d8f1
Java: IPA the CFG
2024-12-10 15:26:11 +00:00
Chris Smowton
568bddc4a9
Add test cases for cases falling directly out of switch blocks
2024-03-25 16:31:40 +00:00
Chris Smowton
f317f782ae
Add test for control-flow with mixed patterns, constants and fall-through
2024-03-25 16:31:38 +00:00
Chris Smowton
6cf956d07a
Add CFG test for anonymous variables and fall-throughs with pattern cases
2024-03-25 16:31:38 +00:00
Chris Smowton
aa5f7352e2
Remove fall-through CFG edge for exhaustive switch statements
2023-11-30 11:24:06 +00:00
Chris Smowton
087be2cca8
Adjust test expectations
2023-11-30 11:24:05 +00:00
Chris Smowton
6b3080ae92
Allow case null, default to be the first switch case
...
This is consistent with existing treatment of `case null: default:`
2023-11-30 11:24:04 +00:00
Chris Smowton
05addde957
Adapt control-flow graph to record patterns
2023-11-30 11:24:00 +00:00
Chris Smowton
144218e2f7
Implement switch CFG when there are mixed constant and pattern cases
2023-11-30 11:23:59 +00:00
Chris Smowton
2b16121638
CFG: Support guarded patterns
2023-11-30 11:23:59 +00:00
Chris Smowton
6c990c2cf6
Add pattern-case support and generally debug switch CFGs
...
These were reasonably broken beforehand, due to not taking switch rules into account in enough places, and confusing the expression/statement switch rule distinction with the distinction between switch statements and expressions.
(For example, `switch(x) { 1 -> System.out.println("Hello world") ... }` is a statement, but has a rule expression).
2023-11-30 11:23:58 +00:00