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

Add option to use javap instead of asm #21

Open
lrytz opened this issue Sep 13, 2017 · 2 comments
Open

Add option to use javap instead of asm #21

lrytz opened this issue Sep 13, 2017 · 2 comments
Assignees
Milestone

Comments

@lrytz
Copy link
Contributor

lrytz commented Sep 13, 2017

ASM desugars certain details when disassembling classfiles, for example it eliminates redundant line numbers:

$ javap -v -cp a C
...
  public void t();
...
      LineNumberTable:
        line 2: 0
        line 3: 0
        line 4: 3

whereas

$ asm a/C.class
$ cat a/C.asm
...
  public t()V
   L0
    LINENUMBER 3 L0
    LDC ""
   L1
    ASTORE 1
   L2
    LINENUMBER 4 L2
@retronym
Copy link
Collaborator

I haven't implemented this yet, but I have add -r ("raw") mode to show more details with ASM. It disables sorting of members, shows the Scala sig annotation and all attributes, and includes local variable names and stack map entries.

@retronym retronym self-assigned this Jan 18, 2018
@retronym retronym added this to the Backlog milestone Jun 4, 2019
@retronym
Copy link
Collaborator

retronym commented Jun 4, 2019

The difficulty here is finding a way to call javap without forking (which is expensive for lots of files), that will also work across a range of JDK versions. The REPL has some code do to this but it has been somewhat fragile.

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

No branches or pull requests

2 participants