News for hackers. Stuff that matters.
Re:C to Java Translation. Automatic, Complete, Correct. Free... by bedatadriven on Wednesday April 29, 2015 @08:54AM (#9457896)
This looks pretty nice. Pointer/array arithmetic seems to be handled nicely, (double)malloc(sizeof(double)*100) looks pretty ugly but it's hard to tell what's going on under the DoubleContainer hood.

For OSS (or other projects) that just need running JVM byte code, checkout the GCC Bridge component of Renjin, which uses a combination of GCC to Soot to compile C and Fortran code to bytecode: https://github.com/bedatadriven/renjin/tree/master/tools/gcc...

Re:C to Java Translation. Automatic, Complete, Correct. Free... by marco2357 on Wednesday April 29, 2015 @09:08AM (#9457969)
Thanks!

malloc() we only optimized for char* so far (there are endless possible optimizations when translating C the way we do).

"(double* )malloc(sizeof(double) * 100)" should be translated as "new DoubleContainer(100, true)". We'll add that add some point.