freenode/#sicl - IRC Chatlog
Search
20:09:45
Bike
beach: i hit an issue with local environments in cleavir. it's like this - say we have a (declare (notinline foo)) - this will end up as an environment #<INLINE #<ATOM-CST raw: FOO> #<ATOM-CST raw: NOTINLINE>>. stuff like FUNCTION-INFO deals with symbols, so it fails to see the local declaration.
20:10:09
Bike
beach: is it intentional for these environments to have CSTs in them, or should we take raws? I'm asking because I know you've been dealing with trucler and stuff.
2:17:17
karlosz
beach: doing this read only optimization ended up being MUCH more involved than i had planned. i was able to do the optimization in segregate-lexicals pretty quickly until i ran into this function https://paste.gnome.org/pikoys0p9. as you can see, fact is an input to the enclose instruction, but is also the output, so when the read only optimization is made, the hir graph has an unresolved dependency
2:18:37
karlosz
so, me and Bike propose adding a new instruction, something like initialize-closure-instruction, that takes as input the output of enclose and all the other inputs that enclose used to take, and leaving enclose with no inputs
2:19:50
karlosz
the downside is that it is a side effecting instruction that is tied up with enclose pretty tightly, making hir transformations like inlining and remove-useless-instructions pretty hard to work with
2:19:59
Bike
i forgot that at least for clasp, the enclose would have to know the eventual size of the vector. i don't think sicl would though.
3:07:20
beach
karlosz: Yes, I see the problem and I think the new instruction is a good idea. Except I would call it SET-STATIC-ENVIRONMENT-INSTRUCTION or something like that.
3:08:41
beach
It is amusing that the static environment of a closure can contain the closure itself. I had never thought about it, but that must obviously be the case.
3:52:55
beach
karlosz: For mutually recursive functions introduced by LABELS, the occurrences of the new instruction must be after the last ENCLOSE-INSTRUCTION.