Mikhail Glukhikh
4cff6d93be
Get rid of containingClass storage in FirDeclarationsResolveTransformer
2021-03-17 12:13:20 +03:00
Mikhail Glukhikh
91607044d0
FIR: extract BodyResolveContext.withFile
2021-03-17 12:13:20 +03:00
Andrey
b7dc1e64b1
[KAPT] Disable JPMS when running annotation processing
...
If sources contain module-info.java javac tries to validate modules existence/visibility during AP phase and fails, because we don't specify modules-path/patch-module. All these checks will be done in kotlin compiler and in javac for java classes. And it is not necessary to do it in AP too.
So we go for easiest path possible - disable jpms for AP.
#KT-32202 Fixed
2021-03-17 11:10:27 +03:00
Ilmir Usmanov
a90a5f6dd4
Check for backend when checking for suspend in fun interfaces
2021-03-16 22:37:44 +01:00
Steven Schäfer
bf2942b5cc
JVM IR: Add Object.clone to JvmSymbols
...
The `clone` function is not available in the builtin classes created
from fir.
2021-03-16 21:30:18 +01:00
Steven Schäfer
99a4779c6b
JVM IR: Don't produce line numbers in synthetic Enum members
2021-03-16 21:30:18 +01:00
Steven Schäfer
5be00cfa04
JVM IR: Don't use null checks in Enum.valueOf
2021-03-16 21:30:18 +01:00
Steven Schäfer
bea1a8c422
JVM IR: Use Object.clone in Enum.values
2021-03-16 21:30:18 +01:00
Ilmir Usmanov
e47715f52b
Minor. Add tests with returning inline class from SAM adapter
2021-03-16 20:57:05 +01:00
Nikolay Krasko
aff25b3666
Remove jcenter usages
2021-03-16 22:24:10 +03:00
Nikolay Krasko
74dd8726c0
Update repositories in kotlin/buildSrc
2021-03-16 22:24:08 +03:00
Mikhail Glukhikh
0e8f8362da
FIR checkers: use isNullableType() instead of isSubtypeOfAny()
2021-03-16 21:56:11 +03:00
Mikhail Glukhikh
599a0d9c2b
Minor fixes in FirTypeParameterInQualifiedAccessChecker
2021-03-16 21:56:10 +03:00
Mikhail Glukhikh
0b9598d880
Minor fixes around FirKClassWithIncorrectTypeArgumentChecker
2021-03-16 21:56:10 +03:00
Jinseong Jeon
4c08d10cce
FIR checker: report expression of nullable type parameter as LHS of class literals
2021-03-16 21:56:10 +03:00
Jinseong Jeon
26441ed64f
FIR IDEA: avoid unnecessary type casting
2021-03-16 21:56:10 +03:00
Jinseong Jeon
7fff4108b6
FIR checker: report KClass with incorrect type argument
2021-03-16 21:56:10 +03:00
Jinseong Jeon
bc2228d434
FIR checker: don't report errors on type parameter as LHS of class literals
...
If a type paramter is not reified or nullable, different errors will
be reported by FirGetClassCallChecker.
When determining whether type parameter wrapped in qualified access is a
standalone expression or not, we examine whether the checker context has
other qualified accesses in stack. Class literals (::class) is desugared
to FirGetClassCall, and thus not stacked as qualified access. Since
class literals are a special type of callable reference (a subtype of
qualified access), we should keep track of FirGetClassCall in a similar
way.
2021-03-16 21:56:09 +03:00
Jinseong Jeon
e29b40b07f
FIR checker: report TYPE_PARAMETER_AS_REIFIED
2021-03-16 21:56:09 +03:00
Jinseong Jeon
5ba5b63dee
FIR checker: report nullable expression as LHS of class literals
2021-03-16 21:56:09 +03:00
Jinseong Jeon
33c5b49632
FIR checker: report non-typed LHS of callable references
2021-03-16 21:56:08 +03:00
scaventz
329be4f906
Add a test to for the situation where pathname of destination does not name a parent.
2021-03-16 18:44:12 +01:00
Georgy Bronnikov
bff6e9b972
IR: document lock priority.
2021-03-16 19:49:31 +03:00
Georgy Bronnikov
60f38369f1
JVM_IR: synchronize binary class reloading
2021-03-16 19:49:30 +03:00
Georgy Bronnikov
42279c3b5b
IR: introduce IrLock
...
Use a single lock object for synchronization to avoid deadlocks.
2021-03-16 19:49:30 +03:00
Georgy Bronnikov
215556511e
JVM_IR: synchronization in InlineCodegen
2021-03-16 19:49:30 +03:00
Georgy Bronnikov
be67dacef1
JVM_IR: synchronized getOrPut for SLRUMap
2021-03-16 19:49:30 +03:00
Georgy Bronnikov
78d62dcb1e
JVM_IR: use ConcurrentHashMap in codegen where appropriate
2021-03-16 19:49:30 +03:00
Georgy Bronnikov
c36bc9f312
JVM_IR: use synchronized map in ClassFileFactory
2021-03-16 19:49:30 +03:00
Georgy Bronnikov
3a10ea4f88
JVM_IR: synchronize code generation for inline functions
2021-03-16 19:49:29 +03:00
Georgy Bronnikov
c7feaee8ae
IR: make copying optional in performByIrFile
...
For codegen phases, input files are readonly data. There is no need to
copy them.
2021-03-16 19:49:29 +03:00
Georgy Bronnikov
1383c31caf
JVM_IR: use threadLocal in GlobalInlineContext
2021-03-16 19:49:29 +03:00
Georgy Bronnikov
fe4d33dcb1
JVM_IR: make codegen a phase
2021-03-16 19:49:29 +03:00
sebastian.sellmair
b68fee9cbc
CliCommonizer: Guard input- and dependency- libraries
2021-03-16 15:47:29 +00:00
sebastian.sellmair
d03a85525d
[Commonizer] DependencyLibrariesOptionType: Make option optional (default: empty)
2021-03-16 15:47:28 +00:00
sebastian.sellmair
73222fbc4f
[Commonizer] Add more verbose debugging information when failing to parse a task
2021-03-16 15:47:28 +00:00
sebastian.sellmair
f6e8afcbcc
Move Gradle property 'kotlin.commonizer.jvmArgs' to 'kotlin.mpp.commonizerJvmArgs'
2021-03-16 15:47:27 +00:00
sebastian.sellmair
56661068bd
CommonizerIT: Reuse DISABLED_NATIVE_TARGETS_REPORTER_WARNING_PREFIX instead of hardcoded string
2021-03-16 15:47:26 +00:00
sebastian.sellmair
5a10cb6a3e
CommonizerIT: Add integration tests for user defined c-interop commonization
2021-03-16 15:47:25 +00:00
sebastian.sellmair
80e964c166
[Commonizer] NativeKlibCommonize: Remove optimization for only loading dependencies from native distribution
...
This is removed for now, because of test failures on Windows.
It seems like the dependencies in the klib produced by Windows are not
correct.
See: https://youtrack.jetbrains.com/issue/KT-45471
^KT-45471
2021-03-16 15:47:25 +00:00
sebastian.sellmair
b777c89bc8
[Commonizer] NativeKlibCommonize: Only load dependencies from native distribution
2021-03-16 15:47:24 +00:00
sebastian.sellmair
97a57a7d93
Forward dependencies from CInteropCommonizerTask to commonizer
2021-03-16 15:47:23 +00:00
sebastian.sellmair
49cf386258
Limit CInteropCommonizerTask to only one level of commonization
...
See ^KT-39324
2021-03-16 15:47:23 +00:00
sebastian.sellmair
261934d881
Implement CopyCommonizeCInteropForIdeTask to survive build folder cleaning
2021-03-16 15:47:22 +00:00
sebastian.sellmair
a53df56781
Implement CInteropIdentifier.Scope
2021-03-16 15:47:21 +00:00
sebastian.sellmair
6efd04edc0
Implement CInteropCommonizerTask to support commonization of user-defined cinterops
...
^KT-40975 Verification Pending
2021-03-16 15:47:20 +00:00
sebastian.sellmair
7cf8e9ec58
CInteropProcess: Promote settings to constructor
...
This enforces that the specified c-interop settings cannot be re-set on
a CInteropProcess.
2021-03-16 15:47:20 +00:00
sebastian.sellmair
be84b7b419
Rename 'getSourceSetHierarchy' to 'withAllDependsOnSourceSets' and lift the previous Deprecation
2021-03-16 15:47:19 +00:00
sebastian.sellmair
7da7dd92d6
Deprecate KotlinSourceSet.getSourceSetHierarchy in favour of 'resolveAllDependsOnSourceSets' and general purpose 'transitiveClosure'
2021-03-16 15:47:18 +00:00
sebastian.sellmair
4e07dcf2d8
Minor: Add dictionaries/sebastiansellmair.xml
2021-03-16 15:47:17 +00:00