Commit Graph

3040 Commits

Author SHA1 Message Date
Anders Schack-Mulligen
67f0529cda Dataflow: Sync. 2023-12-04 12:36:57 +01:00
Anders Schack-Mulligen
fd920b8585 Java: Deprecate old data flow api. 2023-12-04 12:36:57 +01:00
Chris Smowton
aa8f798853 Move condition into isNonFallThroughPredecessor 2023-11-30 11:24:07 +00:00
Chris Smowton
94819e37c4 More StmtParent -> SwitchBlock 2023-11-30 11:24:07 +00:00
Chris Smowton
53ca8e5fe9 autoformat 2023-11-30 11:24:07 +00:00
Chris Smowton
633b92da62 Introduce and use SwitchBlock instead of StmtParent for switch-statement-or-expression 2023-11-30 11:24:07 +00:00
Chris Smowton
e50a0eee59 Remove duplicate of expr exception propagation logic 2023-11-30 11:24:07 +00:00
Chris Smowton
6f3bff19cc Expose getFirstPatternCase, not getPatternCase/2 2023-11-30 11:24:07 +00:00
Chris Smowton
40464ed1f9 Eliminate duplicate predicate 2023-11-30 11:24:07 +00:00
Chris Smowton
3971817c92 Fix: ensure is a switch block 2023-11-30 11:24:07 +00:00
Chris Smowton
b1cea1d91e autoformat 2023-11-30 11:24:07 +00:00
Chris Smowton
561f06a4bd Remove unused predicate 2023-11-30 11:24:06 +00:00
Chris Smowton
e9603f0aba Factor out isNonFallThroughPredecessor 2023-11-30 11:24:06 +00:00
Chris Smowton
84ec453a80 Explicitly rule out switchCaseControls for PatternCase 2023-11-30 11:24:06 +00:00
Chris Smowton
77b1721542 Move TypeTestGuard's logic into Guard.appliesTypeTest 2023-11-30 11:24:06 +00:00
Chris Smowton
b33dc38a65 Fix hasBranchEdge for switch exprs with an internal CFG and incoming edges from a passing case guard 2023-11-30 11:24:06 +00:00
Chris Smowton
9b5b496462 Avoid quadratic switch case intermediate 2023-11-30 11:24:06 +00:00
Chris Smowton
d1e16ada4c Tidy up pattern case CFG logic 2023-11-30 11:24:06 +00:00
Chris Smowton
beb827b1d0 Remove unused predicate 2023-11-30 11:24:06 +00:00
Chris Smowton
1cb5efa1ec Simplify last nodes of rule cases 2023-11-30 11:24:06 +00:00
Chris Smowton
aa5f7352e2 Remove fall-through CFG edge for exhaustive switch statements 2023-11-30 11:24:06 +00:00
Chris Smowton
1047a89613 Improve complexity class of getASuccessorSwitchCase 2023-11-30 11:24:06 +00:00
Chris Smowton
d99a005b42 Fix pretty-printing case null, default 2023-11-30 11:24:06 +00:00
Chris Smowton
4bff7953fc Fix record pattern and pretty-printing 2023-11-30 11:24:05 +00:00
Chris Smowton
a11c5c7257 Fixup pretty-printer and add test 2023-11-30 11:24:05 +00:00
Chris Smowton
3bde66adfb Pretty-print 'var' statements 2023-11-30 11:24:05 +00:00
Chris Smowton
07d2ce7a41 Change pretty-printing of PatternCase 2023-11-30 11:24:05 +00:00
Chris Smowton
5511955b60 Simplify getCaseIndex 2023-11-30 11:24:05 +00:00
Chris Smowton
bbc0f29f16 Restrict getCheckedType to unrestricted records, introduce getSyntacticCheckedType and use that where appropriate 2023-11-30 11:24:05 +00:00
Chris Smowton
29fdd04eb0 Include switch and instanceof binding in Variable.getAnAssignedValue, and test via endsInQuote 2023-11-30 11:24:05 +00:00
Chris Smowton
ef6ea71e43 Revert unnecessary exists statement 2023-11-30 11:24:05 +00:00
Chris Smowton
da62a04653 Note that binding variables may be casting nodes 2023-11-30 11:24:04 +00:00
Chris Smowton
89f7e7f76a autoformat 2023-11-30 11:24:04 +00:00
Chris Smowton
dd41f50fbf Fix uses of ConditionBlock that require a condition expression (not a switch case statement) 2023-11-30 11:24:04 +00:00
Chris Smowton
68fe7efd9e autoformat 2023-11-30 11:24:04 +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
0b08507033 Document testedBranch 2023-11-30 11:24:04 +00:00
Chris Smowton
ba0a05c804 Add pretty-printing for patterns 2023-11-30 11:24:04 +00:00
Chris Smowton
668f445fb4 Fix switchCaseControls and hasBranchEdge to account for mixed patterns and constant cases 2023-11-30 11:24:04 +00:00
Chris Smowton
c1814408f0 Fix guard basic block for switch cases 2023-11-30 11:24:04 +00:00
Chris Smowton
6583c72c5d Restrict pattern type guards to account for nested record matching failures 2023-11-30 11:24:03 +00:00
Chris Smowton
d40311efe9 Spelling 2023-11-30 11:24:03 +00:00
Chris Smowton
6e868d21bd Make DefaultCase include NullDefaultCase 2023-11-30 11:24:03 +00:00
Chris Smowton
d2ff1baff0 Replace getDefaultOrNullDefaultCase with getDefaultCase 2023-11-30 11:24:03 +00:00
Chris Smowton
0bb051e08c First stab at implementing negative type-test logic for pattern-case 2023-11-30 11:24:03 +00:00
Chris Smowton
cc373e322f Engineer join order for getLexicallyOrderedRecordField 2023-11-30 11:24:03 +00:00
Chris Smowton
6fb33e0bde Re-re-factor instanceOfGuarded et al 2023-11-30 11:24:03 +00:00
Chris Smowton
06d5233523 Use SwitchCase.getSelectorExpr 2023-11-30 11:24:03 +00:00
Chris Smowton
b731b8d30a Simplify PatternExpr definition 2023-11-30 11:24:02 +00:00
Chris Smowton
3d980b1684 Switch to using VariableAssign for instanceof and switch dataflow 2023-11-30 11:24:02 +00:00