Commit Graph

56016 Commits

Author SHA1 Message Date
Mikhail Zarechenskiy 6eefea6715 Add tests for obsolete issues
#KT-32395 Obsolete (fixed in 42a5c488)
 #KT-32388 Obsolete (fixed in f3e4c9cd)
 #KT-32271 Obsolete (fixed in 60a0cf1)
2019-07-06 10:06:04 +03:00
Svyatoslav Kuzmich 675f01ee80 [JS IR BE] Set Throwable subtype name in extendThrowable function 2019-07-05 19:31:23 +03:00
Leonid Startsev 4379780ff8 Fixed extra argument in function call after rebase 2019-07-05 18:48:51 +03:00
Leonid Startsev 80ddac64e0 Add serializers for primitive arrays to default types list 2019-07-05 18:14:34 +03:00
Ilya Chernikov cfceeb1e8c Implement direct bindings to script properties mapping in the JSR-223 implementation
fix infrastructure and codegen parts
2019-07-05 17:02:10 +02:00
Ilya Chernikov 4940f64265 Refactor scripting infrastructure - convert usages to the new entities 2019-07-05 17:02:10 +02:00
Ilya Chernikov 80ada5113e Fix flaky test 2019-07-05 17:02:10 +02:00
Alexander Udalov 37002748c8 Do not wrap and display cause's message in compiler exceptions
In case the wrapped exception message contains some long text (bytecode,
IR, etc.), it could be displayed several times in the same stack trace,
which significantly worsened the experience of parsing such stack traces
2019-07-05 15:55:01 +02:00
Dmitry Gridin 430aed6559 Minor: clean up code 2019-07-05 19:28:02 +07:00
Toshiaki Kameyama 1f89c0f730 "Convert to sealed class" intention: don't suggest when no "class" keyword
#KT-32365 Fixed
2019-07-05 19:28:02 +07:00
Toshiaki Kameyama 9786564d75 "Remove argument name" intention: remove array literal brackets for annotation vararg argument
#KT-32318 Fixed
2019-07-05 19:18:40 +07:00
Juan Chen d33d1913cb Not throw exception when cidr has been registered already
This is to avoid failures from some Android Studio tests depending on cidr.
2019-07-05 12:57:48 +03:00
Toshiaki Kameyama 9f6e88d571 Formatter: format around safe cast operator as? (KT-32324)
#KT-32324 Fixed
2019-07-05 12:57:48 +03:00
Toshiaki Kameyama 44e9090931 Formatter: format between type reference and 'by' keyword (KT-32277)
#KT-32277 Fixed
2019-07-05 12:57:47 +03:00
Nikolay Krasko 0b8f35c04d Revert "Register mock injection language manager in compiler"
This reverts commit 674badc6

Since idea 192.5587.17 idea has own InjectedLanguageManager registration
and fails because of duplicate.

org.junit.ComparisonFailure: exception: org.picocontainer.defaults.DuplicateComponentKeyRegistrationException: Key com.intellij.lang.injection.InjectedLanguageManager duplicated
	at com.intellij.util.pico.DefaultPicoContainer.registerComponent(DefaultPicoContainer.java:123)
	at com.intellij.util.pico.DefaultPicoContainer.registerComponentInstance(DefaultPicoContainer.java:331)
	at com.intellij.mock.MockComponentManager.registerService(MockComponentManager.java:89)
	at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment$ProjectEnvironment.registerJavaPsiFacade(KotlinCoreEnvironment.kt:162)
	at com.intellij.core.JavaCoreProjectEnvironment.<init>(JavaCoreProjectEnvironment.java:55)
	at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreProjectEnvironment.<init>(KotlinCoreProjectEnvironment.kt:27)
	...
2019-07-05 09:08:15 +03:00
Dmitry Gridin f9b53da0fa Attempt to fix some inspection tests 2019-07-05 13:02:52 +07:00
Roman Artemev 8a569cc698 [JS IR BE] Do not create $default stub for external function and any its fake override 2019-07-04 22:59:12 +03:00
Roman Artemev 28a108a205 [JS IR BE] Visit callable reference members in private member lowering 2019-07-04 22:59:12 +03:00
Roman Artemev b4c68025a7 [JS IR BE] Improve error reporting 2019-07-04 22:59:12 +03:00
Vyacheslav Karpukhin 940c9e5604 192: build against IDEA 192.5587.17 2019-07-04 20:23:58 +02:00
Svyatoslav Kuzmich a2625c7bc8 [JS IR BE] Don't render null messages in Throwable
Set message property to 'undefined' to make Error.prototype.toString
skip it
2019-07-04 18:33:23 +03:00
Svyatoslav Kuzmich 94aebd0101 [JS IR BE] Proper support for String and Any constructors
Remove workarounds from codegen
2019-07-04 17:03:47 +03:00
Roman Artemev d7cb3e05ef [JS IR BE] Replace 32bit default String.hashcode with 64bit cityhash for UniqID
Split uniqID space into two part 63 bit each.
2019-07-04 12:49:30 +03:00
Dmitry Gridin 46eb929bd1 ControlFlowWithEmptyBodyInspection: shouldn't report on while with comments
#KT-32419 Fixed
2019-07-04 16:33:24 +07:00
Nikolay Krasko 6e750b0857 Enable API watcher in Kotlin
When Api Watcher plugin is installed this will activates pre-commit
checks in the project.
2019-07-04 11:54:22 +03:00
Nikolay Krasko ef90353831 Another test-runtime java plugin dependency 2019-07-04 11:54:22 +03:00
Nicolay Mitropolsky 5d081efe60 Uast: tests for no implicit returns in lambdas (KT-32370) 2019-07-04 10:53:48 +03:00
Nicolay Mitropolsky a180d78eaf Uast: implicit returns for local function bodies (KT-32370) 2019-07-04 10:53:48 +03:00
Nicolay Mitropolsky f85ebe7f43 Uast: implicit returns for lambda expressions (KT-32370) 2019-07-04 10:53:48 +03:00
Svyatoslav Kuzmich 631a09e541 [JS IR BE] ThrowableLowering: Use dynamic operators instead of jsSetJSField intrinsic 2019-07-03 20:37:49 +03:00
Svyatoslav Kuzmich 871180cdc0 [JS IR BE] Fix setting names of Throwable subclasses without primary constructor 2019-07-03 20:37:49 +03:00
Svyatoslav Kuzmich 918d470e1b [JS IR BE] Simplify throwable lowering.
- Make kotlin.Throwable class extenral
- Add runtime function 'extendThrowable' to use instead of delegating
  constructors to Throwable
2019-07-03 20:37:48 +03:00
Svyatoslav Kuzmich 6d1f893a5a [JS IR BE] Move object instance creation lowerings to IR 2019-07-03 20:37:48 +03:00
Svyatoslav Kuzmich 5dcb0ee016 [JS IR BE] Reduce JsScope usage in codegen 2019-07-03 20:37:48 +03:00
Jeffrey van Gogh a9c8fd903b reduce calls to Object.hashCode originating from LabelNormailizationMethodTransformer
Building on the work in #2403, shaves 1% of compilation time on kotlinx.serialization
by using SmartIdentityTable instead of hashMap in LabelNormailizationMethodTransformer.

Metrics on the prior hashMap use in this code:

| What      | Count |
| --------- | ----- |
| instances | 21530 |
| min       | 0     |
| max       | 174   |
| mean      | 4     |
| stddev    | 8.24  |
| median    | 4     |
| 90p       | 8     |
| 95p       | 15    |
2019-07-03 19:25:57 +02:00
Alexander Udalov 361c468c33 IR: move type utilities from IrTypeUtils.kt to irTypePredicates.kt
Multiple IrType extensions were incorrectly calling isNameInPackage
which actually checked if the name of the type's classifier _starts_
with the given string, not equals it. Move them to irTypePredicates,
which seems a more natural place for these extensions anyway. Move
isKClassArray to JVM backend utilities, since this is JVM-specific
behavior at the moment. Fix minor warnings/inspections
2019-07-03 19:10:03 +02:00
Alexey Tsvetkov 7c6f48df39 Revert "Set sourceCompatibility and targetCompatibility for JavaCompile tasks"
This reverts commit 290aded9
2019-07-03 12:47:36 +03:00
Alexey Tsvetkov 2a3bb2968e Revert "Call configureJvmProject once per project in afterEvaluate"
This reverts commit 33de71f7
2019-07-03 12:47:23 +03:00
Alexey Tsvetkov ab6174defd Revert "Check JDK env vars once during configuration when not syncing"
This reverts commit 48b86bba
2019-07-03 12:47:10 +03:00
Alexey Tsvetkov aa7aff84fc Revert "Do not fork java compile tasks when current JDK can be used"
This reverts commit f2021b58
2019-07-03 12:46:50 +03:00
Alexey Tsvetkov 9340bffd02 Revert "Add ext.jvmTarget and ext.javaHome to core:descriptors.runtime"
This reverts commit 35dea296fa.
2019-07-03 12:40:02 +03:00
Andrey Uskov 1a290621b0 Minor. Update multiplatform kotlin plugin version in HMPP tests 2019-07-03 11:49:04 +03:00
Andrey Uskov e079615cdf Add possibility to edit target platform for non-HMPP projects in order to keep ability to edit target platform for IDEA-based projects 2019-07-02 22:46:48 +03:00
Andrey Uskov efb0e692ae Minor. Reformat KotlinFacetEditorGeneralTab 2019-07-02 22:46:47 +03:00
Andrey Uskov 9fc60be9d8 Fix serialization of facet settings in order to read properly
settings of native platforms
2019-07-02 22:46:47 +03:00
Andrey Uskov 404ce1a8c1 Facet serialization changed in order to keep compatibility with previous
versions of Kotlin plugin
2019-07-02 22:46:46 +03:00
Andrey Uskov 87e75bd4cc HMPP: fix importing target platforms for case when JVM targets are involved 2019-07-02 22:46:45 +03:00
Andrey Uskov 8445e3a2a4 HMPP: add importing tests 2019-07-02 22:46:45 +03:00
Andrey Uskov 8280c647af HMPP: Migration of source root types for middle HMPP source sets fixed 2019-07-02 22:41:49 +03:00
Andrey Uskov 90187c959e Add test for 'isHMPP' flag 2019-07-02 22:41:02 +03:00