[Pharo-project] How to copy a CompiledMethod?

Igor Stasenko siguctua at gmail.com
Thu Nov 25 22:14:36 CET 2010

On 25 November 2010 20:44, Gabriel Hernán Barbuto <gbarbuto at gmail.com> wrote:
> Hi
> I am trying to make a complete duplicate of a CompiledMethod. I
> started with CompiledMethod>>#copyWithTrailerBytes: but I think that
> this way still leaves some things to copy. It duplicates all the
> literals, but I think that it doesn't duplicate a Pragma if for
> example, the method has one.
AFAIR, pragmas are stored as one of literals.
So, it actually should also make a copy of pragmas.

> Is there a proper way to completely make deep copy of a
> CompiledMethod? I mean, without writing my own. If there is a way to
> do it, I don't want to duplicate it.
if you tell more, why #copy is not enough for you.

> Thanks in advance.
> Gabriel

Best regards,
Igor Stasenko AKA sig.

More information about the Pharo-project mailing list