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

commits at source.squeak.org commits at source.squeak.org
Tue Oct 20 23:08:53 UTC 2015


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

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

Name: VMMaker.oscog-eem.1497
Author: eem
Time: 20 October 2015, 4:07:03.853 pm
UUID: 0719f4d7-3dd5-4f5c-bc36-07461475c215
Ancestors: VMMaker.oscog-eem.1496

Make sure signed comparisons are used in the relevamt isIntegerValue: implementations.

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

Item was changed:
  ----- Method: ObjectMemory>>isIntegerValue: (in category 'interpreter access') -----
  isIntegerValue: intValue
  	"Answer if the given value can be represented as a Smalltalk integer value.
  	 In C, use a shift and XOR to set the sign bit if and only if the top two bits of the given
  	 value are the same, then test the sign bit. Note that the top two bits are equal for
  	 exactly those integers in the range that can be represented in 31-bits or 63-bits."
  	<api>
  	^self
+ 		cCode: [(intValue bitXor: (intValue << 1)) asInteger >= 0]
- 		cCode: [(intValue bitXor: (intValue << 1)) >= 0]
  		inSmalltalk: [intValue >= 16r-40000000 and: [intValue <= 16r3FFFFFFF]]!

Item was changed:
  ----- Method: Spur32BitMemoryManager>>isIntegerValue: (in category 'interpreter access') -----
  isIntegerValue: intValue
  	"Answer if the given value can be represented as a Smalltalk integer value.
  	 In C, use a shift and XOR to set the sign bit if and only if the top two bits of the given
  	 value are the same, then test the sign bit. Note that the top two bits are equal for
  	 exactly those integers in the range that can be represented in 31-bits or 63-bits."
  	<api>
  	^self
+ 		cCode: [(intValue bitXor: (intValue << 1)) asInteger >= 0]
- 		cCode: [(intValue bitXor: (intValue << 1)) >= 0]
  		inSmalltalk: [intValue >= 16r-40000000 and: [intValue <= 16r3FFFFFFF]]!



More information about the Vm-dev mailing list