Disassembly doesn't work unless you give the wrong optimization level

Project:JNode Core
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

The "disasm" command behaves rather strangely. It turns out the the root problem is in the VmSystemClassLoader class:

public void disassemble(VmMethod vmMethod, int optLevel,

    boolean enableTestCompilers, Writer writer) {

...

  if (vmMethod.getNativeCodeOptLevel() < optLevel) {

    cmp = cmps[index];

    cmp.disassemble(vmMethod, getResolver(), optLevel, writer);

  }

}

As you can see, the method ignores the request to disassemble a method unless the compiled method's optimization level is less that the optimization level supplied by the user.

I cannot see the purpose of the test at all, and I think it is a bug.

Can someone (Levente, etc) confirm this, and I'll fix it by removing the test and making the call to cmp.disassemble unconditional.

#1

Status:active» closed

I've put in a fix for this problem. Marking as fixed.

#2