Commit Graph

1190 Commits

Author SHA1 Message Date
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
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
1b40f78b9c Kotlin: Recognise + etc for Double 2022-05-10 19:51:05 +01:00
Tamas Vajk
ae86fcb499 Split main extractor file 2022-05-10 19:51:05 +01:00
Tamas Vajk
2dfe50cbaa Change constructor and type name of anonymous classes to empty string 2022-05-10 19:51:05 +01:00
Tamas Vajk
b7faa33c60 Fix constructor call type access 2022-05-10 19:51:05 +01:00
Tamas Vajk
b7e0828f78 Extract anonymous object creation 2022-05-10 19:51:05 +01:00
Ian Lynagh
10004c77d1 Kotlin: some TODO stuff works now 2022-05-10 19:51:05 +01:00
Ian Lynagh
a3e70fdb5c Kotlin: Add support for ieee754equals 2022-05-10 19:51:05 +01:00
Ian Lynagh
78d2ef52c1 Kotlin: Towards better equality checking 2022-05-10 19:51:05 +01:00
Ian Lynagh
5da15ca03b Kotlin: Resugar != 2022-05-10 19:51:04 +01:00
Ian Lynagh
b4c3f57bab Kotlin: Get != working again 2022-05-10 19:51:04 +01:00
Chris Smowton
956c479db3 Document TypeResult 2022-05-10 19:51:04 +01:00
Chris Smowton
ccf21b7183 Implement Java signature extraction 2022-05-10 19:51:04 +01:00
Chris Smowton
6391484692 Add modifiers to array built-in functions 2022-05-10 19:51:04 +01:00
Chris Smowton
b33f2d9952 Merge shortName recursion into useType 2022-05-10 19:51:04 +01:00
Ian Lynagh
0ce6e53386 Kotlin: Remove unused expressions and fix a copy/paste-o 2022-05-10 19:51:04 +01:00
Tamas Vajk
da0e2c276f Add comment explaining why the annotation is needed 2022-05-10 19:51:04 +01:00
Tamas Vajk
c4ad2f3463 Add kotlin 1.4 support 2022-05-10 19:51:04 +01:00
Ian Lynagh
744f3db68d Kotlin: Handle binops correctly 2022-05-10 19:51:04 +01:00
Tamas Vajk
ab86778e1d Remove external property related log messages 2022-05-10 19:51:04 +01:00
Chris Smowton
5ee9135643 Couple more style fixes 2022-05-10 19:51:04 +01:00
Chris Smowton
970e3d64c0 Fix various style warnings highlighted by IntelliJ 2022-05-10 19:51:04 +01:00
Chris Smowton
87d6313278 Move extractClassInstance to the file extractor
Since now we know the file context has been set correctly at this point
2022-05-10 19:51:03 +01:00
Chris Smowton
5ec546bcb0 Extract locations for generic instantiations 2022-05-10 19:51:03 +01:00
Chris Smowton
f06285e9c7 Fix: use source information for class actually extracted in case of K<->J substitution 2022-05-10 19:51:03 +01:00
Chris Smowton
bde4534050 Only report locations without a source offset in non-source files
Also adjust tests that would otherwise report types with locations outside the source tree (i.e., for the most part in the standard library)
2022-05-10 19:51:03 +01:00
Chris Smowton
c2fef58b21 Extract source files for external types 2022-05-10 19:51:03 +01:00
Tamas Vajk
4c5b4b15a9 Allow associating comments with fields 2022-05-10 19:51:03 +01:00
Tamas Vajk
d0c470dbac Add direct field access support 2022-05-10 19:51:03 +01:00
Ian Lynagh
3a0435b196 Kotlin: Towards 'this' qualifiers
This probably handles most cases well enough
2022-05-10 19:51:03 +01:00
Ian Lynagh
87e8425603 Kotlin: Extract the abstractness of classes. 2022-05-10 19:51:03 +01:00
Ian Lynagh
45658e5d89 Kotlin: Add writeCallableEnclosingExpr calls 2022-05-10 19:51:03 +01:00
Ian Lynagh
854a03d696 Kotlin: Fix property initialisers 2022-05-10 19:51:03 +01:00
Ian Lynagh
e6e56238c5 Kotlin: Handle properties better 2022-05-10 19:51:03 +01:00
Chris Smowton
1b7e33b6e3 Remove Kotlin element and component type from arrays
Now that these are no longer required, array extraction can extract kt-types consistently with other parameterised classes.
2022-05-10 19:51:03 +01:00
Chris Smowton
70294bd26b Array types: distinguish (e.g.) Array<Int> from IntArray 2022-05-10 19:51:03 +01:00
Chris Smowton
380da465b9 Fix bad rebase 2022-05-10 19:51:02 +01:00
Chris Smowton
b4138838fe Update TODOs 2022-05-10 19:51:02 +01:00
Chris Smowton
329ead2b52 Pull out and tidy array extraction 2022-05-10 19:51:02 +01:00
Ian Lynagh
0bf60fff53 Kotlin: Add a test that was failing dbcheck, and comment out the cause 2022-05-10 19:51:02 +01:00
Ian Lynagh
e1cfaaaa9a Kotlin: Extract listOf(...) 2022-05-10 19:51:02 +01:00
Chris Smowton
06c4fd9060 Properly extract wildcard bounds 2022-05-10 19:51:02 +01:00
Tamas Vajk
356639dadd Add optional exitProcess after extraction 2022-05-10 19:51:02 +01:00