Commit Graph

943 Commits

Author SHA1 Message Date
Alexey Andreev
eb495182d2 JS: fix runtime for Safari 2021-03-22 15:13:40 +03:00
Alexey Andreev
38cbd7e80b JS: fix async methods 2021-03-22 14:17:50 +03:00
Alexey Andreev
d6780ea637 Fix bug in global value numbering optimization 2021-03-22 14:17:50 +03:00
Alexey Andreev
bd53c1a5a2 wasm: trying to implement coroutines 2021-03-21 22:13:09 +03:00
Alexey Andreev
c4c1408160 wasm: fix running tests, add in-browser test runners 2021-03-20 19:52:45 +03:00
Alexey Andreev
b2b7a603b4 JS: fix array optimization 2021-03-19 14:16:29 +03:00
Alexey Andreev
75d06bebbf JS: fix bug in compilation of monitorenter instruction 2021-03-18 14:20:29 +03:00
JohannesS
f97484365c JS: fix overrides with default methods 2021-03-18 12:26:33 +03:00
Alexey Andreev
81bfe3f6e2 Improve pom.xml configuration 2021-03-18 11:16:41 +03:00
Alexey Andreev
2c7b5be62e JS: fix long emulation in JS engines that don't support BigInt 2021-03-18 10:14:18 +03:00
Alexey Andreev
3779520389 C: fix after introducing CCE support 2021-03-18 01:03:01 +03:00
Alexey Andreev
67c639b875 JS: fix stack trace decoder with new CCE support 2021-03-17 21:49:06 +03:00
Alexey Andreev
4c0c7872a1 JS: add support for CCE in strict mode 2021-03-17 21:11:18 +03:00
Alexey Andreev
02e8955abc JS: fix overflow behaviour of unary minus 2021-03-17 10:16:07 +03:00
Alexey Andreev
71f87d79a5 JUnit: add support for TestNG annotations 2021-03-16 21:47:05 +03:00
Alexey Andreev
40ecb0938d Fix issue with BigInt64Array in Safari 2021-03-12 19:13:29 +03:00
Alexey Andreev
35f025d7da JS: fix bug in fallback long implementation 2021-03-10 16:22:19 +03:00
Alexey Andreev
ca23da939a JS: represent long as BigInt if available 2021-03-08 22:59:45 +03:00
Alexey Andreev
e4c808c324 Add switch to log devirtualization process 2021-02-26 12:26:13 +03:00
Alexey Andreev
0eca9d95e1 Fix missing virtual call detector 2021-02-26 11:52:10 +03:00
Alexey Andreev
d1fa57210e Copy parameter annotations when renaming a class 2021-02-01 14:41:18 +03:00
Alexey Andreev
969ad17b6a C: workaround for regression in MSVC compiler 2020-11-27 18:54:24 +03:00
Octavia Togami
a8641de39b
Correct problem severity for warning 2020-11-26 14:59:13 +03:00
Alexey Andreev
306c78459c JS: use symbol instead of string property to represent Java exception wrapper 2020-09-09 19:28:32 +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
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
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
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
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
a9e7e51c51 Properly support non-ASCII characters in System.out and System.err 2020-04-30 14:49:33 +03:00
Adam J Ryan
e0fc5d834b Add ability to fine tune transpiler class substitutions. 2020-04-01 19:32:34 +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
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
Alexey Andreev
c1891a1908 Further work on decreasing generated code size 2020-03-03 12:17:39 +03:00
Alexey Andreev
ea1134d66b Trying to reduce number of classes for which name is provided in their metadata 2020-03-02 16:36:09 +03:00
Alexey Andreev
81235ac714 JS: reduce size of wrapped virtual methods 2020-03-02 11:50:45 +03:00
Alexey Andreev
8d1eb3fcc6 Better optimization of <clinit> when reading other's class static final fields 2020-03-02 11:23:58 +03:00
Alexey Andreev
2f95045345 Improve optimization of unused methods that were inlined on every usage 2020-02-28 14:42:51 +03:00
Alexey Andreev
150a613709 C/Wasm: trying to fix GC (again) 2020-02-26 14:51:40 +03:00
Alexey Andreev
84aa50e7eb C/Wasm: trying to fix GC 2020-02-26 14:38:01 +03:00
Alexey Andreev
0e7c1e5ef9 Wasm: don't generate class metadata if it's not used. Don't generate names and call site metadata in minified mode 2020-02-21 17:29:31 +03:00
Alexey Andreev
3f2c52000f Wasm: support null checks and array bound checks 2020-02-21 16:32:45 +03:00
Alexey Andreev
c35861610f Wasm: support null checks and array bound checks 2020-02-21 16:32:00 +03:00
Alexey Andreev
7d95c0fb04 Wasm: fix GC 2020-02-21 16:22:25 +03:00
Alexey Andreev
d76eeb9be3 Improve <clinit> elimination. Improve inlining in ADVANCED optimization mode 2020-02-14 12:46:57 +03:00
Alexey Andreev
fecdd6613a Use tab character to indent stack traces 2020-02-14 10:39:50 +03:00
Alexey Andreev
289bfc9488 C: fix Function.get when getting function from different class 2020-02-10 19:52:17 +03:00
Alexey Andreev
a414a7979c Fix NPE 2020-02-10 17:08:25 +03:00
Alexey Andreev
3b1dae4412 Fix <clinit> elimination in case of native methods 2020-02-10 16:37:32 +03:00
Alexey Andreev
8cba925a89 C: fix bug in deobfuscator 2020-02-04 17:37:00 +03:00
Alexey Andreev
f4ec4872c5 C: fix crash when creating stack trace triggers GC 2020-02-04 14:25:22 +03:00
Alexey Andreev
45d36eac83 C: fix crash on GC when there are queued WeakReference instances in the heap
When performing young GC, we can encounter some WeakReferences which get into
corresponding ReferenceQueue. In this case queue internal state will be updated.
After it defragmentation phase runs which updates references to relocated objects.
For performance reason, defragmentation phase scans only regions either
marked with write barriers or regions that contain surviving objects in
young generation. However, sometimes a queue can be in neither of these sets,
so we additionally mark regions containing all affected queues.
2020-01-31 18:23:50 +03:00
Alexey Andreev
374f7c6634 C: allow to define custom logging functions. Use unified logging function within VM 2020-01-30 18:18:16 +03:00
Alexey Andreev
f13a7e6375 C: fix Strings.fromC/fromC16 methods 2020-01-30 15:41:37 +03:00
Alexey Andreev
7a2cd6ae4f Fix more bugs in devirtualization 2020-01-24 16:23:28 +03:00
Alexey Andreev
2d2ef642a3 Fix virtual method resolution in code server mode 2020-01-23 19:03:47 +03:00
Alexey Andreev
c53a563e96 Fix bug in devirtualization while inlining 2020-01-23 15:53:11 +03:00
Alexey Andreev
4776bebe8e C/Wasm: fix incorrect removal of GC root in optimizer 2020-01-22 17:16:44 +03:00
Alexey Andreev
a35a10bbc6 Reduce GC region size 2020-01-22 13:15:57 +03:00
Alexey Andreev
1ac0f7156c C/Wasm: fix OOME from compiled application 2020-01-22 13:15:57 +03:00
adamjryan
34aed76714 Add write replace method to lambdas that implement java.io.Serializable (#453)
Add write replace method to lambdas that implement java.io.Serializable

* Peripheral java library classes added as part of the toString method
of SerializedLambda to align functionality with the standard library.
* Test added that checks the SerializedLambda can be returned and that
it is populated with the correct values including it's toString method.
2020-01-15 11:11:48 +03:00
Alexey Andreev
9d0a53175a Do not insert GC write barriers when value assigned to field is known to be null or constant literal 2019-12-05 15:36:32 +03:00
Alexey Andreev
72fc62f082 Fix bug that causes heap to grow without need 2019-12-05 15:07:18 +03:00
Alexey Andreev
a7df41d41d Fix debugging when script is included with additional query string 2019-12-04 15:28:40 +03:00
Alexey Andreev
e147a998e5 Remove performance optimization that causes bug when modifying class hierarchy within class transformers 2019-12-04 12:41:41 +03:00
Alexey Andreev
16f4d2571b Support generations in GC 2019-12-03 12:10:55 +03:00
Alexey Andreev
d71aec7c40 Fix bug when boxing primitive value inside lambda to supertype (e.g. java.lang.Object) of corresponding wrapper type 2019-11-18 12:34:55 +03:00
Alexey Andreev
631111bdb3 Fix potential NPEs in compiler and native runtime 2019-11-18 11:24:47 +03:00
Alexey Andreev
099b9c5827 C: add stack trace deobfuscation tool 2019-11-06 14:02:56 +03:00
Alexey Andreev
e164015bfa C: another fix for GC when passing strings from native to Java 2019-11-06 11:19:02 +03:00
Alexey Andreev
3335b86619 C: fix exception when marshalling string from native code to Java and GC is triggered 2019-11-05 18:14:09 +03:00
Alexey Andreev
c05f40cc6a C: improve performance of heap dump to hprof converter 2019-11-05 14:01:56 +03:00
Alexey Andreev
9bdec1fdb2 C: fix the way how UWP env is detected in preprocessor 2019-10-31 14:37:49 +03:00
Alexey Andreev
fb78377db8 Fix various issues reported by PVS Studio and LGTM 2019-10-31 14:36:37 +03:00
Alexey Andreev
beef9e09ca C: fix bug in exception handling 2019-10-31 14:18:29 +03:00
Alexey Andreev
81cc3c156e Add optimization that eliminates repeated access to fields 2019-10-30 16:09:17 +03:00
Alexey Andreev
511160935f C: add missing include 2019-10-30 16:08:11 +03:00
Alexey Andreev
2bfc5b5305 JS: fix error in strict mode when NPE is never instantiated directly 2019-10-30 15:40:28 +03:00
Alexey Andreev
6bfbd38e22 Fix bug in decompiler that causes expression statement containing || or && with side effects to be removed 2019-10-30 13:38:47 +03:00
Alexey Andreev
15be89a758 JS: fix source map generation in some cases 2019-10-28 14:33:53 +03:00
Alexey Andreev
6ed00f1af2 C/Wasm: fix heap corruption when GC hits on initializing stack trace of exception 2019-10-28 13:59:03 +03:00
Alexey Andreev
4f9567561c Fix WASM backend 2019-10-23 18:30:16 +03:00
Alexey Andreev
3b4cc43e79 C: add option to strip off information about call site locations.
This decreases executable size significantly. However, this produces
obfuscated stack traces which can be deobfuscated using JSON symbol table.
2019-10-23 17:34:23 +03:00
Alexey Andreev
c78874f426 C/Wasm: don't generate names for classes when possible 2019-10-23 14:11:24 +03:00
Alexey Andreev
f7620704fc C/Wasm: fix bugs in GC 2019-10-22 19:05:37 +03:00
Alexey Andreev
70cb67c8f0 Fix bug in WASM backend 2019-10-18 17:09:57 +03:00
Alexey Andreev
8a91605c56 Add support for Class.getCanonicalName/getEnclosingClass 2019-10-18 15:10:16 +03:00
Alexey Andreev
8038f90fd8 Support new format of debug information in C and WASM
This allows to keep proper stack traces in FULL optimization mode,
when aggressive inlining is applied
2019-10-15 11:47:40 +03:00
Artem Godin
e46f204b4e #431: Add support for char annotation methods
Fixes #431
2019-10-14 14:06:21 +03:00
Alexey Andreev
4ef231c7fa JS: preserve stack trace items when agressive inlining enabled 2019-10-14 14:05:06 +03:00
Alexey Andreev
e762f26a40 Keep location stack in IR when inlining methods 2019-10-08 16:09:07 +03:00
Alexey Andreev
378111d767 C: fix generation of heap dump 2019-10-07 17:43:18 +03:00
Alexey Andreev
94a96f571b C: support array bound checking 2019-10-07 16:55:31 +03:00
Alexey Andreev
6f50eefaf9 JS: add null check in strict mode 2019-10-07 16:55:30 +03:00
Alexey Andreev
bffb50f0cd Implement array bounds checking in JavaScript 2019-10-07 16:55:30 +03:00
Alexey Andreev
a1d7153cab Add instruction to perform array bound check 2019-10-07 16:55:30 +03:00
Matt McHenry
ec21f2d8e1 mark threading primitives unsupported on wasm
this gives much clearer feedback, at build time rather than runtime,
when attempting to use TeaVM with code that uses these operations.
2019-10-06 21:10:40 +03:00
Alexey Andreev
89ea97d00f JS: revert $rt_compare implementation since new one does not work properly 2019-10-04 16:40:41 +03:00
Alexey Andreev
3194a403b8 C/Wasm: reduce memory consumption in GC 2019-10-02 13:55:23 +03:00
Alexey Andreev
ae896f3d90 WASM: bugfixes 2019-10-01 14:52:28 +03:00
Max Graey
e23293a8af Minor improvements for javascript runtime (#425) 2019-10-01 11:29:30 +03:00
Alexey Andreev
810ee0f49e JS: fix crash on some JavaScript constructs in hand-written runtime code 2019-09-30 18:36:05 +03:00
Alexey Andreev
3b170df2ca Fix nullness information builder 2019-09-30 18:23:38 +03:00
Alexey Andreev
a2a9dbcbe3 Improve performance of inliner in FULL optimization level
The former implementation suffered from class inference.
The reason was in many nodes having too many possible classes in them.
The new implementation does not handle full set of classes in each node.
Instead, it introduces concept of 'overflow', i.e. node having
more types than the given upper limit.
These nodes behave as if there were all possible classes in them,
which allows to apply certain optimization for these nodes and
omit heavy computations of large type sets.
2019-09-27 16:36:55 +03:00
Alexey Andreev
fe3436f053 C/Wasm: resizable heap 2019-09-24 17:48:17 +03:00
Alexey Andreev
f0b6cc2f30 Update version to 0.7.0 2019-09-24 16:26:14 +03:00
Alexey Andreev
5643e82a3d C: minor fixes for Linux 2019-09-07 22:08:32 +03:00
Alexey Andreev
5b739238c2 More efficient filesystem implementation 2019-09-05 17:11:43 +03:00
Alexey Andreev
6e6783f93d C: regenerate only as small amount of classes as possible during incremental build 2019-09-04 19:04:12 +03:00
Alexey Andreev
e33cc5a807 C: split runtime into smaller parts 2019-09-03 14:01:30 +03:00
Alexey Andreev
9e9866398b C: generate return statement in main function 2019-08-29 14:34:06 +03:00
Alexey Andreev
6b0b30cb23 C: fix duplicate call of some <clinit> methods when using reflection 2019-08-29 14:33:23 +03:00
Alexey Andreev
5a8284222a C: fix support of weak references in GC 2019-08-26 19:50:10 +03:00
Alexey Andreev
f028f8db37 JS: don't remove class name from metadata when it's referenced indirectly from array class 2019-08-26 16:44:10 +03:00
Alexey Andreev
7a03ad6c5e Fix issue with <clinit> methods introduced by previous commit 2019-08-23 14:26:33 +03:00
Alexey Andreev
ed627459c8 Fix issue with async methods in code server 2019-08-23 13:44:03 +03:00
Alexey Andreev
492fd004af C: add ability to write heap dump when application crashes 2019-08-19 15:51:41 +03:00
Alexey Andreev
97f9967153 Make SSA and non-SSA liveness analyses. Fix aliasing local variable names with special variables.
Fix #416
2019-08-14 12:40:58 +03:00
Alexey Andreev
6307a67f8f C: allow to redefine directory where to write GC trace files 2019-08-13 13:40:25 +03:00
Alexey Andreev
67c86b089f Fix bug in liveness analysis when running on non-SSA IR 2019-08-13 11:37:21 +03:00
Alexey Andreev
c5334e344d C: add setting to generate code with lots of assertions 2019-08-12 15:12:48 +03:00
Alexey Andreev
0fdf58cbd8 C: implement heap defragmentation in GC 2019-08-12 15:12:27 +03:00
volth
d750847a19 teavm_printString: fix on linux 2019-08-07 19:11:56 +03:00
Alexey Andreev
dcd1f64c81 JS: fix instanceof T[], where T is non-primitive type 2019-08-07 18:34:06 +03:00
Alexey Andreev
e16ba8a6ca C: don't treat primitives as subtypes of Object. Fix #411 2019-08-07 13:45:40 +03:00
volth
2e27a3c218 fix ci 2019-08-07 13:14:20 +03:00
volth
c7309c06d0 ClassGenerator.prepare: handle IsInstanceInstruction case 2019-08-07 13:14:20 +03:00
Alexey Andreev
a5ba6f247e Fix register allocator 2019-07-30 11:23:52 +03:00
Alexey Andreev
1074293aad C: properly print stack trace when application crashes in Windows 2019-07-30 11:23:52 +03:00
Alexey Andreev
d9361e339a C: fix file IO in UWP 2019-07-26 17:00:13 +03:00
Alexey Andreev
c80e9ee431 C: don't add native functions to GC roots 2019-07-26 16:59:58 +03:00
Alexey Andreev
a9ba21889a C: generate unreachable hint after throw statement to avoid compiler warnings 2019-07-23 18:19:40 +03:00
Alexey Andreev
ca3b565210 C: improve null check implementation 2019-07-23 16:33:13 +03:00
Alexey Andreev
a260067fde C: fix bug in GC 2019-07-23 14:15:59 +03:00
Alexey Andreev
90e00f7eb4 C: add option to support exceptions via setjmp/longjmp 2019-07-22 16:53:47 +03:00
Alexey Andreev
114ad986e4 C: fix initialization code 2019-07-15 19:34:02 +03:00
Alexey Andreev
db911c6623 C: fix compilation on Linux 2019-07-15 15:22:43 +03:00
Alexey Andreev
a240537e36 C: reduce number of synthesized null checks 2019-07-12 14:07:57 +03:00
Alexey Andreev
cdcaa8947c C: fix bugs in exception handling lowerer 2019-07-11 15:56:03 +03:00
Alexey Andreev
f264865cc1 C: fix bugs in exception handling lowerer 2019-07-09 17:57:28 +03:00
Alexey Andreev
94996a5e00 C: don't define WIN32_LEAN_AND_MEAN 2019-07-09 15:52:19 +03:00
Alexey Andreev
8a359c6434 C: fix GC 2019-07-09 14:41:53 +03:00
Alexey Andreev
3ed75a97d4 C: fix insertion of shadow stack instructions 2019-07-09 14:41:39 +03:00
Alexey Andreev
f4f80a88ea C: fix minor compiler warnings 2019-07-09 11:40:39 +03:00
Alexey Andreev
4fa3db38a0 C: improve resolution of System.currentTimeNano in Windows 2019-07-08 14:13:56 +03:00
Alexey Andreev
8667b98af5 C: fix incorrect phi placement after some IR transformations 2019-07-05 18:24:59 +03:00
Alexey Andreev
973cdf045b Always eliminate constant variables in AST optimizer 2019-06-28 22:23:50 +03:00
Andrey Mikhalev
5593a2c557 Fixed teavm_currentTimeNano() for MSVC 2019-06-28 12:15:01 +03:00
Alexey Andreev
da27628e19 C: fix bug in conversion from char16 C string to Java string 2019-06-26 15:26:13 +03:00
Alexey Andreev
a2b6c2be58 Fix bug in liveness analysis 2019-06-26 13:41:21 +03:00
Alexey Andreev
b6cfbe7f5b TeaVM(C): fix unnecessary call to Fiber.isResuming 2019-06-25 14:03:02 +03:00
Alexey Andreev
c430578426 Improve GVN 2019-06-23 23:39:40 +03:00
Alexey Andreev
2c6068b36a JS: reduce the probability of colliding local variable name with a keyword 2019-06-22 23:56:32 +03:00
Alexey Andreev
62b3c68a5b Don't report compile-0time error when there's possible way to reach suspension point. Generate runtime error instead. 2019-06-22 23:30:05 +03:00
Alexey Andreev
c28d9ef68d C: fix GC hanging when main function receives 0 for argc 2019-06-20 17:41:35 +03:00
Alexey Andreev
aeb5f44922 C: allow to change main function name 2019-06-20 17:13:08 +03:00
Alexey Andreev
a65f8fdcd9 C: reduce number of warnings, redirect console to debugger in Windows 2019-06-20 15:06:15 +03:00
Alexey Andreev
9e4c3010b0 C: fix compilation on UWP 2019-06-18 19:17:09 +03:00
Alexey Andreev
b72e4f01e2 C: fix coroutine generation 2019-06-17 17:45:34 +03:00
Alexey Andreev
00ca2c1064 C: fix compilation in Linux 2019-06-17 15:58:19 +03:00
Alexey Andreev
9642eeec0a C: support passing strings as char16_t*, fix bugs under msvc 2019-06-17 15:16:44 +03:00
Alexey Andreev
6e71fa7e87 C: implement file IO in Windows 2019-06-14 15:32:20 +03:00
Alexey Andreev
2c67cc3eb9 C: fix initialization order of system classes 2019-06-10 13:16:27 +03:00
Alexey Andreev
7831fd328f C: allow to put 'struct' keyword before references to native structures 2019-06-06 18:37:37 +03:00
Alexey Andreev
c84ae57b3a C: native structures 2019-06-03 18:27:08 +03:00
Alexey Andreev
3fe3aa5847 C: fix NPE when building application with errors 2019-05-31 17:37:05 +03:00
Alexey Andreev
91de1f6ca7 C: implement native file system 2019-05-31 15:05:23 +03:00
Alexey Andreev
2ba4ce0977 Fix inability to synchronize using array object
See #393
2019-05-29 22:49:13 +03:00
Alexey Andreev
1ca635fac6 JS: fix rethrowing uncaught exception
See #394
2019-05-29 21:37:34 +03:00
Alexey Andreev
d17b459ecc C: fix MSVC support 2019-05-28 20:13:14 +03:00
Alexey Andreev
1899641f63 C: when converting between C and Java strings, properly handle illegal characters 2019-05-27 17:39:10 +03:00
Alexey Andreev
d818b62686 C: fix bug in virtual table builder 2019-05-27 11:57:57 +03:00
Alexey Andreev
fdb3f5edb1 C: improve incremental compiler performance. Generate text file with list of c files to compile 2019-05-24 12:10:18 +03:00
Alexey Andreev
28c0cc6ef2 Wasm: fix bugs 2019-05-23 23:38:10 +03:00
Alexey Andreev
871e9a0113 C: reduce size occupied by call site descriptors 2019-05-23 18:43:31 +03:00
Alexey Andreev
9de7df6fdf C: pack virtual tables 2019-05-23 17:34:08 +03:00
Alexey Andreev
063a9f049e C: less code for virtual calls 2019-05-23 15:26:35 +03:00
Alexey Andreev
8b3df6f730 C: fix bugs, introduce new virtual table builder 2019-05-23 15:18:25 +03:00
Alexey Andreev
7f875aa568 C: support methods of Date class 2019-05-21 15:17:58 +03:00
Alexey Andreev
bb9ca77349 JS: fix bug in debugger 2019-05-17 18:51:34 +03:00
Alexey Andreev
2eafb902f4 C: support weak references 2019-05-17 17:40:45 +03:00
Alexey Andreev
4c50ed8714 C: fix generation of '#line' directive 2019-05-17 17:39:29 +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
816434500c C: fix virtual tables 2019-05-16 18:58:36 +03:00
Alexey Andreev
f5c2cf0fa3 C: fix generation of virtual tables inheriting interface default methods 2019-05-16 18:50:03 +03:00
Alexey Andreev
b3b324d73c C: add missing include to all.c 2019-05-16 17:08:50 +03:00
Alexey Andreev
8e08cf6dcd C: improve generation of string pool for incremental mode 2019-05-16 16:53:40 +03:00
Alexey Andreev
0003ed0bb2 C: generate '#line' preprocessor directive 2019-05-16 11:12:35 +03:00
Alexey Andreev
054db3e8d1 C: incremental code generator 2019-05-15 15:16:18 +03:00
Alexey Andreev
ca50f72fe9 Fix displaying diagnostics in out-of-process mode 2019-05-14 14:46:44 +03:00
Alexey Andreev
3d96616761 JS: reduce precision of float constants 2019-05-13 17:39:18 +03:00
Alexey Andreev
a1aa25afa0 C: fix generation of relative path in 'include' directive 2019-05-13 10:49:36 +03:00
Alexey Andreev
da22256c1f C: compile into multiple .c and .h files 2019-05-08 17:36:46 +03:00
Alexey Andreev
7ef639ec8a Fix bug in GC 2019-04-29 16:24:07 +03:00
Alexey Andreev
ea5dd80199 C/Wasm: fix bugs in GC root detector 2019-04-29 16:24:07 +03:00
Alexey Andreev
5a346fd3a4 Fix issue in inliner 2019-04-29 16:24:07 +03:00
Alexey Andreev
093b506c9a Improve resolution of System.nanoTime 2019-04-29 16:24:07 +03:00
Alexey Andreev
8a45dc300c C backend: fix bug Class implementation. Don't emit unnecessary Object.monitor field 2019-04-26 18:26:23 +03:00
Alexey Andreev
da68fa0083 Wasm backend: fix 2019-04-26 17:10:28 +03:00
Alexey Andreev
20866637e7 C backend: exit application and print stack when getting out of memory error 2019-04-26 14:04:07 +03:00
Alexey Andreev
87656a3e9a C backend: fix array of of bounds access in fibers 2019-04-26 12:41:17 +03:00
Alexey Andreev
8cd96d2da2 C backend: fix passing NULL arrays to native methods 2019-04-26 12:40:51 +03:00
Alexey Andreev
f828d049c4 C backend: bugfixes 2019-04-23 19:56:16 +03:00
Alexey Andreev
cbc8d3f638 C backend: bugfixes 2019-04-22 19:03:37 +03:00
Alexey Andreev
2a6ca2d0d8 C backend: bug fixes and interop improvements 2019-04-19 18:41:02 +03:00
Alexey Andreev
cfd6b64899 Remove debugging code 2019-04-15 16:47:46 +03:00
Alexey Andreev
83d041d55b Improve compilation performance of low-level backends 2019-04-05 14:37:02 +03:00
Alexey Andreev
7551cd1ec6 C: fix bugs in GC 2019-04-05 13:08:16 +03:00
Alexey Andreev
ec8bae1d40 C: fix bugs in RTTI. Support args parameter of main method 2019-04-04 18:34:30 +03:00
Alexey Andreev
91cf9917c7 JS: fix deobfuscated parameter names. Generate less local variables 2019-04-02 19:15:48 +03:00
Alexey Andreev
e6bb91bfb0 JS: fix coroutines 2019-04-02 17:12:53 +03:00
Alexey Andreev
fe68bf700b Improve performance of array creation 2019-04-02 17:04:51 +03:00
Alexey Andreev
a9c4ab6aa4 Support generic type signatures in IR 2019-03-31 21:32:41 +03:00
Alexey Andreev
45d31da85c Make clinit optimization weaker in order to properly handle case
when clinit method reads state that was set somewhere in main method
2019-03-27 19:34:30 +03:00
Alexey Andreev
d2a7e31eca Proper fix for recent bug in C backend. Fix Thread.daemon flag 2019-03-27 18:29:02 +03:00
Alexey Andreev
0dc170dad2 Fix bugs in C backend 2019-03-26 19:09:25 +03:00
Alexey Andreev
46d76f7acf Fix <clinit> optimization issues 2019-03-25 15:09:23 +03:00
Alexey Andreev
103affa392 Partially revert previous <clinit> commit.
Generate calls to <clinit> methods, since corresponding analyzer
guarantees proper initialization order.
2019-03-24 22:51:17 +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
f664d94d74 Allow to exclude certain classes, fields and methods from compilation 2019-03-21 17:00:22 +03:00
Alexey Andreev
36041b4107 Fix issues with call graph serialization 2019-03-13 19:19:05 +03:00
Alexey Andreev
731beb5cd5 Fix bugs in threading in C backend 2019-03-13 18:47:30 +03:00
Alexey Andreev
eeaa71072a Fix IR serialization issue 2019-03-11 18:36:10 +03:00
Alexey Andreev
a8226ef6a3 Decrease memory consumption 2019-03-11 17:27:51 +03:00
Alexey Andreev
94322e5f6e Get rid of Mapper interface in favour of Function 2019-03-11 13:27:34 +03:00
Alexey Andreev
3acf1f9538 Fix issues with new IR serialization format 2019-03-11 12:14:10 +03:00
Alexey Andreev
abdd9b3270 C backend: support coroutines 2019-03-10 14:04:04 +03:00
Alexey Andreev
578912056b Reduce memory used by initial class reader 2019-03-07 19:27:07 +03:00
Alexey Andreev
fcfa998e1c Reduce memory used by call graph in dev server mode 2019-03-07 16:51:00 +03:00
Alexey Andreev
88dca1bd02 Decrease memory consumption during compilation 2019-03-06 16:51:01 +03:00
Alexey Andreev
2a1aca98da Use shared ReferenceCache between different stages of compilation 2019-03-05 19:32:50 +03:00
Alexey Andreev
3c9a3bb359 Store AST cash in binary format. Introduce more compact
AST serialization format.

Reduce memory consumption of incremental compilation on dev server
2019-03-05 19:06:21 +03:00
Alexey Andreev
573c5f6064 Reduce memory consumption of incremental compilation on dev server 2019-03-05 16:50:16 +03:00
Alexey Andreev
35730d665f Decrease memory consumption 2019-02-27 13:24:50 +03:00