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

Executable ideas (Discussion) #11

Open
julianlore opened this issue May 24, 2019 · 2 comments
Open

Executable ideas (Discussion) #11

julianlore opened this issue May 24, 2019 · 2 comments

Comments

@julianlore
Copy link
Member

What should the executable be able to do?
I think it should be able take in either a .java file or a .class file (call javac as needed if a .java file) and then with the bytecode it would be able to:

  • Pretty print the IR (similar to javap -v)
  • Create a corresponding .class file after having passed through the optimizer
@AllanWang
Copy link
Member

I've currently written the majority of parts required to convert from .class files to the IR format. The format itself isn't set in stone, and for testing it would probably be easiest if we can parse other formats such as that of krakatau. I was also wondering if we wanted to support parsing javap output, since it looks like they do have enough information to generate classfiles, though not nicely packages. Krakatau's constant pool variant (to generate the same class data) works fine, but isn't as readable, whereas javap's version is readable, but more annoying to parse.

For .java to .class, we'll just rely on javac, since that seems like a much harder problem if you consider validation.

@AllanWang
Copy link
Member

If we want we can discuss about how we want our .j format to be. It's currently a mix between javap (without -v) and krakatau

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

2 participants