[Vm-dev] VM Maker: VMMaker.oscog-ul.2388.mcz

commits at source.squeak.org commits at source.squeak.org
Mon May 21 11:40:17 UTC 2018


Levente Uzonyi uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-ul.2388.mcz

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

Name: VMMaker.oscog-ul.2388
Author: ul
Time: 21 May 2018, 1:39:17.631893 pm
UUID: e3f7bf9d-6a46-4809-a2e9-c06ac3566cee
Ancestors: VMMaker.oscog-ul.2387

- fixed a bug in primitiveStringHash

=============== Diff against VMMaker.oscog-ul.2387 ===============

Item was changed:
  ----- Method: MiscPrimitivePlugin>>primitiveStringHash (in category 'primitives') -----
  primitiveStringHash
  	"ByteArray (class) hashBytes: aByteArray startingWith: speciesHash"
  	<export: true>
  
  	| aByteArray hash byteArrayOop |
  	<var: 'aByteArray' type: #'unsigned char *'>
  	<var: 'hash' type: #'unsigned int'>
  	hash := interpreterProxy stackIntegerValue: 0.
+ 	interpreterProxy failed ifTrue:
- 	interpreterProxy failed ifFalse:
  		[^interpreterProxy primitiveFailFor: PrimErrBadArgument].
  	byteArrayOop := interpreterProxy stackValue: 1.
  	(interpreterProxy isBytes: byteArrayOop) ifFalse:
  		[^interpreterProxy primitiveFailFor: PrimErrBadArgument].
  	aByteArray := interpreterProxy firstIndexableField: byteArrayOop.
  	0 to: (interpreterProxy sizeOfSTArrayFromCPrimitive: aByteArray) - 1 do: 
  		[ :pos |
  		hash := hash + (aByteArray at: pos) * 16r19660D ].
  	interpreterProxy methodReturnInteger: (hash bitAnd: 16r0FFFFFFF)!



More information about the Vm-dev mailing list