libera/#sicl - IRC Chatlog
Search
5:37:29
beach
I guess initially, I'll just make a cleaner version of the portable condition system, using special variables to store the dynamic environment. I would have preferred to have dedicated entries in the dynamic environment for handlers, restarts, etc., but I'll figure that out later.
5:44:25
jackdaniel
awhat is somewhat characteristic is that handlers and restarts are grouped in clusters in the dynamic environment (i.e list of lists) because of how corresponding operators are expected to handle them
5:45:32
beach
Yes, I think I figured all that out yesterday. In some ways, the situation is ideal for special variables.
5:47:16
beach
Using special variables, it is more expensive (in terms of performance) to establish a handler or a restart, and less expensive to search for it. With special entries, it is the other way around. But I don't think performance matters very much for the condition system.
5:48:47
jackdaniel
because it is usually slow some techniques are not often used, but handling partial results signaled from a busy loop is something I've incorporated in code a few times
5:50:20
beach
And I think it is more common to establish a handler or a restart than to actually search for one, so that's part of my preference for specific entries. But mostly it is just an aesthetic opinion.
5:52:15
jackdaniel
ecl implements clusters by binding special variables, but they have predefined position (like the nil symbol and a few other things) in the core structure
5:59:14
beach
How is the dynamic environment represented in ECL? Like how do you store TAGBODY tags, BLOCK names, UNWIND-PROTECT functions, etc.?
6:15:49
beach
My initial plan for SICL was to have entries in the dynamic environment encoded as a sequence of words in the ordinary stack frame, and to link those entries with some kind of pointer. But then I decided to make an ordinary Common Lisp list of entries consisting of standard objects. As I recall, Bike did some performance tests, and decided this representation does not impact performance in any significant way.
6:17:09
jackdaniel
an array based stack is better for cache but it is hard to argue with actual benchmarks
6:18:58
moon-child
presumably just an issue of hotness--no one is setting up unwinding in tight loops so it's of no consequence