Revising Arcueid’s implementation of protect
I had a very lively discussion with some of the folks at the Arc Forum when Arcueid first began to make a shot at implementing the protect
function (which is Arc’s hook into Scheme’s dynamic-wind
). This proved a messy undertaking from the start, and I am not very happy with how it exists in the current release. It works alright for now, but the fact that it is so complicated makes me think that there are corner cases that it doesn’t handle properly. I should begin revising the code to do this to make use of the Hanson-Lamping algorithm discussed there.
While I do so, the implementation of call-w/std(in|out)
could use more than a little revision. I should begin using the more general notion of continuation marks and parameters that became the subject of another lively discussion I had on the Arc Forum once Arcueid began implementing those features.
This requires ripping out most of the guts of Arcueid’s continuation structure, simplifying it and removing all the cruft that has accumulated there over time. There’ll be a second branch for this and we’ll see about merging the two later on once the implementation is stable.
Many thanks to rocketnia (Ross Angle), for describing the Hanson-Lamping algorithm so I could understand it.