On Tue, Jan 17, 2012 at 5:58 PM, Stefan Marr <[email protected]>wrote:
> Hi: > > On 17 Jan 2012, at 09:47, Mariano Martinez Peck wrote: > > > Stefan, another approach would be to store the source code in the > compiled method trailer. > Looks like everything is there already, but it does not seem to work > stable enough. > > Yes, that was pretty much the same idea I got when I tried it. > > With the code below, this should work: (do not apply the change to > getSourceFromFile!!) > ------------- > |trailer source m | > m := (Gofer>>#load). > trailer := m trailer. > source := m getSource. > trailer sourceCode: source. > m recompileWithTrailer: trailer. > ------------- > > If you don't bother about being slow, you can also make it much easier: |trailer source m | m := (Gofer>>#load). trailer := m trailer. source := m getSource. trailer sourceCode: source. m becomeForward: (m copyWithTrailerBytes: trailer) and if you want to do it for the whole image you can use one bulk become and it will be fast. I will experiment and see if it is working. > > > > PS: I will interested if you do it :) > In return, I would really appreciate if you could learn a bit about > etiquette and quoting > http://www.gweep.ca/~edmonds/usenet/ml-etiquette.html#SECTION00090000000000000000 > > 99% of the cases I answer where I have to answer (like I am doing now). But sometimes if my answer is obvious, I think it is much easier a top posting than having to quote your email. -- Mariano http://marianopeck.wordpress.com
