freenode/#sicl - IRC Chatlog
Search
19:46:41
shka_
beach: i like the sense of style already, i just finished the first chapter and it was enough to feel the sudden urge to write
4:37:00
beach
Yesterday, I again worked on code generation. I made progress on how to handle the CATCH-INSTRUCTION, but doing so required some reorganization of the different systems, so it is taking some time.
4:37:59
beach
The idea is to handle the CATCH-INSTRUCTION as a FUNCALL-INSTRUCTION, but not translate it. I need to keep the arbitrary number of successors until the very end, or at least that's the plan.
4:39:19
beach
But I will preprocess the CATCH-INSTRUCTION just as I do with the FUNCALL-INSTRUCTION, i.e. make it have no outputs, and instead have its values in the distinguished global-values location.
4:40:00
beach
I can do this in HIR which makes it possible to test the entire thing in the HIR interpreter, which is a good thing.
4:40:17
beach
But I then have to import another function into the environments during bootstrapping.
4:41:49
beach
When I am done with the CATCH-INSTRUCTION, I will do the same with the UNWIND-INSTRUCTION and the BIND-INSTRUCTION, i.e. I will either treat them as FUNCALL-INSTRUCTIONs, or translate them to one.
5:14:15
alandipert
got local jump optimization done! the performance gain is incredible - 60 seconds to 23 milliseconds
5:28:16
beach
I must make sure that a CATCH-INSTRUCTION that does not have a corresponding UNWIND-INSTRUCTION does not call the function that augments the dynamic environment, and here is why:
5:28:17
beach
Every DEFUN results in a BLOCK, including the function that augments the dynamic environment with BLOCK/TAGBODY-ENTRY. That means that there is an infinite recursion in that augmentation function.
5:35:15
beach
I ought to be able to eliminate CATCH-INSTRUCTION without any corresponding UNWIND-INSTRUCTION. The "continuation" output of such a CATCH-INSTRUCTION is not used, so all I need to handle is the dynamic environment output.
5:36:15
beach
I could replace such a CATCH-INSTRUCTION by an ASSIGNMENT-INSTRUCTION that just assigns to the dynamic-environment output.
5:37:53
beach
The register allocator will recognize that they are not used simultaneously and assign them to the same place.
5:54:55
Bike
https://github.com/robert-strandh/SICL/blob/master/Code/Cleavir/HIR-transformations/eliminate-catches.lisp