Commit Graph

23 Commits

Author SHA1 Message Date
Artem Kobzar 3429cbd321 [K/JS] Support companion objects in external and exported declarations 2024-02-27 16:30:13 +00:00
Igor Yakovlev ff20ae34e5 [Wasm/WASI] Allow external declarations only for top-level functions
Fix #KT-63737
2024-02-06 12:03:08 +00:00
Artem Kobzar 2eb1e65bbf [K/Wasm] Allow to export unsigned numbers 2023-12-08 09:06:19 +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
Svyatoslav Kuzmich 31560217f8 [Wasm] Port @JsFun checker to K2 (KT-56849)
^KT-62724 Fixed
2023-11-20 14:39:24 +00:00
Svyatoslav Kuzmich 62ebb9932f [Wasm] Port external declaration checker to K2 (KT-56849)
Share common code with FirJsExternalChecker using
FirWebCommonExternalChecker
2023-11-16 14:27:49 +00:00
Svyatoslav Kuzmich 1c230c8f27 [Wasm] Port WasmImport/WasmExport checker to K2 (KT-56849) 2023-11-14 12:24:10 +00:00
Svyatoslav Kuzmich 15d3bf5e25 [Wasm] Port JS interop type checker to K2 (KT-56849) 2023-10-31 12:34:32 +00:00
Igor Yakovlev 60d35200f6 [Wasm] Wasi frontend diagnostics 2023-08-08 18:10:19 +02:00
Igor Yakovlev 78fa93d75c [Wasm] Restrict WasmExport functions for primitive typed signature 2023-07-17 14:01:13 +00:00
Igor Yakovlev b5eafb9eb7 [Wasm] WasmExport implementation 2023-07-07 20:45:51 +00:00
Svyatoslav Kuzmich 1dc0b054ed Deprecate PlatformDiagnosticSuppressors::shouldReportUnusedParameter with one parameter 2023-06-13 15:37:54 +00:00
Svyatoslav Kuzmich dc4aa8c15e [Wasm] Restore binary compatibility of PlatformDiagnosticSuppressor
Keep the original shouldReportUnusedParameter method without
 BindingContext parameter

^KT-58188 Fixed
2023-06-13 15:37:53 +00:00
Ilya Goncharov bcefa1cd66 [Gradle, Wasm] Add wasm platform kind
KTIJ-25583
2023-05-17 13:28:20 +00:00
Svyatoslav Kuzmich 1e91fe155b [Wasm] Restrict types allowed in JS interop
- Prohibit Any, Array and other unsupported non-external types in JS
  interop context
- Add K1 diagnostic
- Update BE testdata

^KT-57136 Fixed
2023-03-16 09:12:07 +00:00
Svyatoslav Kuzmich bb05c8528f [Wasm] Fix KtDeclarationWithBody.hasValidJsCodeBody
Empty bodies are not valid jsCode bodies.
2023-03-16 09:12:06 +00:00
Svyatoslav Kuzmich 7a04999e4a [Wasm] Add K1 compiler diagnostics for js(code) calls (KT-56955)
This function is handled as intrinsics and supported in limited context
2023-03-03 19:39:10 +00:00
Svyatoslav Kuzmich 60ef7fcb49 [Wasm] Suppress unused parameters warning for functions with JS body
These parameters can be used in js(code)
2023-03-03 19:39:09 +00:00
Svyatoslav Kuzmich 4be2f53b47 [Wasm] Add @JsFun diagnostics (KT-56944)
JsFun target should be top-level external function
2023-02-24 11:35:16 +00:00
Svyatoslav Kuzmich 1da96213ca [Wasm] Add @WasmImport diagnostics (KT-56943)
WasmImport annotated functions:
* Restricted to top-level external functions
* Only supports primitive numbers, booleans and Unit
  (as return type only) in its signature
* Can't have default parameter values
* Can't have vararg parameters
2023-02-24 11:35:16 +00:00
Svyatoslav Kuzmich b4fcfd6719 [Wasm] Add external declaration diagnostics (KT-56940)
Prohibit:
- external enum class
- external tailrec fun
- external suspend fun
- external lateinit var

Add tests for other external diagnostics inherited from K/JS
2023-02-24 11:35:15 +00:00
Svyatoslav Kuzmich 321a476898 [Wasm] Add external inheritance checker.
Prohibit non-external types to extend external types.
This type of inheritance is not supported in Wasm backend.
2023-02-24 01:05:23 +01:00
Svyatoslav Kuzmich 54a45c49f8 [Wasm] Add Wasm platform and K1 FE infrastructure 2023-02-24 01:05:23 +01:00