[Vm-dev] Igor's fast become for CompiledMethods in Cog

Mariano Martinez Peck marianopeck at gmail.com
Tue Jan 31 19:22:59 UTC 2012


Hi Eliot. Me again :)   I was checking the changes Igor did some time ago
for the fast become where he basically swapped the bytes contents between
the objects when they were the same size and same header type. He put such
code in separate primtives and some changes in the image side to call them.
I have just played with them and they seem to work. I have 2 questions for
you:

1) Do you think that this new fast become can have problems when becoming
CompiledMethods? I am asking because of the JIT/Pic. Maybe I need a
flushCache or something?
So far, I tried for example the following:
    | methods |
    methods := IdentitySet new.
    (PackageInfo allPackages select: [:each|
        (#( 'AST' 'Autotest' 'AutomaticMethodCategorizer' "'Bogus'
'CodeStats'  'Gofer' 'Metacello' 'FreeType' 'HelpSystem' 'ProfStef'
'ScriptManager' 'Zinc' 'Sound' 'Tests' 'ConfigurationOf'
'ImageForDevelopers' 'LED' 'MemoryMonitor' 'SUnit' 'TrueType' 'Monticello'
'Network' 'Refactoring' 'Regex' 'ToolBuilder'" ) anySatisfy:  [:aString  |
(each packageName includesSubString: aString)])
        ] )
    do: [:aPackage |
        aPackage classes do: [:each | methods addAll: each methods ].
        ].
    methods do: [:each |
    each become: each copy
    ]

and I run the tests of that package before and after... no crash. Is there
something better I could test?

2) If I prepare a nice script with some small modifications to Igor's
proposal  would you take a look and integrate it if it is ok?  Just to know
whether I should spend time on that or not.

Thanks in advance,


-- 
Mariano
http://marianopeck.wordpress.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20120131/a791e1d4/attachment.htm


More information about the Vm-dev mailing list