Chris Smowton
faa7ccfb01
Add test of selective generic extraction
2022-05-10 19:51:10 +01:00
Chris Smowton
b601cdeb8f
Extract generic constructor calls
2022-05-10 19:51:10 +01:00
Chris Smowton
d4519eb1bc
Downgrade assert to warning
2022-05-10 19:51:10 +01:00
Chris Smowton
bb3049a686
Extract generic method prototypes
...
These feature substituted types according to their declaring generic specialisation, with wildcards that reach top-level being converted to their upper or lower bound depending on usage context.
This commit also includes an incidental fix such that constructors declare their return-type as unit, consistent with the Java extractor.
2022-05-10 19:51:10 +01:00
Ian Lynagh
b38f47f9ea
Java/Kotlin: Tweak consistency queries
2022-05-10 19:51:10 +01:00
Ian Lynagh
c04912701a
Java/Kotlin: Speed up toString.ql
...
It's less informative now, but manual debugging will likely be needed
to investigate failures.
2022-05-10 19:51:10 +01:00
Ian Lynagh
ab93d166b8
Java/Kotlin: Tweak consistency queries
2022-05-10 19:51:10 +01:00
Tamas Vajk
fa5c3f9159
Remove and replace @anonymousclassdeclstmt with @localtypedeclstmt
2022-05-10 19:51:10 +01:00
Tamas Vajk
e325925f5a
Extract field declaration directly inside class
2022-05-10 19:51:10 +01:00
Tamas Vajk
929c50f0b3
Adjust build script based on review
2022-05-10 19:51:10 +01:00
Tamas Vajk
0978e522d0
Fix expected files
2022-05-10 19:51:10 +01:00
Tamas Vajk
7b58d01eff
Specify lambda method for big arity lambdas
2022-05-10 19:51:10 +01:00
Tamas Vajk
dec165c5b2
Remove Lambda class as supertype
2022-05-10 19:51:09 +01:00
Tamas Vajk
3cd2583ec8
Handle large arity lambdas, and add missing type access for some constructor calls (needed for anonymous classes)
2022-05-10 19:51:09 +01:00
Tamas Vajk
f4c87cb79d
Extract function expressions
2022-05-10 19:51:09 +01:00
Ian Lynagh
b32ac935f6
Revert "Merge pull request #160 from github/smowton/feature/type-substitution-prototypes"
...
This reverts commit 1dd83a3f0fab407fe94a09fc517c516ed24b1d0c, reversing
changes made to 22aebf8128bfe20bb89e5ecc11e0e8cdd65bf317.
2022-05-10 19:51:09 +01:00
Chris Smowton
4e36b2489c
Add test of selective generic extraction
2022-05-10 19:51:09 +01:00
Chris Smowton
b8af2e6e40
Extract generic constructor calls
2022-05-10 19:51:09 +01:00
Chris Smowton
cfb839ac91
Downgrade assert to warning
2022-05-10 19:51:09 +01:00
Chris Smowton
2f8b8fadc3
Extract generic method prototypes
...
These feature substituted types according to their declaring generic specialisation, with wildcards that reach top-level being converted to their upper or lower bound depending on usage context.
This commit also includes an incidental fix such that constructors declare their return-type as unit, consistent with the Java extractor.
2022-05-10 19:51:09 +01:00
Ian Lynagh
26a0925f99
Kotlin: Add comments saying what generated TRAP files
2022-05-10 19:51:09 +01:00
Ian Lynagh
35ad8f372e
Kotlin: Add a test for Kotlin and Java calling each other
...
Currently kotlin->java causes DB inconsistencies.
2022-05-10 19:51:09 +01:00
Ian Lynagh
1719b921cf
Kotlin: Accept test changes
2022-05-10 19:51:09 +01:00
Ian Lynagh
b57d7f5a75
Kotlin: Extract fakeKotlinType for all kt_types
...
This allows us to make consistent Java+Kotlin databases in the short
term.
2022-05-10 19:51:09 +01:00
Ian Lynagh
40976a91ce
Kotlin: Fix a bad label expansion
...
We were making a key
@"class;ClassLabelResults(classLabel=java.io.Console, shortName=Console)\$LineReader"
2022-05-10 19:51:09 +01:00
Ian Lynagh
c05aab278a
Kotlin: Add a TODO
2022-05-10 19:51:09 +01:00
Ian Lynagh
c35f871c46
Kotlin: Add tests for file classes
2022-05-10 19:51:09 +01:00
Ian Lynagh
43f50888a7
Kotlin: Add a trivial test
2022-05-10 19:51:09 +01:00
Ian Lynagh
c63918d431
Kotlin: Add an empty test
2022-05-10 19:51:09 +01:00
Ian Lynagh
509860b7cf
Kotlin: Add a file_classes consistency query
2022-05-10 19:51:09 +01:00
Ian Lynagh
33757a1266
Kotlin: Extract whether a class is a "file" class
2022-05-10 19:51:09 +01:00
Tamas Vajk
fd27243ec6
Add todo comment regarding class declaration stmt
2022-05-10 19:51:09 +01:00
Tamas Vajk
c446b0ecaf
Move anonymous class and local function label generation to KotlinUsesExtractor
2022-05-10 19:51:09 +01:00
Tamas Vajk
6dbf278269
Add extension tests
2022-05-10 19:51:08 +01:00
Tamas Vajk
058ff0a60b
Remove empty file
2022-05-10 19:51:08 +01:00
Tamas Vajk
2f06c9c03f
Fix spacing
2022-05-10 19:51:08 +01:00
Tamas Vajk
05f22576d1
Fix extraction state resetting
2022-05-10 19:51:08 +01:00
Tamas Vajk
ebf91b79a9
Revert moving extraction to SourceFileExtractor
2022-05-10 19:51:08 +01:00
Tamas Vajk
01f46555b0
Fix disappearing variable labels
2022-05-10 19:51:08 +01:00
Tamas Vajk
27f58f2929
Improve code quality
2022-05-10 19:51:08 +01:00
Tamas Vajk
16ba27c476
Extract local functions
2022-05-10 19:51:08 +01:00
Ian Lynagh
f0949a4936
Kotlin: Add a test
...
This caused a stack overflow on a branch, due to the recursino between
the class and the extension function.
2022-05-10 19:51:08 +01:00
Ian Lynagh
9c4c559ab2
Kotlin: Add some TODO comments
2022-05-10 19:51:08 +01:00
Ian Lynagh
5bc1bdb5a3
Kotlin: Refactor PrimitiveTypeInfo
...
Avoids mentioning the name of IdSignature.PublicSignature, which used to
be IdSignature.CommonSignature, giving us compatibility issues.
2022-05-10 19:51:08 +01:00
Ian Lynagh
d977500047
Kotlin: Make it easier to diagnose build failures
2022-05-10 19:51:08 +01:00
Ian Lynagh
c525d2a633
Kotlin: Consistently use addClassLabel, and have it handle external classes
2022-05-10 19:51:08 +01:00
Tamas Vajk
161463ecae
Fix catch clause location
2022-05-10 19:51:08 +01:00
Tamas Vajk
21af31f3ab
CFG changes for non-null operator + some tests
2022-05-10 19:51:08 +01:00
Ian Lynagh
de137415b8
Kotlin: Use an IrClass for the Java class in the priomitive type handling
...
This means we can add a label for it, and indicate that we use it,
properly.
2022-05-10 19:51:08 +01:00
Chris Smowton
7fa4da8b0c
Add explanatory comments
2022-05-10 19:51:08 +01:00