Sergey Bogolepov
c22285f824
[IR] Remove unused Ir.irModule property
...
It is required for the Native backend refactoring
where `Context` does not contain a reference for any
particular IrModuleFragment.
2023-01-20 13:33:06 +00:00
Zalim Bashorov
ab1cbc49dd
[Wasm] Minor: move buildUnreachable* helpers to more specific module
2023-01-17 19:37:05 +01:00
Zalim Bashorov
37879e18d9
[Wasm] Pass location instead of fileEntry to generateConstExpression
2023-01-17 19:37:05 +01:00
Zalim Bashorov
aa8a0fd7d7
[Wasm] Remove LocationHolder and helper functions
...
It turned out that dedicated scoping function for locations are not so useful.
Now, if you want to scope a location use functions from stdlib, like `let`.
2023-01-17 19:37:05 +01:00
Zalim Bashorov
0d203d190e
[Wasm] Remove buildInstr without location and fix usages
2023-01-17 19:37:05 +01:00
Zalim Bashorov
42f2edd282
[Wasm] Require location for buildThrow and fix all usages
2023-01-17 19:37:05 +01:00
Zalim Bashorov
1244cd1259
[Wasm] Require location for buildBr* and fix all usages
2023-01-17 19:37:05 +01:00
Zalim Bashorov
95c84d5d3f
[Wasm] Require location for buildDrop and fix all usages
2023-01-17 19:37:05 +01:00
Zalim Bashorov
6eba0392db
[Wasm] Require location for buildRefNull and fix all usages
2023-01-17 19:37:05 +01:00
Zalim Bashorov
12854af0a2
[Wasm] Require location for buildRefTestStatic and fix all usages
2023-01-17 19:37:05 +01:00
Zalim Bashorov
7bd92bc412
[Wasm] Require location for buildRefCastNullStatic and fix all usages
2023-01-17 19:37:05 +01:00
Zalim Bashorov
158a307334
[Wasm] Require location for buildStructSet and fix all usages
2023-01-17 19:37:05 +01:00
Zalim Bashorov
e7dc443c18
[Wasm] Require location for buildStructGet and fix all usages
2023-01-17 19:37:04 +01:00
Zalim Bashorov
530438dfcb
[Wasm] Require location for buildStructNew and fix all usages
2023-01-17 19:37:04 +01:00
Zalim Bashorov
3967bd2755
[Wasm] Require location for buildSetGlobal and fix all usages
2023-01-17 19:37:04 +01:00
Zalim Bashorov
65e1b53027
[Wasm] Require location for buildGetGlobal and fix all usages
2023-01-17 19:37:04 +01:00
Zalim Bashorov
00d0c38fc3
[Wasm] Require location for buildSetLocal and fix all usages
2023-01-17 19:37:04 +01:00
Zalim Bashorov
0b59ef58dc
[Wasm] Require location for buildGetLocal and fix all usages
2023-01-17 19:37:04 +01:00
Zalim Bashorov
e5e786c265
[Wasm] Use more specific types in generateExpression and generateStatement
...
Also, rename: `generateStatement` -> `generateAsStatement`
2023-01-17 19:37:04 +01:00
Zalim Bashorov
ce265c049a
[Wasm] Require location for buildUnreachable and fix all usages
2023-01-17 19:37:04 +01:00
Zalim Bashorov
36d4e29253
[Wasm] Require location for buildConstI32Symbol and fix all usages
2023-01-17 19:37:04 +01:00
Zalim Bashorov
e69bbdd5b4
[Wasm] Require location for buildConstF32 & buildConstF64 and fix all usages
2023-01-17 19:37:04 +01:00
Zalim Bashorov
332aca10b0
[Wasm] Require location for buildConstI64 and fix all usages
2023-01-17 19:37:04 +01:00
Zalim Bashorov
f2f4c63720
[Wasm] Require location for buildConstI32 and fix all usages
2023-01-17 19:37:04 +01:00
Zalim Bashorov
cdc1d66b1f
[Wasm] Require a description on each usage of SourceLocation.NoLocation
2023-01-17 19:37:04 +01:00
Zalim Bashorov
61440c74d5
[Wasm] Require location for buildCall and fix all usages
2023-01-17 19:37:03 +01:00
Svyatoslav Kuzmich
d14d4c8510
[Wasm] Support JsModule and JsQualifier
2023-01-13 21:58:34 +00:00
Svyatoslav Kuzmich
1564de5859
[Wasm] Support external vararg
...
Initial implementation copies Wasm array to JS array and spreads it
2023-01-11 10:35:36 +00:00
Igor Yakovlev
f7940a2d46
[Wasm] Fix invalid cast generation for inline classes
2023-01-04 17:16:04 +00:00
Svyatoslav Kuzmich
9bc6b420a9
[Wasm][Stdlib] Add public APIs for linear memory access
...
Needed for interop with APIs that use linear memory.
2022-12-29 19:25:23 +00:00
Igor Yakovlev
fc80104d55
[Wasm] Fix external functions import clashing
2022-12-29 11:57:47 +00:00
Igor Yakovlev
4e24a9caa5
[Wasm] Cache down-casted dispatcher receiver in virtual functions
2022-12-29 11:57:46 +00:00
Igor Yakovlev
3be3ae4895
[Wasm] Fix invalid boxing for non-primitive typed vararg
2022-12-29 11:57:46 +00:00
Igor Yakovlev
1b2b7ce34c
[Wasm] Support Number type for external functions
2022-12-29 11:57:45 +00:00
Igor Yakovlev
4dedd47172
[Wasm] Fix JsName external declarations
2022-12-29 11:57:45 +00:00
Svyatoslav Kuzmich
9d099348ba
[Wasm] Disable interop adapters for WasmImport
...
Merge-request: KT-MR-8152
2022-12-28 17:33:51 +00:00
Svyatoslav Kuzmich
62217b39ec
[Wasm] Rename WasmImportPair -> WasmImportDescriptor
2022-12-28 12:14:16 +01:00
Svyatoslav Kuzmich
dd53998c2d
[Wasm] Add uninstantiated MJS wrapper
...
It allows
* Custom imports
* Ability to skip initializer
2022-12-28 12:13:52 +01:00
Svyatoslav Kuzmich
3bbd8c291a
[Wasm] Add @WasmImport annotation
...
Imports top-level function from given module
2022-12-28 12:13:18 +01:00
Svyatoslav Kuzmich
d788adcbb5
[Wasm] Move non-recursive function types out of rec group
...
This fixes linking with other wasm modules with non-rec types
2022-12-21 20:20:13 +00:00
Svyatoslav Kuzmich
62ac77ca39
[Wasm] Add comments to .wat files
2022-12-16 13:57:59 +00:00
Svyatoslav Kuzmich
777bb0f0cb
[Wasm] Rename Wasm*CodegenContextImpl to Wasm*CodegenContext
2022-12-13 16:08:49 +01:00
Svyatoslav Kuzmich
b9b2723b0a
[Wasm] Remove Wasm*CodegenContext interfaces
...
Use classes instead
2022-12-13 16:08:48 +01:00
Zalim Bashorov
49c3ba33f1
[Wasm] Add a basic end-to-end sourcemap generation in wasm backend
...
More constructions/instructions will be supported separately.
2022-12-08 12:44:26 +00:00
Zalim Bashorov
7f8f7aa050
[Wasm] Revert ref cast and test instructions to be compatible with Binaryen
2022-11-25 15:31:48 +01:00
Zalim Bashorov
5f140dac21
[Wasm] Remove wasm_ref_cast and use wasm_ref_cast_null inside the compiler
2022-11-25 15:31:47 +01:00
Zalim Bashorov
e7d0e451e7
[Wasm] Fix immediate type for recently (in M6) introduced instructions
...
STRUCT_TYPE_IDX -> HEAP_TYPE
WasmImmediate.TypeIdx -> WasmImmediate.HeapType
2022-11-25 15:31:47 +01:00
Zalim Bashorov
d2b63c8c31
[Wasm] Use common logic for eqeq and eqeqeq
...
So, now it generates better code when null literals are passed to `eqeqeq`,
same as for `eqeq`.
2022-11-18 17:30:11 +01:00
Zalim Bashorov
96b02c9b66
[Wasm] Minor: move part of code of eqeqSymbol processing in BuiltInsLowering
2022-11-18 17:30:11 +01:00
Zalim Bashorov
0529ba9a87
[Wasm] Extract common some logic of eqeqSymbol processing in BuiltInsLowering
2022-11-18 17:30:10 +01:00