The Trunk: Collections-eem.700.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Collections-eem.700.mcz

commits-2
Eliot Miranda uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-eem.700.mcz

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

Name: Collections-eem.700
Author: eem
Time: 7 July 2016, 11:10:35.817225 am
UUID: 3761f170-2d94-4ed1-bf3d-1790217dc3d3
Ancestors: Collections-eem.699

Better error messages for primitive failure of one-way become.  Set lastChar in TranscriptStream (does this really belong in Collections?) when resetting.

=============== Diff against Collections-eem.699 ===============

Item was changed:
  ----- Method: Array>>elementsForwardIdentityTo:copyHash: (in category 'converting') -----
  elementsForwardIdentityTo: otherArray copyHash: copyHash
  "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.
  If copyHash is true, the identityHashes remain with the pointers rather than with the
  objects so that the objects in the receiver should still be properly indexed in any
  existing hashed structures after the mutation.  If copyHash is false, then the hashes
  of the objects in otherArray remain unchanged.  If you know what you're doing this
  may indeed be what you want."
  <primitive: 249 error: ec>
+ ec == #'bad receiver' ifTrue:
+ [^self error: 'receiver must be of class Array'].
+ ec == #'bad argument' ifTrue:
+ [^self error: (otherArray class == Array
+ ifTrue: ['arg must be of class Array']
+ ifFalse: ['receiver and argument must have the same size'])].
+ ec == #'inappropriate operation' ifTrue:
+ [^self error: 'can''t become immediates such as SmallIntegers or Characters'].
+ ec == #'no modification' ifTrue:
+ [^self error: 'can''t become immutable objects'].
+ ec == #'object is pinned' ifTrue:
+ [^self error: 'can''t become pinned objects'].
  self primitiveFailed!

Item was added:
+ ----- Method: TranscriptStream>>reset (in category 'positioning') -----
+ reset
+ "Override to set lastChar"
+ position > 0 ifTrue:
+ [lastChar := collection at: position].
+ ^super reset!