Commit Graph

3068 Commits

Author SHA1 Message Date
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
Bernd Busse
cf850157f0 classlib: fix javadoc warnings 2024-02-15 11:59:43 +03:00
Bernd Busse
7f333cc73e JSO: make global objects available in WebWorker contexts (no hardcoded window) 2024-02-15 11:55:05 +03: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
Bernd Busse
83e3306071 classlib: extend BigInteger implementation with xValueExact() and sqrt() 2024-01-24 21:56:12 +03:00
Bernd Busse
4e076a65ee classlib: add BigInteger constant TWO added in Java 9 2024-01-24 21:56:12 +03:00
Bernd Busse
9280992661 classlib: add minimal SecureRandom implementation
- Utilizes JavaScript's window.crypto.getRandomValues() when available,
  otherwise uses the general Math.random() as fallback.
- No support for providers
- No support for proper randomness sources on non-JS backends
2024-01-24 20:48:28 +03:00
Bernd Busse
1964235fef classlib: directly use Math.random() in Random
Math.random() already handles the implementation for the backends,
delegating to JavaScript's Math.random() or the C runtime
implementation.

Fixes duplicate symbols when using the WASM backend.
2024-01-24 20:48:28 +03:00
Bernd Busse
6de4560282 classlib: implement Cloneable for TreeSet 2024-01-24 20:46:26 +03:00
Bernd Busse
6a398c9b8d classlib: properly duplicate inner map when cloning TreeMap 2024-01-24 20:46:26 +03:00
Bernd Busse
2318caad7b
classlib: add static nullOutputStream() to OutputStream (#878) 2024-01-24 20:44:59 +03:00
Alexey Andreev
b6bea8bcfb Fix release script 2024-01-08 19:06:22 +01:00
Alexey Andreev
4049bc529e js: introduce setting to choose module type 2023-12-23 16:32:55 +01:00
Alexey Andreev
8c344b3812 samples: add more metrics to software3D 2023-12-12 20:21:24 +01:00
Alexey Andreev
18e92a49e3 jso apis: fix declaration in IndexedDB API
Fix #874
2023-12-12 09:40:30 +01:00
Alexey Andreev
facf3c496f classlib: get rid of call to Math.log 2023-12-07 19:55:47 +01:00
J. Fronny
953c475b46
classlib: implement float support for String.format (#873) 2023-12-07 19:16:38 +01:00
Alexey Andreev
bb837bd020 classlib: replace usage of Math.log10 with custom implementation of int log10 algorithm
This fixes BigDecimal support on WASI, which does not support log10 at the moment
2023-12-07 19:14:55 +01:00
Alexey Andreev
a9af6e4f33 JSO: fix wrapping undefined value 2023-12-07 10:02:30 +01:00
J. Fronny
9093ad2f8a
classlib: implement String.chars() (#872) 2023-12-05 13:26:39 +01:00
Alexey Andreev
067f7453fe JS: a better fix for wrapping/unwrapping JS objects implemented in Java 2023-11-27 13:05:51 +01:00
Alexey Andreev
b3e889fa11 junit: fix compiling tests for platforms which don't participate in testing 2023-11-26 22:05:23 +01:00
Alexey Andreev
9757213379 JS: fix unwrapping JS objects implemented in Java 2023-11-26 21:57:19 +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
a433ca9fe5 gradle: fix passing optimization from DSL to tasks 2023-11-25 15:57:21 +01:00
Alexey Andreev
607e107e70 samples: fix classpath so that it's possible to run TeaVM out-of-process 2023-11-25 15:56:45 +01:00
Alexey Andreev
f3bf9d812f samples: fix rendering stopped when changing worker count or type 2023-11-25 14:05:01 +01:00
Alexey Andreev
2bd76e2da5 gradle: fix issues with new source file property 2023-11-25 13:41:21 +01:00
Alexey Andreev
bdd0193eb8 samples: fix path to file 2023-11-24 21:28:48 +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
a1355bb2f7 classlib: refactor LinkedHashMap
I found regression somewhere in LinkedHashMap, when certain operations cause cycle in entry list. Since updated logic was totally unclear to me, I rewrote it from scratch. Also, reverted mechanism to remove entries NOT by keys and used it where necessary to improve performance.
2023-11-23 21:19:28 +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
997a31b683 junit: don't start browser if corresponding test platforms disabled 2023-11-23 16:04:32 +01:00
Alexey Andreev
ef359c3604 samples: fix issues in software3d 2023-11-22 21:23:20 +01:00
Alexey Andreev
57c22ab2c8 JS: fix some runtime function names not being mangled 2023-11-22 18:49:37 +01:00
Alexey Andreev
be53236d23 JS: fix wrapping keys for native indexers 2023-11-20 20:33:47 +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
89661e52fb JS: fix output to console in obfuscated mode 2023-11-20 18:57:51 +01:00
Alexey Andreev
810012872c Add couple native declarations to JSO APIs. Update sample 2023-11-19 20:25:29 +01:00
Alexey Andreev
7108dfbac7 classlib: fix Math exact operations in C and WebAssembly backends 2023-11-19 20:12:58 +01:00
Alexey Andreev
318d4bff93 Fix boxing/unboxing arguments and return values in method references 2023-11-19 20:12:58 +01:00
Jonathan Coates
4fc43a5597
classlib: fix toLowerCase/toUpperCase on Locale.ROOT (#862) 2023-11-19 21:45:32 +03:00
Alexey Andreev
fa5fa3df47 Suppress test failing in C 2023-11-19 18:40:48 +01:00
Alexey Andreev
0f84012008 Suppress tests failing in WebAssembly 2023-11-19 18:34:22 +01:00
Alexey Andreev
6e46ae8eec classlib: get rid of Math polyfill in java.time implementation 2023-11-19 18:32:36 +01:00