Commit Graph

6360 Commits

Author SHA1 Message Date
Artem Kobzar aa85b755c1 chore: remove unused break statements from inlined functions bodies. 2022-03-19 20:04:22 +00:00
Ilya Goncharov adad0b4628 [JS IR] Fix export of nested enums
Merge-request: KT-MR-5916
Merged-by: Ilya Goncharov <Ilya.Goncharov@jetbrains.com>

^KT-51211 fixed
2022-03-18 09:45:14 +00:00
Alexander Korepanov 69295f2cf0 [JS IR] IC invalidation refactoring
- Huge refactoring for IC
  - Update hash combination logic
  - Introduce value class for IC hashes
  - Calc md5 directly by function IR
  - Split IC logic by classes
  - Move JsIrLinkerLoader into separate file
  - CacheUpdateStatus is a sealed class
  - Render TYPE_PARAMETER reified flag

^KT-51081 Fixed
^KT-51084 Fixed
2022-03-15 05:34:19 +00:00
Ilya Goncharov 0463b5ec3c rra/ilgonmic/duplicated-import-names
[JS IR] Add tests with external funs and global vals

[JS IR] Non module cases are exceptions for naming

[JS IR] Use fqn for jsModule on declaration

[JS IR] Add test on same external names

Merge-request: KT-MR-5901
Merged-by: Ilya Goncharov <Ilya.Goncharov@jetbrains.com>

^KT-51438 fixed
2022-03-14 14:04:27 +00:00
wrongwrong c4735f9f29 Add tests for KFunction involving value classes
See KT-31141.
2022-03-10 23:28:40 +01:00
Alexander Udalov 1e26888dd9 Psi2ir: fix parameter indices when generating extension invoke call
Incorrect `valueParameter` was passed to `generateValueArgument`, which
resulted in incorrect type being considered for generating suspend
conversion.

 #KT-50949 Fixed
2022-03-09 15:19:38 +01:00
Alexander Udalov 328853dffe Add tests for obsolete issues
(Test for KT-37331 is added to multiplatform/defaultArguments/suspend.kt.)

 #KT-30080
 #KT-33641
 #KT-36237
 #KT-36952
 #KT-37331
 #KT-38920
 #KT-39256
 #KT-42415
 #KT-44636
 #KT-45704
 #KT-47084
 #KT-47894
2022-03-08 14:19:37 +01:00
Dmitry Petrov fdb01d96f0 JVM_IR JavaSamConversionEqualsHashCode 2022-03-03 09:01:42 +00:00
Ilya Goncharov 8b34be9490 rra/ilgonmic/update-lock-files
[Gradle, JS] Update npm versions

[JS] Update package.json's and lock files

Merge-request: KT-MR-5852
Merged-by: Ilya Goncharov <Ilya.Goncharov@jetbrains.com>

^KT-51503 fixed
2022-03-01 10:24:56 +00:00
Alexander Udalov 157db778fd Rework support of Iterator.iterator optimization in ForLoopsLowering
- Fix the predicate used for finding the member function `next`: check
  that there's no extension receiver parameter, don't filter out
  abstract functions.
- Do not copy iterator expression, instead change the type in all
  references to the iterator variable.
- Fix some style issues.

 #KT-47171 Fixed
2022-02-28 01:39:31 +01:00
Xin Wang 1b776bd5b6 JVM_IR: Specialize iterator if possible
fixes KT-47171
2022-02-28 01:39:31 +01:00
Dmitry Petrov 872b81ac8a JVM prune exception edges in DFA in some cases 2022-02-24 10:06:47 +00:00
Artem Kobzar 9c5c31bdcb build: change the logic for building ts files before js tests run. 2022-02-23 10:28:02 +00:00
Ilmir Usmanov 8811f62300 Fix mapping of nullable generic underlying types of inline classes
#KT-32162 Fixed
2022-02-23 01:23:07 +03:00
Ilmir Usmanov c072448d22 Lower fun interface children's body during inline class lowering
#KT-51121 Fixed
2022-02-21 19:50:12 +03:00
Artem Kobzar acc467594f chore: remove unused protobuf message. 2022-02-17 11:54:37 +00:00
Ilmir Usmanov 05457c291d Minor. Update test 2022-02-17 09:00:37 +03:00
Ilmir Usmanov f4407c213a Rename some tests with long names
Otherwise, their path on WIN will be longer than MAXPATH, leading to
V8 load error.
2022-02-16 23:46:30 +03:00
Alexander Korepanov 43a0876c26 [JS IR] IC invalidation performance improvements
- Cache signature readers and deserializers
 - Cache inline function hashes
 - IC refactoring
 - [gradle] Use hash of module path for cache dir; Fix KT-51238

^KT-51238 Fixed
2022-02-16 13:41:53 +00:00
Artem Kobzar 804eb61bf0 feat: add polyfills insertion for ES Next used features 2022-02-16 10:49:11 +00:00
Ilmir Usmanov 714c5091cc Add regression test for KT-51254
#KT-51254 Fixed
2022-02-15 08:11:21 +01:00
Ilmir Usmanov 00a08fc6a4 Minor. Add tests and comment about copying generic parameters to
constructor, but not function reference to the constructor.

 #KT-32162
2022-02-15 08:11:19 +01:00
Ilmir Usmanov 2fedb97d16 Correctly map nullable generic underlying value of inline class
if upper bound is primitive type.
 #KT-32162
2022-02-15 08:11:17 +01:00
Ilmir Usmanov cece7120df Minor. Add more tests 2022-02-15 08:11:13 +01:00
Ilmir Usmanov c8817893d4 Support default parameters of inline type with generic underlying value
#KT-32162
2022-02-15 08:11:11 +01:00
Ilmir Usmanov 4f95171472 Minor. Add tests 2022-02-15 08:11:10 +01:00
Ilmir Usmanov 9060168542 Support generic underlying type of inline class
Use upper bound in JVM representation.
 #KT-32162
2022-02-15 08:11:08 +01:00
Ilmir Usmanov 8f23fc54a4 Mangle bridges if its return type is not inline
#KT-51235 Fixed
2022-02-14 13:06:13 +01:00
Dmitry Savvinov ea466353fb Dont store type refinement mode in analysis flags
Instead, check the refiner from the DI-container or refiner from
capability of a module descriptor.

The reason is because in the IDE there might be multiple
ResolutionFacades (-> multiple DI-containers -> multiple module
descriptors) for one and the same IDE module, with different refinement
settings.
However, due to how the code is written, it's hard to have
different LanguageVersionSettings for one and the same module.

After this commit the refinement settings are determined by the
moduleDescriptor capabilities, which is much easier to tweak

See usage of that change in Kotlin IDE Plugin (commit is linked to the
YT issue)

^KTIJ-20775
2022-02-14 13:08:50 +03:00
Svyatoslav Kuzmich 4636f71076 [Wasm] Loader improvements
- Output ES modules instead of plain files
- Support -Xwasm-launcher=d8 for d8 shell used in tests and benchmarks.
- Reuse launcher generation logic in CLI and box tests runners.
- Create separate output directory for each box since
  there are multiple output files generated for each test.
- Stop using absolute paths in generate JS files
  to simplify running generated code on different machine
- Remove ">>>" from println output


Merge-request: KT-MR-5729
Merged-by: Svyatoslav Kuzmich <svyatoslav.kuzmich@jetbrains.com>
2022-02-10 22:59:44 +00:00
Ilmir Usmanov 47ee0e5b0a Get type arguments from supertype in supercall
Otherwise, when the function has inline class parameter, we get ICE.
We do not get the error without inline class parameter, since we
substitute type parameters in limited situations, which includes
inline class lowering.

 #KT-51157 Fixed
2022-02-10 10:40:55 +01:00
Dmitriy Novozhilov 0eb526a8b4 [FE 1.0] Report warning about conflict in inherited members from deserialized dependencies
^KT-51194
^KT-51223 Fixed
2022-02-09 19:35:56 +03:00
Svyatoslav Scherbina 62c1bd0044 Native: fix using nested expect enum entry in a default argument
^KT-51156 Fixed
2022-02-09 14:41:11 +00:00
Ivan Kochurkin 5391ee91af [FIR2IR] Fix incorrect type of typealias for suspend functional type, ^KT-50997 Fixed 2022-02-07 17:21:59 +03:00
Ilya Goncharov 77b367fe96 rra/ilgonmic/ic-to-compiler
[JS IR] Fix compilation in tests

[JS IR] Fix test after migrating IC to compiler

[JS IR] Fix memory leak

[JS IR] Move js ic to compiler

Merge-request: KT-MR-5673
Merged-by: Ilya Goncharov <Ilya.Goncharov@jetbrains.com>
2022-02-07 11:40:16 +00:00
Artem Kobzar 33918156e1 feat(JsCode): inline usage of js code which captures kotlin variables. 2022-02-04 15:08:22 +00:00
Artem Kobzar 5223efd3f1 fix(Kotlin/JS IR): nested comments in implicit export. 2022-02-04 10:55:52 +00:00
Igor Yakovlev 392ab75bee [WASM] BasicWasmBoxTest refactoring 2022-02-03 21:25:59 +01:00
Igor Yakovlev eb8c3aa54e [WASM] Remove WasmImport annotation 2022-02-03 21:25:59 +01:00
Igor Yakovlev 0acb1c0c05 [WASM] Implemented Wasm unhandled exceptions on JS site 2022-02-03 21:25:57 +01:00
Alexander Korepanov 28b1f1c50f [JS IR] Add IC invalidation tests 2022-02-03 20:19:17 +00:00
Ilya Goncharov a2167200d6 [JS IR] IR module to name
Merge-request: KT-MR-5672
Merged-by: Ilya Goncharov <Ilya.Goncharov@jetbrains.com>
2022-02-03 17:28:46 +00:00
Igor Laevsky 4e84e14d34 [Wasm] Don't squish modules together 2022-02-03 18:19:30 +03:00
Igor Yakovlev 1446914ba9 [WASM] Run box tests with dce and non-dce modes 2022-02-02 16:44:47 +03:00
Dmitry Petrov beb4cf3d99 PSI2IR KT-51036 fix lambda return value generation 2022-01-31 12:18:19 +00:00
Ilya Goncharov 32cda8a37e [JS IR] Fix cache format, module name one the second line 2022-01-31 12:00:12 +00:00
Sergej Jaskiewicz 8149189585 [JS IR] Optimize away upcasts
#KT-50212 Fixed
2022-01-28 10:03:53 +00:00
Sergej Jaskiewicz 400a5a0f34 [JS] Add CHECK_TERNARY_OPERATOR_COUNT and CHECK_BINOP_COUNT directives 2022-01-28 10:03:52 +00:00
Artem Kobzar f835433221 test: add optional argument d.ts generation. 2022-01-27 19:45:00 +00:00
Mikhail Glukhikh 5798320e9e Drop usages of CompilerArguments::useExperimental 2022-01-27 11:48:21 +00:00