Commit Graph

1408 Commits

Author SHA1 Message Date
Ian Lynagh
8b4cf295bc Merge pull request #10110 from igfoo/igfoo/compression
Kotlin: Add support for TRAP compression
2022-08-24 10:37:20 +01:00
Tamás Vajk
ecde0abc04 Merge pull request #10091 from tamasvajk/kotlin-data-class
Kotlin: Identify data classes during extraction
2022-08-24 08:45:41 +02:00
Ian Lynagh
910372bfb7 Kotlin: Refactor CallableReferenceHelper
This removes some non-null-expressions, and also makes the code more
robust and easier to understand.
2022-08-23 15:24:13 +01:00
Ian Lynagh
d3a8060e34 Kotlin: Remove another not-null-expr in the extractor 2022-08-23 12:05:14 +01:00
Ian Lynagh
98dd2448ff Kotlin: Remove a not-null-expr from the extractor 2022-08-23 11:49:55 +01:00
Ian Lynagh
51ada5c2af Merge pull request #10130 from igfoo/igfoo/non-null-exprs
Kotlin: Fix some more not-null-exprs in the extractor
2022-08-23 10:49:45 +01:00
Tamás Vajk
aa0ff2b53f Merge pull request #10129 from tamasvajk/kotlin-fix-comment-type-alias
Kotlin: Extract type alias doc comments
2022-08-22 16:10:50 +02:00
Ian Lynagh
d5b414f163 Kotlin: Fix some more not-null-exprs in the extractor 2022-08-22 14:16:58 +01:00
Tamas Vajk
25098ef2d8 Kotlin: Extract type alias doc comments 2022-08-22 12:31:13 +02:00
Ian Lynagh
584037737e Merge pull request #10113 from igfoo/igfoo/nullexpr
Kotlin: Remove another instance of a not-null-expression
2022-08-22 10:52:04 +01:00
Ian Lynagh
5d670c6186 Kotlin: Remove another instance of a not-null-expression 2022-08-19 14:50:06 +01:00
Tamas Vajk
1c08ac1d7a Kotlin: Identify data classes during extraction 2022-08-19 14:51:36 +02:00
Ian Lynagh
62779944e8 Kotlin: Compress TRAP files
The Kotlin extractor can now be told to write TRAP with no compression,
gzip compression or Brotli compression - although Brotli is not yet
supported and it will fall back to gzip.

The invocation TRAP file is a bit more complicated, as it's already been
started before the extractor starts. For now that continues to always be
uncompressed.
2022-08-19 12:47:10 +01:00
Tamás Vajk
ad1cb8f8c7 Merge pull request #10065 from tamasvajk/kotlin-1.7.20-Beta
Kotlin: Add support for version 1.7.20-Beta
2022-08-18 12:17:10 +02:00
Tamas Vajk
fb9a34851a Apply code review changes 2022-08-18 09:01:10 +02:00
Tamas Vajk
5d01653371 Fix gradle exclude list after the version number changes 2022-08-17 15:03:37 +02:00
Tamas Vajk
abc4405221 Kotlin: Change version numbers 2022-08-17 11:57:33 +02:00
Tamas Vajk
f12c73f472 Kotlin: Add support for version 1.7.20-Beta 2022-08-17 11:57:33 +02:00
Ian Lynagh
7406915616 Kotlin: Remove some dead code 2022-08-16 17:47:12 +01:00
Ian Lynagh
7b33aebe1f Kotlin: Refactor TypeResults
We statically know when we expect to have no signature, so now we tell
the type system what we know, rather than having signature always be
nullable.
2022-08-16 17:42:47 +01:00
Ian Lynagh
0e4066b6a8 Kotlin: Typo in comment 2022-08-16 14:09:07 +01:00
Ian Lynagh
c927ac9b33 Merge pull request #10048 from igfoo/igfoo/NotNullExpr
Kotlin: Remove not-null-expressions from KotlinUsesExtractor
2022-08-16 10:59:43 +01:00
Ian Lynagh
19c2ca8d40 Merge pull request #10049 from igfoo/igfoo/NotNullExpr2
Kotlin: Remove a non-null-expr
2022-08-16 10:59:33 +01:00
Ian Lynagh
d06b3a17bb Kotlin: Remove a non-null-expr 2022-08-15 15:01:48 +01:00
Ian Lynagh
48e6b4c01b Kotlin: Remove another not-null-expression 2022-08-15 14:43:59 +01:00
Ian Lynagh
10463e12a7 Kotlin: Add List<T?>.requireNoNullsOrNull(): List<T>? utility 2022-08-15 14:38:09 +01:00
Ian Lynagh
d4517f1266 Kotlin: Refactor away a NotNullExpr in the extractor 2022-08-15 14:17:53 +01:00
Tamas Vajk
ccef2f7646 Address review comments 2022-08-12 15:25:46 +02:00
Tamas Vajk
451be6c32c Kotlin: Add explicit CI version number to build script 2022-08-12 14:27:06 +02:00
Tamas Vajk
0bd00ce1db Kotlin: Change handling of version variants in build script 2022-08-12 13:11:33 +02:00
Chris Smowton
8c32758ae5 Merge pull request #9829 from smowton/smowton/fix/kotlin-underscore-parameter-names
Kotlin: Don't extract a name for a '_' parameter
2022-08-10 12:28:26 +01:00
Ian Lynagh
b5d6258e54 Merge pull request #9809 from igfoo/igfoo/fakeLabel
Kotlin: Remove the last uses of fakeLabel
2022-08-08 11:54:53 +01:00
Chris Smowton
5086841b46 Kotlin: implement super-method calls
If we only look at the dispatch receiver, these show up like `this` references rather than `super` references, preventing flow through super-calls. The super-interface case requires properly noting that interface methods with a body get a `default` modifier in order to avoid QL discarding the method as a possible callee.
2022-07-26 17:03:46 +01:00
Chris Smowton
3f6925e7be Merge pull request #9875 from smowton/smowton/fix/charat-naming
Kotlin: Special-case String.charAt naming
2022-07-25 16:10:13 +01:00
Chris Smowton
9593ceeda5 Kotlin: Special-case String.charAt naming
In the Kotlin universe this is called `get` so that Kotlin programmers can use the `[]` operator on `String`s.
2022-07-21 09:17:08 +01:00
Chris Smowton
0a351b73cb Underscore query: tolerate synthetic functions 2022-07-21 09:15:27 +01:00
Chris Smowton
1cbe26a54f Kotlin: fix for-loop iterators over primitive or wildcard types
Array<*> can't be queried for an argument type, and IntArray doesn't have an argument at all; both were previously causing the extractor to fail to extract the whole file due to throwing an exception.
2022-07-21 09:13:55 +01:00
Chris Smowton
41ca791966 Implement is-underscore-parameter for old versions of Kotlin 2022-07-15 12:36:37 +01:00
Chris Smowton
d4b0163c4c Kotlin: Don't extract a name for a '_' parameter
I can't reproduce the exact circumstances, but these sometimes get "<anonymous parameter X>" names and sometimes get "$noName_X" names. Whichever way, avoiding extracting a synthetic name seems safest; anyone finding the .class file and not reading the metadata indicating it came from a `_` will extract the binary name selected, or else QL will
invent a name.
2022-07-14 16:36:26 +01:00
Ian Lynagh
83edb3b5e9 Kotlin: Remove the last uses of fakeLabel 2022-07-12 17:43:50 +01:00
Ian Lynagh
d0bf424b19 Merge pull request #9806 from igfoo/igfoo/useType
Kotlin: Extract an ErrorType if we fail to correctly extract a type
2022-07-12 13:45:04 +01:00
Ian Lynagh
2edeeaac0e Merge pull request #9801 from igfoo/igfoo/psi
Kotlin: We can't extract comments for < 1.5.20
2022-07-12 11:01:30 +01:00
Ian Lynagh
960d1dba8a Kotlin: We can't etract comments for < 1.5.20
We were making our own PsiSourceManager, but that didn't know about any
IrFile -> PsiFile mappings.
2022-07-11 19:36:43 +01:00
Ian Lynagh
4c68624b00 Kotlin: Pass a FileLogger to Psi2Ir 2022-07-11 19:17:21 +01:00
Ian Lynagh
b9072a3594 Kotlin: Share a Psi2Ir instance 2022-07-11 18:57:43 +01:00
Ian Lynagh
1730ec22d9 Kotlin: Extract an ErrorType if we fail to correctly extract a type 2022-07-01 16:33:43 +01:00
Chris Smowton
b499ba5aa8 Kotlin: don't extract private setters of external classes
Previously these would get extracted unlike other private methods even if the class was a standard library or other external class. This could cause inconsistencies because if we also compiled the class from source we could end up deciding different names for the property's setter: setXyz$private when seen from source, and setXyz without a
suffix when seen as an external .class file. Avoiding extracting these functions from the external perspective both restores consistency with other kinds of method and avoids these consistency problems.
2022-07-01 15:44:17 +01:00
Chris Smowton
4c6a9772af Merge pull request #9768 from smowton/smowton/fix/internal-method-name-mangling
Kotlin: Mangle names of internal functions to match JVM symbols
2022-07-01 14:33:32 +01:00
Chris Smowton
df78b7e54b Merge pull request #9755 from smowton/smowton/feature/implement-jvmstatic-annotation
Kotlin: support JvmStatic annotation
2022-07-01 10:14:08 +01:00
Chris Smowton
dd93062101 Kotlin: Mangle names of internal functions to match JVM symbols 2022-06-30 21:56:25 +01:00