[bug] copying a compiledmethod
Lex Spoon
lex at cc.gatech.edu
Thu Oct 26 17:01:09 UTC 2000
I've run into this, and after some tinkering came up with appended
method. I don't remember the details, except that this is similar to
another method that already existed.
-Lex
====
'From Squeak2.9alpha of 13 June 2000 [latest update: #2447] on 16 August 2000 at
10:33:07 am'!
"Change Set: cmCopy
Date: 16 August 2000
Author: Lex Spoon
CompiledMethod>>copy -- needed for adding a variable to Behavior"!
!CompiledMethod methodsFor: 'initialize-release' stamp: 'ls 8/14/2000 17:57'!
copy
| copy end start |
start _ self initialPC.
end _ self endPC.
copy _ CompiledMethod newMethod: end - start + 1
header: self header.
1 to: self numLiterals do: [:i | copy literalAt: i put: (self literalAt:
i)].
start to: end do: [:i | copy at: i put: (self at: i)].
^ copy! !
More information about the Squeak-dev
mailing list
|