Commit Graph

27 Commits

Author SHA1 Message Date
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