Commit Graph

87742 Commits

Author SHA1 Message Date
Igor Chevdar 8b859e6558 [gradle] Added option to customize class loaders map
This will be used in the K/N build for automatic cleaning of the daemon
2021-11-24 16:08:33 +05:00
Dmitriy Dolovov 9c1c1805a3 [Native][tests] Log test process stdout/stderr when failed on timeout 2021-11-24 13:30:21 +03:00
Dmitriy Dolovov 3e0761b4fc [Native][tests] Minor. Refactor AbstractRunner.RunResult 2021-11-24 13:30:15 +03:00
Dmitriy Dolovov 1d721f03b2 [Native][tests] Destroy test process that has not finished on time 2021-11-24 13:30:09 +03:00
Pavel Kunyavskiy 98fa69c3d5 [K/N] Remove hack from suspend function inheritance to allow export
Before that commit, function in coroutine implementation class was
override for both SuspendFunctionN's and FunctionN+1's invoke,
which somehow works, but breaks exporting classes with such functions.

Now it's two separate functions, as it should be normally.

^KT-49395
2021-11-24 07:54:51 +00:00
Dmitriy Dolovov 536bfe5bf9 [Native][tests] Use more compact paths to produced binaries 2021-11-24 10:25:16 +03:00
Dmitriy Dolovov 34627633c4 [Native][tests] Add an ability to fail tests on exceeded timeout 2021-11-24 10:25:10 +03:00
Dmitriy Dolovov a2ad9026a6 [Native][tests] Make file content comparison to be OS-neutral 2021-11-24 10:25:04 +03:00
Dmitriy Dolovov bd3ae12e0a [Native][tests] Minor. Update comments for TestModule/TestCase/TestCaseGroup 2021-11-24 10:24:59 +03:00
Dmitriy Dolovov 7ea66076eb [Native][tests] Minor. Rename effectivePackageName to nominalPackageName 2021-11-24 10:24:52 +03:00
Dmitriy Dolovov 3fa5363434 [Native][tests] Fix sanitization of logged command-line arguments 2021-11-24 10:24:42 +03:00
Ilya Gorbunov d7c31fbe82 Disregard PlatformImplementation class loaded from parent classloader
Such type cannot be cast to a base type, if the former is loaded from
a different, parent classloader.

#KT-47857 Fixed

Co-authored-by: Aleksei.Cherepanov <aleksei.cherepanov@jetbrains.com>
2021-11-24 01:59:48 +03:00
Mikhail Glukhikh c2ab91d048 Drop not enhanced Java static methods in Fir2IrLazyClass 2021-11-23 21:56:05 +03:00
Ilya Kirillov e12479dd89 FIR IDE: fix access to unresolved type parameter 2021-11-23 19:08:59 +03:00
Ilya Goncharov ffbf2ea1a5 [Gradle, JS] Remove redundant build.gradle modification in test 2021-11-23 18:48:33 +03:00
Mads Ager 8255118204 [JVM] Do not extend local ranges across control-flow merges.
The coroutine method transformer extends the range of locals
across code where the local is not live when it is safe to do
so. However, it only bailed out for one case of control-flow
merging, namely backwards branches for loops. That is not
sufficient as there can be control flow merges without loops
where the local is only defined on one control-flow path.

This change generalizes the bailout to any control-flow merge.

^KT-49834 Fixed
2021-11-23 13:49:45 +01:00
Ilya Kirillov 8ace9e45b9 LL API: unmute passing test 2021-11-23 15:41:03 +03:00
pyos 001ddda935 IR/Android: place the cache field first
to avoid NPEs if it is used during instance initialization.
2021-11-23 13:39:11 +01:00
Dmitry Petrov 55d1fdfbc2 JVM_IR prevent clash of unsubstituted special bridges 2021-11-23 12:05:13 +00:00
Dmitriy Novozhilov 1e98748e0b [Test] Increase timelimit for running separate jvm process in box tests
Timelimit is increased from 1.5 to 3 minutes because in some cases
 (in parcelize tests) on windows tests can don't fit in 1 minute
 limit, which causes flaky failures of tests

Value of 3 minutes is taken from old parcelize tests
2021-11-23 15:01:37 +03:00
Dmitriy Novozhilov ae967ec31b [FIR] Fix detecting version of plugin annotations if it differs from 1.6.255-SNAPSHOT 2021-11-23 15:01:36 +03:00
Dmitriy Novozhilov edb62e247f [FIR] Drop redundant class from fir plugin annotations module 2021-11-23 15:01:35 +03:00
Dmitriy Novozhilov 2d0bbf6e4b [FIR] Fix build configuration for tests in :fir-plugin-prototype 2021-11-23 15:01:34 +03:00
Dmitriy Novozhilov 409f96678a [Parcelize] Extract common names, class ids and FQNs into separate object 2021-11-23 15:01:33 +03:00
Dmitriy Novozhilov edc74b8838 [Parcelize] Add test for Parcelable implementation with overriden describeContents 2021-11-23 15:01:33 +03:00
Dmitriy Novozhilov 6b330fb5d5 [FIR] Set proper return type for LighterASTNode.getChildren utility 2021-11-23 15:01:32 +03:00
Dmitriy Novozhilov 8cdddbfd9d [FIR] Implement checkers for FIR parcelize plugin
There is one of checks left unimplemented (FirParcelizePropertyChecker.checkParcelableClassProperty)
  because it requires huge commonization of detecting which type can be
  serialized and which not, which is not prioritized job for now
2021-11-23 15:01:31 +03:00
Dmitriy Novozhilov eac9a9fc79 [FIR] Implement FIR version of parcelize plugin
This commit includes only generation of declarations and
  ir backend part, checkers are added in separate commit
2021-11-23 15:01:29 +03:00
Dmitriy Novozhilov cb0705ec03 [FIR] Change scheme of generating declarations by plugins
Methods `needToGenerateAdditionalMembersInClass` and
  `needToGenerateNestedClassifiersInClass` are removed, now compiler
  uses `get...Names` and `getTopLevel...` methods to determine which
  extension may generate declaration with specific classId/callableId

This is needed to simplify API of FirDeclarationGenerationExtension and
  provide guarantee that `generate...` method will be called with
  specific classId/callableId only if specific extensions returned name
  for this id from `getName...` functions
2021-11-23 15:01:28 +03:00
Dmitriy Novozhilov 40d8451698 Add compiler diagnostic tests for parcelize checkers 2021-11-23 15:01:26 +03:00
Dmitriy Novozhilov b84ee64994 Move parcelize checkers testdata to :parcelize-compiler module 2021-11-23 15:01:23 +03:00
Dmitriy Novozhilov a093052b77 Delete sources of parcelize IDE plugin
They are moved to intellij community repo, so those sources in kotlin
  repository are actually redundant
2021-11-23 15:01:22 +03:00
Dmitriy Novozhilov b0f38bd996 [FIR] Save mapping from supertype to delegated field in class attribute
This is needed to let checkers know which specific interface was
  implemented by delegation
2021-11-23 15:01:21 +03:00
Dmitriy Novozhilov e25fff701b [FIR] Add FirClassLikeDeclarationChecker alias
Such checkers may be useful for checkers which are interested in all
  inheritors of FirClassLikeDeclaration
2021-11-23 15:01:21 +03:00
Dmitriy Novozhilov 33f78e3903 [FIR2IR] Fix collecting declarations for Fir2IrLazyClass
Existed code might lose declarations in two cases:
1. When there is a declared function which is mapped to property
    (java synthetic properties)
2. When class has property and function with same name
2021-11-23 15:01:20 +03:00
Dmitriy Novozhilov 307fa66dda [FIR] Resolve imports before plugin annotation phase
This is needed to correctly resolve imported annotations from plugins
2021-11-23 15:01:18 +03:00
Dmitriy Novozhilov 9948ba57c0 [FIR] Add ability to generate companion object from compiler plugin 2021-11-23 15:01:15 +03:00
Dmitriy Novozhilov 75ed11a620 [FIR] Remove few unused utils 2021-11-23 15:01:10 +03:00
Dmitriy Novozhilov 75b6f7ca00 [FIR] Make FirRegularClass.companionObject companionObjectSymbol field
This is needed for two reasons:
1. Before this change companion object appeared in FirRegularClass
  twice: in declarations list and in companionObject field. This may
  trigger twice transform of it
2. It's very hard to implement generation of companion object by plugins
  because if it is part of the tree then generated declaration must be
  registered in FirProvider, which is inconsistent with other generated
  declarations. Replacing FIR with symbol and removing custom logic of
  visiting/transforming companion FIR allows us to just replace companionSymbol
  in FirClass if plugin wants to generate it without any additional work
2021-11-23 15:01:05 +03:00
Ilya Goncharov 01deac5e5c [Gradle, JS]Run kotlinNodeJsSetup ad kotlinYarnSetup instead of assemble 2021-11-23 11:41:20 +00:00
Ilya Goncharov e32a1ca562 [Gradle, JS] Not resolve configuration with nodejs and yarn if it should not be downloaded 2021-11-23 11:41:19 +00:00
Svyatoslav Scherbina 5020d5f2f9 Native: make SymbolName internal
See ^KT-46649
2021-11-23 08:09:44 +00:00
Svyatoslav Scherbina 8bd1d7b2be Native: allow jsinterop and cinterop (legacy sourcecode mode) using SymbolName
The interop Kotlin source generators still use `@SymbolName` to link
Kotlin code with platform code.
2021-11-23 08:09:44 +00:00
Svyatoslav Scherbina d70eacb1b2 Native: remove the opt-in for SymbolName from stdlib
This annotation is no longer used there.
2021-11-23 08:09:43 +00:00
Svyatoslav Scherbina 6e0a152f39 Revert "[K/N] Replace SymbolName with GCUnsafeCall in interop"
This reverts commit ca9ec76c08.
2021-11-23 08:09:43 +00:00
Svyatoslav Scherbina 7042d01271 Revert "[K/N] Emmit error on using @SymbolName with new mm"
This reverts commit 7e58660ce2.
2021-11-23 08:09:42 +00:00
Dmitry Petrov 2179987de7 FIR2IR fix enum special methods generation 2021-11-23 06:34:33 +00:00
Dmitry Petrov 2a263eca65 FIR2IR strip annotations from IrConst type 2021-11-23 06:34:03 +00:00
Alexander Udalov 0048540652 Prepare kotlinx-metadata-jvm 0.4.0 for release 2021-11-23 02:17:01 +01:00
Ilya Kirillov 1335a2c3ab Analysis API: remove KtTypeRendererOptions.renderTypeArguments as unused 2021-11-22 22:47:20 +01:00