3 ms·
There is another approach to bootstrap an incremental compiler frontend on top of a batch compiler, which I used to create a Java language server [1]. Batch com
by georgewfraser 8y ago
There is another approach to bootstrap an incremental compiler frontend on top of a batch compiler, which I used to create a Java language server [1]. Batch compilers usually support incremental compilation at the file level, so you are already close to a solution: re-compile the active file every time the user edits. This works but is too slow. You can dramatically improve the speed by simply erasing all the code that isn’t relevant to the current edits, which usually means erasing all the method bodies. This simple trick allows you to build a fast incremental compiler on an existing batch compiler.
[1] https://github.com/georgewfraser/java-language-server https://github.com/georgewfraser/java-language-server
- jamesmunns 8y agoThis sounds like a use for the everybody-loops compiler flag: https://github.com/rust-lang/rust/pull/19964 https://github.com/rust-lang/rust/pull/19964