Commit Graph

6540 Commits

Author SHA1 Message Date
Artem Kobzar 0cef573a7b [K/JS] test(@JsExport): add few more tests on export after ExportModel discussion meeting. 2022-08-01 12:17:35 +00:00
Artem Kobzar b9189be728 [K/JS] fix(KT-46643): prevent removal of setter for overridden external field. 2022-07-29 12:41:17 +00:00
Steven Schäfer 6f0ff6aeb0 IR: Fix scope transparency in ReturnableBlockLowering
An IrReturnableBlock introduces a new variable scope and shouldn't be
replaced with a transparent IrComposite block.
2022-07-29 01:06:44 +02:00
Igor Chevdar 8981eb85de [box-tests] Added a couple of reproducers for KT-52795 2022-07-28 16:01:17 +00:00
Alexander Korepanov caa1570e25 [JS IR] Fix clashes between bridge and delegated function call
The patch fixes the js function signature rules to avoid clashes
 between bridge and delegated call. Use overridden symbols dfs of
 JsName annotation in order to get the correct bridge name.

^KT-52968 Fixed
2022-07-28 14:41:47 +00:00
Alexander Korepanov 6525f7a7ac [JS IR] Fix a IC dependency building for class methods.
The patch fixes lost IC dependencies for inherited class or interface methods.
 Especially between a fake override function and its implementation.
 Since IrSymbolDeserializer doesn't provide all class methods,
 they are collected from the class definitions.

^KT-53063 Fixed
2022-07-28 12:39:39 +00:00
Ilya Gorbunov 1addc23b23 Add range iteration tests for rangeUntil
#KT-52932
2022-07-26 23:52:10 +00:00
Sergej Jaskiewicz dbcffeb0ed [JS] Fix a compiler crash when generating sourcemaps
It is possible that the source info has the type `KtPureElement`.
For example, the serialization plugin may create a synthetic companion
object for a `@Serializable`-annotated class.
This results in an instance of
the `SyntheticClassOrObjectDescriptor.SyntheticDeclaration` class being
indirectly set as source info. This class implements the `KtPureElement`
interface.
2022-07-25 19:27:59 +00:00
Alexander Korepanov 0982872959 [JS IR] Fix clash between generic extension overloads
Type parameter constraints are used for calculating JS signature hash.

^KT-51151 Fixed
2022-07-22 16:14:51 +00:00
Victor Petukhov 42e71f8c53 Remove explicit enabling the new type inference from test data 2022-07-22 16:03:52 +00:00
Nikolay Krasko 683322e45a Explicit restriction for maximum memory in js box tests
There were failures during jsCompilerTest execution on the machine
with 16GB and 8 CPU.
2022-07-21 15:47:30 +00:00
Sergej Jaskiewicz 54c2839a7f [JS] J2K for SourceMapBuilderConsumer 2022-07-21 12:18:43 +00:00
Sergej Jaskiewicz 9f5f5bcab2 Rename .java to .kt 2022-07-21 12:18:43 +00:00
Svyatoslav Kuzmich 11c8c01a50 [Wasm] Update v8 shell to v10.5.207 2022-07-19 18:46:52 +02:00
Sergej Jaskiewicz 15bd101110 [JS IR] Fix sourcemap path mapping in compiler tests for Windows 2022-07-19 16:06:25 +00:00
Sergej Jaskiewicz ea556ce428 [JS IR] Implement stepping tests for Kotlin/JS
We already have stepping tests for Kotlin/JVM.
They are helpful for testing the correctness of the generated
debugging information.

They are better than line number tests in that they allow to test the
_behavior_, not the generated data. The structure of the data may change
even if the behavior stays the same. For that reason, stepping tests
are more stable.
2022-07-19 16:06:23 +00:00
Kristoffer Andersen f0bc021b5e Change VARIABLE_REASSIGNMENT slice so it composes properly 2022-07-18 23:50:35 +02:00
Dmitriy Dolovov ce04a24b26 [IR][tests] Removal of class used as variable type and constructor call 2022-07-18 17:29:50 +02:00
Dmitriy Dolovov d5ded97ccb [IR][tests] Removal of inlined class case
^KT-52478
2022-07-18 17:29:50 +02:00
Dmitriy Dolovov 7b5e33b6ca [IR][tests] Add tests for removal-of-typealias case 2022-07-18 17:29:49 +02:00
Dmitriy Dolovov 89a188d199 [IR][tests] Add tests for remove-inlined-callable member case 2022-07-18 17:29:49 +02:00
Dmitriy Dolovov 9c1c712057 [IR][tests] Add tests for removal-of-overridden open callable case 2022-07-18 17:29:49 +02:00
Artem Kobzar 1557f919f5 chore: split huge declarations.d.ts test on few smaller tests. 2022-07-18 12:59:21 +00:00
Steven Schäfer 8014712569 JVM IR: Check that we generate callable references in tests 2022-07-14 23:24:18 +02:00
Artem Kobzar 117df325c9 [JS/IR] fix: add ability to render type constraints into TypeScript definitions. 2022-07-13 15:20:27 +00:00
Pavel Kunyavskiy 5cdda48487 [K/N] Extract const val initializers to place of usage
This would make behaviour more consistent with jvm. There is still
a difference in behaviour about point where side effects happen.

^KT-52970
2022-07-13 08:49:40 +00:00
Igor Chevdar e36bd5fe90 [box-tests] Added a multi-module box test 2022-07-13 08:01:51 +00:00
Vladimir Sukharev a9789203ac Run test genericFunctionReferenceSignature.kt only for JVM and native
Merge-request: KT-MR-6636
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2022-07-12 13:07:14 +00:00
Vladimir Sukharev fd52f475cb Devirtualization fails to eliminate boxing in function reference context
^KT-49847 Fixed

Merge-request: KT-MR-6460
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2022-07-12 08:26:27 +00:00
Victor Petukhov 7d945d9bdc [FIR] Support loading rxjava3 nullability annotations on bounded wildcards
^KT-53041 Fixed
2022-07-11 12:44:08 +00:00
Victor Petukhov cb2dbca0c3 [FE 1.0] Support loading rxjava3 nullability annotations on bounded wildcards
^KT-53041 Fixed
2022-07-11 12:44:07 +00:00
Victor Petukhov 2057deb91b [FE 1.0] Create DONT_CARE type only for callable references with no expected type
Otherwise, it can be resolved safety

^KT-52270 Fixed
2022-07-11 12:44:06 +00:00
Igor Chevdar a61d05971e [box-tests] Added a couple of multi-module box tests 2022-07-10 17:56:36 +00:00
Nikolay Krasko f1ad1da9e5 Avoid re-settings d8Plugin.version during import in IDEA
Error:
Could not create task ':js:js.tests:invalidationTest'.
Configuration already finalized for previous property values
2022-07-08 21:34:26 +00:00
Igor Yakovlev dab1ec7aff [WASM] Download v8 with D8 gradle plugin and make version property in versions.properties 2022-07-07 16:50:40 +02:00
Nikita Nazarov 7287be6879 Add tests on variable spilling with debug mode enabled
#KT-48678 Fixed
2022-07-07 14:51:24 +03:00
Alexander Korepanov 5b4e9e2966 [JS IR] Fix IC invalidation process when symbols are modified
The patch fixes the cases of IC invalidation when symbols are modified:
 adding and removing inline, data, in, out, suspend qualifiers.

 For that purpose an extra hash is used.
 It is written in a direct dependency graph into an IC cache metadata file.
 For inline functions a transitive hash is used.
 For non-inline functions, classes, and others a symbol hash is used.
 The invalidation routine marks the file as dirty
 (with 'updated imports' state) if hash is modified.

^KT-51083 Fixed
^KT-51088 Fixed
^KT-51090 Fixed
^KT-51099 Fixed
2022-07-05 12:45:43 +00:00
Alexander Korepanov 644447db84 [JS IR] Fix IC invalidation for fake override inline functions
The patch enables the direct dependency between
 fake override inline function and its implementation from the base class.

 Because klibs do not keep a signature of fake override implementation,
 incremental cache can not use the signature index,
 therefore the signature is serialized to a cache file as is.

^KT-51896 Fixed
2022-07-05 12:45:43 +00:00
Nikolay Krasko d080297c20 Revert "Add tests on variable spilling with debug mode enabled"
This reverts commit 65bb6abae4.
2022-07-05 11:04:50 +00:00
Pavel Kunyavskiy c1ec1d9d4c [K/N] Handle Unit? and Nothing? correctly in finally transformation
^KT-52985
2022-07-05 06:54:29 +00:00
Nikita Nazarov 65bb6abae4 Add tests on variable spilling with debug mode enabled
#KT-48678 Fixed
2022-07-02 18:29:18 +03:00
Pavel Mikhailovskii 8a402bcacd KT-52875 Fix extension function literal creation with -Xlambdas=indy 2022-06-30 14:13:05 +00:00
Ilmir Usmanov a5084c2f69 JVM IR: Make receiver type of IrGetField not null
otherwise, it will be mapped to inline class type if underlying type
is primitive of nullable.

 #KT-52913 Fixed
2022-06-30 01:28:09 +00:00
Dmitriy Novozhilov 1a8496757e [Compiler] Mark all entrypoints to compiler API as experimental 2022-06-29 12:00:01 +00:00
Dmitriy Novozhilov c979e1edcf [Plugins] Deprecate ComponentRegistrar
^KT-52665 In Progress
2022-06-29 11:59:58 +00:00
Ilmir Usmanov 09c9641e23 FE: Use safe call when searching for suspend modifier
The modifier does not exist, when the parameter type is typealias.

 #KT-35187 Fixed
2022-06-29 06:12:44 +02:00
Igor Yakovlev 6f88e9b16f [WASM] Fix interop adapter for long strings 2022-06-28 18:00:40 +00:00
Artem Kobzar 133c6713ca [K/JS] fix(Interface Export): prevent structural identity between two interfaces. 2022-06-28 15:44:38 +00:00
Pavel Mikhailovskii c3c09aa95a KT-4107 Data objects 2022-06-28 16:58:20 +02:00
Ilmir Usmanov f34ae686a0 JVM: Make coroutines spilling tests runtime
instead of bytecode text ones. Check the content of continuation
object instead of bytecode, since this is less prone to changes during
changes in coroutines codegen.

 #KT-48678
2022-06-27 23:11:40 +02:00