Attaching a patch that exposes the problem. There's an infinite loop, as shown in my comment above. The hack in the patch short circuits the infinite loop, which involves some classes that have themselves as their superclass and other classes that have themselves as their super-superclass. The hack also allows generation of the class Math. This hack allows class generation to complete (I don't know if it is accurate or not) but on the compliation step I get a lot of cyclic inheritence and complaints about "private not allowed here" before I get an out of memory error.
I don't understand this code well enough to understand how to fix this problem, but hopefully this helps you solve it!