compiled method source pointer cleanup
tim Rowledge
tim at rowledge.org
Thu Oct 19 05:35:05 UTC 2006
I have some code that adds the source reference to the method
properties. Seems to work ok, which is good so far as it goes.
Problem now is that I'm out of spare braincells on the next stage.
I'm reasonably sure I could work it out eventually but I have a bunch
of actual work to do so I'm asking for help.
The current source position/file encoding is a little convoluted -
see StandardSourceFileArray> sourcePointerFromFileIndex: index
andPosition: position - in such a way as to make it a bit tricky to
extend the position range. Now we *could* keep using the same
encoding for larger position ranges but it seems a bit silly to
complicate life. I'd like to use something much more extensible
(remember, the source reference is no longer encoded into a fixed
number of bytes at the end of a compiledmethod) like
(sourcefileindex-1) + (position bitShift: 2)
which would happily keep working into large integers. I think we can
feel sure that large integer will allow pointing into any conceivable
file size?
What we need is a chunk of code that will
do the equivalent of #condenseSources whilst moving from the old to
the new encoding
install the replacement code to use the new encoding without breaking
during the installation
cleanup
I suppose the good news about losing the old sources as part of 3.9
is that there is no need to try to make the transfer also follow the
method history chains. That should simplify things a bit. Obviously I
can supply the changesets for the method changes to the brave volunteer.
There is also a boatload of code needing attacking to clear out usage
of the trailer bytes, explicit assumptions about use of files and the
indices etc but that can come later.
So, who's feeling brave and adventurous?
tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Strange OpCodes: LCD: Launch Cartridge Disk
More information about the Squeak-dev
mailing list
|