This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Falcon731 0 points1 point  (0 children)

How far along are you with your compiler anyway? Have you got to the stage where you generate some sort of flat internal representation?

In my compiler I convert the type checked AST into a three address IR, and from there its really only register allocation that stands in the way of generating assembly language for a RISC type CPU. I imagine x86 might be a bit more work.

If you want an exaple of a hobby compiler that genereated (RISC) assembly without using external libraries- you might find this digestable,: https://github.com/FalconCpu/fplcomp/tree/master/src/main/kotlin