Commit Graph

44 Commits

Author SHA1 Message Date
Igor Yakovlev a7ed496a04 [WASM] Use wasm bottom types for Nothing? 2022-09-15 16:27:45 +00:00
Igor Yakovlev c94a051c19 [WASM] Renew to Milestone 6 instructions set 2022-09-15 16:27:42 +00:00
Igor Yakovlev 780fdd44b3 Revert "[WASM] Remove deprecated usage of externref"
This reverts commit 270a41a2db.
2022-09-15 16:27:42 +00:00
Igor Yakovlev 03c500d9e9 [WASM] Remove unreachable code from compiled wasm 2022-09-15 16:27:41 +00:00
Igor Yakovlev 95396eb61a [WASM] When expressions optimisations for String and Int constant cases 2022-09-15 16:27:39 +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
Igor Yakovlev 0ea7e8b70a [WASM] Add array copy intrinsic 2022-07-06 19:07:56 +00:00
Igor Yakovlev 8306b1bd71 [WASM] Remove deprecated wasm instructions 2022-07-06 19:07:56 +00:00
Igor Yakovlev 1b6b3ec3b5 [WASM] Ignore reference proposal spec test 2022-06-18 19:12:21 +02:00
Igor Yakovlev 270a41a2db [WASM] Remove deprecated usage of externref 2022-06-18 19:12:21 +02:00
Igor Yakovlev bf575f73a2 [WASM] Fix invalid fields name section emit 2022-06-18 19:12:21 +02:00
Yahor Berdnikau b6edf9a86e Shadow Gradle plugin 3rd party dependencies
Such dependencies will be embedded into plugin jar and their package
will be relocated. This is need to avoid dependency conflicts with
user build scripts dependencies or other Gradle plugins.

Kotlin project dependencies are not shadowed.

^KT-46034 Fixed
2022-06-15 10:57:56 +02:00
Igor Yakovlev 526e99891a [WASM] Refcast and Reftest refactorings 2022-05-20 16:33:57 +02:00
Igor Yakovlev 8da6ab7a04 [WASM] New VTable format 2022-05-20 16:33:57 +02:00
Svyatoslav Kuzmich d1c81eb6ba [Wasm] Support Wasm GC milestone 5 2022-05-20 12:22:43 +03:00
Vyacheslav Gerasimov bc2f0936bd Build: Rename commonDep -> commonDependency 2021-12-16 21:48:19 +03:00
Svyatoslav Kuzmich 83c94cc944 [Wasm] Name section for globals and structs 2021-11-09 19:54:27 +00:00
Svyatoslav Kuzmich 4fc461a2ff [Wasm] Imporove external interface support
* Support boxing/unboxing when casting to Any
* Support ===, equals, hashCode, toString

* Support adapting String in interop boundary
2021-10-23 01:26:12 +03:00
Igor Yakovlev b8d11f7938 [WASM] Add text section to implement debug info 2021-09-20 19:08:21 +03:00
Igor Laevsky 9685695769 [WASM] Fold redundant patterns with drop instruction on a wasm level 2021-09-16 20:24:43 +03:00
Igor Laevsky 1db45faba2 [WASM] NFC. Fold instructions from the wasm expression builder 2021-09-16 20:24:42 +03:00
Svyatoslav Kuzmich a384ba6442 [Wasm IR] Add data heap type 2021-09-16 14:14:58 +03:00
Dmitriy Novozhilov 70e8d23d6b Fix new warnings in project code 2021-09-12 16:19:33 +03:00
Igor Laevsky 02aed80e18 WASM: Implement simple try/catch codegen 2021-09-08 19:56:34 +03:00
Igor Laevsky 6ca965af6f WASM: Generate throw instruction instead of wasmThrow call 2021-09-08 19:56:33 +03:00
Igor Laevsky e5e44a0152 WASM: Implement asm/disasm support for exception handling tags 2021-09-08 19:56:32 +03:00
Mikhail Glukhikh ed035d99ab Migrate -Xopt-in to -opt-in in Gradle Kotlin scripts 2021-09-03 15:40:47 +03:00
Alexander Udalov 376b420d1a Fix warnings in JS/WASM modules 2021-08-06 22:36:22 +02:00
Igor Laevsky 0f84525bdc WASM: Implement wasm-native strings part 1
There are several changes here but they all required for at least one test to pass.
- Implemented String class and several utility functions using built-in CharArray
- Added new constant memory segment to hold string literals and required funcs to work with them
- Added very crude mostly incorrect rudimentary ability to pass strings back to javascript
2021-08-04 16:23:28 +03:00
Dmitriy Novozhilov f3116cb64a Fix NON_EXHAUSTIVE_WHEN_STATEMENT warnings in project code 2021-07-20 13:33:46 +03:00
Svyatoslav Kuzmich a468792a19 [Wasm] Support Milestone 3 of V8 Wasm GC
Advance V8 version to 9.2.212

Relevant Wasm GC changes:
https://github.com/WebAssembly/gc/commit/f9f8ffa445c2c0fe4ac284a1d12a8c5477da4457
2021-07-15 10:59:06 +00:00
Abduqodiri Qurbonzoda 40d1849f33 Migrate compiler, idea and others to new case conversion api 2021-04-08 03:22:02 +03:00
Svyatoslav Kuzmich 38967f208e [Wasm] Remove unused WasmI1 type 2020-12-30 19:29:11 +03:00
Svyatoslav Kuzmich b6ad1584c9 [Wasm] Improve interface method dispatch
- Use typed Wasm tables for each interface method to avoid runtime
  function type check

- Use linear search by implemented interface rather than by individual
  virtual function signature
2020-12-30 19:29:10 +03:00
Svyatoslav Kuzmich 51e8d782b0 [Wasm] Support packed integer class fields 2020-12-14 14:40:38 +03:00
Svyatoslav Kuzmich d4233f3f0e [Wasm] Use Wasm GC arrays instead of JS arrays
JS arrays was a workaround for lack of arrays in Firefox Wasm GC prototype
Now with V8 as a test runner we can use proper arrays
2020-12-09 15:56:45 +03:00
Svyatoslav Kuzmich d15af70a3e [Wasm] Refactoring: replace "struct types" with "GC types"
In preparation for adding array types
2020-12-09 15:56:45 +03:00
Svyatoslav Kuzmich 4bb163fd1f [Wasm IR] Add missing GC and function reference instructions 2020-12-09 15:56:44 +03:00
Alexander Udalov d96223a2ff Fix compiler warnings in new wasm modules
Also don't output v8ExecutablePath in js.tests on each project
configuration.
2020-11-10 18:19:41 +01:00
Alexander Udalov 84d1393711 Minor, workaround compiler exception (KT-43286) 2020-11-10 18:06:17 +01:00
Svyatoslav Kuzmich ffe3487aa5 [Wasm] Don't generate unnecessary unreachable instructions
Helps with WAT readability
2020-11-10 13:08:04 +03:00
Svyatoslav Kuzmich b371b61cf5 [Wasm] Indent blocks of produced WAT
Makes it more readable
2020-11-10 13:08:04 +03:00
Svyatoslav Kuzmich bfd0f21e9d [Wasm] Major compiler and stdlib update 2020-11-09 16:04:43 +03:00
Svyatoslav Kuzmich 3be38d1796 [Wasm] Add Wasm IR
Intended to be used by Kotlin/Wasm compiler.

Includes:
 * IR tree: declarations, instructions, types.
 * Convertors: ir2text, ir2bin, bin2ir
 * Spec tests, to test convertors against reference Wabt tool
2020-11-09 16:04:42 +03:00