3 ms·
>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
by 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.