Commit Graph

95416 Commits

Author SHA1 Message Date
Alexander Udalov d249b02cda Add JvmDefaultWithCompatibility to some interfaces
This has no effect on behavior, but will fix a binary compatibility
problem with Compose.

 #KT-54459 Fixed

Co-authored-by: Alexander Likhachev <Alexander.Likhachev@jetbrains.com>
2022-10-14 14:48:15 +02:00
Alexander Likhachev 95c4d6d027 Revert "Remove usage of deprecated Gradle field, replace with equivalent"
This reverts commit 6a491dfd0f.
2022-10-14 12:25:36 +02:00
Sergej Jaskiewicz c1f14d80fd [JS IR] Add Gradle integration tests for names in sourcemaps 2022-10-14 10:09:40 +00:00
Sergej Jaskiewicz d9681caf0c [JS IR] Generate 'names' entries for functions in sourcemaps 2022-10-14 10:09:40 +00:00
Sergej Jaskiewicz 1d0025c3cf [JS] Support the 'names' field in sourcemaps 2022-10-14 10:09:39 +00:00
Sergej Jaskiewicz 227864c6ec [JS IR] Add a compiler option for generating name entries in sourcemaps 2022-10-14 10:09:39 +00:00
pyos 8f237a60f7 Minor: make a convoluted condition even more readable 2022-10-14 08:25:28 +00:00
pyos 9a151e1422 Minor: remove unused FirOverrideService methods 2022-10-14 08:25:28 +00:00
pyos 8f19291a35 Minor: clean up FirTypeIntersectionScopeContext a bit more 2022-10-14 08:25:27 +00:00
pyos 1c2e25d727 FIR: move a condition to make it hopefully a bit clearer
A non-trivial intersection override should be created if:

1. the base methods are from different classes (for proper reporting of
   diagnostics if an override is necessary);
2. OR the return type might need to be intersected (which currently
   happens for non-subtyping scopes if there is no single maximally
   specific declaration)
2022-10-14 08:25:27 +00:00
pyos ee921412fc FIR: intersect return types of declarations in intersection scopes
^KT-54378 Fixed
2022-10-14 08:25:26 +00:00
pyos 2879e7a74c FIR: support > 1 most specific members in type intersection scopes 2022-10-14 08:25:26 +00:00
pyos 35450e6e04 FIR: refactor FirOverrideService to get a list of most specific members
There may be several if neither of them returns a subtype of the other's
returned type.
2022-10-14 08:25:25 +00:00
Sergey Bogolepov 56602290ec [K/N] Decompose ObjCExport framework generator
Split framework generation into several specialized classes
to reduce coupling.
2022-10-14 06:12:06 +00:00
Thomas Tresansky 6a491dfd0f Remove usage of deprecated Gradle field, replace with equivalent 2022-10-13 22:36:17 +02:00
Ivan Kochurkin a4ad8d59b6 [FIR] Move createSessionForTests, createSessionForTests into FirTestSessionFactoryHelper 2022-10-13 18:11:49 +00:00
Ivan Kochurkin 1deb253bac [FIR] Run FirSupertypesChecker for anonymous objects, ^KT-54300 Fixed 2022-10-13 18:11:49 +00:00
Ivan Kochurkin 69ee40325b [FIR] Fix dependencyProviders generation in FirDependenciesSymbolProviderImpl
Get rid of unnecessary creating of FirCompositeSymbolProvider
2022-10-13 18:11:49 +00:00
Ivan Kochurkin fe670d98a9 [FIR] Rename FirSessionFactory to FirJvmSessionFactory 2022-10-13 18:11:48 +00:00
Ivan Kochurkin 40a01180ff [FIR] Move createSessionWithDependencies and createEmptySession into FirSessionFactoryHelper 2022-10-13 18:11:48 +00:00
Ivan Kochurkin 281c79e21e [FIR] Inline createModuleDataForBuiltins method since it doesn't look useful 2022-10-13 18:11:48 +00:00
Ivan Kochurkin 4d89eddbe8 [FIR] Don't create FirDependenciesSymbolProvider without need 2022-10-13 18:11:47 +00:00
Ivan Kochurkin 9c6df5313a [FIR] Fix substitution of anonymous type's supertypes, ^KT-51418 Fixed 2022-10-13 18:11:47 +00:00
Ilya Goncharov c5732b6f4d [Gradle, JS] Make targetPbserver public in kotlinJsExtension 2022-10-13 17:53:40 +00:00
Sergey.Shanshin 5a1c2c56bd Added support of external serializers to the FIR
Co-authored-by: Leonid Startsev <leonid.startsev@jetbrains.com>
Merge-request: KT-MR-7334
Merged-by: Sergey Shanshin <Sergey.Shanshin@jetbrains.com>
2022-10-13 15:25:39 +00:00
vladislav.grechko 817afcd4af KT-MR-7307 review fixes 2022-10-13 15:19:10 +00:00
Anton Lakotka 4348878aab !fixup test typo 2022-10-13 14:56:51 +00:00
Anton Lakotka 728bd95aea [Gradle] Update tests after changes in sources publication
^KT-48839
2022-10-13 14:56:51 +00:00
Anton Lakotka 5e929bbd7b [Gradle] Don't publish test source sets in common module
Publish only shared source sets, including host-specific ones.

^KT-48839 Verification Pending
2022-10-13 14:56:51 +00:00
Anton Lakotka 5f26649246 [Gradle] Introduce getHostSpecificMainSharedSourceSets
^KT-48839
2022-10-13 14:56:50 +00:00
Anton Lakotka 42cda2633d [Gradle] Add/update tests about Sources Publication in MPP
^KT-48839
2022-10-13 14:56:50 +00:00
Bogdan Mukvich 1fd779e7f4 Fix dependencies in verification metadata after test 2022-10-13 14:31:32 +00:00
Bogdan Mukvich 67576b02c4 Add test for dependencies verification metadata
Every dependency used in project should have MD5 and SHA-256 hash
^KTI-943
2022-10-13 14:31:32 +00:00
Bogdan Mukvich e4e15f36ce Update dependencies verification metadata 2022-10-13 14:31:32 +00:00
Yahor Berdnikau 023b9bf284 Align new compiler options names with api naming
Use Kotlin*CompilerOptions or Kotlin*CompilerToolOptions naming approach.

^KT-54306 Fixed
2022-10-13 12:19:08 +00:00
Mikhail Glukhikh 31b3d8f859 Update info about K/N modules which do not pass FIR bootstrap
After we have advanced bootstrap to 1.8.20-dev-649,
some K2 problems inside K/N were fixed.
However, some other are still alive.

Related to KT-54123
2022-10-13 09:45:06 +00:00
Sergey Bogolepov 6a4722188f Extract SameTypeNamedCompilerPhase from NamedCompilerPhase
Currently, compiler pipelines are heavily couples with
NamedCompilerPhase. Unfortunately, NamedCompilerPhase uses the same
type for Input and Output, thus it is not applicable to phases that
try to transform some data purely.
Thus, we separate this class into two, allowing to have a new
inheritor of NamedCompilerPhase with different Input and Output types.
2022-10-13 08:25:26 +00:00
Sergey Bogolepov 3a500e536a Lift restrictions on Context in CompilerPhase
CommonBackendContext is a complex interface that
actually requires many things to be instantiated.
We don't need it for many parts of compilation pipeline:
frontend or object files phases in native backend would
work just fine without CommonBackendContext.
2022-10-13 08:25:26 +00:00
Sergey Bogolepov e1f2b89875 Untie Symbols class from CommonBackendContext
`Symbols.context` property is actually unused. Let's drop
it as it makes harder to create an instance of this class.
2022-10-13 08:24:11 +00:00
Artem Kobzar de880ce9aa [K/JS] Move ES modules logic to a new transformer with IC 2022-10-13 07:32:44 +00:00
Sergey Bogolepov 54deba63a1 Use PhaseConfigurationService in CompilerPhase instead of PhaseConfig 2022-10-13 06:39:39 +00:00
Sergey Bogolepov 06182fe547 Introduce abstraction layer atop of PhaseConfig.
PhaseConfig is tied to some root `compoundPhase` that
defines the whole compilation pipeline. To lift this restriction
and allow dynamically-defined compilation pipelines, let's move
parts of PhaseConfig interface that do not depend on `compoundPhase`
to an interface.
2022-10-13 06:39:38 +00:00
Alexander Korepanov 7b2c125754 [JS IR] Update IC depends graph after intrinsics loading
- Remove unused params from compilerWithIC wrapper.
- Move JsIrBackendContext creation logic into separate function
- Introduce and use compiler interface for IC infrastructure

On dirty rebuild we may reload IR from stdlib,
such reloading may affect files with intrinsics and builtins.
As soon as we load only exported symbols, we must track dependencies
for files with intrinsics or builtins as for others.
This patch implements the logic which updates dependencies for
the stdlib files after loading of intrinsics and builtins.

^KT-54323 Fixed
2022-10-12 22:14:15 +00:00
Denis.Zharkov 31ba1f1534 Add deprecation warning for false-negative TYPE_MISMATCH
See KT-49404 for details

In K1, within SubstitutingScope we approximate almost all the types
containing captured types are being approximated to either a lower or
an upper bound.

While mostly, it's being done correctly there are some problems with
approximations for flexible types

So, the parameter's type of A<in Any>::foo is approximated to Inv<in Any!>,
thus allowing to use Inv<*>, while it's obviously unsound.

NB: For the similar example, in B, there are regular TYPE_MISMATCH
because parameter for B<in Any>::foo is approximated to Nothing

Also, it's important to say that
- in K2 everything works because we don't use type approximation there
- approximation algorithm that works incorrectly is only being used in K1

^KT-54332 Fixed
2022-10-12 20:53:02 +00:00
Denis.Zharkov 4b455c0e51 Minor. Inject CallComponents to CallCheckerContext 2022-10-12 20:53:02 +00:00
Sergey.Shanshin 503f4d924d Added support of MetaSerializable to the FIR 2022-10-12 20:10:58 +00:00
Svyatoslav Scherbina 28340459b0 Bump Kotlin/Native version to 1.8.20-dev-980 2022-10-12 19:12:28 +00:00
Ilya Goncharov 866dee083e [Gradle, JS] Compilation after rebase 2022-10-12 17:59:10 +00:00
Ilya Goncharov 6d7b7724bd [Gradle, JS] Fix filtered arguments for relocated build cache 2022-10-12 17:59:09 +00:00
Ilya Goncharov 715ba5c59f [Gradle, JS] Fix tests 2022-10-12 17:59:09 +00:00