Anton Bannykh
3808d77bf4
JS IR: inliner
2018-06-18 13:15:19 +03:00
Anton Bannykh
d938c91711
JS IR: top-level initializer lowering
2018-06-18 13:15:19 +03:00
Mikhail Zarechenskiy
c5160a6a95
Don't use methods from super interface if call was on inline class type
...
Some methods (like `size` from kotlin.collections.Collection) have
special rules for mapping and overriding. For example, when we call
`size`, normally there will be `INVOKEVIRTUAL size()` in the bytecode,
but for inline classes it should be `INVOKESTATIC ...$Erased.getSize()`
2018-06-18 12:35:31 +03:00
Mikhail Zarechenskiy
246d5e294c
Fix bytecode optimisations for consequent boxing
2018-06-18 11:52:37 +03:00
Mikhail Zarechenskiy
01d9be65bc
Perform bytecode optimisations for inline classes
...
#KT-23742 Fixed
2018-06-18 11:52:36 +03:00
Mikhail Zarechenskiy
7465289811
Introduce jvm backend class resolver to resolve asm types
...
Original author is @dnpetrov
2018-06-18 11:52:34 +03:00
Mikhail Zarechenskiy
5bdd7bca65
Pass GenerationState to OptimizationMethodVisitor
...
Original author is @dnpetrov
2018-06-18 11:52:32 +03:00
Mikhail Zarechenskiy
605cdcd8d8
Allow to use inline classes in 1.3 with warning
2018-06-18 11:52:31 +03:00
Mikhail Zarechenskiy
6db07f71f3
Check feature dependencies targets before report diagnostics
...
For example, if inline classes feature would have state `ENABLED_WITH_WARNING`,
then corresponding warning will be reported on inline functions too
2018-06-18 11:52:29 +03:00
Nikolay Krasko
423e8f9979
Depend on jre8 kotlin stdlib in idea
...
Use jre artifact for now because of KT-24730.
2018-06-16 01:19:15 +03:00
Natalia Selezneva
077554c438
Use field access instead of setter in clone method of KtCodeFragment
...
Fix EA-120381
2018-06-16 00:01:29 +03:00
Alexander Udalov
a9974a522e
Use correct class loader in kotlinx-metadata to load MetadataExtensions implementations
...
By default, ServiceLoader.load uses thread context class loader, which
can differ from the MetadataExtensions' class loader (which also loads
JvmMetadataExtensions, since they're in the same .jar) in many cases,
for example when used in annotation processing
#KT-24881 Fixed
2018-06-15 19:35:39 +02:00
Alexander Udalov
28da071ff6
Remove usages of deprecated ClsCustomNavigationPolicy
...
#KT-24891 Fixed
2018-06-15 18:58:15 +02:00
Nikolay Krasko
ea3c4fd451
Run single test after Gradle 4.7 update
2018-06-15 18:06:20 +03:00
Roman Artemev
960fba3c4e
Fix test failures
2018-06-15 16:23:06 +03:00
Nikolay Krasko
e37cbe51d2
Remove outdated runtime notification
...
#KT-23122 Fixed
#KT-21634 Fixed
#KT-20324 Fixed
#KT-18366 Fixed
#KT-20910 Fixed
Outdated runtime notification was abandoned.
2018-06-15 16:13:17 +03:00
Ilmir Usmanov
192f311128
Minor. Ignore test is JS_IR.
2018-06-15 15:43:56 +03:00
Alexander Udalov
9bf2d129ee
Improve exception message when failing to serialize anonymous object metadata
...
(See KT-20996)
Old message:
Cannot get FQ name of local class: class <no name provided>
New message:
Cannot get FQ name of local class: class <no name provided> defined in private fun x(): <no name provided> defined in root package in file 1.kt
2018-06-15 13:26:44 +02:00
Ilya Chernikov
29adf09b7e
Add test with other annotation, tests fix of #KT-2496
2018-06-15 12:01:49 +02:00
Rodrigo B. de Oliveira
e24a9d08f2
Only collect annotations with a name starting with KotlinScript
2018-06-15 11:53:49 +02:00
Natalia Selezneva
0adfa7b038
182: Converting J2K: save file path before conversion to use it in commit dialog
...
^KT-9945 Fixed
2018-06-14 21:33:11 +03:00
Natalia Selezneva
adfa7a2418
Create new module with dependency on IDEA Git plugin
2018-06-14 21:33:10 +03:00
Roman Artemev
dbb360555c
[JS IR BE] Fix logic boolean operations
2018-06-14 19:54:35 +03:00
Roman Artemev
6ac4fd2e5f
[JS IR BE] Update test data
2018-06-14 19:54:30 +03:00
Roman Artemev
17d71f1e46
[JS IR BE] Implement type check
...
* IrTypeOperator lowering
* runtime support
* refactoring
2018-06-14 18:40:06 +03:00
Alexander Udalov
50eda3b8a0
Make metadata writers' properties protected
...
These properties are only supposed to be used from Writer classes in
KotlinClassMetadata
2018-06-14 17:19:08 +02:00
Alexander Udalov
fec2c14ea5
Support local delegated properties in kotlinx-metadata-jvm
2018-06-14 17:19:08 +02:00
Alexander Udalov
b00f765255
Pass whole ReadContext/WriteContext to kotlinx-metadata extensions
2018-06-14 17:19:08 +02:00
Anton Bannykh
05123c13f8
[JS IR BE] mute ranges' tests
2018-06-14 18:17:43 +03:00
Mikhail Glukhikh
cbcd35e2f5
Implement Kotlin sub-classes tooltip to handle MPP correctly
...
Before this commit, Java tooltip was in use which could not
work correctly with expect / actual classes
So #KT-21011 Fixed
2018-06-14 15:42:37 +03:00
Mikhail Glukhikh
90b6f369e0
Module-specific list cell renderer: wrap into runReadAction
...
This should fix KotlinGoto*ModuleTestGenerated.testExpectClassSuperclass
and related exception in IDEA
Additional fix for KT-23685
2018-06-14 13:55:31 +03:00
Mikhail Glukhikh
3d4b407d0c
MPP wizard: introduce structure: root <- common <- js / jvm
...
This commit also removes deprecated structure with common root
So #KT-20554 Fixed
2018-06-14 13:14:45 +03:00
Ilya Chernikov
cf294b57f0
Update changelog with changes in 1.2.50
2018-06-14 12:02:40 +02:00
Alexander Udalov
5d76e463d3
Fix exception from reflection on local delegated properties
...
The problem was that in JvmSerializerExtension.writeLocalProperties, we
only serialized metadata for local properties, but indices generated in
MemberCodegen.generatePropertyMetadataArrayFieldIfNeeded were among all
delegated properties in the class (not only local). This behaved
incorrectly as long as there was a local and a non-local delegated
property in the same class. For example, if there were 5 non-local
properties and then one local, that local property would get the index 5
and the synthetic signature "<v#5>". But there would only be one
Property entry in the metadata, and so reflection would fail here trying
to load the 5th element of the list which contains only one element.
Now, the index for a local delegated property is computed only as the
number of _local_ delegated properties above it in the class, i.e. the
first local delegated property gets index 0 (and synthetic signature
"<v#0>"), the next one -- index 1, and so on.
#KT-23413 Fixed
2018-06-14 11:07:26 +02:00
Alexander Udalov
b8722ad213
Fail with KotlinReflectionInternalError on non-found local delegated property
...
Instead of IndexOutOfBoundsException from the protobuf internals which
was thrown when loading extension with a non-existing index out of the
list of all extensions (KT-23413)
2018-06-14 11:07:26 +02:00
Pavel V. Talanov
2d7df21b0f
JavaElementFinder: fix classes not being sorted as intended
...
This is tested by `whole project` inspection tests
#KT-24704 Fixed
2018-06-14 10:51:13 +02:00
Vyacheslav Gerasimov
aae0f5123e
Build: Specify metadata source for ivy repositories
...
Otherwise composite build with Kotlin Native fails unable to resolve metadata files
2018-06-13 20:43:16 +03:00
Vyacheslav Gerasimov
992a31af88
Build: introduce javaPluginConvention extension on project
...
`ExtensionAware.the<T>()` introduced in gradle 4.7 made existing calls `the<JavaPluginConvention>()` invalid (on wrong receiver)
2018-06-13 19:43:03 +03:00
Vyacheslav Gerasimov
94c636adc3
Build: Fix usage of jvmArgs which became nullable
2018-06-13 19:43:03 +03:00
Vyacheslav Gerasimov
4b3a989b90
Build: Workaround IndexOutOfBoundsException on configuration with gradle 4.7
...
Using delegated property syntax somehow causes IndexOutOfBoundsException from kotlin-reflect, needs further investigation
Should be reverted after #KT-23413 is resolved
2018-06-13 19:43:03 +03:00
Ilya Gorbunov
0065a74c7e
Update to gradle 4.7, fix nullability issue in buildSrc
...
JavaExec args list is nullable now, so use orEmpty before copying it.
2018-06-13 19:43:03 +03:00
Mikhail Glukhikh
37124e0c0d
Make collectSlowLineMarker handle parents to deal with changes correctly
...
So #KT-20825 Fixed
So #KT-21113 Fixed
Related to IDEA-141330 fix
2018-06-13 19:23:41 +03:00
Mikhail Glukhikh
232d340118
Expect/actual companion object: set gutter on leaf element
...
May fix KT-21113
2018-06-13 19:23:40 +03:00
Mikhail Glukhikh
0a2ed054f1
Add module-specific cell renderers to navigate to actuals correctly
...
So #KT-23685 Fixed
2018-06-13 19:23:39 +03:00
Mikhail Glukhikh
efd6b7a035
KotlinGotoTargetRenderProvider: .java -> .kt
2018-06-13 19:23:38 +03:00
Mikhail Glukhikh
ab32a9a564
Minor enhancement of "actual" gutter
...
This makes hint about Ctrl+Alt+B available
2018-06-13 19:23:37 +03:00
Mikhail Glukhikh
f139847e47
Cleanup: KotlinLineMarkerProvider
2018-06-13 19:23:36 +03:00
Mikhail Glukhikh
cfd1a54463
Do not create expect / actual gutters for primary constructor
...
So #KT-22177 Fixed
So #KT-21063 Obsolete
2018-06-13 19:19:26 +03:00
Mikhail Glukhikh
b235af0656
Can be private: correct detection of calls inside inline accessors
2018-06-13 19:17:50 +03:00
Mikhail Glukhikh
542f0a61d1
Unused receiver: optimization
2018-06-13 18:12:37 +03:00