freenode/#sicl - IRC Chatlog
Search
14:20:58
beach
But I know how painful it can be to debug such things, given the sorry state of our tools.
14:23:34
heisig
The problem is that I haven't fully grasped how the interpreter represents the dynamic environment.
14:24:07
heisig
Some things are modeled via sicl-run-time:*dynamic-environment*, but most entries are just pushed to the second output of a catch instruction.
14:26:25
beach
I believe *dynamic-environment* is used around function calls, so that it can be accessed by the host closure and passed to the HIR program.
14:35:15
heisig
I have something else that I'd like you to check. In AST-to-HIR, in the COMPILE-AST method for compiling a tagbody AST.
14:36:13
heisig
If I understand the code correctly then the successor indices for each catch instructions have the opposite order than they should.
14:36:36
heisig
Because indices are incremented starting from zero, but the successors are pushed to the front.
14:38:17
beach
I suspect the order doesn't matter. The GO instruction will turn into an UNWIND with the correct index. But let me check...
16:08:37
beach
Today, I defined a few more of the undefined functions. I am down to 30 now. Frequently, when I define a function, I also add a reference to another unknown function. But the net result is an improvement, so I am not complaining.
16:09:30
beach
Two of the "undefined functions" aren't really. They are due to the compiler assuming it is a function call, when it is really a missing macro definition. I just have to load some macro definition earlier.
16:10:22
beach
Yesterday, I wrote a macro that will allow me to load code for a generic function even though there is already an ordinary function, or a host generic function, with that name in the environment.
16:13:03
beach
I haven't tested that macro yet, but it is the key to loading heisig's implementation of the sequence functions. Loading those functions may not be trivial for other reasons, but it is currently impossible without such a macro.
18:18:05
beach
So, ENSURE-GENERIC-FUNCTION returns the existing host function and can't add methods to it.