Commit Graph

2494 Commits

Author SHA1 Message Date
Alexey Andreev
306c78459c JS: use symbol instead of string property to represent Java exception wrapper 2020-09-09 19:28:32 +03:00
Ivan Hetman
fcc1fb7690
Fix Stream.min and Stream.max (#520) 2020-09-08 19:02:45 +03:00
Alexey Andreev
d97dce4650 Fix concatenation with byte and short in JVM 9+
Fix #522
2020-09-08 15:03:19 +03:00
Alexey Andreev
17098495f2 JS: fix compilation of class files that contain methods and field names containing non-identifier characters 2020-07-06 12:11:17 +03:00
Ivan Hetman
3aaefdf23a
Hashmaps foreach (#513) 2020-07-06 11:29:56 +03:00
Alexey Andreev
9cf21825fc Fix wrong evaluation when optimizer sees array initialization that looks like array initializer expression, but has access to array variable on its elements, i.e. on a case like this:
Object[] array = new Object[1];
array[0] = array;

That can't be optimized to

Object[] array = new Object[] { array };
2020-06-16 19:24:45 +03:00
Ihromant
cf658cf57d Simplification 2020-06-13 13:56:14 +03:00
Ihromant
0c15600700 Added missing methods to Optional and ArrayList 2020-06-13 13:56:14 +03:00
falko
7271a394db XMLSerializer added 2020-06-13 13:55:25 +03:00
falko
7506e60762 New DOMParser class 2020-06-13 13:55:25 +03:00
hsestupin
0639acca21 add static hashCode(i) method like in java.lang.Integer 2020-06-02 18:53:14 +03:00
Alexey Andreev
5ee332c771 Fix crash when lambda is not used. Fix #500 2020-06-01 12:19:37 +03:00
Alexey Andreev
6f7c2dff2b Fix copying source files in simple optimization mode. Fix #501 2020-06-01 12:07:42 +03:00
Jörg Hohwiller
e610c13e69 add int constructor for Java9+ compatibility 2020-06-01 11:51:58 +03:00
Alexey Andreev
ecc4be2d25 Fix class initialization optimization 2020-05-19 13:27:26 +03:00
Alexey Andreev
eebe16157b C: further workaround for msvc bug 2020-05-19 09:56:47 +03:00
Alexey Andreev
8f68c64193 Fix bug in repeated field read elimination.
There's a case that was missing in this optimization. We install invalidation
points on a block's dominance frontiers when the block contains som
invalidation instructions. However, if a block is an entry to exception
handler, state is always invalidated. This should be done
since exception handler may recover and proceed with some code that
follows try/catch block. Without this change code after try/catch inherits
state of `try` block, which is invalid, since `catch` is another
source from where we can get there. We can't rely on regular instruction
analysis in `catch` blocks, since we get into `catch` from an unpredictable
point.
2020-05-18 17:24:21 +03:00
Vladislav Gordievskiy
6892c4f0ca
Fix of exporting a wasm function for scala objects (#498). Fix #497
Co-authored-by: VGORDIEVSKII <vgordievskii@luxoft.com>
2020-05-18 10:08:28 +03:00
Alexey Andreev
333ee95604 C: in addition to deece78dec
Fix generation of heap dump metadata
2020-05-15 18:05:50 +03:00
Alexey Andreev
deece78dec C: workaround msvc C1054 error while compiling virtual table initializers of classes with deep inheritance hierarchy 2020-05-15 17:55:26 +03:00
Alexey Andreev
862e9b846f Exclude all classes from underlying JDK 2020-05-14 16:59:21 +03:00
Alexey Andreev
6a4da94f2e Get rid of irreducible CFGs in input bytecode 2020-05-14 16:18:33 +03:00
Alexey Andreev
4284bb2a6c C: fix naming when bytecode contains method names with special characters 2020-05-14 14:31:48 +03:00
Alexey Andreev
7313b2bb62 Don't fail on environments that miss console object in global scope 2020-04-30 16:06:54 +03:00
Alexey Andreev
1232f20ae4 Add protection against exception fall though one Java machine running another Java machine.
When one TeaVM program calls `eval` and code passed to eval is itself generated
with TeaVM, the inner code can throw uncaught Java exception. The outer code could
try to catch this exception as a native JavaScript exception, but this is not possible,
since the exception is marked as Java exception, and inner scripts's Java class
does not inherit java.lang.Throwable of outer script. The solution for each script
to generate own tag (Symbol) and only treat JS exception as Java exception when
this exception has this tag.
2020-04-30 16:05:24 +03:00
Alexey Andreev
9f823ee450 Minor improvements to time zone support 2020-04-30 15:49:37 +03:00
Alexey Andreev
a9e7e51c51 Properly support non-ASCII characters in System.out and System.err 2020-04-30 14:49:33 +03:00
Alexey Andreev
c7c47f63ee Implement Math.nextDown, reimplement ulp and nextUp using bit operations 2020-04-30 14:19:50 +03:00
Alexey Andreev
d50e048ea4 Add Character.toTitleCase. More efficient implementation for Character.digit 2020-04-14 18:31:19 +03:00
Alexey Andreev
0c8d93acbc Add DecimalFormat.setDecimalFormatSymbols 2020-04-14 16:40:45 +03:00
Alexey Andreev
1681aa5834 Implement some of the missing Timer methods 2020-04-14 16:10:17 +03:00
Alexey Andreev
ddf64870da Implement some of the missing methods related to streams 2020-04-14 15:06:58 +03:00
Alexey Andreev
2bc9329cf8 Implement some of the missing methods in ThreadLocalRandom 2020-04-14 14:03:15 +03:00
Alexey Andreev
061bb859d5 Implement ThreadLocalRandom, implement some of missing Random methods 2020-04-14 12:07:56 +03:00
Alexey Andreev
a074906ea7 Implement AtomicReference 2020-04-14 09:25:20 +03:00
Adam J Ryan
e0fc5d834b Add ability to fine tune transpiler class substitutions. 2020-04-01 19:32:34 +03:00
Jörg Hohwiller
3254dce53b added module names form JPMS 2020-04-01 18:57:28 +03:00
Jörg Hohwiller
67cf421819 prevent javadoc error: The code being documented uses modules but the packages defined in URL are in the unnamed module. 2020-04-01 18:57:00 +03:00
Ondra Pelech
1b8f5940a0 Update Scala to 2.12.11 2020-04-01 18:53:15 +03:00
Jörg Hohwiller
b5237fb20e
Add Flow API for reactive programming (#486) 2020-03-13 11:28:36 +03:00
Jörg Hohwiller
c2d27fdb1a
Add support for String.isBlank() (#482) 2020-03-10 11:28:54 +03:00
Jörg Hohwiller
a45d1e0d07
Support for Thread.UncaughtExceptionHandler (#483) 2020-03-10 11:28:02 +03:00
Alexey Andreev
a152a28a2d C: fix bug in array initializers 2020-03-04 11:37:04 +03:00
Alexey Andreev
37f07b80c3 JS: generate shorter names for Long operations and array creation in minified mode 2020-03-04 13:23:19 +03:00
Alexey Andreev
3ff05d1c5d Eliminate redundant try/catches in generated bytecode for enums 2020-03-04 12:14:25 +03:00
Alexey Andreev
37e6ca3e17 Recognize array initialization pattern in bytecode and translate it to array initializer in target platform 2020-03-03 18:34:48 +03:00
Alexey Andreev
66250cb125 Use advanced optimization level to compile JS benchmark 2020-03-03 18:24:29 +03:00
Alexey Andreev
2ad5baaccc JS: don't write single return statement 2020-03-03 15:01:33 +03:00
Alexey Andreev
eb3490dba0 Improve inlining 2020-03-03 14:34:27 +03:00
Alexey Andreev
146776ff55 JS: reduce size of declaration of classes without fields 2020-03-03 12:47:06 +03:00