Commit Graph

54274 Commits

Author SHA1 Message Date
Dmitry Gridin b78ec32c02 Change CodegenFactory signature from Collection<KtFile?> to Collection<KtFile> 2019-04-25 19:47:39 +07:00
Dmitry Gridin 37c856290f Fix minor compile warnings 2019-04-25 19:47:39 +07:00
Dmitry Gridin 79793a4bda Replace deprecated classes with parent 2019-04-25 19:47:38 +07:00
Dmitry Gridin 2a85bece80 Replace CodeStyleSettingsManager.getSettings with CodeStyle.getSettings 2019-04-25 19:47:38 +07:00
Dmitry Gridin bdb97ed46a Replace deprecated icons with actual 2019-04-25 19:47:38 +07:00
Dmitry Gridin c41b98f5b9 Replace SystemInfo.isJavaVersionAtLeast("1.7") with SystemInfo.isJavaVersionAtLeast(1, 7, 0) 2019-04-25 19:47:38 +07:00
Dmitry Gridin d7d9771b3c Replace UastEmptyExpression with UastEmptyExpression(null) 2019-04-25 19:47:38 +07:00
Alexander Udalov 648ed92ba3 Minor, deduplicate code in CodegenTestCase.doTest 2019-04-25 14:43:56 +02:00
Alexander Udalov 1c1ff3e2b2 Minor, move android-extensions-compiler tests to package org.jetbrains.kotlin
To fix the package name mismatch inspection
2019-04-25 14:43:47 +02:00
Alexander Udalov 74dd99a8da JS: use new DefaultBuiltIns instance instead of anonymous 2019-04-25 14:42:44 +02:00
Alexander Udalov cb6fb78bc3 JS: do not use "-no-stdlib" in non-relevant tests
Rename some Ant tests: "simple[...]" -> "simpleWithoutStdlib[...]" and
"simpleWithStdlib[...]" -> "simple[...]"
2019-04-25 14:42:43 +02:00
Alexander Udalov 0659d0cba9 JS: do not use getBuiltInsModule to compute module name
The intention of this code was to use the name "kotlin" for the builtins
module, in case we're using builtins loaded from the compiler class
loader (whose module is created in
`KotlinBuiltIns.createBuiltInsModule`). However,
`getBuiltIns().getBuiltInsModule()` may refer not necessarily to the
builtins module, but also to any valid module where the builtins are
visible from, therefore its name would be computed incorrectly. Use the
module name instead to determine if it's a synthetic builtins module
created in `createBuiltInsModule`
2019-04-25 14:42:43 +02:00
Alexander Udalov d5fd160fd3 JS: minor, do not use '==' on descriptors from built-ins
Use KotlinBuiltIns.isString instead of equality with
KotlinBuiltIns.string, which is more portable across different module
configurations. Also use isSubtypeOf instead of
DescriptorUtils.isSubclass and thus get rid of an extra error on an
unresolved class in nativeAnnotationCheckers.kt
2019-04-25 14:42:42 +02:00
pyos 31670622c0 Remove a redundant JVM-specific lowering 2019-04-25 14:30:41 +02:00
Jake Wharton 373424f430 Add ULong.compareTo and UInt.div/rem/compareTo intrinsics for Java 8 2019-04-25 13:21:25 +02:00
Georgy Bronnikov e6362661d1 Merge pull request #2298 from pyos/linear-toarray-lowering
JVM_IR: make ToArrayLowering linear in complexity
2019-04-25 13:28:49 +03:00
Mikhail Glukhikh 69ea0a3597 Fir broken FIR2IR test 2019-04-25 12:37:13 +03:00
Ilya Matveev 24588263ed Store kotlin-native-shared version in the jar of the Gradle plugin 2019-04-25 16:19:11 +07:00
Ilya Matveev c9ed648303 Use kotlin-native-shared in the Gradle plugin
The kotlin-native-shared artifact includes API allowing
us to work with K/N platforms, hosts, distribution etc.
This patch replaces a dependency on kotlin-native-utils
containing copies of such classes with a dependency on
published kotlin-native-shared in the Gradle plugin and
bundles kotlin-native-shared into the Gradle plugin jar.
2019-04-25 16:19:11 +07:00
pyos 4b0b9e1f80 JVM_IR: make ToArrayLowering linear in complexity
by not running DFS from every node visited during another DFS.
2019-04-25 11:07:34 +02:00
Nicolay Mitropolsky f118b007f0 Uast: more cases for KotlinUSimpleReferenceExpression resolve (KT-30957, KT-27385) 2019-04-25 10:07:09 +03:00
Simon Ogorodnik 9352d52e7e FIR: load default value from meta-data 2019-04-25 09:47:38 +03:00
Simon Ogorodnik 879563233a FIR: optimize caching in JVM deserializer 2019-04-25 09:47:37 +03:00
Simon Ogorodnik f453e7df27 Improve error reporting in fir benchmark function 2019-04-25 09:47:37 +03:00
Simon Ogorodnik a5ca8ffe69 Refactor FirSelfImportingScope 2019-04-25 09:47:37 +03:00
Simon Ogorodnik f22cca5087 FIR top-level member scope: lookup constructors via classes 2019-04-25 09:47:37 +03:00
Simon Ogorodnik 9cf91738ea Use local callables index in FirClassDeclaredMemberScope 2019-04-25 09:47:37 +03:00
Mikhael Bogdanov 11e0035254 Support test parallelization in uast tests 2019-04-25 08:09:27 +02:00
Mikhael Bogdanov d1b5c76f09 Reuse KtUsefulTest case temporary files infrastructure 2019-04-25 08:09:26 +02:00
Svyatoslav Kuzmich e30bdb8dc9 Fix hanling module names that require escaping 2019-04-25 03:54:17 +03:00
Ilya Chernikov c3a439a829 Fix and refactor scripting subplugin application logic
so warning is not shown when discovery configuration is not populated
fix #KT-31124
refactor code for clarity on the way
also apply scripting subplugin after main plugin to ensure that
configurations are created before scripting is initialized
2019-04-24 17:27:47 +02:00
Ilya Chernikov 917fc56f36 Fix main-kts dependencies after extracting scripting 2019-04-24 17:27:03 +02:00
Ilya Chernikov 4b8d9c8fdd Fix classloaders order on script evaluation
the dependencies one should be a parent for the modules one, to avoid
incompatibility problems. Also fixes main-kts tests
2019-04-24 17:27:03 +02:00
Anton Yalyshev 6ffc3a8679 bunch files update after master switched to 191 2019-04-24 17:23:47 +03:00
Anton Yalyshev 2329954e02 added capability to send a custom event's context 2019-04-24 17:23:22 +03:00
Anton Yalyshev 0255d66144 shortened class and function names and make them closer to actual FUS naming 2019-04-24 17:23:21 +03:00
Dmitry Gridin 9bd32eb3cb Replace GradleBaseInspection with BaseInspection
#KT-31103 Fixed
2019-04-24 20:23:15 +07:00
Dmitry Gridin 0198df4935 PackageDirectoryMismatchInspection should report when a package statement is missing
#KT-13549 Fixed
2019-04-24 20:16:54 +07:00
Dmitry Gridin 2ae30de980 MoveVariableDeclarationIntoWhenInspection shouldn't report a multi-line variable
#KT-30457 Fixed
2019-04-24 20:12:44 +07:00
Sergey Igushkin d456ae58b6 Remove usages of com.intellij.* utils from kotlin-build-common, KT-31106
As Gradle may under certain conditions reorder the buildscript
classpath artifacts, we need to ensure that the `kotlin-build-common`
module, which duplicates some of the classes that are shaded and packed
into `kotlin-compiler-embeddable`, does not call `com.intellij.*`
classes.

Replace the `com.intellij.*` utils that were called on the execution
path with our own implementations.

Issue #KT-31106 Fixed
2019-04-24 15:51:13 +03:00
Svyatoslav Kuzmich 09d7f4015b Move test.kt stubs to smallRuntime
We already use kotlin.test with fullRuntime klib.
2019-04-24 13:06:59 +03:00
Svyatoslav Kuzmich b0bd5802bb Remove optionalExpectation hacks
Add common sources to Generate IR Runtime
2019-04-24 13:06:58 +03:00
Svyatoslav Kuzmich 1a6e6588fc Fix: Use Vars instead of plain assignments for declaration imports 2019-04-24 13:06:58 +03:00
Ilmir Usmanov c2884f3ca8 Optimize variable liveness analysis
During coroutines transformation, we analyse liveness of local variables
in order to decide whether we need to spill them or not.
This analysis contains hot method `useVar`, in which we previously
iterated over all variables in LVT. This is done, since these variables
are seen by debugger and we assume they are alice.
However, this variables can be generated by inliner. In this case, the
LVT's size in huge. I.e. we have loop in hot method.

By hoisting the liveness analysis of the LVT and combining its result
with result of usual liveness analysis, we achieve speed-up from 2m30s
down to 5s.
 #KT-30603 Fixed
2019-04-24 13:04:40 +03:00
Steven Schäfer f2392a6a28 Remove Concat and StringPlus intrinsics in favor of IrStringConcatenation. 2019-04-24 12:04:12 +02:00
Natalia Selezneva 26c9d69252 Check KotlinOutOfCodeBlockTracker in OutOfBlockModificationTest
General PsiModificationTracker.outOfCodeBlockModificationTracker was removed in IDEA 192
2019-04-24 11:45:03 +03:00
Natalia Selezneva 512a297e0a Process property setter parameter in UAST 2019-04-24 11:39:17 +03:00
Natalia Selezneva d45644cea4 Fix path to TestNG library in tests for 191 2019-04-24 11:39:17 +03:00
Nicolay Mitropolsky 1db7754298 A workaround for the IDEA-211491 in IDEA 191 to make Kotlin tests pass
for instance `InspectionTestGenerated$Inspections.testOverridingDeprecatedMember_inspectionData_Inspections_test`
2019-04-24 11:21:30 +03:00
Dmitriy Dolovov d90b63d928 Improve logging in NativeCompilerDownloader
Issue #KT-31158 fixed
2019-04-24 14:17:16 +07:00