Commit Graph

290 Commits

Author SHA1 Message Date
Alexey Andreev
d01ba897c0 Fix build 2019-06-14 15:38:44 +03:00
Alexey Andreev
6e71fa7e87 C: implement file IO in Windows 2019-06-14 15:32:20 +03:00
Alexey Andreev
fe6e796637 Fix bug in ArrayDeque 2019-06-11 16:21:39 +03:00
Alexey Andreev
c8676f7ffe JavaScript: fix filesystem issue 2019-05-31 17:36:32 +03:00
Alexey Andreev
91de1f6ca7 C: implement native file system 2019-05-31 15:05:23 +03:00
Alexey Andreev
6c9393548a JS: fix generation of Class.getDeclaringClass 2019-05-30 00:07:12 +03:00
Alexey Andreev
336590314c C: print stack trace in Logger class 2019-05-27 10:43:13 +03:00
Alexey Andreev
3364022313 classlib: add URLEncoder and URLDecoder 2019-05-24 17:34:33 +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
2eafb902f4 C: support weak references 2019-05-17 17:40:45 +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
3d96616761 JS: reduce precision of float constants 2019-05-13 17:39:18 +03:00
Alexey Andreev
da22256c1f C: compile into multiple .c and .h files 2019-05-08 17:36:46 +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
cbc8d3f638 C backend: bugfixes 2019-04-22 19:03:37 +03:00
Alexey Andreev
ec8bae1d40 C: fix bugs in RTTI. Support args parameter of main method 2019-04-04 18:34:30 +03:00
Dylan
d18d50a823 Add missing forEach to TIterable 2019-04-02 11:28:11 +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
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
Dylan
b8c73ae00c Fix IllegalStateException in TDeflater 2019-03-24 12:25:15 +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
731beb5cd5 Fix bugs in threading in C backend 2019-03-13 18:47:30 +03:00
Alexey Andreev
abdd9b3270 C backend: support coroutines 2019-03-10 14:04:04 +03:00
Alexey Andreev
2a1aca98da Use shared ReferenceCache between different stages of compilation 2019-03-05 19:32:50 +03:00
Alexey Andreev
2c40c7d56e Trying to decrease compiler memory consumption 2019-02-25 18:31:34 +03:00
Alexey Andreev
463f24506d Fix Throwable.toString 2019-02-13 19:30:14 +03:00
Alexey Andreev
1214534671 Reduce unnecessary usages of T-prefixed classes in classlib 2019-02-13 15:12:50 +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
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
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
f589b0035a Decrease memory consumption 2018-12-29 19:02:03 +03:00
Alexey Andreev
6900fd587c Fix Float/Double.parse for strings like '123.' 2018-12-24 18:16:05 +03:00
Alexey Andreev
4ffe74296d Limit max line size of generated JS code 2018-12-21 14:28:30 +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
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
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
cf9090e0fa Use JS typed arrays to reinterpret floats and ints.
Also, drop IE9 support
2018-11-23 17:14:06 +03:00
Alexey Andreev
b9ec21a667 Fix Long.reverse 2018-11-23 14:32:50 +03:00
Alexey Andreev
064888c9a1 Support Java 11 2018-11-12 18:59:28 +03:00
Alexey Andreev
63b2440e48 Remove $rt_global and indirect references to runtime function 2018-10-27 22:42:25 +03:00
Alexey Andreev
5035c58533 Fix Collections.reverse for non-random access lists. Make ArrayList random access. 2018-10-23 17:01:55 +03:00
Alexey Andreev
f206cbe2d1 Reorder modifiers to get less metadata size 2018-10-04 19:07:23 +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
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
614f95d376 Fix String.contains 2018-09-19 13:35:00 +03:00
Alexey Andreev
4b77a5d15f Fix String.contains. Fix crashing in rare cases or improper use of JSO 2018-09-19 12:47:32 +03:00
Alexey Andreev
b74c501fa6 Add Float/Double.isFinite 2018-09-04 17:27:54 +03:00
Alexey Andreev
d20accc20c Add support for Array.set 2018-08-29 13:20:16 +03:00
Alexey Andreev
174ac9e725 Fix translation of lambdas when class has subclass with lambdas 2018-08-27 19:44:44 +03:00
Alexey Andreev
4e20a1de18 Properly handle checkcast to array type in dependency analyzer 2018-07-03 19:11:51 +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
2eea5cba5e Fix AbstractList.removeRange 2018-06-29 16:45:21 +03:00
Alexey Andreev
7511eea1cb Fix boxing lambda return value 2018-06-28 19:07:29 +03:00
Alexey Andreev
d674b0b7de Add some missing stdlib methods 2018-06-28 19:07:04 +03:00
Alexey Andreev
fc13c10d98 Fix Logger.info 2018-06-28 18:54:36 +03:00
Alexey Andreev
dc99ead514 Fix compilation of Kotlin code when there's kotlin-reflect library in the classpath, but it's actually not used by Kotlin code. See #345 2018-06-18 22:56:11 +03:00
Alexey Andreev
cdffb779e0 Fix NPE when there are build errors related to lack of reflection support 2018-06-18 13:40:11 +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
Comick
3ef3678ed0 Fix TSetFromMap#add return value 2018-05-19 21:24:41 +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
f23128bb13 Wasm backend: fix many tests 2018-05-12 23:43:53 +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
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
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
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
05d0220dcd C backend: initial commit 2018-03-20 23:18:52 +03:00
Alexey Andreev
52a23fcadd Support '.<digits>' floating literals in Double.parseDouble
See #327
2018-02-16 23:17:17 +03:00
Alexey Andreev
0485930c1f Add AtomicInteger 2018-02-16 23:08:29 +03:00
Alexey Andreev
51d87091cc Fix TimeUnit.convert implementation
See #329
2018-02-16 22:40:56 +03:00
Alexey Andreev
96b2d4e7d6 Support o and x format specifiers in String.format 2018-01-28 19:19:45 +03:00
Alexey Andreev
4ebaf476fe Fix to[Hex/Octal/Binary]String for unsigned values 2018-01-28 18:38:00 +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
5ec05b9446 Fix lock on overflow/underflow in ArrayBlockingQueue 2018-01-23 22:08:44 +03:00
Alexey Andreev
28e17af500 Implement ArrayBlockingQueue 2018-01-22 23:32:10 +03:00
Alexey Andreev
ec3724b2bc Perform HTTP request as late as possible 2018-01-14 22:51:02 +03:00
Alexey Andreev
ac236f1ff8 When HTTP response invalid, return -1 as a responseCode 2018-01-09 22:15:37 +03:00
Alexey Andreev
a9beef3a15 Fix behaviour of HttpUrlConnection responseCode/responseMessage 2018-01-07 18:45:00 +03:00
Alexey Andreev
477f491b25 Fix HttpUrlConnection responseCode/responseMessage properties 2018-01-07 14:20:08 +03:00
Alexey Andreev
c46bfbc93c Fix bugs in URL implementation 2018-01-03 19:47:00 +03:00
Alexey Andreev
422cb0462a Add java.net.URL implementation 2018-01-01 14:53:44 +03:00
Alexey Andreev
7a03bf795f Add some Java classes that aren't used by TeaVM, but are necessary for javac 2017-12-03 20:05:50 +03:00