Commit Graph

322 Commits

Author SHA1 Message Date
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