Commit Graph

126 Commits

Author SHA1 Message Date
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
8184c46bae Revert change is ResourceProgramTransformer which is not necessary for WasmGC BE, but breaks C BE 2024-09-09 19:06:52 +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
fea62af09a wasm gc: implement resources 2024-09-07 20:11:22 +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
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
931f0f1f4a jso: support varargs in exported classes and modules 2024-04-15 20:53:24 +02: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
3282ae3b59 Refactor mechanism that resolves methods and fields parsed from bytecode and reports errors about missing items 2023-11-20 19:50:20 +01:00
Alexey Andreev
726702dd7f wasm: fix programmatic initialization of a class that is statically initialized by optimizer 2023-11-08 19:59:24 +01:00
Alexey Andreev
ceffde38f3 JS: use ES6 arrow functions and let where possible 2023-11-02 21:10:35 +01:00
Alexey Andreev
23ad999bbd JS: get rid of IOException in SourceWriter and related classes 2023-10-31 20:09:55 +01:00
Alexey Andreev
32ee8943c1 JS: rewrite more natives with templates, get rid of runtime aliases in minification mode 2023-10-31 19:29:32 +01:00
Alexey Andreev
02b3c92912 JS: use native string to represent internals of java.lang.String 2023-10-21 19:30:16 +02:00
Alexey Andreev
772dd9eded JS: fix returning JSO objects from Async methods
Fix #805
2023-10-12 21:13:09 +02:00
Alexey Andreev
3d65d38375 Massive refactoring around Wasm support
1. Get rid of old exception handling IR transformer in favor of generation of EH code inside BE
2. Get rid of no-setjmp/longjmp support in C BE
3. Fix various bugs in WebAssembly BE
4. Suppress remaining failing tests for Wasm
5. Enable running Wasm tests by default
2023-10-08 10:36:03 +02:00
Alexey Andreev
401fcabeae wasm: support ServiceLoader 2023-08-28 19:32:22 +02:00
Alexey Andreev
073a444cc9 Wasm: fix issue with coroutine generator
Partially fix #675
2023-03-19 18:32:52 +01:00
Alexey Andreev
8014c038c0 Migrate to gradle 2023-01-23 17:16:07 +01:00
Alexey Andreev
ada2bf9c58 Fix bug in support for resources 2021-08-31 12:35:56 +03:00
Alexey Andreev
73bd139b7e C: implement ServiceLoader 2021-04-14 23:02:09 +03:00
Alexey Andreev
b34e25414e C: fix support for resources 2021-03-24 18:52:54 +03:00
Alexey Andreev
4c0c7872a1 JS: add support for CCE in strict mode 2021-03-17 21:11:18 +03:00
Alexey Andreev
969ad17b6a C: workaround for regression in MSVC compiler 2020-11-27 18:54:24 +03:00
Alexey Andreev
d76eeb9be3 Improve <clinit> elimination. Improve inlining in ADVANCED optimization mode 2020-02-14 12:46:57 +03:00
Alexey Andreev
8a91605c56 Add support for Class.getCanonicalName/getEnclosingClass 2019-10-18 15:10:16 +03:00
Alexey Andreev
f0b6cc2f30 Update version to 0.7.0 2019-09-24 16:26:14 +03:00
Alexey Andreev
e33cc5a807 C: split runtime into smaller parts 2019-09-03 14:01:30 +03:00
Alexey Andreev
90e00f7eb4 C: add option to support exceptions via setjmp/longjmp 2019-07-22 16:53:47 +03:00
Alexey Andreev
a240537e36 C: reduce number of synthesized null checks 2019-07-12 14:07:57 +03:00
Alexey Andreev
6c9393548a JS: fix generation of Class.getDeclaringClass 2019-05-30 00:07:12 +03:00
Alexey Andreev
86b5daa3cf Add annotations to mark classes and methods supported on some platforms 2019-05-17 11:44:35 +03:00
Alexey Andreev
8e08cf6dcd C: improve generation of string pool for incremental mode 2019-05-16 16:53:40 +03:00
Alexey Andreev
da22256c1f C: compile into multiple .c and .h files 2019-05-08 17:36:46 +03:00
Alexey Andreev
7551cd1ec6 C: fix bugs in GC 2019-04-05 13:08:16 +03:00
Alexey Andreev
0dc170dad2 Fix bugs in C backend 2019-03-26 19:09:25 +03:00
Alexey Andreev
f33c90f778 Improve <clinit> elimination:
* Generate clinit instruction instead of calling <clinit>
  directly
* Rename annotation that indicates absence of side effects
* Don't apply this annotation automatically to all JSBody methods
2019-03-24 12:54:06 +03:00
Alexey Andreev
de84105241 Call <clinit> methods before main method when possible, eliminate
lazy class initialization for these <clinit> methods.
2019-03-22 19:40:56 +03:00
Alexey Andreev
955ac92035 Get rid of reflection code 2019-03-22 11:32:48 +03:00
Alexey Andreev
abdd9b3270 C backend: support coroutines 2019-03-10 14:04:04 +03:00
Alexey Andreev
ade00cc984 C backend: fix bugs 2019-02-26 00:10:22 +03:00
Alexey Andreev
ce13c05342 JS: add ability to set limit for top-level names.
The purpose of this option is JS engines are too sensible for number
of methods in closure, while they don't care about methods
in an object.
2019-02-13 17:03:13 +03:00
Alexey Andreev
4de1c51e1a Improve inliner: use simlified heuristics in advanced optimization mode, remove methods that were fully inlined 2019-02-12 19:30:57 +03:00
Alexey Andreev
95a3a30a6e Fix html4j tests 2019-01-31 19:20:14 +03:00
Alexey Andreev
1dd379551c Produce less names in top level scope in dev server mode in order to improve debugging performance in Chrome 2019-01-23 13:28:39 +03:00
Alexey Andreev
48227b24a0 Fix bootstrap mode 2019-01-20 17:50:46 +03:00
Alexey Andreev
9305a532bb Replace ArrayList with array to store arguments of InvokeInstruction 2019-01-09 12:51:52 +03:00
Alexey Andreev
f589b0035a Decrease memory consumption 2018-12-29 19:02:03 +03:00
Alexey Andreev
4ffe74296d Limit max line size of generated JS code 2018-12-21 14:28:30 +03:00