From the Department of Insane Ideas: D on the JVM
Anders F Björklund
afb at algonet.se
Wed Dec 13 00:31:40 PST 2006
Gregor Richards wrote:
> Using NestedVM, a tool that lets you compile anything GCC supports to
> Java bytecode, I've made a modified copy of GDC that can produce native
> Java .class files from D source.
>
> What's the use? I don't know, I only did it to have a bit of perverse fun.
> Sockets and threads don't work yet, and it's not extensively tested,
> but it works enough to get a simple Hello, World! compiled.
Excellent hack! Will give it a try on Mac OS X, might even be useful. :)
"NestedVM provides binary translation for Java Bytecode. This is done by
having GCC compile to a MIPS binary which is then translated to a Java
class file."
"Entire virtual memory space mapped to a giant int[][] array indexed by
page, then address. Breaking memory up by pages allows memory to be
dynamically allocated."
"Applications interact with the Operating System via the SYSCALL
instruction. ... The syscall instruction is simply mapped to
the syscall() method of the Runtime class."
So it seems the only thing GDC needs is a "nestedvm" OS and "MIPS" CPU ?
--anders
PS. Quotes from http://www.zentus.com/nestedvm/ and their NestedVM.pdf
More information about the D.gnu
mailing list