4 ms·
I happily read that rustc is split into a incremental parsing frontend and a supporting backend. This capability is key in modern compilers and editors. I read
by oaiey 8y ago
I happily read that rustc is split into a incremental parsing frontend and a supporting backend. This capability is key in modern compilers and editors. I read about this like 8 years ago in the C# Roslyn compiler project. Roslyn also aimed in supporting IDEs (here the language server) using the compiler frontend.
My question is: are there any compiler which predate Roslyn in this aspect? Anders Heijlsberg said in a video once, that this is modern compiler architecture (compared to the outdated Dragon and Tiger) but did not mention that the Roslyn team invented it.
- kibwen 8y agoIndeed, I recall hearing that Roslyn was an inspiration for the Rust developers in this regard.
- raphlinus 8y agoI'm not super-expert, but know of some background. I think Rosyln grew very much out of Delphi, and Anders Hejlsberg is the common thread to both. Before that, he did Turbo Pascal, which might have been incremental in some ways (it certainly was very fast). Another earlier example of successful incremental technology was the Java compiler in Eclipse. I'm sure there are academic efforts as well, but don't know as much about these.
- lostmsu 8y agoI thought the main technology behind Roslyn is some researched or customly engineered parser/semantic analyzer that came out of MSR. The original C# parser was quite typical.
- pjmlp 8y agoPhoenix, it was a kind of LLVM (search for "Frameworks for Research in Code Generation and Execution").
- fxfan 8y agolook up Microsoft research Phoenix.
- deleted 8y ago[deleted]
- matklad 8y agoIntelliJ predates Roslyn. While it’s not a full compiler (doesn’t do codegen), it naturally does all the front-end bits which are required for IDEs. Note that “incremental parsing” is a nice to have, but is not required for IDEs. What is required are lazy name resolution and lazy type inference.
- oaiey 8y agoThat Visual Studio also did. That is the reason why Roslyn was financed. Because they did not want to write many parsers for the same stuff. Well, I think you need incremental compilation of you want to a achieve the performance in the ms range an editor needs.
- fnord123 8y agoIs that like GCC having front ends and backends connected by GIMPLE? That was first released in GCC 4.0 from 2005.