Commit Graph

55134 Commits

Author SHA1 Message Date
Anton Bannykh 145ca7b6a9 JS: merge proto parts as bytes 2019-05-28 23:33:17 +03:00
Anton Bannykh fbd59ba68a JS: lazy load special functions and source maps 2019-05-28 23:33:17 +03:00
Anton Bannykh a3aca662c1 JS: improve json parsestring 2019-05-28 23:33:17 +03:00
Anton Bannykh 56915d1c07 JS: optimize JSON parser 2019-05-28 23:33:17 +03:00
Dmitry Savvinov 675f930566 Fix compilation in bunches
Change in bunches was forgotten in aeb7f8400a
2019-05-28 21:25:32 +03:00
Ilya Matveev 78ce34f223 Gradle, native: Remove K/N repo from Gradle integration tests 2019-05-28 20:26:29 +03:00
Ilya Matveev 5b64410259 Gradle, native: Remove kotlin native repo in DSL codegen 2019-05-28 20:26:29 +03:00
Ilya Matveev 5e66399284 Move some classes used by Gradle plugin from K/N shared 2019-05-28 20:26:29 +03:00
Ilya Matveev b002d572fb Gradle, native: Correct path to LLVM in K/N tool runner
Currently we have the same directory as llvmHome and targetToolchain
but strictly speaking we need to use llvmHome.
2019-05-28 20:26:29 +03:00
Ilya Matveev cfb8e75829 Revert "Use kotlin-native-shared in the Gradle plugin"
This reverts commit c9ed648303.
2019-05-28 20:26:29 +03:00
Ilya Matveev 9a5c9a2180 Revert "Store kotlin-native-shared version in the jar of the Gradle plugin"
This reverts commit 24588263ed.
2019-05-28 20:26:28 +03:00
Ilya Matveev 49bcbf00fe Revert "Fix IDEA import after including kotlin-native-shared in Gradle plugin"
This reverts commit 774dbcd6c0.
2019-05-28 20:26:28 +03:00
Ilya Matveev 02ffc4bb22 Split shared: Create KonanVersion from string 2019-05-28 20:26:28 +03:00
Anton Bannykh 052ddd60ce JS: support callable references on suspend functions (KT-30987 fixed) 2019-05-28 19:13:08 +03:00
Dmitry Gridin aff8a3f97f Fix KNPE in OptimizedImportsBuilder
#KT-31637 Fixed
2019-05-28 21:46:48 +07:00
Alexander Udalov f9d61f2dc7 Make inline+reified functions synthetic instead of private in bytecode
#KT-18563 Fixed
2019-05-28 16:17:49 +02:00
Alexander Udalov a645b36688 Minor, restructure InlineOnly-related utilities 2019-05-28 15:56:15 +02:00
Alexander Udalov b42adcd73d Restructure bytecode listing tests on InlineOnly/inline+reified 2019-05-28 15:56:15 +02:00
Sergey Rostov 1c6ce208a6 Gradle, JS: support exotic versions while converting to semver
#KT-31563
2019-05-28 16:40:41 +03:00
Ilmir Usmanov 5631306165 Wrap result method node with max stack calculator in inliner
#KT-31347 Fixed
2019-05-28 16:37:45 +03:00
Mads Ager 3f6492ab2a JVM_IR: Restore lost top-level declaration check in annotation gen.
When moving away from descriptors, this top-level declaration check
was lost. That leads to many useless annotation elements in
inner classes attributes for annotations that are not inner classes.
2019-05-28 16:12:49 +03:00
Ilya Matveev 7929a05ee3 Build: Add K/N repo into Gradle integration tests to fix JPS build 2019-05-28 16:08:27 +03:00
Natalia Selezneva b5dbdc53d1 Pass environment variables resolving script dependencies
There is no option in UI to enable/disable passing those variables,
but during Gradle Sync environment variables are passed by default
Also Gradle expect that gradleOptions are passed but there is also no option in UI
(during Gradle Sync IDEA add some options but they shouldn't affect dependencies resolution process)
see GradleExeSettings.resolverExtension.getExtraCommandLineArgs

gradleWithConnection was removed because it isn't used by gradle because they need to manage the TAPI project directory

projectRoot was fixed to externalProjectPath because it can be overrided in settings.gradle

^KT-30974 Fixed
2019-05-28 16:05:46 +03:00
Dmitry Savvinov 893ac735bc Convert property initializer to getter in
JvmPlatforms.unspecifiedJvmPlatform

This unties static initialization loop which lead to NCDFE and other
issues.
2019-05-28 16:03:05 +03:00
Dmitry Savvinov aeb7f8400a Rename platform to targetPlatform in KotlinFacetSettings to avoid ambiguity in Java 2019-05-28 16:03:05 +03:00
Andrey Uskov 6ff5dc179c Fix exception during mpp run task creation due to usage of deprecated api
#KT-31482 Fixed
2019-05-28 15:17:32 +03:00
Andrey Uskov ec1d313ecb Fix ClassCastException during search of overriders
#EA-115095 Fixed
2019-05-28 15:16:33 +03:00
Andrey Uskov 08d1220728 Do not show UI dialog from a write action during work of intention
#EA-100676 Fixed
2019-05-28 15:15:58 +03:00
Mikhail Zarechenskiy e366bac713 Fix debugger tests for new-inference
There is new child of `VariableAsFunctionResolvedCall` in
 new-inference: `NewVariableAsFunctionResolvedCallImpl`. So, in order to
 support both versions, just use parent class
2019-05-28 14:46:38 +03:00
Dmitry Savvinov dd85dfbfde Extract common logic for parsing platform from test module name 2019-05-28 13:08:09 +03:00
Dmitry Savvinov 8997fa52df Introduce unspecifiedJvmPlatform for clients without jvmTarget
Previously, a lot of clients used JvmPlatform as platform-marker,
without thinking about jvmTarget.

For the sake of migration, this commits introduced so-called
UnspecifiedJvmPlatform, which can be used for a time being, but
generally, all usages should be removed in  future.
2019-05-28 13:08:09 +03:00
Dmitry Savvinov ef39e2a68f [Compatibility] Restore KotlinFacetSettings.getTargetPlatform() 2019-05-28 13:08:09 +03:00
Dmitry Savvinov 716e55d171 [Compatibility] Restore KotlinProjectConfugirator.getTargetPlatform() 2019-05-28 13:08:09 +03:00
Dmitry Savvinov dfe0493f9a [Compatiblity] Restore IdePlatform as well as some related methods 2019-05-28 13:08:09 +03:00
Dmitry Savvinov 1a11eaa4c6 Overload equals for JdkPlatform 2019-05-28 13:08:09 +03:00
Dmitry Savvinov 9d0f518d62 Rename PlatformDependentCompilerServices -> PlatformDependentAnalyzerServices 2019-05-28 13:08:09 +03:00
Dmitry Savvinov 3332cdfce8 [Compatibility] Restore ModuleSourceInfo.getPlatform() for compatibility 2019-05-28 13:08:09 +03:00
Dmitry Savvinov 2caa1c3dd6 [Compatibility] Restore old TargetPlatform and subtypes for compatibility 2019-05-28 13:08:08 +03:00
Dmitry Savvinov bbe7a9790e Imitate old comparison behaviour when collecting dependencies
This is needed, because previously such code were not distinguishing
between different flavours of JVM or Common. Now we do, and, for
example, JdkPlatform(1.6) != JdkPlatform(1.8), which causes such
dependencies to be erroneously dropped
2019-05-28 13:08:08 +03:00
Dmitry Savvinov 4116815a8d [Misc] Provide meaningful debugName for StorageManager everywhere 2019-05-28 13:08:08 +03:00
Dmitry Savvinov 602f642018 [Injection] Make component containers composition more granular and flexible
Previously, containers set-up was performed by calls to static functions
like 'createContainerForLazyResolve', which would set-up whole container
from scratch.

This has several issues:
- complicates code re-use and encourages copy-paste of one and the same
set-up logic
- complicates composition of multiplatform containers (because each
set-up method relies on the fact that it should take an empty
container and compose it completely)

The idea of this commit is to split set-up methods into smaller ones,
with finer areas of responsibility, which allows to re-use them
in various scenarios (and, in particularly motivating composition
of multiplatform container)
2019-05-28 13:08:08 +03:00
Dmitry Savvinov 72e28d37fc [Injection] Introduce PlatformSpecificExtensions and PlatformExtensionsClashResolver
This commit introduces the ability to register a PlatformExtensionClashResolver
in a container. Each PlatformExtensionClashResolver has a corresponding
PlatformSpecificExtensions.

If, during container composition, several instances of
PlatformSpecificExtensions were registred, instead of throwing
InvalidCardinalityException, corresponding PlatformExtensionClashResolver
will be asked to resolve clash.

This allows to make injection more composable and less coupled across
different contributors of service, providing a basis for such motivating
cases as composing containers with both JS and JVM services (for analysis
of multiplatform modules).
Previously, that would be impossible:
a) JS would inject default instances for some services which would clash
with non-default JVM services (like SyntheticScopes)
b) Also, there are a very few services for which *both* platforms provide
non-default implementations, so they should be merged manually on
case-by-case basis (e.g., IdentifierChecker)
2019-05-28 13:08:08 +03:00
Dmitry Savvinov b631e89ea7 [Injection] Annotate default services with @DefaultImplementation 2019-05-28 13:08:08 +03:00
Dmitry Savvinov d80eba31be [Injection] Discriminate default instances during clashes resolution
The idea is to try to resolve the dependency without considering default
instances first.

This makes containers more composable, e.g., it is now possible to put
several containers together as long as all except one provide default
implemenetation for some particular service (non-default implementation
will be automatically chosen, and all defaults will be discarded).
2019-05-28 13:08:08 +03:00
Dmitry Savvinov 398d715fc6 [Injection] Minor: remove explicit injection of ExpressionTypingServices
They will be injected automatically anyways
2019-05-28 13:08:08 +03:00
Dmitry Savvinov c97138c0eb [Injection] Pull languageVersionSettings injection to 'configureModule' 2019-05-28 13:08:08 +03:00
Dmitry Savvinov 89603327c5 [Injection] Minor: inline createLazyResolveSession 2019-05-28 13:08:08 +03:00
Dmitry Savvinov eb155dcf3b [Injection] Minor: inline configureModule overload without trace 2019-05-28 13:08:07 +03:00
Dmitry Savvinov b81b388b33 [Injection] Minor: inline createContainerForTopDownAnalyzerForJvm
Essentially, this function was used solely for setting
'useBuiltInsProvider' to 'true'; otherwise it were just delegating to
createContainerForLazyResolveWithJava, which were just increasing the
noise.
2019-05-28 13:08:07 +03:00
Dmitry Savvinov 70be224f0f [Injection] Minor: inline configureJavaTopDownAnalysis
It was used called only once, and hasn't provided any useful
abstraction.

Actually, this "cosmetic" refactoring makes similarities with other
platform-specific container set-ups cleare, which allows to make further
generalizations and simplifications.
2019-05-28 13:08:07 +03:00