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