Commit Graph

82623 Commits

Author SHA1 Message Date
Victor Petukhov 26cbb020db Use resulting descriptor for old callable references to substitute stub type variables 2021-05-28 15:36:20 +03:00
Victor Petukhov 3ff22b67f7 Substitute type arguments of old callable references as well 2021-05-28 15:36:20 +03:00
Victor Petukhov d5be258291 Do substitution for receivers of old (by passing though OI) callable references properly, with avoiding premature returning from the method 2021-05-28 15:36:19 +03:00
Victor Petukhov 9fd1cbd2e7 Inject stub type variables of a different builder inference call properly 2021-05-28 15:36:19 +03:00
Victor Petukhov d486f7e188 Don't report TYPE_INFERENCE_POSTPONED_VARIABLE_IN_RECEIVER_TYPE if unrestricted build inference was enabled 2021-05-28 15:36:19 +03:00
Victor Petukhov 0c427555cf Support definitely not null stub types and proper subtyping on them 2021-05-28 15:36:19 +03:00
Victor Petukhov 0f317b01b4 Rename language feature StableBuilderInference to UnrestrictedBuilderInference 2021-05-28 15:36:19 +03:00
Victor Petukhov 0b37b2be6a Add addtional tests for builder inference 2021-05-28 15:36:19 +03:00
Victor Petukhov ecde5414dc Reuse error type constructor for stub types 2021-05-28 15:36:18 +03:00
Victor Petukhov ee927a15a9 Compute nullability for stub types properly 2021-05-28 15:36:18 +03:00
Victor Petukhov afbda75581 Set member scope for builder inference stub types equivalent to Any 2021-05-28 15:36:18 +03:00
Victor Petukhov 6356b9d501 Put removing builder inference restrictions under the compiler flag 2021-05-28 15:36:17 +03:00
Victor Petukhov 5a11450d77 Split stub types into stub type for subtyping and for builder inference and use them in the proper way 2021-05-28 15:36:17 +03:00
Victor Petukhov 703a353d2e Determine empty constraint system for a builder inference call by presense of not fixed type variables 2021-05-28 15:36:17 +03:00
Victor Petukhov c5faf532f5 Allow builder inference calls with labeled lambda
^KT-24993 Fixed
2021-05-28 15:36:16 +03:00
Victor Petukhov 90066d7e50 Add expected type constraints in a builder inference call 2021-05-28 15:36:16 +03:00
Victor Petukhov 7da47dcde8 Add type variables into common system of a builder inference call properly 2021-05-28 15:36:15 +03:00
Victor Petukhov ac7b459f2a Do subtyping with stub types properly
1) Return stub type if we are calculating super type between two same stub types
2) Return nullable Any if those stub types are different
2021-05-28 15:36:15 +03:00
Victor Petukhov 5d0461c722 Remove restrictions for builder inference internal calls 2021-05-28 15:36:14 +03:00
Victor Petukhov 26b8e86fe1 Render stub types properly 2021-05-28 15:36:14 +03:00
Nikita Bobko af12b2fdf0 [imltogradle] Replace "Exported transitive dependency" with original module name reference 2021-05-28 14:03:07 +02:00
Nikita Bobko 6a7770573c [imltogradle] Support attaching 211 IDEA 2021-05-28 14:03:07 +02:00
Roman Artemev 8a856e440e [KLIB] Fix linker diagnostic message 2021-05-28 13:37:30 +03:00
Roman Artemev 720edfa6aa [IR] Fix branch offests
Seems logic that right bound of branch is result's right bound,
not condition's.
2021-05-28 13:23:52 +03:00
Andrey Zinovyev ebf6ce133b [FIR] Fix kotlin version check in annotations
@RequireKotlin has more than one string parameter, so you need to check
 'version' only
2021-05-28 12:24:58 +03:00
Elena Lepilkina 3a22761d02 [K/N] Fix MutationCheck calls for inlined property accessors 2021-05-28 06:45:53 +00:00
Elena Lepilkina b6f35ac44d [K/N] Fix inlining of property setters by replacing ReturnsInsertion lowering 2021-05-28 06:45:52 +00:00
Yahor Berdnikau 3387615d4a Fix test requires more later Gradle version. 2021-05-27 18:12:02 +00:00
Yahor Berdnikau cdb04f9cd7 Add 'kgpSimpleTests' task.
This task run all JUnit5 tests with annotated with '@SimpleKGPTests`
annotation and also will be used in CI configuration.

^KT-45745 In Progress
2021-05-27 18:12:02 +00:00
Alexander Shabalin af1f57007a https://channel9.msdn.com/Shows/Going+Deep/Cpp-and-Beyond-2012-Herb-Sutter-atomic-Weapons-2-of-2 2021-05-27 17:18:55 +00:00
Nikolay Krasko 0b1884c994 Print memory consumption in the failure for GradleDaemonMemoryIT test 2021-05-27 20:13:10 +03:00
Nikolay Krasko 166f0a597b Run tests only for unique gradle versions 2021-05-27 20:13:09 +03:00
Nikolay Krasko b5f71bacaf Never spam to log during the normal test execution in Gradle tests 2021-05-27 20:13:08 +03:00
Nikolay Krasko 9d1a6ebb18 Minor: narrow extracting functions scope 2021-05-27 20:13:07 +03:00
Mark Punzalan d12a24418e FIR IDE: Remove multiple nested params in RemoveUselessElvisFix and
RemoveUselessCastFix.
2021-05-27 19:32:03 +03:00
Mark Punzalan a778cc673e FIR IDE: Enable RemoveUselessElvisFix. 2021-05-27 19:32:01 +03:00
Ilya Goncharov 157046153f [Gradle, JS] Add test with dynamic webpack.config.d 2021-05-27 19:18:13 +03:00
Hung Nguyen 01c14a709a KotlinCompile: Add kotlin.incremental.useClasspathSnapshot flag
We are planning to improve incremental Kotlin compile with a new
approach using classpath snapshot (see
https://youtrack.jetbrains.com/issue/KT-45777 for more details).

The estimated steps will be as follows:
  [x] Add a flag for the new approach, disabled by default
  [ ] Add tests for the new approach, and update them as we go
  [ ] Add computation of classpath snapshot using artifact transforms
  [ ] Add computation of classpath snapshot changes
  [ ] Ensure incremental compile is fully functional with the new approach
  [ ] Measure performance + optimize: Repeat until we see evidence that
      the new approach is clearly better than the current approach
  [ ] Advertise the flag, and later on enable it by default

This commit is the first step. Although it's simple, it allows further
changes to be made safely without impacting the current approach.

Bug: KT-45777
Test: N/A (will be added in a subsequent change)
2021-05-27 19:05:26 +03:00
Nikita Bobko 1abf3a39d4 Fix kotlin-compiler-tests-for-ide. tests jars should be published 2021-05-27 17:23:46 +02:00
Nikita Bobko 2d015da1ea Make it possible to depend on the rest of :prepare:ide-plugin-dependencies modules
Those modules used as "aggregate" modules. kotlin-ide modules depend on them in coop-dev
2021-05-27 16:32:14 +02:00
Sergey Shanshin 961ee92c15 Fix bytecode for serializable enums in generated tests 2021-05-27 15:35:12 +03:00
Alexander Shabalin e0c7cda1cf Adjust test expectations for the new MM 2021-05-27 11:39:56 +00:00
Ilya Goncharov f2a067eda0 [Gradle, JS] In KotlinWebpack configDirectory as getter not lazy
It is useful to dynamically creating config directory during build execution

^KT-46976 fixed
2021-05-27 14:07:04 +03:00
Viacheslav Kormushkin 3709616baa Fixed failing cocoapods integration test 2021-05-27 10:47:45 +00:00
pyos 34878d17eb JVM: be more careful when removing unused constants
1. if an argument of a `pop` cannot be removed, then all other potential
   arguments of that `pop` can't be removed either, and the same applies
   to other `pop`s that touch them;
2. the same is true for primitive conversions, but this is even trickier
   to implement correctly, so I simply did the same thing as with
   boxing operators: replace the conversion itself with a `pop` and keep
   the argument as-is.

Somehow this actually removes *more* redundant primitive type conversions
than the old code in a couple bytecode text tests, so I've patched them
to kind of use the value, forcing the instructions to stay.

 #KT-46921 Fixed
2021-05-27 12:24:22 +02:00
pyos 2f60ce21a0 JVM: remove CHECKCAST handling from PopBackwardPropagationTransformer
Redundant CHECKCASTs should've been removed by a previous pass.
2021-05-27 12:24:22 +02:00
pyos 535934dc28 JVM: do not remove NOPs in PopBackwardPropagationTransformer
There is a pass that removes NOPs and runs afterwards anyway.
2021-05-27 12:24:22 +02:00
Aleksei.Cherepanov 5f4be07225 [JPS] Fix JS incremental compilation
Disable Idea JPS build mechanism for marking all sources of common output if one of them is dirty
Add source-to-outputs map for correctly removing Kotlin/JS outputs

#KT-45763 Fixed
#KT-44351 Fixed
2021-05-27 13:00:56 +03:00
Andrey Zinovyev c2389a94fa [FIR] Resolve annotations in when expressions 2021-05-27 12:41:16 +03:00
Sergey Bogolepov b541721a79 Deprecate Architecture.bitness property
There is no such thing as "bitness" of CPU achitecture.
Something more appropriate and correct (e.g. ABI) should be
introduced instead.
2021-05-27 10:09:25 +03:00