nim-lang / compilerdev

This repository contains a collection of documents about how to change/refactor the Nim compiler in order to make it faster, easier to maintain and have fewer bugs by a superior architecture and design. However, no every idea here will work out.
10 stars 3 forks source link

incremental compilation review #15

Open disruptek opened 4 years ago

disruptek commented 4 years ago

The diff is now like 40,000 lines, so I'm going to port it.

Before I do this, I want to see if we have any new ideas on the best way to implement IC. Here are the main features of the approach in my last version, the ic6 branch:

We discussed going straight to a compiler server, but I think dumping sqlite in favor of frosty is probably going to be a big enough first step that we don't need to complicate the user's workflow just yet. It's easy to create a separate server product if someone really wants it; this way, it's really an orthogonal problem.

Any feedback?

disruptek commented 4 years ago

Why don't we simply make symbol locations immutable in front-end AST and store them separately in the backend? We can start with a tiny adaptation to the mangler and then proceed further after IC is done. If you want to switch away from ropes, this is a good excuse to do that, too.

Araq commented 4 years ago

Fine with me, in fact, I think I proposed something similar before.