Jump to content

  • Log In with Google      Sign In   
  • Create Account


The Bag of Holding



Still rambling about self-hosting

Posted by ApochPiQ, 18 September 2013 · 508 views
Epoch
Down to 9 tests in the compiler suite that still need some love before they will pass.

For those not keeping score at home, this means that 58 out of 67 compiler tests are passing in the Epoch implementation of the Epoch compiler. In other words, Epoch is getting very, very close to being able to compile itself.

Fun facts:
The compiler in C++, not incl...


Speculation and such

Posted by ApochPiQ, 09 September 2013 · 553 views
Epoch
Just fooling around.


//// Define an Epoch task that does some work//task Worker :{ // // This specifies a "message signature" which can be // used by and instance of this task to receive data // and commands from other code. // Work : integer a, integer b { // Do some computation integer result = a + b // Reply...


Epoch self-hosting progress

Posted by ApochPiQ, 25 August 2013 · 317 views
Epoch
So the Epoch compiler is now written end-to-end in Epoch. There is no C++ left in the bootstrapping process aside from the runtime environment which does garbage collection and such.

Sadly this doesn't mean that we're quite to self-hosting just yet. Only about a third of the compiler test suite is passing, and a lot of the remaining work centers around g...


Epoch Optimizations and Garbage Collection

Posted by ApochPiQ, 10 August 2013 · 264 views
Epoch, language design
Following the Great Garbage Collection Debug Spree of the past few weeks, I've noticed a general trend towards bad performance in the realtime raytracer benchmark. At one point it was down to ~6.5FPS peak performance, which is just unacceptably bad.

Profiling revealed two main causes of this slowdown. One is the garbage collector invocations themselves;...


VINDICATION

Posted by ApochPiQ, 02 August 2013 · 144 views
Epoch
Turns out my garbage collection woes are over.


I was strongly suspicious of the inliner in my last post, and it turns out that this hunch was (albeit indirectly) completely correct.

The obvious thing to do when facing a bug like this is to compare the code generated; dump out a listing of the version that works, and a listing of the version that doesn'...


The ongoing mission

Posted by ApochPiQ, 02 August 2013 · 204 views
Epoch
Nailed down some more quirks in the GC over the past day; unfortunately the last one is a real bugger.

It appears that LLVM's function inlining optimizations cause the GC to go slightly insane. I have yet to ascertain the exact interaction between the inliner and the GC, but disabling all inline functions makes the GC run beautifully.

I also remembered...


More adventures in garbage collection

Posted by ApochPiQ, 31 July 2013 · 191 views
Epoch
One of my least favorite types of bug to unravel is the Ball of Yarn.

A Ball of Yarn is not just one bug. It's a large number of bugs, all in close proximity, which influence and interact with each other. If you pull on one of the threads, one of two things will happen: either you will slowly gain insight into the mess, or (more likely), you'll inadverte...


Hard lessons

Posted by ApochPiQ, 25 July 2013 · 1,404 views
Epoch
I've learned three nasty lessons this week.


First, exception handling in C++ is a knotted mess of undefined behavior, especially when you start blending JIT compiled native code with C++ code that can throw exceptions.

Second, as a result of this, when testing code you should always run it under a debugger so you can tell if an exception is getting thr...


IDE hackery

Posted by ApochPiQ, 20 July 2013 · 484 views
Epoch
As I continue to mess with self-hosting the Epoch compiler, I'm spending a lot more time actually editing Epoch code than C++ code. This is a wonderful thing overall, since I basically created the language precisely so I could quit writing apps in C++.

Writing a lot of Epoch code in Notepad is pretty brutal, and I was kind of tired of just working on th...


I'll just leave this here...

Posted by ApochPiQ, 16 July 2013 · 471 views
Epoch
Here's the kicker: the compiler that produced this working program is written entirely in Epoch.



Yes, the test program is extremely minimalistic, but it passed .

Self-hosting completion is now just a matter of getting the parser to understand the entire language grammar, and finishing out the last bits of semantic analysis/type system enforcement t...






July 2014 »

S M T W T F S
  12345
6789101112
13 14 1516171819
20212223242526
2728293031  

Recent Comments

PARTNERS