sq 3.9 compiledmethod #sourceClass and #methodClass
tim at rowledge.org
Tue Oct 10 16:11:16 UTC 2006
On 10-Oct-06, at 12:14 AM, Marcus Denker wrote:
> No... so for explanation: Traits share CompiledMethods (if there is
> no super in them).
Ah-hah. I thought they copied down.
> So when you asked the (prior to properties) for #who, the answer
> was random: in what ever class or Traits the method was found
> first, this was returned as the class.
That be would bad (sorry, words in order as found :-)
> For Traits, this now leads to undefined results, as did #who
> before. This should be fixed, of course. There are three
> alternatives: 1) allways return the Trait on
> #methodClass, 2) give up CompiledMethod sharing alltogether or 3)
> have CompiledMethods be real Objects and share the ByteCode
> ByteArray and the literals.
> So.. best would be 3), but this seems to be off for at least 8
> other years,
Oh I sure hope not.
> so I guess it would be 1) first and later maybe 2, as the
> CompiledMethod sharing makes
> not much sense as soon as CompiledMethods know something about
> where they are in the system.
Yes, I think that having the method include the method class is
essentially the same barrier to cm sharing (until 1) above) as having
a super in the code. Is it practical to fix this very soon? Obviously
the code to cope with a non-shared trait method is in place so could
we just kill the shared case for now and re-wiggle the currently
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Useful random insult:- Low on thinking gas.
More information about the Squeak-dev