Ian Lynagh
75e22da096
Kotlin: Fix extraction of dispatch and extension receivers
...
It is possible for a call to have both, e.g. the `arg.ext()` call in:
class Class1 {
val y = 4
}
class Class2 (val arg:Class1) {
val x = 3
fun someFun() {
arg.ext();
}
fun Class1.ext() {
val z = x + y
}
}
2022-05-10 19:51:07 +01:00
Ian Lynagh
76d7ac9898
Kotlin: Accept test changes
2022-05-10 19:51:07 +01:00
Ian Lynagh
6a16588484
Kotlin: Allow comments on enum entries
2022-05-10 19:51:07 +01:00
Ian Lynagh
cc478eb6ee
Kotlin: Add comments on enum test
2022-05-10 19:51:07 +01:00
Ian Lynagh
03199091cd
Kotlin: Add SAFE_CAST support
2022-05-10 19:51:07 +01:00
Ian Lynagh
1c5f6d70bc
Kotlin: Accept changes
2022-05-10 19:51:07 +01:00
Ian Lynagh
25ccf0569e
Kotlin: ReturnStmt CFG isn't handled properly yet
2022-05-10 19:51:07 +01:00
Ian Lynagh
db7f5a04be
Kotlin: BreakStmt CFG isn't handled properly yet
2022-05-10 19:51:07 +01:00
Ian Lynagh
712d70248a
Kotlin: Add CFG for VarArgExpr
2022-05-10 19:51:07 +01:00
Ian Lynagh
8440bafc42
Kotlin: Add CFG for KtAnonymousClassDeclarationStmt
2022-05-10 19:51:07 +01:00
Ian Lynagh
5ae74949a0
Kotlin: Add CFG for ClassExpr
2022-05-10 19:51:07 +01:00
Ian Lynagh
2135a870d3
Kotlin: Fix CFG for StmtExpr
2022-05-10 19:51:06 +01:00
Ian Lynagh
2e5cf92f8a
Kotlin: Fix CFG for string templates
2022-05-10 19:51:06 +01:00
Ian Lynagh
fcbe4331b4
Kotlin/Java: Add a (currently rather lax) cfgDeadEnds consistency query
2022-05-10 19:51:06 +01:00
Tamas Vajk
874afa7fd7
Fix missing extension receiver extraction
2022-05-10 19:51:06 +01:00
Tamas Vajk
23c5caadc8
Fix String?.plus extraction
2022-05-10 19:51:06 +01:00
Tamas Vajk
ea4e919af5
Extract missing functions directly in kotlin package
2022-05-10 19:51:06 +01:00
Tamas Vajk
3a2f7bec1c
Fix test expected files
2022-05-10 19:51:06 +01:00
Tamas Vajk
6246b2142c
Add enclosing stmt to arrayOf extraction
2022-05-10 19:51:06 +01:00
Tamas Vajk
8de5e39309
Extract arrayOf-like calls
2022-05-10 19:51:06 +01:00
Tamas Vajk
8b81ee7e59
Add array creation tests
2022-05-10 19:51:06 +01:00
Chris Smowton
64e1367e59
Make standard library locations consistent between Java and Kotlin
2022-05-10 19:51:06 +01:00
Ian Lynagh
547b60d68f
Kotlin: Add paramTypes test
2022-05-10 19:51:06 +01:00
Ian Lynagh
d5b4931b7f
Kotlin: Tweak superTypes test to give better locations
2022-05-10 19:51:06 +01:00
Ian Lynagh
50c2d10777
Kotlin: Improve the supertypes test
...
Note the line
| file://<external>/superChain.kt:2:1:2:60 | SuperChain2<T5,String> | file://<external>/superChain.kt:1:1:1:33 | SuperChain1<T3,String> |
is currently wrong; the supertype of SuperChain2<T5,String> should be
SuperChain1<T5,String>.
2022-05-10 19:51:06 +01:00
Ian Lynagh
c05aa7bb68
Kotlin: Add superChain test
2022-05-10 19:51:06 +01:00
Ian Lynagh
b876ee98e5
Kotlin: Tweak the superTypes test
2022-05-10 19:51:06 +01:00
Ian Lynagh
90d7c2b3ce
Java/Kotlin: Add a statementEnclosingExpr consistency test
2022-05-10 19:51:06 +01:00
Ian Lynagh
7baefbb9e5
Kotlin: Add WhenBranch.getWhenExpr()
2022-05-10 19:51:06 +01:00
Ian Lynagh
46f103c243
Kotlin: Accept test changes
2022-05-10 19:51:06 +01:00
Ian Lynagh
5c2ce95b1a
Kotlin: Populate statementEnclosingExpr
2022-05-10 19:51:06 +01:00
Ian Lynagh
2b973fa3b1
Kotlin: Add support for IrSyntheticBody
...
I'm not sure it's worth adding an entity to the database for them,
although that would allow us to use a 'case' in the dbscheme for
the different kinds.
There's no QLL support for this info yet.
2022-05-10 19:51:06 +01:00
Tamas Vajk
4ca024f043
Fix try statement extraction
2022-05-10 19:51:06 +01:00
Tamas Vajk
716b87d200
Extract not-null expression
2022-05-10 19:51:06 +01:00
Ian Lynagh
6603767d94
Kotlin: Clarify !/ paths
2022-05-10 19:51:06 +01:00
Ian Lynagh
f40ab39447
Kotlin: Small fixes and a little more documentation for TrapWriter
2022-05-10 19:51:06 +01:00
Ian Lynagh
d1fefe0246
Kotlin: Refactor TrapWriters
...
Now ClassFileTrapWriter is just FileTrapWriter, which no longer takes a
nullable IrFileEntry.
SourceFileTrapWriter still extends FileTrapWriter, and adds the
IrFileEntry, allowing it to override the location functions with more
useful variants.
populateFileTables no longer has a default. I think that for the sake
of a handful of calls, it's simpler to be explicit so we aren't
confused.
2022-05-10 19:51:05 +01:00
Ian Lynagh
1990b68c21
Kotlin: Return more precise types from PopulateFile.java
2022-05-10 19:51:05 +01:00
Ian Lynagh
83ac77dccc
Kotlin: Start documenting TrapWriter
2022-05-10 19:51:05 +01:00
Tamas Vajk
afabe652c1
Add anonymous class declaration stmt
2022-05-10 19:51:05 +01:00
Ian Lynagh
3e9d12aff0
Kotlin: Accept test changes
2022-05-10 19:51:05 +01:00
Ian Lynagh
37d6bc29dc
Kotlin: Fix Byte tests
2022-05-10 19:51:05 +01:00
Ian Lynagh
1eda692ec8
Kotlin: Import org.jetbrains.kotlin.ir.util.* in KotlinFileExtractor
...
This makes dump() available
2022-05-10 19:51:05 +01:00
Ian Lynagh
2d8a2abe5c
Kotlin: Recognise more numeric types
2022-05-10 19:51:05 +01:00
Ian Lynagh
76151b413f
Kotlin: Add more Long tests
2022-05-10 19:51:05 +01:00
Ian Lynagh
6b5fe14e94
Kotlin: Add tesets for more integer types
2022-05-10 19:51:05 +01:00
Ian Lynagh
1b40f78b9c
Kotlin: Recognise + etc for Double
2022-05-10 19:51:05 +01:00
Ian Lynagh
5b5a6042a9
Kotlin: Add tests for more Double operators
2022-05-10 19:51:05 +01:00
Chris Smowton
35e6b06fe3
Revert "Fix failing tests"
...
This reverts commit 940db3d0828422bc26d7167c138199aa51ab4e89.
2022-05-10 19:51:05 +01:00
Chris Smowton
bb7a17b5bd
Add missing test file
2022-05-10 19:51:05 +01:00