e01.org

Self-hosting (compilers)

In computer programming, self-hosting is the use of a program as part of the toolchain or operating system that produces new versions of that same program—for example, a compiler that can compile its own source code. Self-hosting software is commonplace on personal computers and larger systems. Other programs that are typically self-hosting include kernels, assemblers, command-line interpreters and revision control software. Source: e01 Encyclopedia. Licence: CC BY-SA 4.0.

In computer programming, self-hosting is the use of a program as part of the toolchain or operating system that produces new versions of that same program—for example, a compiler that can compile its own source code. Self-hosting software is commonplace on personal computers and larger systems. Other programs that are typically self-hosting include kernels, assemblers, command-line interpreters and revision control software. ===Advantages=== Self-hosting a compiler has the following advantages: It is a non-trivial test of the language being compiled, and as such is a form of dogfooding. Compiler developers and bug reporters only need to know the language being compiled. Compiler development can be performed in the higher-level language being compiled. Improvements to the compiler's back-end improve not only general-purpose programs but also the compiler itself. It is a comprehensive consistency check as it should be able to reproduce its own object code. Note that some of these points assume that the language runtime is also written in the same language. ==List of languages having self-hosting compilers== The following programming languages have self-hosting compilers:

source: e01 Encyclopedia · licence: CC BY-SA 4.0 · page · source revision

Cite this

"Self-hosting (compilers)". 1790931262. e01 Encyclopedia. CC BY-SA 4.0. https://en.wikipedia.org/w/index.php?oldid=1378001832

JSON record · API collection · BibTeX · RIS · CSL-JSON · citation policy

Save to pass ·