Jump to content

  • Log In with Google      Sign In   
  • Create Account





Almost there...

Posted by ApochPiQ, 07 April 2013 · 469 views

Epoch
Today I wrapped up the last Epoch compiler test suite failure besides C-API marshaling. That means 53 of 54 compiler tests are passing as pure native code - no VM to get in the way and slow things down.

Once C marshaling is in place, I'll need to rework the garbage collection implementation a bit, and then I'll have a complete Epoch implementation in JITted native code.

Needless to say, I'm pretty stoked.


Of course, C API marshaling is going to be fairly nasty to reimplement in the JITter, since I'll have to trampoline not just into the VM but into native code. This will require some calling convention wizardry and more than a little assembly language hacking, but at least that stuff is fun.

I'm not so much worried about the actual implementation details as the debugging of all the inevitable things that I'll get wrong on the first pass. Not having a first-class debugger makes this whole process rather painful, as it isn't always clear what Epoch code maps to what JITted machine code. I really need to work on improving that, possibly by writing a custom LLVM pass to emit debug information during the JIT process. In any case, it should be interesting.


I'm waffling on when to pull the trigger on Release 14 in the meantime. I at least want the compiler suite to pass, but having garbage collection is more or less mandatory, and getting a reasonable implementation of that will take time. Stack frame management is possible in LLVM but object lifetime determinacy is kind of a pain and a classic mark/sweep collector like the VM used might get messy.

Either I'll find some good papers on the subject and just copy someone else's approach, or I'll be doing a little pioneering in that department, in which case I'll be sure to write up my findings here.


Stay tuned... Epoch is really close to being officially a massively amazing language implementation. I can hardly wait to get back into some of the more esoteric parallelism features and other nifty stuff that's been on the back burner for so long.




December 2014 »

S M T W T F S
 123456
78910111213
14151617181920
21 22 2324252627
28293031   

Recent Entries

Recent Comments

PARTNERS