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

commits at source.squeak.org commits at source.squeak.org
Wed Mar 13 19:13:45 UTC 2019


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

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

Name: VMMaker.oscog-eem.2528
Author: eem
Time: 12 March 2019, 3:27:02.082826 pm
UUID: 4e2a39e8-85bd-4a4a-a04b-86567f28f1ea
Ancestors: VMMaker.oscog-eem.2527

Spur 64-bits:
Fix https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/376; Bug in primitive 551 (SmallFloat64>> truncated).  Fiox by also checking that the truncated value is in integer range.

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

Item was changed:
  ----- Method: InterpreterPrimitives>>primitiveSmallFloatTruncated (in category 'arithmetic float primitives') -----
  primitiveSmallFloatTruncated
  	<option: #Spur64BitMemoryManager>
  	| rcvr trunc |
  	<var: #rcvr type: #double>
  	<var: #trunc type: #double>
  	rcvr := objectMemory smallFloatValueOf: self stackTop.
  	self cCode: [self mod: rcvr f: (self addressOf: trunc)]
  		inSmalltalk: [trunc := rcvr truncated].
+ 	((trunc between: objectMemory minSmallInteger asFloat and: objectMemory maxSmallInteger asFloat)
+ 	 and: [objectMemory isIntegerValue: trunc asInteger])
- 	(trunc between: objectMemory minSmallInteger asFloat and: objectMemory maxSmallInteger asFloat)
  		ifTrue: [self stackTopPut: (objectMemory integerObjectOf: trunc asInteger)]
  		ifFalse: [self primitiveFail]!



More information about the Vm-dev mailing list