Repository navigation
enable identifier hash-consing - #1745
Merged
Merged
Conversation
…through IdentifierFactory - JavaIdentifierFactory/JavaModuleIdentifierFactory: cache MethodSignature, FieldSignature, MethodSubSignature and FieldSubSignature (weak-value Guava caches), matching the existing ClassType cache. Equal signatures are now the same instance, so callers may compare with ==. - Route STATIC_INITIALIZER through the same subsignature cache. - Replace raw new ClassType/MethodSignature/FieldSignature/MethodSubSignature/ FieldSubSignature construction with IdentifierFactory calls across production code (ICFGDotExporter, AbstractCallGraphAlgorithm, apk.frontend FieldInstruction/MethodInvocationInstruction, EnumConstant, JavaJimple, spark ValueToNodeConversionVisitor) and the remaining test call sites that still built ClassTypes directly. - Add tests asserting hash-consing (assertSame across repeated lookups).
…y, retrieved from the view
# Conflicts: # sootup.qilin/src/main/java/qilin/core/pag/PAG.java # sootup.qilin/src/main/java/qilin/util/PTAUtils.java
swissiety
enabled auto-merge
September 21, 2026 09:02
qilin.util.JavaTypes still called the removed JavaIdentifierFactory singleton, which broke the build of sootup.qilin and with it the Test, style and documentation CI jobs. Its well-known JDK types are created via JavaClassType.of now, and the method-kind checks take the View whose IdentifierFactory they ask. Documentation: - migrating.md/whatsnew.md describe the hidden constructors, the identity guarantee and the replacements for the removed getInstance() methods. - the constructor javadoc in JavaClassType had been separated from the constructor by the new interner field. Test JVM: surefire ran whole test classes in parallel with unlimited threads, so the peak memory of a run was bounded by nothing but the size of the suite. It parallelises classes only now, and heap and thread count are properties, so machines with less memory than CI can dial them down (-Dsurefire.threadCount=1 -Dsurefire.maxHeap=3072M).
The test arrived on develop while this branch added an IdentifierFactory parameter to AsmUtil.createAnnotationUsage, so the merged state did not compile.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #1745 +/- ##
=============================================
+ Coverage 72.63% 72.64% +0.01%
+ Complexity 239 238 -1
=============================================
Files 486 486
Lines 20744 20796 +52
Branches 3398 3396 -2
=============================================
+ Hits 15067 15108 +41
- Misses 4373 4383 +10
- Partials 1304 1305 +1
🚀 New features to boost your workflow:
|
# Conflicts: # sootup.java.bytecode.frontend/src/main/java/sootup/java/bytecode/frontend/conversion/AsmMethodSource.java
swissiety
force-pushed
the
feature/hash-cons-identifiers
branch
from
September 22, 2026 12:15
4c3260f to
4f5beed
Compare
swissiety
force-pushed
the
feature/hash-cons-identifiers
branch
from
September 22, 2026 12:18
4f5beed to
afa4547
Compare
Contributor
|
Documentation was updated: Preview Modified
... and 16 more files not shown Javadoc was updated |
JonasKlauke
reviewed
Sep 22, 2026
JonasKlauke
disabled auto-merge
September 22, 2026 14:10
JonasKlauke
approved these changes
Sep 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR address? (Why)
hide ctor of
ClassType,MethodSignatureetc. to enfore the usage of the IdentifierFactory. That change allows us to use == and IdentityHashMaps for these objects in the future to improve performance.Checklist
[x] yes