So I would like to still know: 1) while those fucking CMs are not GCed 2) how they can be generated.
I have spent the whole day and I couldn't :( I am more interested in
Notice that I didn't do anything weird. I just took the default Pharo1.3 image.
you could take any method and just do #copyWithTrailerBytes: with any trailer you would like to test.
Thanks. I don't understand how I can create a trailer with tempNames. Actually, I don't understand what string to pass as tempNames. In your #testEmbeddingTempNames you do: code := 'testEmbeddingSourceCode | trailer newTrailer code | trailer := CompiledMethodTrailer new. trailer sourceCode: code. newTrailer := trailer testEncoding. self assert: (newTrailer sourceCode = code).'. trailer tempNames: code. But I am not sure if that's correct. What does it means? that as temp names I send the full source code? I tried and doesn't work. And then, I read the following method which says something about writing the tempNames with a particular way: schematicTempNamesString "Answer the temp names for the current method node in a form that captures temp structure. The temps at each method and block scope level occur space-separated, with any indirect temps enclosed in parentheses. Each block level is enclosed in square brackets. e.g. 'method level temps (indirect temp)[block args and temps (indirect)]' This representation can be reconstituted into a blockExtentsToTempsMap by a CompiledMethod that has been copied with the schematicTempNamesString." You can also look at CompiledMethodTrailerTest for examples (see
#testEncoding).
As for finding pointers.. have you tried to use pointer finder? :) (it means i can't help with it more than you already know).
Yeah, I tried it. But maybe I am not seeing something :( If you want to try it by yourself, just take any Pharo1.3 image like: https://pharo-ic.lille.inria.fr/hudson/view/Pharo/job/Pharo%201.3/128/artifa... And explore any of the pointers of ((CompiledMethod allInstances select: [:each | each trailer kind = #VarLengthSourcePointer] ) ) thanks for the effort Mariano
Thanks Igor for your help.
-- Mariano http://marianopeck.wordpress.com
-- Best regards, Igor Stasenko AKA sig.
-- Mariano http://marianopeck.wordpress.com