This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Java to C through an intermediate assembly


Quoth Hamdy Mobarak on Tuesday, 20 November:
: Dear,
: I am asking about if it is possible to convert java program to an
: intermediate
: assembly (say assembly of Intel microprocessor), and then decompile this
: intermediate
: assembly to get the C version of the input java program?
: Thanks

Darling,

It all depends on finding a good -- nay, superlative -- C decompiler
for one of the supported targets.  I've not worked with recent
decompilers.  I did use a SPARC decompiler from circa 1992 once, but
it wasn't up to this sort of task: It was tuned to recognize optimized
code produced by the then-current Sun C compiler (which was primitive
by modern standards), and would choke on some gcc-emitted code.  But,
Jeff Sturms discouraging comment notwithstanding, such beasts do
exist.  They are generally closely held and hard to find.  Of course
the result for gcj-emitted code would be C code that depended
extensively on libgcj.

At a guess, I'd say the first place to look for a high-quality
decompiler would be Windows, and the second would be Solaris.  To
round-trip on Windows you'd need to finish the mingw32 port of GCJ, to
get GCJ to emit something that runs correctly in its runtime first.




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]