Commit Graph

87580 Commits

Author SHA1 Message Date
Dmitriy Novozhilov a7bea1ad2f [Build] Add ability to set fixed numbers of JUnit 5 threads via local.properties 2021-11-15 16:50:08 +03:00
Nikolay Lunyak 2fb066e261 KT-47101: Fix companion supertypes 2021-11-15 13:22:38 +00:00
Roman Golyshev 4f52ab6ba1 Add kdoc for FirPredicateBasedProvider::fileHasPluginAnnotations 2021-11-15 16:02:55 +03:00
Elena Lepilkina 59d74b818e [K/N] Replace safe points after EnterFrame to allow LLVM reemove repeated instructions 2021-11-15 12:29:54 +00:00
Roman Golyshev 13e27a3e06 [FIR IDE] Get rid of KtPossiblyMemberSymbol::dispatchType 2021-11-15 14:36:35 +03:00
Roman Golyshev 4e1e1570df [FIR IDE] Add getDispatchReceiverType function and use
This function is under a heavy deprecation and should not be used,
since it will most probably be removed in the future
2021-11-15 14:36:31 +03:00
Roman Golyshev 3091269035 [FIR IDE] Create generated members for data classes more accurately in FIR Light Classes
`equals`/`hashCode`/`toString` don't necessarily come from `Any` - they
might be overridden in the abstract class like this:

```kt
abstract class Base {
  // reinforces overriding in inheritors
  abstract override equals(a: Any?): Boolean

  // implementation will be replaced by the generated for data class
  override hashCode(): Int = 0

  // implementation is final, compiler will not replace it
  final override toString(): String = ""
}
```
2021-11-15 14:36:26 +03:00
Pavel Punegov 524c7c4397 [K/N][build] Use JDK17 only during stdlib builds
JDK17 can't be applied for all subprojects because it will make our
bundle require JDK17 to be used by end users.
2021-11-15 09:04:52 +00:00
Pavel Punegov 76d9692c4d [K/N][build] Fix for Class.newInstance is deprecated in Java 2021-11-15 09:04:52 +00:00
Pavel Punegov 56f6637279 [K/N][build] Use JDK17 on macOS arm64 to prevent odd failures 2021-11-15 09:04:51 +00:00
Tianyu Geng 1c8d1fcdba FIR Tree: make FirDefaultPropertyAccessor propagate dispatchReceiverType
Custom property accessor has this property set and hence it make sense
for the default accessor to have it too. Also, FE1.0's counterpart
has this bit set and it's returned through the analysis API.
2021-11-15 11:10:46 +03:00
Igor Chevdar 03d8a3927b [gradle] Made KotlinToolRunner public to use in K/N build 2021-11-15 12:42:24 +05:00
Kirill Shmakov a582504bf1 [K/N][debug] Update LLDB bundle for Linux
This is related to KTIJ-19931
2021-11-15 10:39:11 +03:00
Steven Schäfer a6dae0b37b JVM IR: Fix value class mangling in SAM wrappers from different modules
KT-49659
2021-11-14 21:52:39 +01:00
Kristoffer Andersen 771b79d045 [EE-IR] Use reflection to avoid the need for accessors when compiling
evaluator fragments

- Refactor JvmIrCodegenFactory to allow for caller's choice of
  lowerings.

- Refactor of SyntheticAccessorLowering to expose the accessibility
  check used to determine the need for accessors.

- Replacement of field, method and constructor uses with corresponding
  java.lang.reflection API via additional lowering running _before_
  the existing IR pipeline.

- Emulating super calls in the context of class methods via new
  compiler intrinsic.

- psi2ir: Add support for `_field` suffix on properties in the
  evaluator for accessing underlying fields when applicable.

- Add `JvmGeneratorExtensions` point for determining whether a
  property accessor has a user-supplied body in order to predict how
  they are ultimately compiled for the JVM.
2021-11-14 21:50:13 +01:00
Alexander Udalov 2e535366f1 Speed up LauncherScriptTest
Do not run kotlinc in a separate process in tests which check behavior
of the `kotlin` launcher script.

Locally, the test now runs for 37s instead of 51s.
2021-11-14 18:50:48 +01:00
Xin Wang b24c3a106e CLI: Allow running class files with '.class' extension in 'kotlin' script
Catch NoClassDefFoundError and print message with cause.

 #KT-11164 Fixed
 #KT-46171 Fixed
2021-11-14 18:50:39 +01:00
Ilmir Usmanov b7d88be41a Regenerate FIR diagnostics-related files 2021-11-13 12:38:49 +01:00
zhelenskiy c1dc1f7e33 Diagnostics renamed
Signed-off-by: zhelenskiy <zhelenskiy2000@yandex.ru>
2021-11-13 12:38:45 +01:00
Nikolay Krasko 3f7bf51059 Temporary workaround too long JDKs download by increasing timeout 2021-11-13 03:59:46 +03:00
Matthew Haughton ee62c6d11d Add readable toString for JvmTarget 2021-11-13 00:39:41 +01:00
Ilya Kirillov 540bbc6bef Analysis API: temporary update descriptors testdata 2021-11-12 23:19:41 +01:00
Ilya Kirillov 50f5a0559e Analysis API: regenerate tests 2021-11-12 22:09:00 +01:00
Tianyu Geng a8ae704c0c FIR IDE: fix property accessor resolution
For property access with implicit receiver, the resolved fir is a
FirPropertyAccessExpression and hence we need to handle it in
KtFirCallResolver.
2021-11-12 21:56:46 +01:00
Tianyu Geng 1a22124c02 FIR IDE: add helper to resolve call for any KtElement 2021-11-12 21:56:45 +01:00
Pavel Kunyavskiy 523cb4b3e8 [K/N] Better handling of nested returns in RedundantCoercionsCleaner.kt
^KT-49356
2021-11-12 19:12:37 +00:00
Ivan Kylchik 41547174a7 [JS TESTS] Enable directive processing for js ir 2021-11-12 21:24:32 +03:00
Ivan Kylchik 8d1459d8c2 [JS TESTS] Move js ir tests to separate folder to fix jsIrTest task 2021-11-12 21:24:32 +03:00
Ivan Kylchik 103d948dc8 [JS TESTS] Remove common handlers from abstract test classes 2021-11-12 21:24:31 +03:00
Ivan Kylchik a3239288a7 [JS TESTS] Rename testNew to test 2021-11-12 21:24:31 +03:00
Ivan Kylchik ab1d0d0b74 [JS TESTS] Rename test to testOld 2021-11-12 21:24:31 +03:00
Ivan Kylchik 8c2e9fdc89 [JS TESTS] Drop old basic tests 2021-11-12 21:24:30 +03:00
Ivan Kylchik 33c799b6d9 [JS TESTS] Drop pir tests 2021-11-12 21:24:30 +03:00
Ivan Kylchik 4d5ba7e956 [JS TESTS] Drop ES6 tests 2021-11-12 21:24:29 +03:00
Artem Kobzar 7aa8de55a5 fix(use strict): move global this polyfill after "use strict" pragma. 2021-11-12 15:59:27 +00:00
Svyatoslav Kuzmich 3aafb76077 [Wasm] Enable name section in CLI by default 2021-11-12 18:44:47 +03:00
Svyatoslav Kuzmich 49d63abc88 [Wasm] Add JS box/native tests 2021-11-12 18:44:47 +03:00
Svyatoslav Kuzmich 08362e8b38 [Wasm] Support defineExternally 2021-11-12 18:44:46 +03:00
Svyatoslav Kuzmich 5098bc0c70 [Wasm][Minor] Rename method 2021-11-12 18:44:46 +03:00
Svyatoslav Kuzmich 7e9fc54e64 [Wasm] Support external companions 2021-11-12 18:44:46 +03:00
Svyatoslav Kuzmich 91ea3738b4 [Wasm] Fix type parameters with external upper-bounds.
`klass.isExternal` was never reachable for type parameters
because of klass != null check
2021-11-12 18:44:46 +03:00
Andrey Uskov 9826984c4a Report flag use-fir in Gradle statistics
#KT-49633 Fixed
2021-11-12 18:13:41 +03:00
Andrey Uskov b5456539aa More stable reporting of compilation in statistics 2021-11-12 18:13:40 +03:00
Andrey Uskov 2fe337f58a Fixed flakiness of BuildSessionLoggerTest 2021-11-12 18:13:39 +03:00
Igor Chevdar b474b570a4 [K/N][gradle] Supported friend modules for two stage compilation
Fixes https://youtrack.jetbrains.com/issue/KT-49248
2021-11-12 17:40:26 +05:00
Alexander Udalov e7680ddbff Fix execution optimization warning for :kotlin-stdlib-common:sourcesJar
#KTI-662 Fixed
2021-11-12 13:24:08 +01:00
Ivan Kochurkin 15c83abfd8 [FIR] Throw UNCHECKED_CAST instead of NO_TYPE_ARGUMENTS_ON_RHS closer to FE 1.0 2021-11-12 15:20:48 +03:00
Ivan Kochurkin 87eb02a9e0 [FIR] Add error messages for CANNOT_CHECK_FOR_ERASED, CAST_NEVER_SUCCEEDS, UNCHECKED_CAST 2021-11-12 15:20:48 +03:00
Ivan Kochurkin 5fda933c33 [FIR] Unify code of type unification, fix intersection types processing in FirCastDiagnosticsHelpers.kt 2021-11-12 15:20:47 +03:00
Ivan Kochurkin 98cce8e05b [FIR] Support of intersection types in bareTypes.doUnify ^KT-48832 Fixed 2021-11-12 15:20:47 +03:00