Commit Graph

1128 Commits

Author SHA1 Message Date
Alexey Andreev
14a4a99fa5 wasm gc: fix exporting classes to JS 2024-10-10 19:12:40 +02:00
Alexey Andreev
0dcc25d66b wasm gc: support exporting declarations as JS entities from module 2024-10-08 20:09:43 +02:00
Alexey Andreev
73dda91d35 wasm gc: minor optimizations; make initializer functions Wasm start function; fix compilation; remove debugging output 2024-10-06 17:29:27 +02:00
Alexey Andreev
f95250ddf7 wasm gc: fix inlining support in debug info builder, fix support of debug info in disassembler 2024-10-06 16:54:57 +02:00
Alexey Andreev
c2eb11e056 wasm gc: support writing debug info, support it in disassembler 2024-10-04 18:49:58 +02:00
Alexey Andreev
7aec0763fa wasm gc: fix issue with JS exceptions, trying to propagate Java exception message to JS error message 2024-10-04 16:56:47 +02:00
Alexey Andreev
753a028fc9 wasm gc: improve performance of JS interop 2024-10-04 15:38:14 +02:00
Alexey Andreev
3218a00eb9 wasm gc: support JS exceptions 2024-10-04 11:49:17 +02:00
Alexey Andreev
1d47146f43 wasm gc: support JS functions with varargs 2024-10-04 10:02:06 +02:00
Alexey Andreev
a5212fb9ca wasm gc: support imported functions in disassembler 2024-10-04 09:40:54 +02:00
Alexey Andreev
eba0e2b2e8 wasm gc: fix issues with arrays of JS objects, unignore passing test 2024-10-03 22:23:56 +02:00
Alexey Andreev
8ce104ae64 Fix bug in GVN that prevented optimizations in same basic block 2024-10-03 19:38:54 +02:00
Alexey Andreev
68a1b2efae wasm gc: fix issue with dependency initialization order 2024-10-02 20:18:04 +02:00
Alexey Andreev
802efd49c6 wasm gc: fix String.intern support 2024-10-02 20:04:18 +02:00
Alexey Andreev
0bd7bc6ca9 wasm gc: fix support of legacy Object.cast method 2024-10-02 19:27:43 +02:00
Alexey Andreev
551f0505c7 wasm gc: fix support of cast/instanceof for JS types; fix accessing top-level declarations 2024-10-02 14:54:40 +02:00
Alexey Andreev
a291eb3026 wasm gc: support wrapping JS values in Java 2024-10-02 14:31:33 +02:00
Alexey Andreev
4b76396332 wasm gc: basic support for functors in JSO 2024-10-01 14:43:53 +02:00
Alexey Andreev
383fee67c5 wasm gc: support exporting Java classes to JavaScript 2024-10-01 13:57:20 +02:00
Alexey Andreev
5ad4496c34 wasm gc: support primitive array conversion to JavaScript in JSO 2024-09-28 19:52:14 +02:00
Alexey Andreev
bbf45760b8 wasm gc: implement simple features from JSO 2024-09-28 19:20:48 +02:00
Alexey Andreev
33f4537f43 wasm gc: use non-null array storage type 2024-09-27 13:50:45 +02:00
Alexey Andreev
1d81b7004f Fix possible bug with exceptions in GVN 2024-09-26 20:39:29 +02:00
Alexey Andreev
054d4c2a24 wasm gc: generate array constructor using ref.struct_new 2024-09-26 19:32:02 +02:00
Alexey Andreev
4d416af7dc wasm gc: reduce amount of code generated for initialization of strings 2024-09-26 18:59:44 +02:00
Alexey Andreev
951d0c53c3 wasm gc: fix Date API support 2024-09-26 18:24:15 +02:00
Alexey Andreev
b9f406dcaa wasm gc: general implementation of System.arraycopy 2024-09-26 07:57:46 +02:00
Alexey Andreev
dd24425de0 wasm gc: support resources 2024-09-25 13:39:03 +02:00
Alexey Andreev
f8022f9465 wasm gc: fix issues in Java 17 switch expression and metaprogramming API 2024-09-23 20:23:24 +02:00
Alexey Andreev
4546029a5a wasm gc: implement String.intern 2024-09-23 15:39:08 +02:00
Alexey Andreev
8ed8322b17 wasm gc: basic implementation of WeakReference 2024-09-20 15:03:43 +02:00
Alexey Andreev
6613d379ec wasm gc: don't generate emulated casts in non-strict mode 2024-09-19 20:40:45 +02:00
Alexey Andreev
29339f3fbc Fix old Wasm backend 2024-09-19 20:26:32 +02:00
Alexey Andreev
21cc3b048b wasm gc: fix broken module when Class.getName is never called 2024-09-19 19:49:25 +02:00
Alexey Andreev
10805ed0dd wasm gc: implement creation of multidimensional arrays 2024-09-18 20:34:29 +02:00
Alexey Andreev
3cf5fc10c8 wasm gc: emit string literals in WTF-8 rather than in UTF-8 2024-09-18 14:24:19 +02:00
Alexey Andreev
944fd22513 wasm gc: group structurally equal different substructures into recursive group in order to benefit from using native ref.test/rest.cast instructions for classes 2024-09-18 13:24:29 +02:00
Alexey Andreev
55ac5d0321 wasm gc: implement ServiceLoader 2024-09-17 20:14:29 +02:00
Alexey Andreev
36f7ec36f3 wasm gc: disable cast optimization and fix issue with short/char fields 2024-09-17 08:02:50 +02:00
Alexey Andreev
7784969bb8 wasm gc: fix issues with casts 2024-09-16 13:49:38 +02:00
Alexey Andreev
7e622d8bc7 wasm gc: sort types, functions and globals in usage count order to reduce binary size 2024-09-15 11:02:55 +02:00
Alexey Andreev
86e8cfd0db wasm gc: reduce size of array construction 2024-09-14 19:34:56 +02:00
Alexey Andreev
e5d6603503 wasm gc: reduce size of class metadata and metadata initializer 2024-09-14 18:24:54 +02:00
Alexey Andreev
a503333c1b wasm gc: optimize null checks, casts and try/catch using branching instructions 2024-09-14 15:26:22 +02:00
Alexey Andreev
9aee15fa0f wasm gc: attach Java exception to Wasm exception 2024-09-14 13:02:31 +02:00
Alexey Andreev
7029d3cff7 wasm gc: implement branching instructions and null check instruction 2024-09-13 19:46:11 +02:00
Alexey Andreev
5acb9a4707 Fix checkstyle warnings 2024-09-13 13:27:22 +02:00
Alexey Andreev
4072111af5 wasm: fix error when generating casts 2024-09-13 13:25:26 +02:00
Alexey Andreev
845523f1a7 wasm gc: implement flags for classes 2024-09-12 20:43:09 +02:00
Alexey Andreev
bfd2c8479c wasm gc: fix bugs related to casts and implement runtime method for converting date to string 2024-09-12 20:16:01 +02:00
Alexey Andreev
8e2cf27e94 wasm gc: fix bugs related to invalid nested temporary variable generation 2024-09-12 18:23:05 +02:00
Alexey Andreev
eccfaff889 wasm gc: fix bugs with Class 2024-09-11 20:07:05 +02:00
Alexey Andreev
d12637f959 wasm gc: fix issues related to class metadata 2024-09-11 15:45:37 +02:00
Alexey Andreev
1533794cf1 wasm gc: add strict mode, fix some bugs 2024-09-11 08:00:39 +02:00
Alexey Andreev
2d8556d0a2 wasm gc: implement enum constants 2024-09-10 15:32:27 +02:00
Alexey Andreev
349ed8fc2d wasm gc: implement Class.getSuperclass and Object.clone, fix issue with resource maps 2024-09-09 14:23:58 +02:00
Alexey Andreev
fe0304ee67 wasm gc: reduce size of string literal initializer 2024-09-08 20:52:23 +02:00
Alexey Andreev
d0226aab88 wasm gc: implement some Class intrinsics, fix issues with type inference 2024-09-08 20:32:30 +02:00
Alexey Andreev
fea62af09a wasm gc: implement resources 2024-09-07 20:11:22 +02:00
Alexey Andreev
29dec0962b wasm gc: fix issues with type inference 2024-09-05 18:49:42 +02:00
Alexey Andreev
a9d46ac55e wasm gc: fix issue with type inference for null values 2024-09-04 14:58:56 +02:00
Alexey Andreev
d0707e5355 js: emit non-breaking whitespace before function arrow in remaining places 2024-09-03 20:54:34 +02:00
Alexey Andreev
9768a86378 Fix issues related to sigma nodes in phi updater 2024-09-03 20:50:07 +02:00
Alexey Andreev
8038d68963 wasm gc: fix building virtual tables for interface default methods 2024-09-03 14:16:52 +02:00
Alexey Andreev
019eb4500c wasm gc: fix issues, make more test passing 2024-09-02 16:02:58 +02:00
Alexey Andreev
1dc7bc653d wasm gc: support type nullability and global mutability 2024-08-31 20:16:09 +02:00
Alexey Andreev
9b601ac002 wasm gc: initialize class initializer globals in global section 2024-08-30 20:54:46 +02:00
Alexey Andreev
638cc8ed15 wasm gc: reduce sizes of virtual tables, initialize structures in global section 2024-08-30 20:21:01 +02:00
Alexey Andreev
f19c211b2a wasm gc: fix issie with type inference for array set, implement some intrinsics 2024-08-30 13:44:23 +02:00
Alexey Andreev
1ba1dcfc09 wasm gc: fix issue in type inference for comparison instruction result 2024-08-30 12:54:59 +02:00
Alexey Andreev
0b11a9ce90 wasm gc: fix issues in disassembler 2024-08-30 12:54:39 +02:00
Alexey Andreev
8ba4f9c30b wasm gc: fix issue with function numbering in disassembler 2024-08-29 21:24:14 +02:00
Alexey Andreev
cb1f3c6dfc wasm gc: fix issue in virtual table generator 2024-08-29 21:14:49 +02:00
Alexey Andreev
a0224f60e6 wasm gc: fix infinite loop in type inference 2024-08-29 21:04:33 +02:00
Alexey Andreev
31d89ebec2 wasm gc: support emitting disassembly in HTML with link references, add setting to emit disassembly in JUnit tests 2024-08-29 18:41:02 +02:00
Alexey Andreev
a8b999f8d9 wasm gc: support global section in disassembler 2024-08-29 17:43:41 +02:00
Alexey Andreev
d6b2afd096 wasm gc: support name section in disassembler 2024-08-28 21:02:33 +02:00
Alexey Andreev
5a513fd6fd wasm gc: improve disassembler to print type section 2024-08-28 14:13:10 +02:00
Alexey Andreev
7324e99e6a wasm gc: produce better names for declarations, generate locals in names section 2024-08-27 20:03:22 +02:00
Alexey Andreev
10c3731c43 wasm gc: fix some issues and implement intrinsics
* properly cast exception type on catch blocks
* generate virtual table structures lazily
* fix calculation of types of a.field values
2024-08-27 13:28:49 +02:00
Alexey Andreev
6ff58b2dc7 wasm-gc: fix type inference for case of integer subtypes 2024-08-26 20:48:53 +02:00
Alexey Andreev
96bf4379c9 Temporarily ignore failing test 2024-08-26 19:40:59 +02:00
Alexey Andreev
ebac13a363 wasm gc: implement Array.getLength and Array.get 2024-08-26 18:14:04 +02:00
Alexey Andreev
ba08fb395c wasm gc: always emit java.lang.Class, fix issue with recursive types 2024-08-25 20:38:02 +02:00
Alexey Andreev
0cda737dca Add test for bug in nullness analysis 2024-08-25 19:34:20 +02:00
Alexey Andreev
4a345610cf wasm gc: reduce number of generated virtual table entries, reduce size of a simple program 2024-08-23 21:10:44 +02:00
Alexey Andreev
3e19ca341e wasm gc: fix support of class initialization, inherit arrays from Object, add support for clone in arrays 2024-08-23 21:10:44 +02:00
Alexey Andreev
335e2da4cf wasm gc: implement System.identityHashCode() and some Integer intrinsics 2024-08-23 10:14:39 +02:00
Alexey Andreev
5d109236d9 wasm gc: fix running tests in JUnit, fix remaining errors so that *few* tests pass 2024-08-21 14:29:56 +02:00
Alexey Andreev
1aebe51256 wasm gc: implement backend-specific virtual table builder 2024-08-20 21:03:51 +02:00
Alexey Andreev
eb0eb1f146 wasm gc: generate field names and write them to name section 2024-08-20 14:16:24 +02:00
Alexey Andreev
29f29cea1d wasm gc: trying to fix virtual calls 2024-08-19 15:02:11 +02:00
Alexey Andreev
5eb1e7d9bc wasm gc: implement intrinsics for Long and Class classes 2024-08-18 19:55:25 +02:00
Alexey Andreev
a97e6574ac Introduce concept of 'weak' cast.
Use weak casts to maintain proper typing within methods during various operations on IR. At generation level, ignore weak casts, except for Wasm GC BE, which turns weak casts into platform casts.
2024-08-18 18:47:04 +02:00
Alexey Andreev
8b52741e04 wasm: avoid generation of types as defined in GC spec
This fixes passing tests in environments that either don't support or prohibit usage of GC spec
2024-08-18 17:51:29 +02:00
Alexey Andreev
199032d48a wasm gc: support Array.newInstance 2024-08-17 20:48:03 +02:00
Alexey Andreev
40fbce0ddd wasm gc: fix issues with virtual calls 2024-08-16 20:42:03 +02:00
Alexey Andreev
8c15885f44 Fix metaprogramming support, fix calculation of virtual tables for final classes 2024-08-14 13:22:27 +02:00
Alexey Andreev
eaf2c8189f wasm gc: implement some basic reflection-specific intrinsics in Object and Class 2024-08-13 20:51:20 +02:00
Alexey Andreev
a84c5fc77f wasm gc: fix issues related to virtual calls 2024-08-13 19:57:48 +02:00