[Vm-dev] VM Maker: VMMaker.oscog-tfel.1862.mcz

commits at source.squeak.org commits at source.squeak.org
Thu May 19 07:50:39 UTC 2016


Tim Felgentreff uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-tfel.1862.mcz

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

Name: VMMaker.oscog-tfel.1862
Author: tfel
Time: 19 May 2016, 9:49:06.672041 am
UUID: ee2580a0-a9df-a945-ab7d-26865d302201
Ancestors: VMMaker.oscog-tfel.1861

Use SmallInteger maxVal and minVal in Integer>>signedIntFromLong for the benefit of VMs that can fit more than 30bit into a signed integer

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

Item was changed:
  ----- Method: Integer>>signedIntFromLong (in category '*VMMaker-interpreter simulator') -----
  signedIntFromLong
  	"Self is a signed or unsigned 32-bit integer"
  
  	| bits |
+ 	(self >= SmallInteger minVal and: [self <= SmallInteger maxVal]) ifTrue: "These are known to be SmallIntegers..."
- 	(self >= -1073741824 and: [self <= 1073741823]) ifTrue: "These are known to be SmallIntegers..."
  		[^self].
  	bits := self bitAnd: 16rFFFFFFFF.
  	(bits digitAt: 4) <= 16r7F ifTrue: [^bits].
  	^bits - 16r100000000!



More information about the Vm-dev mailing list