[Vm-dev] VM Maker: VMMaker.oscog-eem.179.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Jun 28 03:25:45 UTC 2012


Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-eem.179.mcz

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

Name: VMMaker.oscog-eem.179
Author: eem
Time: 27 June 2012, 8:23:19.924 pm
UUID: 1d88b152-8a22-4ca4-a96d-06022751a128
Ancestors: VMMaker.oscog-eem.178

Fix str:n:cmp: implementation for short strings

=============== Diff against VMMaker.oscog-eem.178 ===============

Item was removed:
- ----- Method: CogVMSimulator>>str:n:cmp: (in category 'debug printing') -----
- str: aString n: bString cmp: n
- 	"implementation of strncmp(3)"
- 	bString isInteger ifFalse:
- 		[^(aString first: n) ~= (bString first: n)].
- 	1 to: n do:
- 		[:i| | v |
- 		v := (aString at: i) asInteger - (self byteAt: bString + i - 1).
- 		v ~= 0 ifTrue: [^v]].
- 	^0!

Item was changed:
  ----- Method: VMClass>>str:n:cmp: (in category 'C library simulation') -----
  str: aString n: bString cmp: n
  	<doNotGenerate>
  	"implementation of strncmp(3)"
  	bString isString ifTrue:
+ 		[^(aString first: (n min: aString size)) ~= (bString first: (n min: bString size))].
- 		[^(aString first: n) ~= (bString first: n)].
  	1 to: n do:
  		[:i| | v |
  		v := (aString at: i) asInteger - (self byteAt: bString + i - 1).
  		v ~= 0 ifTrue: [^v]].
  	^0!



More information about the Vm-dev mailing list