freenode/#sicl - IRC Chatlog
Search
3:58:38
beach
I think I pretty much finished "tying the knot" in environment E5. In that environment, I can now evaluate things, i.e., both compile and load.
3:58:59
beach
Classes, in E5 are instances of other classes in E5. Ordinary functions in E5 are either instances of classes in E5 or they are imported host functions (of which there are 122 right now). Generic functions in E5 are either instances of classes in E5 or they are imported from the host.
3:59:17
beach
There are 17 such imports, one of which is causing me trouble. The other 16 are SICL first-class global environment functions, that I am not going to deal with now. The one causing me trouble is cleavir-code-utilities:required, which can't be redefined, because it is needed for its own redefinition. And redefining a generic function is not atomic as redefining an ordinary function is.
3:59:19
beach
Anyway, the mission today (aside from making bread, going to the store, and some chores around the house) is to work on the 122 imported functions and replace them with SICL versions as much as possible.
4:00:28
beach
There are probably a few bugs in this "knot". I already know of the method function of accessors that were added as a result of DEFCLASS in phase 5, but those should be easy to fix.
4:01:07
beach
Later, I'll go through every object in E5 and check whether there is some trace of any other environment in it.
12:35:11
Bike
the more mundane thought is we could make sure abstract syntax trees are actually trees, at least as far as cleavir-ast:children is concerned
12:35:31
Bike
this would remove the need for the expensive hash table stuff in map-ast-etc, i think be compatible with all uses of it
12:36:18
Bike
i think the only way they're not trees right now is with lexical asts. it might make sense to have a like, variable-read ast, and replace lexical ASTs with some kind of non-AST lexical variable object
12:37:18
Bike
the other thought was about type checks. as far as i remember part of the idea was that if you had, say, a type declaration on a variable, all uses of that variable would have a type check for that type, because another thread could alter the variable (if it's shared)
12:37:43
Bike
however, another thread could simply alter the variable after the type check is complete but before whatever unsafe operation is performed
12:40:06
Bike
more or less the same problem of generic function dispatch having to grab the rack and make sure any quick readers use the rack rather than grab it from the object again
12:42:31
Bike
the problem extends from variables to their actual variables depending on which types are checked. a compound cons type or a class type can have the value changed from under it. and satisfies, i guess
12:47:00
beach
Don't we always assign the variable to a temporary before doing the type check and the unsafe operation?
12:48:10
Bike
i can double check, but for example if (car x) is inlined as (if (cleavir-primop:typeq x cons) (cleavir-primop:car x) ...) i believe both "x"s will have their own load
12:48:45
Bike
it's another problem of atomicity, i guess. we basically want cl:car to be atomic i think
12:50:17
Bike
right, but i mean i don't think that happens. i think segregate-lexicals sees two variable reads and gives each one a lod
12:51:28
beach
OK, that should probably be fixed at some point then. Perhaps by surrounding the type check and the primop with a LET.
12:54:01
Bike
checking the disassembly, because generating and displaying HIR is more of a pain, but it should reflect the HIR
13:36:12
beach
Looking at the exchange in #clasp, I get the impression that there are still lots of problems. Or is it just a matter of improving performance?
13:36:58
Bike
the problem drmeister has been talking about is a performance issue, but it's a pretty severe one.
13:37:38
Bike
karlosz and i have been talking about doing some analysis in the compiler to find nonlocal exits where the intervening dynamic environments are statically known, and in that case using a faster exit mechanism
13:38:27
Bike
some of it may be applicable to sicl, like, you could have an unwind that doesn't need to call the unwind function
13:42:58
beach
It *is* the essence of SICL, so it should be impeccable, and I am currently the only one who can make it so. So I just need to bite the bullet.