• entries
    625
  • comments
    1446
  • views
    1006953

Almost there...

Sign in to follow this  
ApochPiQ

588 views

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.
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now