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
Alexey Andreev
ade00cc984
C backend: fix bugs
2019-02-26 00:10:22 +03:00
Alexey Andreev
2c40c7d56e
Trying to decrease compiler memory consumption
2019-02-25 18:31:34 +03:00
Alexey Andreev
95092c4d82
Refactor things around decompiler, JS backend and control flow debug info
2019-02-25 16:10:35 +03:00
Alexey Andreev
3be32a5851
JS: don't generate square brackets in 'if' bodies, when possible.
...
Generate mangled name for $rt_wrapException
2019-02-25 11:30:30 +03:00
Alexey Andreev
a8f1940df3
Fix bugs in debugger
2019-02-22 17:19:19 +03:00
Alexey Andreev
4a325a192e
Update inlining thresholds due to changes in scoring algorithm
2019-02-13 19:31:57 +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
6790d724c7
Further improvements to inliner
2019-02-13 13:42:44 +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
89189c7454
Fix bugs in debugger
2019-02-12 12:10:33 +03:00
Alexey Andreev
bc41b12f0e
JS: fix bug in generating async functions in minified mode
2019-02-07 17:15:32 +03:00
Alexey Andreev
1b2c47407f
Place classes to a single object in development server to improve debugger performance
2019-02-07 16:29:55 +03:00
Alexey Andreev
95a3a30a6e
Fix html4j tests
2019-01-31 19:20:14 +03:00
Alexey Andreev
7d2c76f711
Fix compiler crash when using incremental pipeline
2019-01-30 19:36:00 +03:00
Alexey Andreev
35ca7fd152
Add lazy compilation pipeline that can work a little bit faster in incremental compiler
2019-01-30 19:00:07 +03:00
Alexey Andreev
5be34dcf44
Proper fix for virtual table issue.
...
C: prevent from generating identifiers that clash with keywords
2019-01-30 15:00:49 +03:00
Alexey Andreev
daeaa502d6
JS: deobfuscate stack traces for wrapped native exceptions
2019-01-30 14:32:43 +03:00
Alexey Andreev
42aedf770b
Fix bugs in C backend
2019-01-28 14:57:34 +03:00
Alexey Andreev
f734603255
JS: prevent TeaVM from generating URL function
2019-01-27 23:42:05 +03:00
Alexey Andreev
78c55437e3
Add stack deobfuscation to dev server
2019-01-24 16:28:30 +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
74997d277b
Fix bugs in try/catch decompilation
2019-01-15 21:49:33 +03:00
Alexey Andreev
3c8184c3b7
Fix bug in nullness analysis when variable graph has irreducible loops
2019-01-14 14:08:12 +03:00
Alexey Andreev
1fabe4c5b9
Fix passing checkstyle
2019-01-09 12:54:38 +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
58c19e3abc
Minor fixes in development toolchain
2018-12-25 18:45:26 +03:00
Alexey Andreev
4ffe74296d
Limit max line size of generated JS code
2018-12-21 14:28:30 +03:00
Alexey Andreev
96f77b2f08
Fix stack overflow when decoding large Java strings
2018-12-20 17:25:02 +03:00
Alexey Andreev
43cda1223c
Fix class initialization when writing to its static field
2018-12-20 16:59:15 +03:00
Alexey Andreev
a4b61bac19
Fix bugs in debugger
2018-12-19 19:28:35 +03:00
Alexey Andreev
75295f50e5
Make debugging API asynchronous
2018-12-19 18:13:15 +03:00
Alexey Andreev
d7d4dc1571
Add IDEA run configuration that runs dev server
2018-12-16 20:42:21 +03:00
Alexey Andreev
bab0cd59a6
Improve performance and stability of development server and incremental compilation
2018-12-13 18:45:44 +03:00
Alexey Andreev
c9c9c15dfe
Fix Class.initialize. Fix html4j tests
2018-12-11 23:47:47 +03:00
Alexey Andreev
d968b20e4c
Fix generation of integer multiplication in minified mode. Fix String.intern() (see #370 )
2018-12-11 17:42:14 +03:00
Alexey Andreev
eec458089f
Implement development server
2018-12-10 19:03:18 +03:00
Alexey Andreev
952ed3f193
Fix diagnostics no printed from teavm-cli. Fix diagnostics of unavailable classes and methods
2018-12-09 19:54:04 +03:00
Alexey Andreev
d74bcbe2b9
Fast dependency analyzer, fix bugs in incremental compiler
2018-12-07 17:41:21 +03:00
Alexey Andreev
eaf0f5a24e
Fix bootstrap compiler
2018-12-07 17:41:20 +03:00
Alexey Andreev
3209909c8b
Fix build
2018-12-07 01:30:13 +03:00
Alexey Andreev
1b83519280
Reduce minumus JS runtime a little
2018-12-07 00:52:05 +03:00
Alexey Andreev
2bb146af47
Improve float to string conversion
2018-12-07 00:21:18 +03:00
Alexey Andreev
f23c71cd97
Improve double to string conversion
2018-12-02 16:12:59 +03:00
Alexey Andreev
1cf3cce076
Reduce minimum runtime size
2018-12-01 23:07:03 +03:00
Alexey Andreev
45d0a13c9b
In HtmlUnit, decode stack traces for all constructed exceptions
2018-11-26 15:58:51 +03:00
Alexey Andreev
0c03379206
Fix inability to catch exception when calling just created lambda
2018-11-26 14:49:03 +03:00
Alexey Andreev
85f901362f
Wrap native JS exceptions as java.lang.RuntimeException
2018-11-26 14:01:50 +03:00
Alexey Andreev
b018e61615
Fix converting method to state machine in some cases. Fix #366
2018-11-25 18:46:45 +03:00
Alexey Andreev
a3dfc0c486
Add API to catch native JS exceptions
2018-11-23 19:54:37 +03:00
Alexey Andreev
cf9090e0fa
Use JS typed arrays to reinterpret floats and ints.
...
Also, drop IE9 support
2018-11-23 17:14:06 +03:00
Alexey Andreev
0376a46c06
Fix extra space added after new expression
2018-11-23 12:13:13 +03:00
Alexey Andreev
d50189ea3a
Add decoding of stack trace in JUnit adapter
2018-11-23 12:09:26 +03:00
Alexey Andreev
6d2815bc5c
Support running JUnit3 tests and improve support of JUnit4
2018-11-22 19:51:33 +03:00
Alexey Andreev
cd7a702c31
Trying to fix Travis build
2018-11-22 15:40:32 +03:00
Alexey Andreev
753755918d
Update build config to avoid jar hell
2018-11-22 14:49:30 +03:00
Alexey Andreev
0f951f8c86
Fix calculating class name in debugger
2018-11-19 15:29:02 +03:00
Alexey Andreev
f2dd398719
Fix bug in source map generation
...
This bug caused metadata lines that follow after the code
generated from Java bytecode, to be mapped to the line in
Java bytecode of the method that appears last in the generated
JavaScript
2018-11-18 02:11:28 +03:00
Alexey Andreev
148c07336c
Generate entire code inside wrapper IIF
2018-11-15 12:47:25 +03:00
Alexey Andreev
fe151d525a
Prevent generation of function names that clash with standard objects
2018-11-14 13:55:36 +03:00
Alexey Andreev
064888c9a1
Support Java 11
2018-11-12 18:59:28 +03:00
Alexey Andreev
4a7b70e1e8
Wasm: fix the way '!' expression translated. Also fix #365
2018-11-06 14:34:18 +03:00
Alexey Andreev
4d2c075c07
Always embed runtime into generated file. Remove 'runtime' build property
2018-10-28 00:15:36 +03:00
Alexey Andreev
63b2440e48
Remove $rt_global and indirect references to runtime function
2018-10-27 22:42:25 +03:00
Alexey Andreev
1b78ef99a6
Fix bugs in node splitting or irreducible graphs
2018-10-24 18:16:59 +03:00
Alexey Andreev
ef011d429d
Ignore flaky test
2018-10-19 17:20:07 +03:00
Alexey Andreev
8a55510d4f
Fix bug in dependency analyzer
2018-10-19 14:47:34 +03:00
Alexey Andreev
f206cbe2d1
Reorder modifiers to get less metadata size
2018-10-04 19:07:23 +03:00
Alexey Andreev
4c4c589172
Various code size optimizations
...
1. Generate 'a' for 'this' instead of '$t'
2. Fix frequency-based identifier optimization
3. Generate less code in <clinit> callers
4. Generate one-letter identifier in most of constructors
(instead of $r)
5. Use $ and _ chars in identifiers
2018-10-04 16:29:05 +03:00
Alexey Andreev
b66053f5ce
Don't generate virtual wrappers for methods that aren't ever called virtually
2018-10-04 11:55:34 +03:00
Alexey Andreev
681e21ecca
Store class names in metadata as a pair of package and simple name
2018-10-03 16:01:37 +03:00
Alexey Andreev
0a94c91ff2
Don't generate unused class names in metadata section
2018-10-03 14:46:52 +03:00
Alexey Andreev
be21e474c5
Generate shorter <clinit> caller names in minified mode
2018-10-03 12:48:14 +03:00
Alexey Andreev
6b063bc567
Some code size optimizations
...
1. Eliminate empty switch statements
2. Eliminate unnecessary == 0 and != 0 conditions in 'if'
2018-10-03 11:57:51 +03:00
Alexey Andreev
168bf1fa9c
Add option to print size statistics of generated JS code
2018-10-03 11:08:15 +03:00
Alexey Andreev
0473020bc8
Prevent from generating functions with NaN identifier
2018-09-04 17:28:10 +03:00
Alexey Andreev
50573f4f06
Prevent minifier from generating NaN function
2018-08-30 11:10:23 +03:00
Alexey Andreev
f5c6ac9c5d
Improve performance of dependency analyzer, decrease memory consumption
2018-08-29 13:20:16 +03:00
Alexey Andreev
365e47882a
Avoid generation of too deeply nested expressions to fit into v8 parser stack
2018-08-27 22:08:03 +03:00
Alexey Andreev
d6363c5fbf
Fix NPE in dependency analyzer. Fix excessive types propagating in dependency analyzer
2018-08-27 16:17:23 +03:00
Alexey Andreev
558c3f2f1e
Fix bugs in dependency analyzer, introduced by previous optimizations
2018-08-23 13:26:26 +03:00
Alexey Andreev
0ebf8c2f6e
Reduce memory consumption
2018-08-20 18:56:16 +03:00
Alexey Andreev
2dd145a731
Improve performance of dependency analysis
2018-08-20 18:41:08 +03:00
Alexey Andreev
7f46c301bd
IDEA: allow to configure build daemon heap size
2018-07-31 16:31:09 +03:00
Alexey Andreev
67afe6173e
Improve performance of compilation of large code bases
2018-07-31 12:14:53 +03:00
Alexey Andreev
5b5417d46b
Improve performance of dependency analysis
2018-07-04 11:53:53 +03:00
Alexey Andreev
4e20a1de18
Properly handle checkcast to array type in dependency analyzer
2018-07-03 19:11:51 +03:00
Alexey Andreev
3653e39bec
Add system property that triggers printing of dependency analyzer summary report
2018-06-29 17:32:26 +03:00
Alexey Andreev
f160ce2f2f
Use class/method names to generate lambda class names. Reduce number of types propagated by dependency analyzer
2018-06-29 16:46:36 +03:00
Alexey Andreev
097820cc2b
Wasm backend: implement remaining types of resources
2018-05-20 23:54:23 +03:00
Alexey Andreev
5ce48ce866
Wasm backend: fix issues related to instanceof expression
2018-05-19 22:56:16 +03:00
Alexey Andreev
27a4848947
Make more precise type inference. The old algorithm sometimes reported wrong results on multidimensional primitive arrays
2018-05-19 20:40:47 +03:00
Alexey Andreev
15b77ee752
Wasm backend: fix Array.get
2018-05-17 23:58:14 +03:00
Alexey Andreev
9b2e00cb9f
Wasm backend: support reinterpret conversion in C wasm emulator
2018-05-17 23:58:01 +03:00
Alexey Andreev
dbe31c43bf
Wasm backend: write function index in AST representation to make easier navigation and debugging
2018-05-17 19:39:22 +03:00
Alexey Andreev
bb3a2a22fe
C backend: add GTK version of jbox2d benchmark.
2018-05-17 01:14:37 +03:00
Alexey Andreev
c7b6544537
C backend: allow to pass Java string to C code
2018-05-16 23:20:20 +03:00
Alexey Andreev
f0d97a72ab
Wasm backend: add intrinsics for some Float and Double methods
2018-05-16 20:15:13 +03:00
Alexey Andreev
d7b57ae938
Update asm version to 6.1.1 and versions of Maven plugins that use old asm in order to support Java 10 bytecode version.
2018-05-15 16:20:20 +03:00
Alexey Andreev
d3a9f57c1c
C backend: avoid generation of deeply nested blocks and long lines (such code is rejected by MSVC).
2018-05-14 22:34:37 +03:00
Alexey Andreev konsoletyper@gmail.com
4d8f33d994
C backend: few fixes for MVSC
2018-05-14 01:15:29 +03:00
Alexey Andreev
76ca3f06cf
C backend: make compiled binary independent of load location
2018-05-13 23:27:27 +03:00
Alexey Andreev
8cf69db8bb
Wasm backend: copy wasm-runtime.js to the output directory. Fix wasm benchmark according latest changes
2018-05-13 19:45:25 +03:00
Alexey Andreev
c9ebe2e2e9
Wasm backend: fix more tests. Implement Array.get. Implement x instanceof C for all cases.
2018-05-13 19:17:45 +03:00
Alexey Andreev
f23128bb13
Wasm backend: fix many tests
2018-05-12 23:43:53 +03:00
Alexey Andreev
5e3514e5dd
Wasm backend: fix low-level memory copying function
2018-05-11 20:02:52 +03:00
Alexey Andreev
a81eeeee03
Wasm backend: fix hanging tests, make more tests pass, change name generation scheme
2018-05-10 17:41:28 +03:00
Alexey Andreev
b087610c2c
Wasm backend: make JUnit tests work
2018-05-08 23:31:51 +03:00
Alexey Andreev
f532801f38
C backend: implement support for ResourceArray and ResourceMap
2018-05-07 19:30:00 +03:00
Alexey Andreev
401a9ed212
C backend: improve representation of string literals, fix them for various corner cases
2018-05-06 00:48:27 +03:00
Alexey Andreev
37efbd742b
C backend: more bugfixes
...
* Fix cloning Object[] in 64-bit systems
* Fix generation of x instanceof Interface
* Fix a % b when a and b are float or double
* Fix generation of unreachable virtual calls
2018-05-05 23:35:17 +03:00
Michele Comignano
c11b868c0b
Add IdentityHashMap, improve distribution of identityHashCode
...
Add IdentityHashMap, improve distribution of identityHashCode
2018-05-05 22:05:22 +03:00
Alexey Andreev
ff07b28bee
C backend: fix bugs in exception handling transformer
2018-05-05 22:03:20 +03:00
Alexey Andreev
52ddd96c7d
Fix duplicate <clinit> execution in some cases when accessing class through reflection
2018-05-05 18:38:18 +03:00
Alexey Andreev
d2aa37d6a4
C backend: fix more bugs, pass more tests
2018-05-05 15:17:35 +03:00
Alexey Andreev
899725b6bd
C backend: fix bug in type inference, fix code generation for small int and long values
2018-05-04 19:05:11 +03:00
Alexey Andreev
4530167061
C backend: implement support for simple cases of resources
2018-05-01 00:54:11 +03:00
Alexey Andreev
ee2f389027
C backend: make more tests pass
2018-04-28 18:49:26 +03:00
Alexey Andreev
18eb3ee058
C backend: make more tests pass
2018-04-27 00:47:38 +03:00
Alexey Andreev
fa07100024
C backend: major improvements to interop
...
1. Function.get that allows to convert static Java method
to a C function pointer
2. Address.ofData that gets address (void*) of Java array data
3. `@Include` annotation to add `#include` to generated C
when using some method or class
2018-04-24 00:36:25 +03:00
Alexey Andreev
38267980fb
Run C test compilation in multiple threads
2018-04-21 12:24:31 +03:00
Alexey Andreev
8f0320e217
Fix bugs in C backend to make more tests pass
2018-04-21 00:55:43 +03:00
Alexey Andreev
4990dbe8e4
Add support for C backend in TeaVMTestRunner
2018-04-20 22:58:09 +03:00
Alexey Andreev
e77997c93f
Implement null check in C backend
...
Although initial purpose of this comment was null check,
it took much time to complete it and it caused many unrelated changes.
Besides just implementing null check in quite naive fashion
(I could not use the trick with memory protection, since I have to
maintain shadow stack, and support WebAssembly), I had to optimize
things. I relied on my existing nullness analysis to eliminate
as much null checks as possible. However, the whole nullness analysis
was wrong. After some thoughts I came up with solution very
close to range analysis, which required me to introduce extension
to IR sometimes called e-SSA form with so called sigma nodes.
Also, I found some bugs in few different places (by the time write this
message I could only remember escape analysis/scalar replacement and
after-inlining devirtualization) and fixed them.
2018-04-17 00:05:46 +03:00
Alexey Andreev konsoletyper@gmail.com
d9c5b3fd04
C backend: compatibility with msvc
2018-03-29 00:44:31 +03:00
Alexey Andreev konsoletyper@gmail.com
fe47fe19ce
Fix build under JDK9+
2018-03-28 22:54:55 +03:00
Alexey Andreev
0d1cb85067
C backend: generate code to buffer, simplify generator
2018-03-27 23:16:38 +03:00
Alexey Andreev
dc227e1e42
C backend: add support for Array.get
2018-03-21 22:44:22 +03:00
Alexey Andreev
05d0220dcd
C backend: initial commit
2018-03-20 23:18:52 +03:00
Alexey Andreev
540ad7f694
Uprage HPPC to 0.7.3
2018-03-20 19:10:36 +03:00
Alexey Andreev
de88541b64
Another fix for evaluation order in AST optimizer
...
See #330
2018-02-17 10:29:33 +03:00
Alexey Andreev
788e506175
Fix evaluation order when eliminating redundant variables from AST
...
See #330
2018-02-17 01:29:26 +03:00
Alexey Andreev
4f9110f7b1
Make graph.toString return dot representation of graph
2018-02-04 22:51:25 +03:00
Alexey Andreev
6d68010416
Improve speed of class inference during inlining
2018-02-04 22:29:51 +03:00
Alexander Gundermann
f548fc964c
WASM: fix opcodes
2018-01-28 19:21:45 +03:00
Alexey Andreev
ff7232ac3e
Improvements in reflection:
...
1. During dependency analysis, propagate class literals from
Class.forName return node
2. Use original class source to generate reflection metadata
3. Link classes when they appear in signature of reflectable methods
4. Turn Class.forName(string_literal) into class literal.
2018-01-27 00:21:50 +03:00
Alexey Andreev
f49ec16021
Replace non-strict equality comparisons with strict in runtime.js
2018-01-25 22:08:19 +03:00
Alexey Andreev
caaf2114bf
Fix error when superclass has final String fields
2018-01-25 21:53:28 +03:00
Alexey Andreev
85c686c72a
Remove outdated methodAliases build parameter
...
Replace classAliases with classesToPreserve
2018-01-09 23:38:30 +03:00
Alexey Andreev
10c706077a
When a value in debugger represents plain JavaScript object, show its native fields in watch window
2018-01-08 14:45:46 +03:00
Alexey Andreev
0c8013dfcf
When splitting async program, don't process same blocks twice
...
The old assumption was: if a block has instructions, it was already processed. However, that might be not true in some cases. This led to duplication of exception handlers in some blocks which in turn broken decompiler. From now on processed blocks are stored in a set.
2018-01-07 16:04:11 +03:00
Alexey Andreev
c15709994f
Fix bug in decompiling nested catch blocks with complex control flow
2017-12-03 18:39:57 +03:00
Alexey Andreev
a20d0b0855
Fix compile-time error when callable reference requires boxing
2017-11-26 13:14:02 +03:00
Alexey Andreev
a7ac256c47
Fix bug in AST optimization
2017-11-26 13:14:02 +03:00
Alexey Andreev
1200354a7b
Emit boolean constants as numbers
2017-11-26 13:14:02 +03:00
Alexey Andreev
ff19dc15c9
Further bootstrapping
2017-11-26 13:14:02 +03:00
Alexey Andreev
5fb1623c4e
Add utility method to automatically register extensions in bootstrap mode
2017-11-26 13:14:02 +03:00
Alexey Andreev
256814a60a
Support plugin loading from bootstrap environment
2017-11-26 13:14:02 +03:00
Alexey Andreev
fc4425d7f4
Add missing method to Properties
2017-11-26 13:05:34 +03:00
Alexey Andreev
62f639f92b
Properly report missing virtual methods
2017-11-19 14:36:04 +03:00
Alexey Andreev
3f487f8a7d
Add some useful implementations of ClassHolderSource and ResourceReader
2017-11-16 18:30:25 +03:00
Alexey Andreev
44e6feef0c
Add support for functions that return true or false depending on whether they run from TeaVM
2017-11-16 18:30:04 +03:00
Alexey Andreev
105c188953
Fix nested exception handlers
2017-11-16 00:19:00 +03:00
Alexey Andreev
945a0fee9d
Fix bug in dependency analyzer
2017-11-13 00:15:15 +03:00
Alexey Andreev
2bbdf6caba
Rename DependencyChecker to DependencyAnalyzer
2017-11-12 23:21:16 +03:00
Alexey Andreev
0f39dbbdd4
Minor code style improvements
2017-11-12 23:07:12 +03:00
Alexey Andreev
1b0bacd90c
Remove unused parts of call graph API
2017-11-12 23:06:58 +03:00
Alexey Andreev
edfbe01a7f
Improve performance of dependency analysis by filtering out propagated types that don't match types of method parameters and return values
2017-11-12 23:06:15 +03:00
Alexey Andreev
d811e7edbb
Improve performance of dependency analyzer
2017-11-11 00:48:39 +03:00
Alexey Andreev
f4c5b5073a
Minor performance improvement
2017-11-05 16:12:31 +03:00
Alexey Andreev
a9d47b5ce7
Improve performance of register allocator
2017-11-05 14:55:04 +03:00
Alexey Andreev
90e9792892
Improve DependencyChecker performance
2017-11-05 14:54:37 +03:00
Alexey Andreev
bc51940ce1
Another fix for array.clone() in Rhino and old browsers
2017-11-05 14:53:38 +03:00
Alexey Andreev
6817618b4e
Make primivive[].clone() work in older browsers and in Rhino
2017-11-05 12:29:02 +03:00
Alexey Andreev
344cb4e42d
Fix T[].clone()
2017-11-03 21:58:48 +03:00
Alexey Andreev
25011ee7a6
Remove outdated hack when Class.parent could be non-null for root classes
2017-10-29 21:41:49 +03:00
Alexey Andreev
c54b2b9e9e
Fix bug in escape analysis
2017-10-29 19:08:25 +03:00
Alexey Andreev
c224c57f98
Fix compiler crash when there's no method found during DCE
2017-10-26 15:50:46 +03:00
Alexey Andreev
775b5324b3
Fix WebAssembly codegen
2017-10-24 00:04:57 +03:00
Alexey Andreev
c82ed6746a
Fix compilation of WebAssembly samples
2017-10-22 20:22:24 +03:00
Alexey Andreev
de14a57fe1
Change how method resolution work in DCE and devirtualization.
...
Since in Java 8 there are default methods in interface, method
resolution algorithm becomes more complicated. This alseocauses
several related changes.
1. Resolve methods as late as possible; do not resolve
virtual call sites during DCE.
2. Due to several reasons we have to improve linking phase
to preserve super methods that aren't actually ever called,
but present in virtual call sites.
Related issue: #311
2017-10-22 17:56:31 +03:00
Alexey Andreev
880529dbe2
Fix compiler crash when can't find referring declarations
2017-10-05 14:59:09 +03:00
Alexey Andreev
12dded73f6
JS: add support for Class.getModifiers
2017-07-17 22:21:17 +03:00
Alexey Andreev
1581345e17
Properly report breakpoint hit event
2017-07-04 06:37:17 +03:00
Alexey Andreev
db97b7f732
Fix various issues in debugger
2017-07-02 16:25:11 +03:00
Alexey Andreev
434a3dd207
Fix IDEA debugger issues
2017-07-01 23:41:21 +03:00
Alexey Andreev
d4903d460b
Reformat test code to conform checkstyle settings
2017-07-01 15:47:46 +03:00
Alexey Andreev
cdec4560ba
Remove dumb comments containing only @author annotation
2017-07-01 13:13:52 +03:00
Alexey Andreev
59e5c16b31
Update version to 0.6.0-SNAPSHOT
2017-06-19 20:50:19 +03:00
Alexey Andreev
40b29cdfa1
Add support for altMetafactory
2017-06-18 21:22:44 +03:00
Alexey Andreev
45ba247265
When Java class gets exported to JS, generate bridges for its
...
methods so that these bridges perform type conversion
between Java and JS
2017-06-09 00:02:28 +03:00
Alexey Andreev
27bb8fe9ed
Rename object's $id
field to $id$
...
To avoid clash with user-defined fields
2017-06-07 12:46:43 +03:00
Alexey Andreev
ba7f07de4b
Copy default methods from interfaces to implementing classes
2017-06-06 22:42:21 +03:00
Alexey Andreev
2e8e3a65bd
Add IO bufferization
2017-06-01 16:14:24 +03:00
Alexey Andreev
288e3b97fe
Fix recognition of loop tree in a CFG
...
(cherry picked from commit 8f58b924628b87d13cfb8352d032a4932dcba17f)
2017-05-29 23:23:47 +03:00
Alexey Andreev
7019e1ada6
Workaround for bug in ASM which adds java/lang/Synthetic annotation twice. Should fix #278
2017-05-21 00:16:23 +03:00
Alexey Andreev
d882fd14a6
WASM: fix bug in GC
2017-05-15 22:04:30 +03:00
Alexey Andreev
b8b3aa7a53
WASM: fix name section
2017-05-15 00:39:20 +03:00
Alexey Andreev
4b6193baca
Fix bug in escape analysis. See #271
2017-05-08 18:44:58 +03:00
Alexey Andreev
812aa5a682
Fix bugs in textual IR parser and stringifier
2017-05-08 18:17:33 +03:00
Alexey Andreev
2d5f6a81c2
Improve peformance of Long.hashCode
2017-05-07 22:18:10 +03:00
Alexey Andreev
293e82a3c0
In class inference add rules for known types of method parameters
...
and method return value
2017-04-27 00:14:14 +03:00
Alexey Andreev
8d9240df36
When eliminating constant conditions, and removing dead branch,
...
also remove corresponding phi input to avoid clashes with further
optimizations
2017-04-25 22:57:57 +03:00
Alexey Andreev
058566e731
Fix bug in JSO
2017-04-22 14:11:24 +03:00
Alexey Andreev
8e67fe0168
Escape undefined unicode characters in string literal
2017-04-22 00:38:04 +03:00
Alexey Andreev
f347de44a9
WASM: fix metadata intrinsics
2017-04-17 00:09:14 +03:00
Alexey Andreev
9e6061c3f1
WASM: implementing intrinsics to access resources
2017-04-17 00:09:14 +03:00
Alexey Andreev
05d4652c86
WASM: add intrinsic that writes metadata to static binary
2017-04-17 00:09:14 +03:00
Alexey Andreev
f716a4be62
WASM: refactoring resource generator
2017-04-17 00:09:14 +03:00
Alexey Andreev
f1da7a417e
WASM: preparing to implement metadata API
2017-04-17 00:09:14 +03:00
Alexey Andreev
530fe1d277
JS: remove references to window. See #269
2017-04-15 13:40:54 +03:00
Alexey Andreev
54accaff5b
WASM: use signed comparison for lookupswitch
2017-04-15 12:22:35 +03:00
Alexey Andreev
63025a57b7
WASM: fix reverse subtyping relation in exception handling
2017-04-15 12:04:09 +03:00
Alexey Andreev
3ad16e80c7
WASM: add support for Enum.valueOf and Class.isEnum
2017-04-10 22:27:24 +03:00
Alexey Andreev
d09affce85
WASM: fix translation of lookupswitch when min and max values differ by
...
more than 2^31
2017-04-10 21:35:02 +03:00
Alexey Andreev
248a49c7dd
WASM: when lookupswitch table has labels that diff by more 256,
...
translate it to binary search code.
See #261
2017-04-09 23:13:26 +03:00
Alexey Andreev
ef1618ec36
Merge remote-tracking branch 'origin/master'
2017-04-06 23:35:53 +03:00
Alexey Andreev
354883ab86
$rt_ustr handles null strings. $rt_s gets optimized in minified mode.
2017-04-06 23:35:40 +03:00
Alexey Andreev
8330eae4ae
WASM: support stack traces
2017-04-06 23:06:30 +03:00
Mirko Sertic
09b3f18a2c
#258 WASM: Unreferenced but exported methods are removed by dep checker ( #259 )
...
WASM: automatically mark as reachable methods of reachable classes which are exported to WASM via `@Export` annotation
See #258
2017-04-05 18:36:53 +03:00
Alexey Andreev
473c35dafa
WASM: Fix generation of types of 'if' blocks generated from conditional
...
expressions.
See #256
2017-04-04 23:16:59 +03:00
sertic
f84a646eae
#253 WASM Memory should be exported to make it accessible from JS
...
Now a default export named "memory" is created to export the WASM memory.
2017-04-04 15:55:55 +02:00
sertic
19b804b5fc
#252 WASM binary version was reset to 0x01 for MVP official release
...
In current browsers and for the official MVP only WASM binary version 0x01 is supported.
All other binary versions are no longer required or supported, hence the generation
logic for them is no longer needed.
2017-04-04 12:48:00 +02:00
Steve Hannah
7491f1805a
Added annotation to suppress errors like * claimed to be synchronous, but has invocations of synchronous methods. This is usesful in cases where the developer knows that the APIs are synchronous but might be mistakenly marked as async for some reason. This is a possible workaround for issues like https://github.com/konsoletyper/teavm/issues/248
2017-03-24 15:51:23 -07:00
Alexey Andreev
d49354bdac
Fix another exception while rendering labels
2017-03-21 21:48:03 +03:00
Alexey Andreev
299485eb96
Fix bug in generation of block labels
2017-03-17 17:19:28 +03:00
Alexey Andreev
b28f5a6b71
Don't produce keywords for label names
2017-03-17 16:41:35 +03:00
Alexey Andreev
891b906a8c
Fix serialization of call graph. Fix minor bugs in build daemon
2017-03-17 13:57:37 +03:00
Alexey Andreev
56398f58f9
Make serializable some classes that are going to participate in remote build strategy
2017-03-17 13:57:37 +03:00
Alexey Andreev
c6d4265f8b
Fix generation of JS labels
2017-02-26 20:02:45 +03:00
Alexey Andreev
6d3b329540
Remove unnecessary comments and eliminate duplicate code
2017-02-26 13:52:06 +03:00
Alexey Andreev
17113533fc
Implement default annotation values and annotations of method parameters in IR binary serializer
2017-02-26 13:49:45 +03:00
Alexey Andreev
3e3b25bddc
Fix serialization of IR to binary format for incremental build
2017-02-26 07:07:02 +03:00
Alexey Andreev
a94686ddf6
Fix nullness detection on exception variable
2017-02-25 19:52:05 +03:00
Davin McCall
6ef08ae709
Fix errors in hasAsyncMethods() which cause it to return an incorrect result.
...
Previously the method could only ever return false.
2017-02-25 19:06:56 +03:00
Alexey Andreev
891e3b8ea9
Don't generate call to <clinit> on each static method during AST rendering. Instead, extract from WASM transformation that adds InitClassInstruction to beginning of each method and reuse in in JS. This fixes some issues in async methods, without making AST renderer much more complicated.
2017-02-22 23:05:58 +03:00
Alexey Andreev
55453c9311
Set version to 0.5.0-SNAPSHOT. Add configuration to deploy to bintray. Update version number during Travis build.
2017-02-16 21:48:13 +03:00
Alexey Andreev
89f835540b
Add unused variable elimination to standard optimization levels
2017-02-15 22:16:14 +03:00
Alexey Andreev
19e8e06446
Fix creation of multi-dimensional arrays with zero dimensions. See https://github.com/konsoletyper/teavm/issues/239
2017-02-11 23:23:50 +03:00
Alexey Andreev
3402fd8ec9
Speed-up dependency analysis
2017-02-11 12:25:57 +03:00
Alexey Andreev
9271d71906
Fix compile-time error in metaprogramming API when body of emit
or lazy
throws exception instead of returning value
2017-02-05 17:28:40 +03:00
Alexey Andreev
751587bddc
Disabl redundant return elimination in async methods. Fix https://github.com/konsoletyper/teavm/issues/235
2017-01-31 22:45:17 +03:00
Alexey Andreev
e992297781
Eliminate unnecessary return statements
2017-01-29 23:45:48 +03:00
Alexey Andreev
fa0e884931
Optimize if statement to ternary conditional expression
2017-01-29 23:33:51 +03:00
Alexey Andreev
ecd58e3573
WASM: fix bugs
2017-01-29 22:17:04 +03:00
Alexey Andreev
2610fe5428
WASM: fix bugs
2017-01-29 19:01:18 +03:00
Alexey Andreev
055f39c1c8
WASM: fix exception handling
2017-01-28 23:25:13 +03:00
Alexey Andreev
f6103ec00b
Copy exception variables when splitting async programs. Fix https://github.com/konsoletyper/teavm/issues/230
2017-01-28 22:39:44 +03:00
Alexey Andreev
58563a3e2d
Fix liveness analysis in split AST optimizer
2017-01-25 22:46:15 +03:00
Alexey Andreev
02d8439920
When copying basic blocks in async splitter, copy exception variable as well. Fix https://github.com/konsoletyper/teavm/issues/230
2017-01-24 23:59:54 +03:00
Alexey Andreev
55836d6ed7
Fix async splitting of blocks with exception handlers in some cases. Fix https://github.com/konsoletyper/teavm/issues/234
2017-01-24 23:36:15 +03:00
Alexey Andreev
8967f423eb
Increase inlining threshold. Add property to build TeaVM without additional artifacts (like samples)
2017-01-21 23:34:33 +03:00
Alexey Andreev
d3bed47b1d
Add tests for escape analysis/scalar replacement. Fix found bugs
2017-01-21 23:34:33 +03:00
Alexey Andreev
e4fab2be41
Add escape analysis
2017-01-21 23:34:33 +03:00
Alexey Andreev
6781dd0abb
Fix bug in nullness analysis
2017-01-18 21:30:04 +03:00
Alexey Andreev
149970f162
Fix infinite loop in inlining
2017-01-14 02:00:19 +03:00
Alexey Andreev
98b6fff2f0
Use local type inference to devirtualize calls after inlining
2017-01-14 00:50:22 +03:00
Alexey Andreev
645b2b7cd5
Add local type inference to use in optimizations
2017-01-09 19:16:51 +03:00
Alexey Andreev
5d1e558401
Disable loop inversion, since it contains errors
2017-01-08 23:43:12 +03:00
Alexey Andreev
ff059919a7
Eliminate exception joint in favour of phi functions with multiple inputs per source basic block
2017-01-08 23:43:12 +03:00
Alexey Andreev
9532f9a32b
Refactor phi updater
2017-01-06 21:13:12 +03:00
Alexey Andreev
a5eb9ac800
Add tests for phi updater
2017-01-04 22:09:56 +03:00
Alexey Andreev
727c831467
Use new null checker in optimizer. Fix multiple bugs in optimizer and IR
2017-01-03 23:39:43 +03:00
Alexey Andreev
aef1e2e206
Fixing bugs in nullness analyzer
2017-01-02 16:55:17 +03:00
Alexey Andreev
5fd95f21cb
Refactor nullness tests
2017-01-02 13:28:35 +03:00
Alexey Andreev
9dc4b47253
Add nullness analysis
2016-12-27 00:28:37 +03:00
Alexey Andreev
ae5e1e4962
Store instructions as double-linked list instead of ArrayList
2016-12-20 00:03:14 +03:00
Alexey Andreev
231dcbaf36
Working on new nullness checker that uses augmented program representation
2016-12-04 22:30:35 +03:00
Alexey Andreev
730d3f3070
Use $$
prefix for exception handling variables, since $
used for local variables
2016-12-04 20:52:57 +03:00
Alexey Andreev
973231752f
Avoid creating of unnecessary phi functions
2016-12-04 20:51:00 +03:00