freenode/#sicl - IRC Chatlog
Search
23:01:10
alandipert
quasiquote is go! reading how elector does it was really helpful, thanks https://tmp-alandipert.s3.amazonaws.com/Screen+Shot+2019-10-17+at+3.58.16+PM.png
4:00:47
beach
I need to figure out the implementation of CLASS-OF and TYPEP. The two are intimately related.
4:01:58
beach
It should check whether the object is one with a special tag, such as FIXNUM, CHARACTER, SINGLE-FLOAT, or CONS.
4:04:21
beach
There are standard functions CHARACTERP and CONSP, but no such thing for FIXNUM or SINGLE-FLOAT.
4:06:11
beach
We would like for all these types to be worked on by the type inferencer. So they should result in a TYPEQ-INSTRUCTION.
4:08:08
beach
First, we need a compiler macro on TYPEP that turns it into a TYPEQ when the type descriptor is a constant.
4:10:18
beach
And then, after the type inferencer has done its job, we must turn TYPEQ-INSTRUCTION into either FIXNUMP-INSTRUCTION, CHARACTERP-INSTRUCTION, CONSP-INSTRUCTION, [I forget what the thing is for floats], or a call to TYPEP.
4:13:49
beach
That's fine, but we need to make sure that the (TYPEQ object fixnum) does not result in a call to TYPEP.
4:16:45
beach
Which means that after the type inferencer has done its work, if there is ever a type descriptor that is equivalent to FIXNUM, then the FIXNUMP-INSTRUCTION should be used, rather than a call to TYPEP.
4:18:56
beach
But depending on the context, that type may turn into something like (AND (INTEGER .. ..) FIXNUM).
4:22:51
beach
We might get away with the simpler version where we just check the equivalence of a type with FIXNUM.
4:24:29
beach
It is *possible* that we can identify a small number of cases that we can handle "manually".
4:26:51
beach
Now, as I recall, Jim Newton et al are working on such a thing, but I think it is still work in progress.
6:22:59
beach
Hmm. I should have spent more time proofreading the draft of the paper by Valais, Newton, and Verna. There is some stuff in there that is hard to understand.