freenode/#clasp - IRC Chatlog
Search
15:42:18
drmeister
Bike: I'm hitting a problem with characters and I need to check the inlined code for characterp - can you point me to where that happens?
15:43:20
drmeister
It's unlikely that anything is wrong but I'm getting an illegal character in the byte-code of quicklisp package.lisp
15:43:49
drmeister
It has the tag #B1010 and that is illegal - since we switched to 4-bit tags I need to check it.
15:44:12
drmeister
When I switched to 4-bit tags I changed the character shift to 4 bits and #B0010 is the character tag.
15:44:18
Bike
yeah, characterp is turned into typeq character. then it'll be hir-to-mir'd into a characterp instruction. the translator for that calls compile-tag-check which is here: https://github.com/clasp-developers/clasp/blob/master/src/lisp/kernel/cmp/typeq.lsp
15:47:17
Bike
https://github.com/clasp-developers/clasp/blob/master/src/lisp/kernel/cleavir/translate-instruction.lisp#L841-L845 it uses immediate-mask and character-tag
15:48:46
drmeister
FYI +immediage-mask+ is now 15 and there are now 4 (four) FIXNUM tags. Character and small-float shifts are 4 bits.
15:49:20
drmeister
Does that turn on any warning bells with you? Do you need to change any of the typeq or predicate or fastgf code to handle this new scheme?
15:49:45
Bike
i think it's all in terms of constants defined in cmpintrinsics and stuff, so it ought to be fine
15:49:47
drmeister
We have everything in constants and if you are using them properly it should all work out when I change the tagging scheme like this.
15:50:39
Bike
maybe you could look for uses of the irc- for shift instructions to make sure they're all in terms of constants?
15:52:13
Bike
"no viable overloaded '='" "note: candidate function (the implicit copy assignment operator) not viable: 'this' argument has type 'Monomer_O::Couplings::const_iterator' (aka 'const GCVector_moveable_iterator<bla bla bla>'), but method is not marked const
15:52:29
Bike
i can paste the full error if that's not descriptive enough. ti's from a few places in cando
16:00:18
drmeister
You should be hitting this - it's a sanity check and I changed the name of the _Length slot to _MaybeSignedLength and didn't even bother to try and compile it. I just pushed it to github.
16:00:32
drmeister
https://github.com/clasp-developers/clasp/blob/master/include/clasp/gctools/gcarray.h#L43
16:01:46
drmeister
I think the times on github are when I commit the change, not when I push - right?
16:09:40
drmeister
Ok, when I changed _Length to _MaybeSignedLength - I did that to catch exactly what I'm seeing now.
16:10:10
drmeister
We expose the offset of _Length to Common Lisp. We need to make sure that we aren't using the offset without taking the absolute value.
16:11:55
drmeister
I'm working on the principle that if we read the length of an array that we will have it in a register and we can immediately take the absolute value of it at an insignificant cost.
16:13:38
drmeister
In most cases we won't need to take the absolute value however. We can just keep going like we have been.