Commit Graph

1065 Commits

Author SHA1 Message Date
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
c4d6321e60 Fix whitespace 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
2625c101ad Kotlin: Show class name in log messages 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
Tamas Vajk
69e8db06cb Add optional compilation start plugin option + remove exitProcess 2022-05-10 19:51:02 +01:00
Chris Smowton
6fb5854589 Array types: record dimensionality 2022-05-10 19:51:02 +01:00
Chris Smowton
1d95431a7a Always use the nullable type for arrays 2022-05-10 19:51:02 +01:00
Chris Smowton
0ba4753b8f Restrict Kotlin types describing arrays
* Always use a nullable type
* Never use a type projection (same behaviour as IrType.getArrayElementType)

Otherwise the kotlin type doesn't functionally depend on the type label
2022-05-10 19:51:02 +01:00
Chris Smowton
a6dc408c4e Fix: bracket string template expression properly 2022-05-10 19:51:02 +01:00
Chris Smowton
8016aa7027 Adapt to refactor; useType changes 2022-05-10 19:51:02 +01:00
Chris Smowton
660988d8ac Ensure Unit type is extracted when needed 2022-05-10 19:51:02 +01:00
Chris Smowton
efe3a77efe shortName: use boxed types for type arguments and use K->J class substitutions 2022-05-10 19:51:02 +01:00
Chris Smowton
16335b126f Include type parameters in class short names 2022-05-10 19:51:02 +01:00
Chris Smowton
8acf7d74c1 Restore check for Array<T> type argument 2022-05-10 19:51:02 +01:00
Chris Smowton
dd3bb053e5 Add extracted array length and clone members 2022-05-10 19:51:02 +01:00
Chris Smowton
d62af44baa Extract array type inheritence graph 2022-05-10 19:51:02 +01:00
Chris Smowton
23553f15ee Arrays: extract dimensionality 2022-05-10 19:51:01 +01:00
Chris Smowton
c571657fb1 Abbreviate array test 2022-05-10 19:51:01 +01:00
Chris Smowton
f1a3c9ca20 Arrays: note TODOs 2022-05-10 19:51:01 +01:00
Chris Smowton
2cc5f3e5b7 kt_*_types tables: cite correct Kotlin classid for arrays 2022-05-10 19:51:01 +01:00
Chris Smowton
b926521e7a Only write arrays table on first usage 2022-05-10 19:51:01 +01:00
Chris Smowton
055e9b7797 Convert primitive arrays to Java arrays 2022-05-10 19:51:01 +01:00
Chris Smowton
a92e20e526 Extract nullable arrays as Java arrays
Nullability doesn't matter to this conversion since Java's arrays are reftypes
2022-05-10 19:51:01 +01:00
Ian Lynagh
80e2140ca7 Kotlin: Add TrapWriter.writeComment 2022-05-10 19:51:01 +01:00
Ian Lynagh
8853489f04 Kotlin: Add a "generted by" field to the diagnostics table 2022-05-10 19:51:01 +01:00
Ian Lynagh
be75d30ee0 Kotlin: Add support for varargs 2022-05-10 19:51:01 +01:00
Ian Lynagh
bdaa3ce2b3 Kotlin: Add support for companion objects 2022-05-10 19:51:01 +01:00
Ian Lynagh
f726e6acf8 Kotlin: Fix handling of objects in external dependencies 2022-05-10 19:51:01 +01:00
Ian Lynagh
b460c92c61 Kotlin: Add modifiers to object INSTANCEs 2022-05-10 19:51:01 +01:00
Ian Lynagh
112fac6286 Kotlin: We only support non-companion objects for now 2022-05-10 19:51:01 +01:00
Ian Lynagh
e5cd32bdfe Kotlin: Get the tests passing again 2022-05-10 19:51:01 +01:00