VM Maker: VMMaker.oscog-eem.183.mcz

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

VM Maker: VMMaker.oscog-eem.183.mcz

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

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

Name: VMMaker.oscog-eem.183
Author: eem
Time: 4 July 2012, 6:25:44.228 am
UUID: b044afd7-a1c6-4f20-ae81-96ceffa744e7
Ancestors: VMMaker.oscog-eem.182

Fix the simulated memcpy which used strncmp and hence stopped at
a null byte.

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

Item was changed:
  ----- Method: VMClass>>mem:cp:y: (in category 'C library simulation') -----
  mem: aString cp: bString y: n
  <doNotGenerate>
  "implementation of memcpy(3)"
+ aString isString
+ ifTrue:
+ [1 to: n do:
+ [:i| | v |
+ v := bString isString
+ ifTrue: [bString at: i]
+ ifFalse: [Character value: (self byteAt: bString + i - 1)].
+ aString at: i put: v]]
+ ifFalse:
+ [1 to: n do:
+ [:i| | v |
+ v := bString isString
+ ifTrue: [(bString at: i) asInteger]
+ ifFalse: [self byteAt: bString + i - 1].
+ self byteAt: aString + i - 1 put: v]].
+ ^aString!
- ^self st: aString rn: bString cpy: n!