Self-hosting compiler: Difference between revisions

Added FreeBASIC
m (syntax highlighting fixup automation)
(Added FreeBASIC)
 
(3 intermediate revisions by 3 users not shown)
Line 12:
=={{header|ALGOL 68}}==
 
The Algol 68 to C compiler available here: [httphttps://wwwgithub.poenikatu.co.ukcom/srcsdolim/] or here:algol68toc [https://github.com/NevilleDNZsdolim/algol68toc] is written in ALGOL 68 and compiles itself. It is derived from the ALGOL 68RS compiler.
 
=={{header|ATS}}==
Line 24:
 
The older Mono C# compiler, currently backed by the .NET Foundation, can be found at [https://github.com/mono/mono]. There is also a (much newer) Mono VB compiler.
 
=={{header|FreeBASIC}}==
Essentially, FreeBASIC consists of two parts:
 
1. The FreeBASIC compiler, written in FreeBASIC (self-hosting). Compiling this requires a working FreeBASIC installation.
2. The FreeBASIC runtime libraries, written in C. Compiling this requires a C compiler such as gcc, the GNU C compiler (Native gcc on Linux, MinGW on Windows, DJGPP for DOS).
 
FreeBASIC is a self-hosting compiler, being roughly 120,000 lines of code (compiler core only, not including libraries).
 
Source code can be downloaded from [https://freebasic.net/wiki/DevBuild https://freebasic.net/wiki/DevBuild].
 
=={{header|Go}}==
Line 76 ⟶ 86:
=={{header|Phix}}==
Phix is self hosted. Run "p -c p" and it rebuilds itself in about 15 seconds. One of my favourite parlour tricks is to then run "p p p p p p p p -cp" which stacks seven interpreted copies of itself on top of each other with the last recompiling itself, and apart from a slightly longer startup time, no slower than the shorter command.
 
=={{header|Plain English}}==
Plain English is self-hosted. The Osmosian Order of Plain English Programmers claim that Plain English can recompile itself in 3 seconds. Instructions for recompiling Plain English can be found in the instructions.pdf.
 
=={{header|Python}}==
Line 123 ⟶ 136:
 
The VM (which includes the bytecode compiler) and the command line interpreter (which enables Wren scripts to be run independently) are written in C. Most of the core library is also written in C though parts of it are written in Wren itself. Frankly, in the interests of speed and because Wren is primarily intended as an embedded scripting language, self-hosting is never going to happen.
 
Note, however, that Wren can compile Wren source code ''at runtime'' using the Meta.compile method.
 
=={{header|ZED}}==
2,122

edits