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

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

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

Name: Collections-ul.400
Author: ul
Time: 2 November 2010, 3:12:07.581 am
UUID: 747015e4-a721-7745-982e-7f9df814845d
Ancestors: Collections-ul.399

- use paragma declarations for #inline: and #var:declareC:

=============== Diff against Collections-ul.399 ===============

Item was changed:
  ----- Method: ByteString class>>stringHash:initialHash: (in category 'primitives') -----
  stringHash: aString initialHash: speciesHash
 
  | stringSize hash low |
  <primitive: 'primitiveStringHash' module: 'MiscPrimitivePlugin'>
 
+ <var: #aHash declareC: 'int speciesHash'>
+ <var: #aString declareC: 'unsigned char *aString'>
- self var: #aHash declareC: 'int speciesHash'.
- self var: #aString declareC: 'unsigned char *aString'.
 
  stringSize := aString size.
  hash := speciesHash bitAnd: 16rFFFFFFF.
  1 to: stringSize do: [:pos |
  hash := hash + (aString at: pos) asciiValue.
  "Begin hashMultiply"
  low := hash bitAnd: 16383.
  hash := (16r260D * low + ((16r260D * (hash bitShift: -14) + (16r0065 * low) bitAnd: 16383) * 16384)) bitAnd: 16r0FFFFFFF.
  ].
  ^ hash!