Skip to content

Commit

Permalink
Cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
lahodaj committed Sep 2, 2024
1 parent a2ab4ba commit acab89a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -841,9 +841,18 @@ private boolean exhausts(JCExpression selector, List<JCCase> cases) {
return true;
}
if (!repeat) {
//there may be situation like:
//class B permits S1, S2
//patterns: R(S1, B), R(S2, S2)
//this might be joined to R(B, S2), as B could be rewritten to S2
//but hashing in reduceNestedPatterns will not allow that
//disable the use of hashing, and use subtyping in
//reduceNestedPatterns to handle situations like this:
repeat = useHashes;
useHashes = false;
} else {
//if a reduction happened, make sure hashing in reduceNestedPatterns
//is enabled, as the hashing speeds up the process significantly:
useHashes = true;
}
patterns = updatedPatterns;
Expand Down Expand Up @@ -1024,7 +1033,8 @@ private List<ClassSymbol> baseClasses(TypeSymbol root) {
* when false, the processing will be significantly slower,
* as pattern hashes cannot be used to speed up the matching process
*/
private Set<PatternDescription> reduceNestedPatterns(Set<PatternDescription> patterns, boolean useHashes) {
private Set<PatternDescription> reduceNestedPatterns(Set<PatternDescription> patterns,
boolean useHashes) {
/* implementation note:
* finding a sub-set of patterns that only differ in a single
* column is time-consuming task, so this method speeds it up by:
Expand Down
1 change: 0 additions & 1 deletion test/langtools/ProblemList.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ tools/javac/annotations/typeAnnotations/referenceinfos/Lambda.java
tools/javac/annotations/typeAnnotations/referenceinfos/NestedTypes.java 8057687 generic-all emit correct byte code an attributes for type annotations
tools/javac/warnings/suppress/TypeAnnotations.java 8057683 generic-all improve ordering of errors with type annotations
tools/javac/modules/SourceInSymlinkTest.java 8180263 windows-all fails when run on a subst drive
tools/javac/patterns/Exhaustiveness.java 8326616 generic-all intermittently timeout

###########################################################################
#
Expand Down

0 comments on commit acab89a

Please sign in to comment.