Commit Graph

972 Commits

Author SHA1 Message Date
Alexey Andreev
8e483245f5 wasm: fix generation of constructor invocation 2024-08-02 14:36:33 +02:00
Alexey Andreev
7ba0a7fe7d wasm gc: export exception tag from module 2024-08-02 14:31:00 +02:00
Alexey Andreev
e4fa6bd364 wasm gc: reduce number of generated virtual tables, fix non-matching types in case of null literals 2024-08-02 13:50:49 +02:00
Alexey Andreev
9b5e1e7661 wasm gc: fix remaining issues that prevent running trivial example 2024-08-01 20:25:18 +02:00
Alexey Andreev
54dc7fe5f8 wasm gc: fix generation issues, get first version that produces module that passes validation 2024-08-01 19:57:12 +02:00
Alexey Andreev
a8d97ad387 wasm gc: cast receivers on devirtualized calls to actual argument type, avoid this cast when possible 2024-07-31 20:49:45 +02:00
Alexey Andreev
75bead66b3 wasm: support instructions that were recently implemented in generator 2024-07-31 17:31:39 +02:00
Alexey Andreev
5572d4b5d7 wasm gc: add subtyping information to types, fix generation of expressions 2024-07-30 20:57:36 +02:00
Alexey Andreev
a1a776ea9b wasm gc: trying to fix type validation 2024-07-30 17:33:31 +02:00
Alexey Andreev
87aaa0b452 wasm gc: fix issues in generation of types, globals and some expressions 2024-07-29 20:41:58 +02:00
Alexey Andreev
ea29208b6c wasm gc: trying to generate types according to unclear spec 2024-07-28 21:04:18 +02:00
Alexey Andreev
a281c19363 wasm gc: draft Wasm GC backend 2024-07-28 14:31:34 +02:00
Alexey Andreev
9f12917de9 js: remove long emulation 2024-07-25 19:43:29 +02:00
Alexey Andreev
f48c24283c wasm: implement transformation from TeaVM tree IR to Wasm GC 2024-07-24 20:21:22 +02:00
Alexey Andreev
172de8e737 wasm: move common part of wasm expression generator in order to later reuse it with Wasm GC BE 2024-07-22 20:16:16 +02:00
Alexey Andreev
025801d385 Limit depth of method analysis in class initializer analysis in order to avoid too deep stack (and therefore SOE) 2024-07-11 18:18:24 +02:00
Alexey Andreev
7efb3c97a0 wasm gc: draft first parts of Wasm GC backend
* class metadata generator
* string pool generator
2024-07-09 19:42:37 +02:00
Alexey Andreev
efcb22b639 wasm: implement global variables
They aren't used by current Wasm BE yet, but will be used by future Wasm GC BE
2024-07-01 19:37:04 +02:00
Alexey Andreev
3ba2282473 wasm: implement several instructions related to reference types
These instructions will be presumably required for implementation of new Wasm GC BE. There's no tests for these changes, since there is no infrastructure to test anything like this. Instead, this code will be covered by tests for corresponding Wasm BE, when it's finally implemented.
2024-06-30 16:19:00 +02:00
Alexey Andreev
d6474c3aeb wasm: add model definitions for GC spec
- refactor Wasm type representation to include reference types
- refactor function representation for consistency with new type system

First step toward Wasm GC support
2024-06-26 20:41:01 +02:00
Alexey Andreev
5d237a98ae wasm: fix writing debug info when some class was not found 2024-05-15 19:24:33 +02:00
Alexey Andreev
1b412073b9 wasm: support exception handling via native exception handling spec 2024-05-09 20:38:17 +02:00
Alexey Andreev
e48dfb27b0 Improve inlining performance by caching method complexity 2024-04-29 16:32:24 +02:00
Alexey Andreev
188d189407 js: improve performance of instanceof against interfaces 2024-04-26 10:37:12 +02:00
Alexey Andreev
a1d711d069 jso: when casting to JS objects, don't fail cast when cast object is null 2024-04-16 20:03:19 +02:00
Alexey Andreev
931f0f1f4a jso: support varargs in exported classes and modules 2024-04-15 20:53:24 +02:00
Alexey Andreev
6a09f181c7 js: add JSTopLevel annotation that allows to import top-level declarations 2024-04-11 20:29:57 +02:00
Alexey Andreev
a6fb67817c jso: improve support of instanceof and cast against JS wrapper types
Fix #808
2024-04-04 21:18:54 +02:00
Alexey Andreev
e069bc3a44 classlib: implement WeakHashMap
Fix #799
2024-04-03 19:11:48 +02:00
Alexey Andreev
bbd02b0067 gradle: implement dev server task 2024-03-20 20:41:10 +01:00
Alexey Andreev
7341fb38a6 Reduce memory consumption 2024-03-18 18:05:06 +01:00
Alexey Andreev
622006de0e Reduce memory consumption 2024-03-18 17:02:42 +01:00
Alexey Andreev
6e416c11d7 Reduce memory consumption in dependency analyzer 2024-03-18 16:21:12 +01:00
Alexey Andreev
055d5df367 js: fix emitting line number to debug info 2024-03-13 12:36:33 +01:00
Alexey Andreev
582fcf904c jso: implement vararg support for method calls 2024-03-12 18:56:19 +01:00
Alexey Andreev
ccfe19994b js: refactor and simplify AstWriter, properly fix case with variable in catch block 2024-03-06 20:24:35 +01:00
Alexey Andreev
393cd7f807 c: don't generate while(condition) loops due to UB in C spec
See https://www.iso-9899.info/n1570.html#6.8.5p6

Fix #885
2024-02-19 20:35:21 +01:00
Alexey Andreev
c1b3deedff Support @Inherited annotation on annotations
Fix #883
2024-02-19 20:14:00 +01:00
Bernd Busse
d067b986df JS: fix catch variable not getting minified 2024-02-17 21:05:06 +03:00
Alexey Andreev
ab253fd34a Fix class initializer compilation for WASI target 2024-02-17 19:04:37 +01:00
Alexey Andreev
8db406c603 jso: implement exporting Java methods to JS
Fix #785
2024-02-15 21:00:10 +01:00
Alexey Andreev
6ac598b927 js: add limit for top-level declarations
Rationale: turns out that V8 utilizes stack even to represent module-level functions.
This can cause SOE when there's too many classes and methods in source JVM
2024-02-01 09:41:50 +01:00
Alexey Andreev
ca273390ef Remove outdated file 2024-01-30 15:46:20 +01:00
Alexey Andreev
4049bc529e js: introduce setting to choose module type 2023-12-23 16:32:55 +01:00
Alexey Andreev
1c292f3fbe Fix calculating comparison in constant propagation 2023-11-25 17:23:50 +01:00
Alexey Andreev
6695103f49 Increase upper complexity threshold for inlining 2023-11-25 15:58:00 +01:00
Alexey Andreev
ac2c084290 js: add ability so refer to local files in source maps. Add copying of source files to Gradle plugin. 2023-11-24 21:28:37 +01:00
Alexey Andreev
6543e68f8a JS: fix naming of variables in no-obfuscation mode 2023-11-24 17:38:50 +01:00
Alexey Andreev
86efdb0809 JS: remove legacy way to generate names, fix issue with duplication of some top-level names in no-optimization mode
Fix #860
2023-11-23 17:22:03 +01:00
Alexey Andreev
57c22ab2c8 JS: fix some runtime function names not being mangled 2023-11-22 18:49:37 +01:00