News for hackers. Stuff that matters.
Re:One-pass Compiler by jjice on Saturday May 23, 2020 @10:40AM (#23283308)
I'm actually working on a Pascal compiler right now. Register management has been a really tricky part for me, but I didn't even thing of treating an x86 processor as a stack based machine. Very clever, especially when you just want a simple compiler an not anything super optimized.
Re:One-pass Compiler by lebuffon on Saturday May 23, 2020 @01:09PM (#23284587)
A simple optimization is to make a stack machine with the top of stack cached in a register. This can improve speed about 10% in general operation.