Open disruptek opened 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.
Fine with me, in fact, I think I proposed something similar before.
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:setLocation
orclearRope
notation in a review. Fairly painful as code smell goes. I will try to do this better next go 'round. It should already have been improved by themangling
branch.PContext
and prevent mutating the ast with similar hacks, though the mechanism is cleaner -- this is thewitness
stuff. I'd like to improve this, too; it's still pretty smelly.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?