Difference between one pass and multi pass compilers?

后端 未结 6 1084
逝去的感伤
逝去的感伤 2021-02-06 03:24

I have seen a lot of posts regarding one pass and multi pass compilers but i dont seem to get the point.

  • What are one

6条回答
  •  星月不相逢
    2021-02-06 03:57

    • A one-pass compiler is a compiler that passes through the source code of each compilation unit only once. A multi-pass compiler is a type of compiler that processes the source code or abstract syntax tree of a program several times.

    • A one-pass compilers is faster than multi-pass compilers

    • A one-pass compiler has limited scope of passes but multi-pass compiler has wide scope of passes.

    • Multi-pass compilers are sometimes called wide compilers where as one-pass compiler are sometimes called narrow compiler.

    • Many programming languages cannot be represented with a single pass compilers, for example Pascal can be implemented with a single pass compiler where as languages like Java require a multi-pass compiler.

提交回复
热议问题