Tamas Vajk
4efb87a7dd
Extract enum entry initializers
2022-05-10 19:51:30 +01:00
Tamas Vajk
fc5229a0a5
Extract type access expression for static field access in initializer
2022-05-10 19:51:29 +01:00
Tamas Vajk
c6a75957e9
Fix expected files, fix type access extraction of file level static declarations
2022-05-10 19:51:29 +01:00
Tamas Vajk
1e529b2563
Add missing type access expression for static field accesses
2022-05-10 19:51:29 +01:00
Tamas Vajk
f43296a157
Extract type access for enum value access
2022-05-10 19:51:29 +01:00
Tamas Vajk
b5c8d29e40
Extract enum field declarations
2022-05-10 19:51:29 +01:00
Tamas Vajk
d6cbcdc847
Extract type access expression for parameter types
2022-05-10 19:51:29 +01:00
Tamas Vajk
f557719fe5
Extract type access expression for function return types
2022-05-10 19:51:29 +01:00
Chris Smowton
375199508e
Always extract static initializers if a class has static members
...
This may not be necessary for anonymous objects, but it is certainly unrelated to `init { ... }` blocks.
2022-05-10 19:51:29 +01:00
Chris Smowton
e21a60bb4b
Only extract anonymous init blocks in an instance initializer context
2022-05-10 19:51:29 +01:00
Chris Smowton
a317dc4246
Extract field initializers
2022-05-10 19:51:29 +01:00
Tamas Vajk
cdc7ed0e14
Extract container of adapter function as compiler generated
2022-05-10 19:51:28 +01:00
Tamas Vajk
fc66b73e3b
Extract override modifier for lambda and reflection-like constructs
2022-05-10 19:51:28 +01:00
Tamas Vajk
505ccbbcf6
Extract override modifier
2022-05-10 19:51:28 +01:00
Tamas Vajk
ca99cb4999
Code quality improvements
2022-05-10 19:51:27 +01:00
Chris Smowton
db9ab22437
Erasure: produce raw types, not unbound types
...
This affects the trap labels for methods, and therefore consistency with the Java extractor.
TODO: check whether we can unify `erase` and `toRawType` entirely.
2022-05-10 19:51:26 +01:00
Tamas Vajk
613d81d231
Extract static modifier and missing type access qualifier for static calls
2022-05-10 19:51:26 +01:00
Ian Lynagh
37cf36bc33
Kotlin: useDeclarationParent: Don't use fakeLabel
2022-05-10 19:51:26 +01:00
Ian Lynagh
5c8e0ff49b
Kotlin: extractTypeParameter: Don't use fakeLabel
2022-05-10 19:51:26 +01:00
Ian Lynagh
1e8d077522
Kotlin: Fix some warnings
2022-05-10 19:51:26 +01:00
Ian Lynagh
05c062da99
Kotlin: Stop useValueDeclaration returning fakeLabel
2022-05-10 19:51:26 +01:00
Ian Lynagh
86c31cb2e8
Kotlin: Add Label.cast()
2022-05-10 19:51:26 +01:00
Tamas Vajk
026ce2a27a
Fix location of parameters in methods of parameterized types
2022-05-10 19:51:26 +01:00
Tamas Vajk
bfcd553c6c
Change location of properties inside parameterized types
2022-05-10 19:51:26 +01:00
Tamas Vajk
0726b6410f
Change location of methods inside parameterized types
2022-05-10 19:51:26 +01:00
Tamas Vajk
acb310e46a
Change parameterized type location to the class file
2022-05-10 19:51:26 +01:00
Tony Torralba
f8ad93a530
Add test case for local variable in anonymous init
...
Also fix another instance of the same issue in extractLocalTypeDeclStmt
2022-05-10 19:51:25 +01:00
Tony Torralba
1926bef050
Don't extract static init when the class already contains an anonymous init
2022-05-10 19:51:25 +01:00
Tony Torralba
1f812f856c
Extract static initializers of inner classes
2022-05-10 19:51:25 +01:00
Tamas Vajk
8c50e857e4
Add comments to clarify JVM type substitution for invoke methods
2022-05-10 19:51:25 +01:00
Tamas Vajk
1317d2d578
Fix DB inconsistencies with KFunction and KFunction::invoke call extraction
2022-05-10 19:51:25 +01:00
Tamas Vajk
0b4cf6ec82
Adjust extractEnclosingClass extraction
2022-05-10 19:51:25 +01:00
Tamas Vajk
44c8249a33
Remove outdated TODO comments
2022-05-10 19:51:25 +01:00
Tamas Vajk
5f729f8131
Merge two implementation of enclosing class extraction
2022-05-10 19:51:25 +01:00
Tamas Vajk
fe9333898f
Minor code quality improvements
2022-05-10 19:51:25 +01:00
Tamas Vajk
257224aa59
Change base class of property reference classes
2022-05-10 19:51:25 +01:00
Tamas Vajk
cf0be05b44
Add property reference invoke method implementation
2022-05-10 19:51:25 +01:00
Tamas Vajk
abcb367495
Add dataflow tests for lambda-like constructs
...
This commit adds tests for dataflow involving lambdas, big-arity lambdas, SAM conversions, and function references.
2022-05-10 19:51:25 +01:00
Chris Smowton
aab271d81e
Fix extraction of data classes with array members
...
These use compiler-internal intrinsics at the IR layer, which are later lowered to java.util.Arrays calls. This performs that lowering in the same manner.
2022-05-10 19:51:25 +01:00
Chris Smowton
ae2ca183cc
Improve logging when function resolution fails
2022-05-10 19:51:25 +01:00
Ian Lynagh
34f8d9b9b7
Kotlin: Handle annotation classes
...
Fixes:
[TYPES_NOT_DISJOINT] Base types @class and @interface are not disjoint. A common value is 225832
Relevant element: id=225832
Full ID for 225832: @"class;kotlin.internal.LowPriorityInOverloadResolution"
when Kotlin and Java both see such a class.
2022-05-10 19:51:24 +01:00
Tamas Vajk
91b7de42ad
Make generated invoke/get/set public
...
The generated `invoke`/`get`/`set` methods are implementing interface members, so they need to be `public`.
2022-05-10 19:51:24 +01:00
Chris Smowton
96908d153d
Accept and amend check for anonymous types with type parameters
2022-05-10 19:51:24 +01:00
Chris Smowton
613e6b29a9
Don't log every time a type alias is ignored
...
This is a known TODO; runtime output not required.
2022-05-10 19:51:24 +01:00
Tamas Vajk
5a5d0e15eb
Extract calls to big-arity lambda's invoke by converting the artificial invoke to the existing one
...
Big arity lambda calls in IR look like standard method calls to an `invoke` with N arguments. However, this method doesn't exist in JVM, so instead we need to extract a call to `FunctionN.invoke(Object[])`.
2022-05-10 19:51:24 +01:00
Tamas Vajk
222f2415e2
Fix local function reference extraction
2022-05-10 19:51:24 +01:00
Chris Smowton
35d213afc0
Extract varargs constructors
2022-05-10 19:51:24 +01:00
Chris Smowton
e24d78ae14
Create instance variable initializer block eagerly
...
Otherwise when the init block is followed by other constructor statements we can get a gap in a BasicBlock's child sequence due to the child init block never getting created at all.
2022-05-10 19:51:23 +01:00
Tamas Vajk
b26044b327
Change extension receiver this access to be a parameter access
2022-05-10 19:51:23 +01:00
Ian Lynagh
ef5950197d
Kotlin: Broaden isFake
2022-05-10 19:51:23 +01:00