Commit Graph

85362 Commits

Author SHA1 Message Date
Steven Schäfer a743669bc9 Parcelize: Fix type signatures in parcelable creator objects
These objects are visible from annotation processors and should not
refer to the type parameters of enclosing parcelable classes.
2021-08-27 21:26:46 +02:00
Steven Schäfer 0bbb36e765 Parcelize: Add tests for obsolete issues 2021-08-27 21:26:46 +02:00
Nikolay Krasko eaf31b1ada Update org.jsoup:jsoup to 1.14.2 2021-08-27 20:32:23 +03:00
Roman Golyshev 08e9a3bc4f Process FirErrorResolvedQualifiers in KtFirReferenceShortener
Also, add `classId` default value to the `FirErrorResolvedQualifierImpl`
just as in `FirResolvedQualifierImpl` - it seemed inconsistent that
we can have a class symbol in error-resolved qualifier, but the
`classId` field will be `null`
2021-08-27 19:29:14 +03:00
Dmitriy Novozhilov f6e49776f8 [Test] Add fir.bench.use.build.file flag to FP intellij configurations 2021-08-27 19:02:58 +03:00
Dmitriy Novozhilov 455ed1bdc0 [Test] Add flag to full pipeline test which allows to use build file instead of regular args 2021-08-27 19:02:58 +03:00
Simon Ogorodnik 4a75222491 [FP] Pass module data to compiler via build file 2021-08-27 19:02:58 +03:00
Mikhail Glukhikh 020b6e9dd1 FIR Java: fix conversion of primitive type 2021-08-27 18:03:02 +03:00
pyos a12e31daf1 FIR: dump nested classes in loadJava tests
Because those test are single Java files, many of them use a top-level
class as a container for multiple classes to be tested. Such tests do
almost nothing if those nested classes aren't handled.
2021-08-27 18:03:01 +03:00
Dmitry Petrov c2b575505a JVM_IR KT-48432 fix overflow in const-bound range optimization 2021-08-27 16:42:52 +03:00
Igor Chevdar ce44403d1b [K/N][IR][codegen] Made lazy init logic JVM-like
Now a file will be initialized only if a top level function has been called
rather than any function like was before the commit
2021-08-27 18:22:52 +05:00
Igor Chevdar e6be5e4266 [K/N][codegen][runtime] Removed remnants of main thread init logic 2021-08-27 18:22:51 +05:00
sebastian.sellmair ae88689e58 [Gradle] Improve NativeDistributionCommonizerTask's cold startup performance
This is done by removing support for Gradle's UP-TO-DATE checker
in favour of our own 'NativeDistributionCommonizationCache'
2021-08-27 12:26:06 +00:00
Igor Yakovlev e802ef27f1 [FIR IDE] Fix invalid lazy expressions for property initializers 2021-08-27 14:55:34 +03:00
Dmitriy Dolovov 19e5e7d511 [Test] Use lazy JUnit5 assertion messages 2021-08-27 08:18:24 +00:00
Jinseong Jeon a711280b6c FIR IDE: APIs to unwrap upper/lower bounds of flexible KtType 2021-08-26 22:30:49 +03:00
Jinseong Jeon dca8789659 FIR IDE: API to determine if the given KtType is a functional interface type 2021-08-26 22:30:49 +03:00
Jinseong Jeon b7a99eca55 FIR IDE: expected type of lambdas and block expression 2021-08-26 22:30:49 +03:00
Jinseong Jeon da3f2c2095 FIR IDE: new symbol/kind/pointer/resolver for SAM constructor 2021-08-26 22:30:48 +03:00
Dmitry Petrov 7df5ebf6ee JVM_IR KT-48433 don't generate null check on 'this$0' parameter 2021-08-26 20:06:20 +03:00
Dmitry Petrov dd98f72fd7 JVM_IR KT-42010 use IINC for postfix int increment/decrement 2021-08-26 20:06:19 +03:00
Georgy Bronnikov ef72413da9 Revert "JVM_IR: use computeIfAbsent in ClassCodegen.getOrCreate()"
This reverts commit 32518eee4b.

Reason: the commit causes lockups in ClassCodegen.
2021-08-26 17:52:42 +03:00
Ilya Matveev d32b42c538 [K/N][New MM] Add runtime asserts to state switch functions 2021-08-26 14:46:08 +00:00
Ilya Matveev 463bc22bf3 [K/N] Enable callbackOnSeparateThread test since KT-44283 is fixed 2021-08-26 14:46:07 +00:00
Ilya Matveev 99bd26c2ef [K/N][Runtime] Switch thread states in termination handlers 2021-08-26 14:46:07 +00:00
Ilya Matveev a1f6c70355 [K/N][Runtime] Use the objc module in the unit tests
Calling initRuntime requires some machinery from the
objc module (e.g. adding the toKotlin method to NSObject).

Include this module to the tests to allow full runtime
initialization in the tests
2021-08-26 14:46:06 +00:00
Ilya Matveev e85761bc47 [K/N][Runtime] Support nice mocks for scoped mock functions 2021-08-26 14:46:06 +00:00
Mark Punzalan f098bf449c HL API: Remove unused // CALL directive in resolve call test data. 2021-08-26 15:52:13 +03:00
sebastian.sellmair 8508017dbb [Gradle, MPP] Ensure outputDirectory exists before locking
NativeDistributionCommonizationCache:
The .lock file cannot be locked when parents are missing.

^KT-48427 Verification Pending
2021-08-26 12:18:56 +00:00
Dmitry Petrov d8518e34b9 Minor: exclude some more directories in CodeConformanceTest 2021-08-26 15:14:03 +03:00
Mads Ager 8dee3c1ca0 [JVM] Do not unbox when local variable initialized with null.
This is already the case for straightline code such as

```
inline fun <R> f(size: Int, block: () -> R): R {
    var result: R
    result = block()
    return result
}
```

However, if the local variable introduction happens at a merge
point as in the following example, we allow the unboxing but
only do it halfway. The initialization of the local is still
done with a null value.

```
inline fun <R> f(size: Int, block: () -> R): R {
    var result: R
    while (true) {
        result = block()
        if (size == 0) break
    }
    return result
}
```

This change disallows unboxing for this move complicated
case as well by bailing out if a local use is with a
TaintedBoxedValue (merge of Object and Integer).

^KT-48394 Fixed.
2021-08-26 15:14:02 +03:00
Mark Punzalan 580f1d51f6 FIR checker: report LOCAL_VARIABLE_WITH_TYPE_PARAMETERS 2021-08-26 12:25:07 +03:00
Tianyu Geng a18daa5d62 FIR checker: report type parameters on anonymous objects 2021-08-26 12:25:06 +03:00
Tianyu Geng 4d9102f749 FIR checker: fix position strategy of TYPE_PARAMETERS_IN_OBJECT 2021-08-26 12:25:03 +03:00
Ilya Goncharov acb7ba86bc [JS IR] Add vararg to state machine building
^KT-48344 fixed
2021-08-26 08:52:34 +00:00
Ilya Goncharov 0ca9e08c11 [JS IR] Add test with fail with vararg call in suspend
^KT-48344 fixed
2021-08-26 08:52:34 +00:00
Ilya Goncharov 4179d078ca [JS IR] Add test on call of suspend super type 2021-08-26 08:50:14 +00:00
Ilya Goncharov ee712b2770 [JS IR] Invokes which is not concrete suspend not wrap into function call 2021-08-26 08:50:13 +00:00
Margarita Bobova c3044e558a Add changelog for 1.5.30 2021-08-26 10:22:38 +03:00
Svyatoslav Scherbina 981a6ffeb8 Native: RedundantCoercionsCleaner should rewrite nested returns too 2021-08-26 07:15:25 +00:00
Dmitriy Novozhilov 3176dd1341 [FIR] Properly create edges from return expression to finally block
^KT-48376 Fixed
2021-08-26 10:08:52 +03:00
Dmitriy Novozhilov 16b7735cd6 [FIR] Fix rendering of labels for return edgeds in CFG 2021-08-26 10:08:52 +03:00
Dmitriy Novozhilov 0924216ed2 [FIR] Distinguish stub types for builder inference and for subtyping
^KT-48110 Fixed
2021-08-26 10:08:52 +03:00
Dmitriy Novozhilov 7e6e0a3dd6 Remove all type system-specific inheritors of TypeCheckerState 2021-08-26 10:08:51 +03:00
Dmitriy Novozhilov 3f6738c8bc Remove all type system dependent methods from TypeCheckerState 2021-08-26 10:08:51 +03:00
Dmitriy Novozhilov e07512a847 Delegate refineType and prepareType in TypeCheckerState to special services
This is needed to add ability to create type system independent TypeCheckerState
2021-08-26 10:08:51 +03:00
Dmitriy Novozhilov 8b5548df49 Rename AbstractTypeCheckerContext to TypeCheckerState 2021-08-26 10:08:51 +03:00
Alexander Shabalin 28136d7eb0 [K/N] Fix memoryModel selection 2021-08-26 04:46:47 +00:00
Ivan Kochurkin 84c5f58cab [FIR] Implement UNRESOLVED_REFERENCE_WRONG_RECEIVER 2021-08-25 21:53:23 +00:00
Ivan Kochurkin 34cc7e5199 [FIR] Fix resolving to star import member instead of builtin (^KT-48157 Fixed) 2021-08-25 21:53:23 +00:00