4 ms·
I understood it up to "Note how the compilation order is the reverse of the topological order (we’ll get back to this in a bit)." But then couldn't find where y
by jon889 8y ago
I understood it up to "Note how the compilation order is the reverse of the topological order (we’ll get back to this in a bit)." But then couldn't find where you got back to it, and can't quite understand why it's the reverse of the topological order or how that's possible?
- tpxl 8y ago>can't quite understand why it's the reverse of the topological order For example: A depends on B depends on C, so the graph is A->B->C. To compile A, first B must be compiled, and for B, C must first be compiled. The compilation order has to be in reverse of the dependency graph. >how that's possible? The compiler first determines dependencies and then compiles. The compilation then happens per file, so that part is trivial.