News for hackers. Stuff that matters.
Re:Show HN: Writing my first interpreter in C for fun by felixangell1024 on Tuesday June 21, 2016 @04:41PM (#11949237)
Depends what you compile to. Writing a register allocator may be a little tricky (if you compile to a VM/Assembly/..), though if you compile to something like C, it's very easy. LLVM is another alternative which is also relatively simple to learn.
Re:Show HN: Writing my first interpreter in C for fun by andars on Tuesday June 21, 2016 @05:20PM (#11949502)
Spilling every variable to memory isn't too bad if you just want it to work and aren't worried about performance.
Re:Show HN: Writing my first interpreter in C for fun by sklogic on Wednesday June 22, 2016 @05:17AM (#11952460)
Linear scan register allocation is "good enough" in most cases and it is trivial if you're doing it on top of an SSA.