[squeak-dev] The Trunk: Collections-mt.978.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Jan 26 07:33:44 UTC 2022


Marcel Taeumel uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-mt.978.mcz

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

Name: Collections-mt.978
Author: mt
Time: 26 January 2022, 8:33:13.286127 am
UUID: 1b55f52e-37a1-6041-823a-ab7a5c648184
Ancestors: Collections-mt.977

Updates commentary for primitive 248 to match the style of the commentary for primitive 72. (Sorry for the noise.)

=============== Diff against Collections-mt.977 ===============

Item was changed:
  ----- Method: Array>>elementsForwardIdentityTo: (in category 'converting') -----
  elementsForwardIdentityTo: otherArray
  	"This primitive performs a bulk mutation, causing all pointers to the elements of the
  	 receiver to be replaced by pointers to the corresponding elements of otherArray.
+ 	NOTE THAT the #identityHash of the objects in the receiver are changed, so that hashed structures that contain such objects MUST BE rehashed while structures that contain objects from otherArray are still properly indexed. See implementors of #rehash."
- 	 The identityHashes are not copied to the target objects so that the objects in otherArray
- 	 should still be properly indexed in any existing hashed structures after the mutation."
  	<primitive: 248 error: ec>
  	ec == #'no modification' ifTrue:
  		[^self modificationForbiddenFor: otherArray becomeSelector: #elementsForwardIdentityTo:].
  	ec == #'bad receiver' ifTrue:
  		[^self error: 'receiver must be of class Array'].
  	ec == #'bad argument' ifTrue:
  		[^self error: (otherArray class == Array
  						ifFalse: ['arg must be of class Array']
  						ifTrue: ['receiver and argument must have the same size'])].
  	ec == #'inappropriate operation' ifTrue:
  		[^self error: 'can''t become immediates such as SmallIntegers or Characters'].
  	ec == #'object is pinned' ifTrue:
  		[^self error: 'can''t become pinned objects'].
  	ec == #'insufficient object memory' ifTrue:
  		[self error: 'The virtual machine is out-of-date.  Please upgrade.'].
  	self primitiveFailed!



More information about the Squeak-dev mailing list