pnkfelix / larceny-test

test import of trac db
Other
2 stars 0 forks source link

Parameterize heap dumping over character representation for unicode #367

Open larceny-trac-import opened 11 years ago

larceny-trac-import commented 11 years ago

_Reported by: lth on Fri Dec 10 06:00:00 2004 _ 167 v0.53 (2004-12-10 / lth) Priority: low Category: REPRESENTATIONS / Portability

The data representations in Petit Larceny are quite abstract and precise layouts are defined by macros in C header files. In most cases there's not much that can be done with this abstraction, but in the case of Unicode there is: one can go from a CHAR data representation that has 8 bits of data to one that has 24 bits of data, provided the character data use all available space. But the char representation puts the character data in the middle 8 bits. For all C code this is abstracted away and it is easy to change the charcode() and int_to_char() macros. But the heap dumper does not cooperate: it knows what a character looks like.

The heap dumper should be parameterized to handle this, or perhaps, we should store the character data more conveniently for a Unicode port to get at them.

larceny-trac-import commented 11 years ago

Author: pnkfelix I think this has been resolved as part of the shift to Unicode support that we did across the board for Larceny 0.93...

larceny-trac-import commented 11 years ago

Author: pnkfelix I cannot tell if Lars was talking about the code in [source:trunk/larceny_src/src/Rts/Sys/heapio.c heapio.c] or the code in [source:trunk/larceny_src/src/Asm/Shared/dumpheap.sch dumpheap.sch].

The [source:trunk/larceny_src/src/Rts/Sys/heapio.c heapio.c] does not look like it assumes a particular representation for characters or strings.

The [source:trunk/larceny_src/src/Asm/Shared/dumpheap.sch dumpheap.sch] has been parameterized over the string representation option selected at build time.

So I'm very tempted to close this ticket...