Closed abstraktor closed 8 years ago
Ain't gonna work withput modification, I think, Character
s need some treatment, at least.
Tobias Pape sent from a mobile device
Am 13.05.2015 um 15:41 schrieb abstraktor notifications@github.com<mailto:notifications@github.com>:
Without modifying our internal representations, we would like to read the Spur image format into our virtual machine
— Reply to this email directly or view it on GitHubhttps://github.com/HPI-SWA-Lab/RSqueak/issues/66.
Reworded the ticket accordingly.
we're working on branch: 66-read-spur
Transcribed our yesterday's handwritten notes here: https://github.com/HPI-SWA-Lab/RSqueak/wiki/Image-reading
Spur introduces new object format bits for 16 bit indexables and 64 bit indexables. I assume the latter ones are out of scope for now, since we have no model for 64 bit integer arrays (or do we?). How do we want to handle the 16 bit ones? One quick way would be to store the 16 bit integers as 32 bit ints in a W_WordsObject, but the point of this format might be, e.g., 16-bit bitmap pixel arrays, so that could defeat their purpose.
If we see any of those 16-bit indexables in the wild, we can implement it. I don't think it should be too hard, if we base it on the 16-bit display bitmap code. But I assume that you ask because you haven't encountered these, yet?
Another thought is that we might want to just switch to 16-bit lltype arrays for storage for these objects, rather than storing them in 32-bit arrays and masking...
I just stumbled upon them not being supported while writing the test case for the formats. I have yet to let loose the Spur reading code on a complete image. The code in SpurBootstrap does not look like it would emit such indexables. If they do exist or when we will support them for completeness sake, I like the lltype idea, as long as the code does not read horribly if we do this. :-)
In that case, let's leave this issue open and get back to it when we need to. Unless somebody wants to do it just because... ;)
Closing this for now, unless we find more specific issues, this actually works now.
With as little modifications to our internal representations as possible/reasonable, we would like to read the Spur image format into our virtual machine.
Todo
SpurImageReader
and read spurSpecific headerGenericObject.decodePointers(…)
respect immediate characters (whenpointer & 3 == 2
)SpurImageReader.read_body()
remove bridges and usegap_length
andsize_of_next_segment
to annotateaddress_offset
to each chunkGenericObject.decodePointers(…)
respect theaddress_offset
that came from bridges and segments (whenpointer & 3 == 0
)SpurImageReader.read_object()
respect the new object header format<W_PointersObject a MethodContext>.varsize()
returns a negative value