background preloader

Code translation

Facebook Twitter

ActionScript to Java | jetDrone. Source Checkout - objc2j - Objective-C to Java translator. How JITB converts ActionScript to Java « blog.joa-ebert.com – Blog of Joa Ebert. One of the biggest challenges when writing a program like JITB is to convert ActionScript to Java. There are major differences between ActionScript 3.0 and Java 1.6 which JITB currently targets.

ActionScript 3.0 is a dynamically typed language with function closures. Furthermore it has native XML support, scope-changes, implicit getters and setters etc. The main issue however is to convert the set of bytecodes ahead of time to statically typed Java code. JITB does not know anything about what is going on since it compiles all the code ahead of time. JITB and TAAS JITB makes use of TAAS. What I love about TAAS is that it has a really small instruction set. JITB uses a frontend that parses ActionScript bytecode and creates an AST which is then transformed and passed to a backend that creates Java bytecode. An example for such a problem are implicit getters and setters. Closures for Java Java 1.6 does not support closures. I took the idea from Scala and how they support closures in the JVM. Www.nextcomputers.org/NeXTfiles/Software/WebObjects/Guides/PortingObjectiveCtoJava.pdf.

<Code> - A mini Actionscript 3 to Java converter.