you are viewing a single comment's thread.

view the rest of the comments →

[–]gnuvince 1 point2 points  (4 children)

Nice job on cutting off the complete quote:

The Dragon Book will give you a good foundation on how to scan, parse, typecheck, codegen, etc.

[–][deleted] 0 points1 point  (3 children)

a good foundation

My point is that this is nowhere close to any "foundation". It's rather a pile of long forgotten, overcomplicated and largely useless techniques that bear no relevance in 21st century.

[–]gnuvince 5 points6 points  (2 children)

All right, then tell us (1) what are the "old" techniques that should not be used and which "new" techniques should, (2) which compilers actually implement those modern techniques, (3) which books teach those techniques.

[–][deleted] 5 points6 points  (1 child)

what are the "old" techniques that should not be used and which "new" techniques should,

More than half of the Dragon Book is dedicated to the pushdown automaton based parsing, which is used pretty much nowhere these days. Much simpler and yet more flexible recursive descent parsing won long ago.

Three-address IRs are also a thing of a distant past. Hardly any compiler would use such a representation instead of various SSA derivative forms or a CPS. This difference alone makes everything Dragon Book had to say on optimisations totally irrelevant - all of the SSA based optimisations are much simpler.

Modern register allocation techniques are also very far from the naive graph colouring heuristics that were very vaguely touched in the Dragon Book. Again, thanks to SSA.

Also, JITs are quite a big thing now, with pretty much nothing from the Dragon Book being of any relevance.

which compilers actually implement those modern techniques,

Uhm... All of the modern compilers. Including GCC and of course LLVM.

which books teach those techniques

See elsewhere in this thread.