Commit Graph

1823 Commits

Author SHA1 Message Date
Leonid Startsev c3f66cda65 Lowering extension point 2018-08-09 16:16:09 +03:00
Alexey Sedunov abbac067b8 Configuration: Collapse empty nullable strings to null 2018-08-09 10:06:30 +03:00
Nicolay Mitropolsky ce6543b1cb 183: IdeaExtensionPoints.IDEA_COMPATIBLE_BUILD_NUMBER = "183.1" 2018-08-08 12:29:36 +03:00
Denis Zharkov 8050869e45 Use THashSet for sets that are assumed to be big
Otherwise, a lot of memory is wasted on nodes instances

(cherry picked from commit 4922f87)
2018-08-08 15:17:25 +07:00
Alexander Udalov b67d236857 Fix bunch files for KotlinToJVMBytecodeCompiler
After 1582354077
2018-08-07 16:13:16 +02:00
Alexey Sedunov ecf607d4fa Gradle: Implement new MPP model import 2018-08-07 15:59:41 +03:00
Alexander Udalov 1582354077 Refactor CompileEnvironmentUtil.getKtFiles, move to KotlinCoreEnvironment
Do not call this method the second time in KotlinToJVMBytecodeCompiler
where all KtFile instances are already created; just get only those
files that are in the needed module, which can be determined solely by
the file path.

Also "kotlinize" getKtFiles and rename to createKtFiles
2018-08-07 13:38:30 +02:00
Alexander Udalov 5da8ce844a Minor, move ContentRoot and KotlinSourceRoot to module 'cli'
Also move CONTENT_ROOTS from JVMConfigurationKeys to
CLIConfigurationKeys since it's used on all platforms, not just JVM
2018-08-07 13:38:30 +02:00
Alexander Udalov 14b8f4b52b Minor, change package of outputUtils.kt 2018-08-07 13:38:30 +02:00
Alexander Udalov 2d875a9cb4 Reformat module 'cli', fix warnings/inspections 2018-08-07 13:38:29 +02:00
Nicolay Mitropolsky bbf2af1004 IdeaExtensionPoints.IDEA_COMPATIBLE_BUILD_NUMBER = "182.3040"
Otherwise Kotlin plugin is not loaded in some tests (`org.jetbrains.uast.test.kotlin.KotlinDetachedUastTest` for instance)
2018-08-07 12:26:30 +03:00
Yan Zhulanow 54470fe2b7 Pill: Remove source dependencies to 'tests-common'
'tests-common' module does only have a test source set so the dependency is redundant.
2018-08-07 11:55:23 +03:00
Vyacheslav Gerasimov ebb90f8260 183: Build against 183-SNAPSHOT 2018-08-03 21:29:19 +03:00
Natalia Selezneva f71269009a Refactoring: use KtScript.scriptDefinition instead of KotlinScriptDefinitionProvider.findScriptDefinition if possible 2018-08-03 15:25:35 +03:00
Natalia Selezneva 736361e345 Provide a default scriptDefinition for script 2018-08-03 15:25:35 +03:00
Vyacheslav Gerasimov a2bf417d75 Remove 172 bunchset 2018-08-02 19:32:18 +03:00
Vyacheslav Gerasimov 0103c0d2fd Switch to 182 platform 2018-08-02 18:17:06 +03:00
Nikolay Krasko a406f1b361 Revert registering ClsCustomNavigationPolicy EP in 182 (KT-24891)
Registration can't be removed because there's still a usage in ClsFileImpl:

Caused by: java.lang.IllegalArgumentException: Missing extension point: com.intellij.psi.clsCustomNavigationPolicy in area null
    at com.intellij.openapi.extensions.impl.ExtensionsAreaImpl.getExtensionPoint(ExtensionsAreaImpl.java:335)
    at com.intellij.openapi.extensions.impl.ExtensionsAreaImpl.getExtensionPoint(ExtensionsAreaImpl.java:26)
    at com.intellij.openapi.extensions.Extensions.getExtensions(Extensions.java:104)
    at com.intellij.openapi.extensions.Extensions.getExtensions(Extensions.java:98)
    at com.intellij.openapi.extensions.Extensions.getExtensions(Extensions.java:93)
    at com.intellij.psi.impl.compiled.ClsFileImpl.getNavigationElement(ClsFileImpl.java:312)
2018-08-01 14:02:59 +03:00
Alexander Udalov 4bd66d5aa8 Add compiler argument -Xfriend-paths for kotlinc-jvm
#KT-21910 Fixed
2018-07-27 18:51:42 +02:00
Dmitry Petrov 566b5856ec Constructor call normalization mode depends on language version 2018-07-27 09:52:29 +03:00
Alexander Udalov 3323fd5a11 Check "kotlin" package usage when compiling common code
#KT-25369 Fixed
2018-07-26 17:10:33 +02:00
Alexey Tsvetkov 0b18380770 Use separate system properties to control IC for JVM and JS
Also this commit effectively disables JS IC by default

     #KT-25563 fixed
2018-07-23 15:43:16 +03:00
Dmitry Savvinov 6dacd1011f Do not report warning if -XXLanguage turns on bugfix
KT-25554 Fixed
2018-07-20 14:24:42 +03:00
Denis Zharkov 0b2fde3886 State on types level that forcing imports works only for non-default 2018-07-20 11:27:08 +03:00
Alexander Udalov 871b896a21 Add internal compiler argument to change metadata version
Will be used in tests to check how we behave on binaries produced by a
"future" compiler
2018-07-18 17:59:37 +02:00
Alexander Udalov cfc0f5e453 Support correct way of writing/loading version requirement table
Tests are added in subsequent commits.

KT-25120 Fixed
2018-07-18 17:59:37 +02:00
Alexander Udalov 1e9694f1db Fix version requirement serialization for nested classes
Use the version requierement table of the outer DescriptorSerializer
instance when serializing metadata for a class. Pass parent serializer
to DescriptorSerializer.create to make sure the correct table is used.
Serialize nested classes before the outer class in JS and common code,
to make sure requirements are not lost. Also, split
VersionRequirementTest to JVM and JS

 #KT-25120 In Progress
2018-07-18 17:58:46 +02:00
Ilya Chernikov a61de052c7 Do not throw on incompatible cli scripting plugin
More reliably fixes #KT-24946, #KT-24438 and alike
2018-07-18 15:15:41 +02:00
Dmitry Savvinov 70144f8003 Make warning about usage of -XX-flags less scary 2018-07-16 18:49:21 +03:00
Alexander Udalov e937fe8258 Move PackagePartProvider to module descriptors.jvm 2018-07-10 15:16:49 +02:00
Alexander Udalov 2cb4b7c6d4 Extract MetadataPartProvider out of PackagePartProvider 2018-07-10 15:16:49 +02:00
Georgy Bronnikov 8ce658ab54 Introduce -Xuse-ir flag for cli compiler 2018-07-10 10:05:06 +02:00
Ilya Chernikov b83948f241 Drop support of KOTLIN_HOME environment variable in the command-line compiler
it is proved to be fragile and seems unnecessary at the moment
2018-07-10 08:43:52 +02:00
Ilya Chernikov 92d4d986c8 Take path to scripting plugin libs only from compiler jar path...
ignoring all "kotlin home" settings, since we need to load a compatible
plugin. Fixes #KT-24946
2018-07-10 08:43:51 +02:00
Ilya Chernikov ec58929e39 Allow multiple same jsr305 options in the command-line
do not report duplicate jsr305 entries if options are the same
2018-07-10 08:43:51 +02:00
Ilya Chernikov 199c3bce40 Fix explicit custom scripting definitions choice logic:
add standard script def after custom defs are processed
2018-07-10 08:43:50 +02:00
Ilya Chernikov e17c36cf12 Improve automatic scripting plugin picking logic 2018-07-10 08:43:50 +02:00
Alexander Podkhalyuzin a92ce467a7 Fixed patchset branches 2018-07-06 18:31:21 +03:00
Alexander Podkhalyuzin 571fda0f45 Fixed deprecation of ConcurrentFactoryMap()
#KT-24892 Fixed
2018-07-06 17:20:46 +03:00
Alexander Udalov 959c2f4843 Get rid of split packages in descriptors, descriptors.jvm, deserialization
Also move some other files to related packages and reformat moved files
2018-07-06 14:08:35 +02:00
Alexander Udalov 0c45f20515 Minor, fix several CLI argument descriptions 2018-06-27 13:25:30 +02:00
Alexander Udalov 51c01c15b8 Refactor KotlinCoreEnvironment, fix warnings 2018-06-21 14:47:28 +02:00
Alexander Udalov d2f278b601 Minimize content of version-specific bunch files for KotlinCoreEnvironment 2018-06-21 14:47:27 +02:00
Alexander Udalov 9309570752 Fix serialization of type parameters inner generic class
The call to `createTopLevel` instead of `create` (which creates
serializers for outer classes properly, with correct type parameter
contexts) caused MetadataSerializer to write type parameter metadata
incorrectly.  For example, in the following case:

    class A<E> {
        inner class B<T, E> { ... }
    }

A's type parameter E would get id 0, and B's type parameters T and E
would get ids 0 and 1. This is a problem because ids are supposed to be
unique for each class including its outer classes, and deserializer,
decompiler and stub builder rely on this assumption.

JVM metadata is unaffected because `create` is called correctly there,
see MemberCodegen#generateKotlinClassMetadataAnnotation

 #KT-24944 Fixed
2018-06-21 14:45:45 +02:00
Alexey Tsvetkov 32b1c42647 Specify root type in non-existent location warning 2018-06-20 23:58:37 +03:00
Alexander Udalov 28da071ff6 Remove usages of deprecated ClsCustomNavigationPolicy
#KT-24891 Fixed
2018-06-15 18:58:15 +02:00
Yan Zhulanow ab5614eaac Minor: Replace a number of trivial Guava usages with constructor calls and kotlin-stdlib function calls 2018-06-08 19:37:47 +03:00
Sergey Rostov 0eee2729cd jps: support multiplatform incremental compilation for jvm and js
- support common modules metadata compilation under flag (it is not required since all common source roots are included transitively for now)
- introduce expect actual tracker in jps: move implementation from gradle to build-common
- support js incremental compilation: move implementation from gradle to build-common
2018-06-08 09:46:37 +03:00
Mikhael Bogdanov 419218b9cf Rename 'jvm-default-mode' to 'jvm-default'. Add description 2018-05-29 11:26:36 +02:00
Mikhael Bogdanov 7f4bd549aa Minor. Fix rebase 2018-05-29 09:28:46 +02:00