Commit Graph

376 Commits

Author SHA1 Message Date
Ian Lynagh
b2c83ae69b Kotlin: Remove a cast from extractStaticInitializer 2022-09-07 12:46:26 +01:00
Ian Lynagh
6bee9d8dee Merge pull request #10323 from igfoo/igfoo/extractPropertyReference
Kotlin: Remove a cast from extractPropertyReference
2022-09-07 10:44:17 +01:00
Ian Lynagh
67f8c8215c Merge pull request #10325 from igfoo/igfoo/getDeclaringTypeArguments2
Kotlin: Remove a cast from getDeclaringTypeArguments
2022-09-07 10:44:02 +01:00
Ian Lynagh
b4b52b9074 Merge pull request #10324 from igfoo/igfoo/extractConstructorCall2
Kotlin: Remove a cast from extractConstructorCall
2022-09-07 10:43:54 +01:00
Ian Lynagh
8a5cb11014 Kotlin: Remove some redundant code
useClassSource already checks to see if it is given an anonymous object,
and behaves accordingly.
2022-09-06 17:30:04 +01:00
Ian Lynagh
4a8960607d Kotlin: Remove a cast from getDeclaringTypeArguments 2022-09-06 17:26:15 +01:00
Ian Lynagh
bd5eb1f0ac Kotlin: Remove a cast from extractConstructorCall 2022-09-06 17:23:33 +01:00
Ian Lynagh
d18d5b5cf4 Kotlin: Remove a cast from extractPropertyReference 2022-09-06 17:19:28 +01:00
Tamás Vajk
5f841f71db Merge pull request #10291 from tamasvajk/kotlin-fix-array-set
Kotlin: Fix array `set` operator extraction
2022-09-06 09:01:05 +02:00
Ian Lynagh
38ba516687 Merge pull request #10281 from igfoo/igfoo/extractFunctionReference
Kotlin: Remove cast in extractFunctionReference
2022-09-05 11:49:09 +01:00
Ian Lynagh
43a553dffb Merge pull request #10279 from igfoo/igfoo/extractGeneratedClass
Kotlin: Remove cast in extractGeneratedClass
2022-09-05 11:48:38 +01:00
Tamas Vajk
6f7f760682 Kotlin: Fix array set operator extraction 2022-09-05 10:20:07 +02:00
Ian Lynagh
a35c7ab5b3 Kotlin: Remove cast in extractFunctionReference 2022-09-02 15:40:45 +01:00
Ian Lynagh
2ecd9c93d1 Kotlin: Remove cast in extractGeneratedClass
It turns out that this was really behaving as a nullness check.
2022-09-02 15:26:49 +01:00
Ian Lynagh
c339a2d4a7 Merge pull request #10273 from igfoo/igfoo/extractRawMethodAccess
Kotlin: Remove cast from extractRawMethodAccess
2022-09-02 13:26:33 +01:00
Ian Lynagh
ed04bec34e Merge pull request #10274 from igfoo/igfoo/extractCall
Kotlin: Remove a cast in array iterator call extraction
2022-09-02 13:26:10 +01:00
Ian Lynagh
a56876533f Kotlin: Remove a cast in array iterator call extraction 2022-09-02 12:25:14 +01:00
Ian Lynagh
db1661fb13 Kotlin: Remove cast from extractRawMethodAccess
I'm not entirely happy with this, but it at least meets the goal of
removing the cast.
2022-09-02 12:14:09 +01:00
Ian Lynagh
3eab35d78b Kotlin: Small simplification 2022-09-02 12:04:21 +01:00
Ian Lynagh
6a4b748958 Kotlin: Remove some casts from getDeclaringTypeArguments 2022-09-02 11:50:00 +01:00
Tamás Vajk
6576f19873 Merge pull request #10255 from tamasvajk/kotlin-array-get-fix
Kotlin: Fix array indexer extraction
2022-09-01 13:28:18 +02:00
Ian Lynagh
cc1a5d82b8 Merge pull request #10243 from igfoo/igfoo/extractExpression
Kotlin: Removed a couple of casts from extractExpression
2022-09-01 11:11:58 +01:00
Ian Lynagh
70cabf188e Merge pull request #10246 from igfoo/igfoo/extractConstructorCall
Kotlin: Refactor extractConstructorCall
2022-09-01 11:11:48 +01:00
Tamas Vajk
a5415c9c8a Kotlin: Fix array indexer extraction 2022-09-01 11:12:14 +02:00
Ian Lynagh
c8deb72ede Kotlin: Refactor extractConstructorCall
Avoids some casts.
2022-08-31 16:53:59 +01:00
Ian Lynagh
eca28af883 Kotlin: Removed a couple of casts from extractExpression 2022-08-31 15:34:18 +01:00
Tamás Vajk
bf7437fd2e Merge pull request #10224 from tamasvajk/kotlin-comment-fixes
Kotlin: Fix issues in comment extraction
2022-08-31 14:22:09 +02:00
Ian Lynagh
3459e5e432 Kotlin: Refactor extractStaticTypeAccessQualifier
Avoids a cast
2022-08-30 17:06:13 +01:00
Tamas Vajk
5418c95a01 Kotlin: minor refactoring in comment extraction 2022-08-30 15:43:48 +02:00
Tamas Vajk
9ced14672d Kotlin: Assign container class as the owner of init block comments 2022-08-30 15:37:55 +02:00
Tamás Vajk
4f5c06fed7 Merge pull request #10169 from tamasvajk/kotlin-array-iterator
Kotlin: fix array iterator extraction
2022-08-26 08:33:52 +02:00
Ian Lynagh
2e2621adad Merge pull request #10154 from igfoo/igfoo/findSubType
Kotlin: Implement and use fun <T,reified S: T> Iterable<T>.findSubType
2022-08-25 12:57:46 +01:00
Ian Lynagh
12eab3d7f0 Kotlin: Specialise findSubType to IrDeclaration
We only use it on that type, and this makes the uses a bit quieter.
2022-08-25 10:11:19 +01:00
Tamas Vajk
15305fd9bb Kotlin: Fix iterator extraction of IntArray, BooleanArray, ... 2022-08-25 11:05:17 +02:00
Tamas Vajk
7196fdd475 Kotlin: fix array iterator extraction to work outside of for loops 2022-08-25 09:23:34 +02:00
Ian Lynagh
b485706fde Kotlin: Remove the last not-null-expressions 2022-08-24 14:39:03 +01:00
Ian Lynagh
e4f66b8aa7 Kotlin: Refactor writeUpdateInPlaceExpr
In tryExtractArrayUpdate we need to know if writeUpdateInPlaceExpr will
succeed before we start writing any TRAP.
2022-08-24 14:31:10 +01:00
Ian Lynagh
31e1230c64 Kotlin: Remove another not-null-expr 2022-08-24 12:51:15 +01:00
Ian Lynagh
20ac15d549 Merge pull request #10152 from igfoo/igfoo/not-null-exprs
Kotlin: Remove more not-null expressions
2022-08-24 12:18:45 +01:00
Ian Lynagh
28d95f4d99 Kotlin: Implement and use fun <T,reified S: T> Iterable<T>.findSubType
We had a lot of uses of find which looked for a subtype, but then had to
cast (seemingly unsafely) the result to that subtype. This pulls all the
casts out into a utility function.
2022-08-24 12:10:53 +01:00
Ian Lynagh
b5f20e40fc Kotlin: Remove some more not-null-expressions 2022-08-24 11:13:27 +01:00
Ian Lynagh
8fe59e7ebc Kotlin: Remove another not-null-expr 2022-08-24 11:09:31 +01:00
Ian Lynagh
01f27ea331 Kotlin: Remove another not-null-expr 2022-08-24 11:07:10 +01:00
Ian Lynagh
940f18f5ae Kotlin: Remove another not-null-expr 2022-08-24 10:59:15 +01:00
Ian Lynagh
44501f5318 Kotlin: Remove another not-null-expr 2022-08-24 10:57:36 +01:00
Ian Lynagh
da7b7ce9f5 Kotlin: Remove some not-null-exprs 2022-08-24 10:55:31 +01:00
Ian Lynagh
623d87aaca Merge pull request #10142 from igfoo/igfoo/not-null-expr
Kotlin: Remove some more non-null-expressions
2022-08-24 10:37:37 +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