IMO there should be several semantic phase so that forward declarations work automatically, without the need to declare that the stuff is a class. More generally a language that doesn't accept out of order declarations has certainly certain limits in semantic processing.
part 1- it translates Pascal syntax to some internal format (internal: better suited to convert to binary)
part 2- it translates internal format to any machine code, with any arch: x32, x64, arm...
Compiling a PL is generally more decomposed in 4 phases
1/ transform into tokens (lex / scan)
2/ transform tokens into grammatical constructs (parse, make the AST)
3/ semantic, i.e meaning of the program
4/ intermediate representation (e.g SSA, LLVM IR)
5/ IR to CG (produce byte code)
1-2-3-4 is the "frontend"
5 is the "backend"
I think that in Pascal the phase 3 is too limited. There should be several passes for example to solve the types like forward / out of order declarations. This would also allow cycles in uses (major limit in current design), as long as there's no initialization in mutually dependent units.