Skip to content

Develop Java Source Translator #11

Description

@DavePearce

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions