freenode/#clasp - IRC Chatlog
Search
16:47:56
karlosz
https://github.com/clasp-developers/clasp/blob/d9b83576506a9156a3fa2a83d4967f60938cdc9f/src/lisp/kernel/cmp/cmpliteral.lsp#L339
16:48:01
karlosz
that's where we convert the bignum to a string and then construct the bytecode call to ltvc
16:58:03
karlosz
oh, maybe we can just add a clause for bignums here: https://github.com/clasp-developers/clasp/blob/d9b83576506a9156a3fa2a83d4967f60938cdc9f/src/lisp/kernel/cmp/cmpliteral.lsp#L558
16:59:54
drmeister
We want a C++ function that will write out a vector of limbs and then read it back.
17:01:33
drmeister
Alternatively you could write it out as a string as a string of bytes. I _think_ you can have any length string containing any characters.
17:02:43
drmeister
Note - I have a facility in there so that size_t are written out in a sort of compressed format
17:04:09
drmeister
I don't think the limbs will be able to use this - they should just write out the full word.
17:07:57
drmeister
the compact_xxx_size_t functions are to take advantage of the fact that we often write out small numbers like 1 and 3 and 9. So why write out 0x0000000000000001 When you can write out '1' followed by the byte 0x01
17:08:41
drmeister
So - in the worst case it looks like: '8' followed by 8 bytes - so nine bytes total.
17:13:41
karlosz
like when you have things like (signed-byte 64) and (unsigned-byte 64) declarations from numeric libraries
17:14:25
karlosz
so quicklips libraries which do a lot of number crunching with word size arithmetic will have those declarations
19:42:25
drmeister
Any Xxxx_sp is a C++ template class that contains a single word of type Xxxx_O*. The Xxxx_O* pointer is a tagged pointer. T_O* indicates a tagged pointer unless it doesn't.
19:43:04
drmeister
The "unless it doesn't" is in very rare circumstances when you strip the tag. We don't let raw Xxxx_O* pointers float around as a rule.
19:46:13
drmeister
Since cons cells will now occupy 32 bytes - I will give them an 8-byte badge for hashing. That way the badge will survive image save/load and I won't have to rehash hash-tables that use cons cells as keys after loading the image.
21:55:52
karlosz
OK new bignum dumping code seems to work now: https://github.com/clasp-developers/clasp/pull/1126
23:26:26
Bike
new subtypep is well underway but there sure are a lot of niggly bits in the type system
23:26:42
Bike
need to do array, function, and values types, and then parsing, and then optimize the whole thing