freenode/#clasp - IRC Chatlog
Search
15:48:14
drmeister
In llvm9 - this is what the layout of a Code_O object would look like by default...
15:49:36
drmeister
It starts with a big chunk of code followed by the __bss section <<-- this contains the literal table.
15:50:17
drmeister
The last line cc_initialize_gcroots_in_module shows where the roots are - they start at 0x125cf3040 and there are 5 roots.
15:50:35
karlosz
Bike: you were right to suspect negative handling is the issue. currently i got the dumping and loading code working for positives but negatives are all loaded back as 0
15:50:54
drmeister
The maintainer for boehm got back to me. It looks like I understand the tags and boehm header word.
15:51:09
Bike
the trick is that bignums are represented as sign-magnitude instead of two's complement. the sign is indicated as the sign of the length
15:51:55
drmeister
There is one that describes a length in bytes, which can be smaller than the size of the objects. It describes the amount of memory that needs to be scanned at the beginning of the object.
15:52:34
karlosz
Bike: this is how i'm setting the bytes of a 0 bignum to initialize it: https://paste.gnome.org/p4li5jv9t
15:53:14
drmeister
I'm going to generate a "boehm header" for every class that the static analyzer handles.
15:53:37
Bike
shouldn't you be able to work with the mp_limb_t directly? like write out limbs to the file instead of bytes? I'm pretty sure we write and read other multi byte integers okay
15:54:13
drmeister
I'll use boehm-bitmaps for regular objects, boehm-lengths for vectors of gc managed pointers and a marking procedure for code objects.