Commit Graph

7293 Commits

Author SHA1 Message Date
Alexander.Likhachev eab2c6b9b9 [Build] Bump gradle-node-plugin version to 7.0.1
This change is required to fix a configuration cache problem revealed after migration to Gradle 8.4
^KTI-1473 In Progress
2023-12-07 18:31:06 +00:00
Alexander.Likhachev a19bd2ed2e [Build] Migrate most of the build logic from Project.buildDir usage
It's going to be deprecated in Gradle 8.3

There's currently no way to pass a `org.gradle.api.provider.Provider` to the JavaExec.systemProperty or Test.systemProperty. There's a workaround using `org.gradle.process.CommandLineArgumentProvider`, but I intentionally don't rework these calls as Gradle is going to allow passing providers to configure system properties: https://github.com/gradle/gradle/issues/12247#issuecomment-1568427242
^KTI-1473 In Progress
2023-12-07 18:31:06 +00:00
Mikhail Glukhikh 4b649cbbe9 [tests] Drop a BI codegen test for should-be-red issue KT-63648 2023-12-05 18:15:53 +00:00
Stanislav Ruban da0c3090a9 [tests] Regenerate test configurations 2023-12-05 18:15:53 +00:00
Stanislav Ruban 3a77f39199 [tests] Regenerate test configurations 2023-12-01 19:20:28 +00:00
Ivan Kylchik 2b6845c032 [JVM_IR] Optimize properties delegated to const val
We can omit `get` call to delegated property and inline
constant value directly. If we are not going to
do that, we can get a runtime exception because
all usages of const property will be inlined and the property
itself will be dropped.

#KT-63567 Fixed
#KT-63580 Fixed
2023-11-30 14:27:36 +00:00
Artem Kobzar 98186ec283 [K/JS] Add ES6 typescript tests + fix a few bugs for it 2023-11-30 13:37:06 +00:00
Alexander Udalov fc7de5ab97 IR: check type parameter bounds equality in overrides
The code is exactly the same as in K1's
`OverridingUtil.areTypeParametersEquivalent`.

 #KT-63442 Fixed
2023-11-30 11:04:02 +00:00
Kirill Rakhman 934253878b [Tests] Add regression test for KT-63564
#KT-63564 Fixed
2023-11-30 08:39:05 +00:00
Dmitriy Dolovov 16d1e85932 IR text tests: Stable blank lines between declarations in class
Rework rendering of kt-like dump and signatures dump in order to avoid
unstable blank line between declarations of the same level:
1. No blank line for the first declaration inside the member scope of
the class.
2. Always a single blank line between each two subsequent declarations
inside the member scope of the class.
2023-11-30 08:32:35 +00:00
Dmitriy Dolovov e0e50e183e IR text tests: Add test with the implementation of a private interface 2023-11-30 08:32:35 +00:00
Dmitriy Dolovov 02604060ae IR text tests: Don't dump signatures for local declarations
1. Local declarations don't participate in IR-linkage, because they
can be referenced only inside the same body -> can be dropped
from IR text tests.

2. Mangled names for private declarations computed by descriptors/fir
are actually not used anywhere (they are recomputed by IR
immediately before serialization of IR). But sometimes such
mangled names diverge between K1 and K2 -> don't check them, but
always check mangled names computed by IR even for private
declarations.

3. Also: Drop DUMP_LOCAL_DECLARATION_SIGNATURES test directive.

^KT-57428 Obsolete
^KT-57430 Obsolete
^KT-57434 Obsolete
^KT-57778 Obsolete
^KT-57775 Obsolete
2023-11-30 08:32:35 +00:00
Stanislav Ruban 514ae0c813 [tests] builder inference test-set: regenerate diagnostic & codegen tests 2023-11-30 06:27:00 +00:00
Svyatoslav Kuzmich e901629cf0 [Wasm] Support WASI target in K2
- Support WASI mode in CLI and test infrastructure
- Add external declaration checker
- Split Fir diagnostic lists into Base, JS and WASI

#KT-56849 Fixed
2023-11-28 11:51:53 +00:00
Stanislav Ruban 269b60b420 [tests] Add a test case for KT-61978
^KT-61978 Obsolete
2023-11-27 15:50:46 +00:00
Alexander Korepanov b1465fbfb8 [JS FIR] Enable warnings and infos for JS FIR tests 2023-11-27 14:31:31 +00:00
Artem Kobzar 6615b77213 [K/JS] Rework symbol hash calculation to make IC works with @JsExport and @JsName changes 2023-11-27 13:49:56 +00:00
Dmitriy Novozhilov e38b25c278 [FIR2IR] Make convertAndActualize method the only entrypoint to fir2ir
Fir2Ir conversion consists of multiple steps with complex logic (like
  conversion of each module, actualization, plugins application, constant
  evaluation), and to ensure that they all are executed correctly it's
  convenient to have the single entry point for all this machinery
2023-11-27 10:17:54 +00:00
Dmitriy Novozhilov 075010b14e [Test] Get rid of some properties in IrBackendInput
`fir2IrComponents`, `irActualizerResult` and `dependentIrModuleFragments`
  were used in `IrActualizerAndPluginsFacade`, which was removed in the
  previous commit
2023-11-27 10:17:54 +00:00
Dmitriy Novozhilov 1303a33bea [Test] Get rid of IrActualizerAndPluginsFacade
IR actualization and IR plugins will be moved into base Fir2Ir facades
  in the following commits, so this facade is not needed anymore

It was easier and cleanlier to remove this facade first and only after
  that modify base facades
2023-11-27 10:17:54 +00:00
Svyatoslav Kuzmich b3bc99a44a [Build] Use impl dependencies for compiler.common.{web,wasm}
Refactor build scripts to use implementation dependencies instead of api
for finer grained recompilations.
2023-11-23 15:52:55 +00:00
Kirill Rakhman 11ab90ecbd [Tests] Add regression test for #KT-63732 2023-11-23 14:24:47 +00:00
Stanislav Ruban ec995fc847 [tests] Regenerate configurations for box-tests 2023-11-23 09:34:15 +00:00
Brian Norman c1f6fe1e76 [FIR] Do not include transitive friend dependencies in symbol provider
When flattening a dependency FirSymbolProvider, make sure transitive
dependency FirSymbolProviders are not included. This requires checking
that nested symbol provider sessions match the composite symbol provider
session when they are both source sessions.

^KT-60614 Fixed
2023-11-22 19:43:24 +00:00
Artem Kobzar 33ab1871c7 [K/JS] Fix coroutines but turn back the fix for coroutines intrinsics intercepted and releaseIntercepted 2023-11-22 18:10:08 +00:00
Alexander Korepanov bf54fda8ec [JS Test] Add a test case
Add a test case for a suspend lambda
with a user-defined value class.

^KT-62077 Fixed
2023-11-22 16:29:54 +00:00
Nikolay Lunyak 427c067cd8 [FIR] Forbid typeRef-named labels without +ContextReceivers
^KT-63068 Fixed
2023-11-22 13:22:45 +00:00
Alexander Korepanov 85b2daf41d [JS IR] Add reflection tests 2023-11-22 09:21:44 +00:00
Nikolay Lunyak f12ecb3011 [FIR2IR] Avoid converting arguments of dynamic array set twice
^KT-63593 Fixed


Merge-request: KT-MR-13152
Merged-by: Nikolay Lunyak <Nikolay.Lunyak@jetbrains.com>
2023-11-22 07:39:46 +00:00
Ivan Kylchik 8715bd6189 [IR] Don't evaluate expressions in inner class of an annotation 2023-11-21 09:48:58 +00:00
Ivan Kylchik 3fa82c7bb1 [K2] Properly evaluate complex boolean constants
Some boolean expressions could be transformed into `IrWhen`
node. To understand that this node is actually
a boolean expression, we need to analyze its origin.

#KT-62683
2023-11-21 09:48:57 +00:00
Dmitrii Gridin b3b184f00d [FIR] add more tests diagnostic tests on data and delegated classes
^KT-63522
^KT-63512
^KT-63042
2023-11-21 08:11:20 +00:00
Artem Kobzar 1832f5a3f7 [K/JS] Introduce the ability to consume platform-specific cli arguments inside the main function ^KT-16981 Fixed 2023-11-18 11:01:34 +00:00
Mikhail Glukhikh a139965231 K2: reproduce KT-63164 2023-11-17 20:29:58 +00:00
Artem Kobzar e64068cf82 [K/JS, K/Wasm, K/Native] Process anonymous initializers inside classes as a part of their primary constructors ^KT-61929 Fixed 2023-11-17 13:04:34 +00:00
Stanislav Ruban 6edc742934 [tests] builder inference test-set: regenerate diagnostic & codegen tests 2023-11-17 07:02:15 +00:00
Artem Kobzar ff50d40b32 [K/JS] Rework kotlin tests compilation to make it works with per-file granularity ^KT-61525 Fixed 2023-11-16 19:02:04 +00:00
Artem Kobzar 890fbd6b0b [K/JS] Process JS-specific returnable blocks before the state machine building
^KT-60785 Fixed
^KT-63207 Fixed
2023-11-16 13:25:51 +00:00
Ivan Kylchik 0a6f711a41 [JS_IR] Use IrModuleFragment as input to lowering instead of iterable
This way we will be able to reuse existing utils
to create a lowering.

#KT-63073
2023-11-16 12:03:41 +00:00
Artem Kobzar f4d088a886 [K/JS] Don't add nested classes generated by plugins into ExportModel for interfaces ^KT-63184 Fixed 2023-11-15 10:21:22 +00:00
Artem Kobzar 82bca7a04f [K/JS] Rework member-exportability check in a right way ^KT-61957 Fixed 2023-11-15 10:18:05 +00:00
Mikhail Glukhikh 4b1368409d K2: add a black box test to confirm KT-55705 now works properly 2023-11-15 09:33:05 +00:00
Mikhail Glukhikh f2ef41dbbd K2: add a black box test for KT-58874 to confirm work also in runtime 2023-11-15 09:33:03 +00:00
Brian Norman ed4a778aa7 [FIR2IR] Convert data class properties of type dynamic for hashCode
Properties of type dynamic within a data class cause compilation to fail
when converting FIR to IR. This is because dynamic types do not have a
proper backing class for symbol lookup. However, dynamic types can just
be considered of type Any for hashCode calculations.

^KT-63094 Fixed
2023-11-14 17:45:04 +00:00
Ilya Goncharov 11b7c35eab All tasks related to typescript generation made configuration avoidance compatible
^KTI-1471 fixed
2023-11-14 16:53:23 +00:00
Artem Kobzar bec434d534 [K/JS] Save nullability from the original type of value parameters ^KT-63013 Fixed 2023-11-14 10:40:07 +00:00
Mikhail Glukhikh 4913c38e98 FIR2IR: insert spread for named argument against primitive vararg
#KT-60312 Fixed
2023-11-13 16:23:26 +00:00
Mikhail Glukhikh 4abce54748 K2: reproduce KT-60312 2023-11-13 16:23:26 +00:00
Dmitriy Novozhilov 8578a0bf6a [FIR2IR] Properly insert casts for smartcasts in argument position
Previously cast inserter didn't consider expected type for arguments
  of function calls

^KT-63257 Fixed
2023-11-10 07:50:01 +00:00
Kirill Rakhman 7da271bab8 [FIR] Serialize context receivers using the correct local serializer
This leads to type ref referring to generic type variables being
serialized correctly.
When the type variable is declared on the member itself, it's written to
typeParameterName,
otherwise it's written to typeParameter. This is required for
deserialization to work correctly.

#KT-63227 Fixed
2023-11-08 10:26:34 +00:00