Owen Mansel-Chan
0f3dd6d8f1
Java: IPA the CFG
2024-12-10 15:26:11 +00:00
Owen Mansel-Chan
bf0fba6c49
Refactor UnreachableBasicBlock to make it clearer
2024-11-14 14:53:12 +00:00
Owen Mansel-Chan
efb34aea45
Fix bug in UnreachableBlocks
2024-11-14 14:50:25 +00:00
Chris Smowton
403e86878c
Don't mistake a rule case for a fall-through edge
2024-03-25 16:31:37 +00:00
Chris Smowton
e59487a324
Don't regard cases with multiple patterns as conducting a type test
2024-03-25 16:31:36 +00:00
Chris Smowton
f44becea7f
Implement multiple pattern case and fall-through pattern case support
2024-03-25 16:31:36 +00:00
Chris Smowton
aa8f798853
Move condition into isNonFallThroughPredecessor
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
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
b1cea1d91e
autoformat
2023-11-30 11:24:07 +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
bbc0f29f16
Restrict getCheckedType to unrestricted records, introduce getSyntacticCheckedType and use that where appropriate
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
0b08507033
Document testedBranch
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
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
06d5233523
Use SwitchCase.getSelectorExpr
2023-11-30 11:24:03 +00:00
Chris Smowton
936c0206ea
Adapt ancillary analyses to record patterns
2023-11-30 11:23:59 +00:00
Chris Smowton
daccd04087
Basic extraction of record patterns
2023-11-30 11:23:59 +00:00
Chris Smowton
54a89d6fef
Handle 'case null, default:'
2023-11-30 11:23:59 +00:00
Chris Smowton
b21aaa75bc
Type-flow: treat pattern-switch on an array index similar to instanceof
2023-11-30 11:23:58 +00:00
Chris Smowton
f552a15aae
Mass-rename MethodAccess -> MethodCall
2023-10-24 10:30:26 +01:00
erik-krogh
e3e8f3d7c4
Java: delete various outdated deprecations
2023-10-09 09:14:54 +02:00
Anders Schack-Mulligen
94556078f1
Java: Add guards logic for SwitchExpr default cases.
2023-09-28 14:21:04 +02:00
erik-krogh
44b6366586
delete old deprecations
2023-06-02 11:58:08 +02:00
Kasper Svendsen
081085e128
Java: Make implicit this receivers explicit
2023-05-03 13:37:35 +02:00
Tony Torralba
527425b397
Fixes bad magic in Guard::guardControls_v3
2022-10-05 12:35:33 +02:00
Tony Torralba
a5a31db835
Rename AnyEqualsExpr and AnyNotEqualsExpr
2022-05-10 19:51:31 +01:00
Chris Smowton
7dec3f4835
Use EqualityTest for either value or ref comparions, and ReferenceEqualityTest for strictly ref comparison.
2022-05-10 19:51:17 +01:00
Chris Smowton
f95effcf82
Always extract ValueEQ/NEExpr for Kotlin ==/!=
...
I introduce AnyEqualsExpr for either reference or value equality and AnyEqualityTest for the same concept including not-equals operators, and use them wherever the written QL clearly doesn't care about the difference between reference and value comparison, typically because it is concerned with testing against null or against a primitive constant.
2022-05-10 19:51:17 +01:00
Anders Schack-Mulligen
7002f49abc
Java: Remove some useless imports.
2022-04-26 12:37:03 +02:00
Chris Smowton
2829770003
Autoformat and fix typo
2022-03-31 14:11:09 +01:00
Jonathan Leitschuh
bd87be636a
Refactor to conditionCheckArgument deprecate old method
2022-03-22 11:56:43 -04:00
Jonathan Leitschuh
b3ee1bd313
Refactor Preconditions and add Tests
2022-03-21 11:20:05 -04:00
Jonathan Leitschuh
1d0275344d
[Java]: Add precondition support for testing library asserts
2022-03-18 20:39:24 -04:00
Anders Schack-Mulligen
5f7ee337cd
Java: Use more set literal syntax.
2022-01-21 13:58:27 +01:00
Anders Schack-Mulligen
41d294229d
Java: Add support for bitwise compound assignments in Guards.
2022-01-21 13:56:07 +01:00
Erik Krogh Kristensen
4e8e3a7420
simplify expressions that could be type-casts
2022-01-20 10:41:35 +01:00
Geoffrey White
3f3c79f48f
Merge pull request #6884 from geoffw0/setliterals
...
Replace or chains with set literals.
2021-10-18 16:46:55 +01:00
Erik Krogh Kristensen
caeeebf572
add explicit this qualifier on all of java
2021-10-15 15:27:37 +02:00