Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop Java Source Translator #11

Open
DavePearce opened this issue Jan 22, 2017 · 0 comments
Open

Develop Java Source Translator #11

DavePearce opened this issue Jan 22, 2017 · 0 comments

Comments

@DavePearce
Copy link
Member

In addition to a transformation from WyIL bytecodes to Java bytecodes, it would be useful to have a translation to Java source. This would help on a number of fronts, including:

  1. Ease of Integration with Existing Code Bases. In some cases, people may prefer to generate Java source code as this can exist independently of Whiley, and can be updated manually if necessary.
  2. Ease Understanding of Mapping between Whiley and Java. Developers may look at the Java source produced from a given Whiley file to help them understand the mapping. This would be useful even if their build actually goes straight to JVM bytecode.
  3. Ease Development of Java Backend. Debugging Java source code is much easier than Java bytecode. As such, looking at the generated Java source will be much easier than at the bytecode. Furthermore, it's easier and quicker to play around with ideas at this level, since bytecode is very finickity.

There are some issues here, of course. We need to ensure the relationship between the Java source produced and the Java bytecode produced is (ideally) identical. Furthermore, in generating Java source, it would be very nice to pull comments over from Whiley source files into the generated Java source files and/or generate Javadoc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant