freenode/#sicl - IRC Chatlog
Search
9:17:41
beach
heisig: I just added two more interpreter methods, for CHAR-CODE and CODE-CHAR. They are not yet generated by any SICL code, but they will be at some point.
9:18:18
beach
heisig: So I suggest you debug your thing as it is first, and only later add evaluators for those instructions.
11:08:42
froggey
I've been getting on with defstruct, and it has reached a point where object-based defstructs are mostly done
11:08:51
froggey
boa constructors have turned out to be more complicated than I originally realized, so I've abandoned the fully standard-compliant version for now and implemented a basic version that mostly works but isn't quite right
11:08:57
froggey
in addition to that I still need to do sequence-based defstructs and define proper conditions for the various errors
13:59:14
beach
An entire day to get the number of undefined functions down from 30 to 29. I defined primops/AST classes/HIR classes for CODE-CHAR and CHAR-CODE.
14:49:39
Harag
beach: It looks like I have funcall, apply and eval successfully locked down ie "Safe" now.
15:03:14
beach
How should I define EVENP and ODDP? The are basically just a bit-test operation, but to accomplish that, I would have to define at least one set of primop/AST/instruction. If I define them using MOD, is there a chance that it could be optimized at a later stage? With MOD, they would end up as a DIV instruction.
15:09:35
Bike
oh, no, you couldn't do a compiler macro because you need to know the first argument to mod is an integer
15:10:55
beach
LOGAND, LOGBITP etc, would need primops/ASTs/instructions for fixnums, so that's fine.
15:18:09
Bike
yeah. we haven't needed primops since without type inference there's no way to avoid the type tests
15:19:03
beach
Yes, that was my thinking. If you don't have them as HIR they won't be optimized with HIR transformations.
15:19:08
froggey
you only need primops for logand/logior/logxor, all the other logical operations can be built on top of them
15:20:06
Bike
i'm switching out our bignum implementation now and have realized that ldb can be done more directly
15:20:53
Bike
more directly than (logand (ash integer (- position)) (lognot (ash -1 size))), which is what we do now
15:23:06
Bike
always conses up a bignum if position > 63 or whatever, even if the result fits in a fixnum
15:30:15
beach
Bike: [changing the subject] I may have asked this before, but do you think it would be possible to do all the transformations prior to closure conversion (that we now do on HIR) on the AST, without losing any opportunities for optimizations later?
15:31:01
beach
In other words, am I right in thinking that the transformations we do after closure conversion are specific to each function?
15:33:42
beach
Do constant hoisting, fdefinition hoisting, and inlining on the AST. Then closure conversion.
15:35:02
beach
I now have top-level functions. I then want to turn each such top-level function (in the form of an AST) back to host code, much the way I did for Harag's sandbox.
15:35:41
beach
If I could do that without losing any opportunities for optimization on HIR later on, I would have a much faster way of executing SICL code in the host.
15:40:40
Bike
we spent a lot of time on moving inlining from ast level to hir level. you'd probably lose the partial inlining concept and stuff.
15:40:45
beach
Because nested functions that don't escape do not need to be independent in the resulting host code.
15:41:28
beach
But if I restrict this idea to functions that escape, then that should be no problem.
15:43:32
beach
The basic idea is that I want to turn the AST into host code for faster execution during bootstrapping.
15:44:05
beach
But that doesn't work if there is a (setf (fdefinition 'foo) (lambda ...)) in the code.
15:44:18
beach
Because then my first-class global environments will end up having host closures in them.
15:45:02
beach
And there are plenty of those. I turn a file into a single AST that does exactly that for each top-level definition in the file.
15:46:26
beach
So then I thought, if I did closure conversion on the AST, that would solve the problem, because I could then turn each such (lambda ...) into HIR, etc.
15:47:25
beach
Only functions that escape, and in particular that case (setf (fdefinition 'foo...) (lambda ...)) need be turned into HIR/MIR/etc.