The Trunk: Collections-ul.429.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-ul.429.mcz

commits-2
Levente Uzonyi uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-ul.429.mcz

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

Name: Collections-ul.429
Author: ul
Time: 28 February 2011, 7:46:37.501 am
UUID: d06ca77f-a95d-134b-9474-847ce5c808b7
Ancestors: Collections-laza.428

String's  #getInteger32: and #putInteger32:at: were moved to Nebraska.

=============== Diff against Collections-laza.428 ===============

Item was removed:
- ----- Method: String>>getInteger32: (in category 'encoding') -----
- getInteger32: location
- | integer |
- <primitive: 'getInteger' module: 'IntegerPokerPlugin'>
- "^IntegerPokerPlugin doPrimitive: #getInteger"
-
- "the following is about 7x faster than interpreting the plugin if not compiled"
-
- integer :=
- ((self at: location) asInteger bitShift: 24) +
- ((self at: location+1) asInteger bitShift: 16) +
- ((self at: location+2) asInteger bitShift: 8) +
- (self at: location+3) asInteger.
-
- integer > 1073741824 ifTrue: [^1073741824 - integer ].
- ^integer
- !

Item was removed:
- ----- Method: String>>putInteger32:at: (in category 'encoding') -----
- putInteger32: anInteger at: location
- | integer |
- <primitive: 'putInteger' module: 'IntegerPokerPlugin'>
- "IntegerPokerPlugin doPrimitive: #putInteger"
-
- "the following is close to 20x faster than the above if the primitive is not compiled"
- "PUTCOUNTER := PUTCOUNTER + 1."
- integer := anInteger.
- integer < 0 ifTrue: [integer :=  1073741824 - integer. ].
- self at: location+3 put: (Character value: (integer \\ 256)).
- self at: location+2 put: (Character value: (integer bitShift: -8) \\ 256).
- self at: location+1 put: (Character value: (integer bitShift: -16) \\ 256).
- self at: location put: (Character value: (integer bitShift: -24) \\ 256).
-
- "Smalltalk at: #PUTCOUNTER put: 0"!