[Pkg] The Trunk: Kernel-eem.889.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Dec 1 21:10:24 UTC 2014

Eliot Miranda uploaded a new version of Kernel to project The Trunk:

==================== Summary ====================

Name: Kernel-eem.889
Author: eem
Time: 1 December 2014, 1:09:35.682 pm
UUID: 1fb0b0d6-b62e-4d04-a3d7-e72a25dafeae
Ancestors: Kernel-eem.888

Provide a plausible definition of
CompiledMethod>>copyFrom: that at least works
with compiled methods and e.g. Array.

=============== Diff against Kernel-eem.888 ===============

Item was added:
+ ----- Method: CompiledMethod>>copyFrom: (in category 'copying') -----
+ copyFrom: anotherObject
+ 	"Copy to myself all instance variables I have in common with anotherObject.
+ 	 This is dangerous because it ignores an object's control over its own inst vars."
+ 	<primitive: 168>
+ 	anotherObject isCompiledMethod
+ 		ifTrue:
+ 			[1 to: self numLiterals do:
+ 				[:i| self literalAt: i put: (anotherObject literalAt: i)]]
+ 		ifFalse:
+ 			[1 to: self numLiterals do:
+ 				[:i| self literalAt: i put: (anotherObject at: i)]].
+ 	self initialPC to: (self basicSize min: anotherObject basicSize) do:
+ 		[:i|
+ 		 self basicAt: i put: (anotherObject basicAt: i)]!

More information about the Packages mailing list