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

commits at source.squeak.org commits at source.squeak.org
Mon Nov 24 19:44:05 UTC 2014


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

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

Name: VMMaker.oscog-eem.955
Author: eem
Time: 24 November 2014, 11:41:31.208 am
UUID: 19a7c0be-668e-42a6-8178-96235b5aafd1
Ancestors: VMMaker.oscog-eem.954

Fix brain fade in primitive[SmallFloat]Truncated

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

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 := self 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)
- 	(trunc between: SmallInteger minVal asFloat and: SmallInteger maxVal asFloat)
  		ifTrue: [self pop: 1 thenPushInteger: trunc asInteger]
  		ifFalse: [self primitiveFail]!

Item was changed:
  ----- Method: InterpreterPrimitives>>primitiveTruncated (in category 'arithmetic float primitives') -----
  primitiveTruncated 
  	| rcvr trunc |
  	<var: #rcvr type: #double>
  	<var: #trunc type: #double>
  	rcvr := self popFloat.
  	self successful ifTrue:
  		[self cCode: [self mod: rcvr f: (self addressOf: trunc)]
  			inSmalltalk: [trunc := rcvr truncated].
+ 		self success: (trunc between: objectMemory minSmallInteger asFloat and: objectMemory maxSmallInteger asFloat)].
- 		self success: (trunc between: SmallInteger minVal asFloat and: SmallInteger maxVal asFloat)].
  	self successful
  		ifTrue: [self pushInteger: trunc asInteger]
  		ifFalse: [self unPop: 1]!



More information about the Vm-dev mailing list