[Vm-dev] VM Maker: VMMaker-dtl.289.mcz

commits at source.squeak.org commits at source.squeak.org
Sat Sep 22 20:26:07 UTC 2012


David T. Lewis uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker-dtl.289.mcz

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

Name: VMMaker-dtl.289
Author: dtl
Time: 22 September 2012, 4:24:48.662 pm
UUID: 7679a179-13e6-4507-8bd9-5b1e5b2d6aac
Ancestors: VMMaker-dtl.288

VMMaker 4.10.4

Update unit tests.

Add SlangTest>>testExportsForSqueak3D to ensure that the code generation bug fixed in 4.10.3 does not come back.

InterpreterPrimitivesTest>>testPrimitiveSubtractLargeIntegersParameterBounds is no longer listed as a expected failure. Update comment in testPrimitiveSubtractLargeIntegersParameterBounds to explain that the questionable expected failure is now a pass due to large integer fixes of Nicolas Cellier (VMM 4.10.1).

Update InterpreterPrimitivesTest>>testSigned64BitValueOfLargeNegativeInteger and InterpreterPrimitivesTest>>testSigned64BitValueOfLargePositiveInteger to reflect expanded range of large integer arithmetic in primitives due to large integer fixes of Nicolas Cellier (VMM 4.10.1).

Update VMConstantsTest>>testConstMinusOne to reflect various recent Interpreter/ObjectMemory refactorings.

All VMMaker-tests tests pass except SlangTest>>testIvarShouldNotBeRedeclaredAsLocal

=============== Diff against VMMaker-dtl.288 ===============

Item was changed:
  ----- Method: InterpreterPrimitivesTest>>expectedFailures (in category 'testing') -----
  expectedFailures
+ 	^#("testPrimitiveSubtractLargeIntegersParameterBounds")!
- 	^#(testPrimitiveSubtractLargeIntegersParameterBounds)!

Item was changed:
  ----- Method: InterpreterPrimitivesTest>>testPrimitiveSubtractLargeIntegersParameterBounds (in category 'testing - primitiveSubtractLargeIntegers') -----
  testPrimitiveSubtractLargeIntegersParameterBounds
+ 	"Prior to VMMaker VMMaker 4.10.1 enhancement by Nicolas Cellier, range was
+ 	restricted and this test would fail."
- 	"Expected failure, but questionably so. The primitiveSubtractLargeIntegers method
- 	fails the primitive if the argument is the maximum negative 64 bit value."
  
  	| intOne intTwo |
  	"LargeNegativeInteger at lower range boundary"
  	intOne := -16r8000000000000000. "maximum negative 64 bit value"
  	intTwo := -16r7FFFFFFFFFFFFFFF.
  	self shouldnt: [intTwo minus64: intOne]
  		raise: Error.
  !

Item was changed:
  ----- Method: InterpreterPrimitivesTest>>testSigned64BitValueOfLargeNegativeInteger (in category 'testing - signed64BitValueOf') -----
  testSigned64BitValueOfLargeNegativeInteger
  	"Exercise #signed64BitValueOf: using a LargeNegativeInteger at the maximum of
  	its range. Note, IntegerArrayTest provides coverage of 32-bit equivalent."
  
  	| intOne diff intTwo |
  	"LargeNegativeInteger at lower range boundary"
  	intOne := -16r8000000000000000. "maximum negative 64 bit value"
  	intTwo := -16r7FFFFFFFFFFFFFFF.
  	self shouldnt: [diff := intOne minus64: intTwo]
  		raise: Error.
  	self assert: diff = -1.
  
  	"See testPrimitiveSubtractLargeIntegersParameterBounds"
  	"self shouldnt: [diff := intTwo minus64: intOne]
  		raise: Error.
  	self assert: diff = 1."
  
  	self shouldnt: [diff := intOne minus64: -1]
  		raise: Error.
  	self assert: diff = intTwo.
  	
  	"Parameters exceeding allowable range"
+ 	"Prior to VMMaker VMMaker 4.10.1 enhancement by Nicolas Cellier, range was
+ 	restricted and the following would raise errors."
+ 	intOne := -16r8000000000000000 - 1. "exceed most negative 64 bit twos complement"
- 	intOne := -16r8000000000000000 - 1. "exceed most negative 64 bit"
  	intTwo := -16r7FFFFFFFFFFFFFFF.
+ 	diff := intOne minus64: intTwo.
+ 	self assert: diff = -2.
+ 	diff := intTwo minus64: intOne.
+ 	self assert: diff = 2.
+ 	"Full 64 bit magnitude range is now available"
+ 	intOne := -16rFFFFFFFFFFFFFFFF. ""
+ 	intTwo := -16rFFFFFFFFFFFFFFFE.
+ 	diff := intOne minus64: intTwo.
+ 	self assert: diff = -1.
+ 	diff := intTwo minus64: intOne.
+ 	self assert: diff = 1.
+ 	intOne := 16rFFFFFFFFFFFFFFFF. ""
+ 	intTwo := 16rFFFFFFFFFFFFFFFE.
+ 	diff := intOne minus64: intTwo.
+ 	self assert: diff = 1.
+ 	diff := intTwo minus64: intOne.
+ 	self assert: diff = -1.
+ 	"Out of range"
+ 	intOne := -16rFFFFFFFFFFFFFFFF - 1. "exceed most negative 64 bit unsigned magnitude"
+ 	intTwo := -16rFFFFFFFFFFFFFFFF.
+ 	self should: [intOne minus64: intTwo]
- 	self should: [diff := intOne minus64: intTwo]
  		raise: Error.
+ 	self should: [intTwo minus64: intOne]
- 	self should: [diff := intTwo minus64: intOne]
  		raise: Error.
  !

Item was changed:
  ----- Method: InterpreterPrimitivesTest>>testSigned64BitValueOfLargePositiveInteger (in category 'testing - signed64BitValueOf') -----
  testSigned64BitValueOfLargePositiveInteger
  	"Exercise #signed64BitValueOf: using a LargePositiveInteger at the maximum of
  	its range. Note, IntegerArrayTest provides coverage of 32-bit equivalent."
  
  	| intOne diff intTwo |
  	"LargePositiveInteger at upper range boundary"
  	intOne := 16r7FFFFFFFFFFFFFFF. "maximum 64 bit positive"
  	intTwo := 16r7FFFFFFFFFFFFFFE.
  	self shouldnt: [diff := intOne minus64: intTwo]
  		raise: Error.
  	self assert: diff = 1.
  	self shouldnt: [diff := intTwo minus64: intOne]
  		raise: Error.
  	self assert: diff = -1.
  	self shouldnt: [diff := intOne minus64: 1]
  		raise: Error.
  	self assert: diff = intTwo.
  	
  	"Parameters exceeding allowable range"
+ 	"Prior to VMMaker VMMaker 4.10.1 enhancement by Nicolas Cellier, range was
+ 	restricted and the following would raise errors."
+ 	intOne := 16r7FFFFFFFFFFFFFFF + 1.  "exceed maximum 64 bit twos complement positive"
- 	intOne := 16r7FFFFFFFFFFFFFFF + 1. "exceed maximum 64 bit positive"
  	intTwo := 16r7FFFFFFFFFFFFFFE.
+ 	diff := intOne minus64: intTwo.
+ 	self should: diff = 2.
+ 	diff := intTwo minus64: intOne.
+ 	self should: diff = -2.
+ 
+ 	"Full 64 bit magnitude range is now available"
+ 	intOne := 16rFFFFFFFFFFFFFFFF.
+ 	intTwo := 16rFFFFFFFFFFFFFFFE.
+ 	diff := intOne minus64: intTwo.
+ 	self should: diff = 1.
+ 	diff := intTwo minus64: intOne.
+ 	self should: diff = -1.
+ 
+ 	intOne := 16rFFFFFFFFFFFFFFFF + 1. "exceed maximum 64 bit unsigned magnitude"
+ 	intTwo := 16rFFFFFFFFFFFFFFFE.
+ 	self should: [intOne minus64: intTwo]
- 	self should: [diff := intOne minus64: intTwo]
  		raise: Error.
+ 	self should: [intTwo minus64: intOne]
- 	self should: [diff := intTwo minus64: intOne]
  		raise: Error.
  !

Item was added:
+ ----- Method: SlangTest>>testExportsForSqueak3D (in category 'testing variable declaration') -----
+ testExportsForSqueak3D
+ 	"If the code generator is not properly initialized in the special case of
+ 	B3DEnginePlugin, the exports table will be incorrect in the generated code.
+ 	Some versions of VMMaker had this problem, this test is to ensure that the
+ 	problem stays fixed."
+ 
+ 	Smalltalk at: #B3DEnginePlugin ifPresent: [:squeak3D | | src |
+ 		src := squeak3D asCString.
+ 		self assert: ( '*"Squeak3D", "setInterpreter", (void*)setInterpreter*' match: src)]
+ !

Item was changed:
  ----- Method: VMConstantsTest>>testConstMinusOne (in category 'testing') -----
  testConstMinusOne
  	"ConstMinusOne is the object reference for integer -1. It must be handled specially
  	in the interpreter simulator because it resolves to a negative integer that cannot be
+ 	directly stored into a BitMap. See InterpreterSimulator>>initialize. Note that an
+ 	interpreter simulator modifies constants that are used in code generation. VMMaker
+ 	is expected to always initialize constants prior to generating code."
- 	directly stored into a BitMap. See InterpreterSimulator>>initialize."
  
  	| interp |
  	self initializeVMConstants.
  	self assert: InterpreterSimulator constMinusOne = -1.
+ 	[self assert: Interpreter constMinusOne = -1.
+ 	interp := InterpreterSimulator new. "modifies the constants in simulation"
- 	self assert: Interpreter constMinusOne = -1.
- 	interp := InterpreterSimulator new.
  	self deny: InterpreterSimulator constMinusOne = -1.
  	self deny: Interpreter constMinusOne = -1.
  	self assert: Interpreter constMinusOne = 16rFFFFFFFF.
+ 	"	interp bytesPerWord: 8."
+ 	"	interp initialize."
- 	interp bytesPerWord: 8.
- 	interp initialize.
  	"Note: Integer value of -1 is the same in 64 bit object memory because
  	SmallInteger format is currently the same as in 32 bit object memory."
+ 	self assert: Interpreter constMinusOne = 16rFFFFFFFF]
+ 		ensure: [self initializeVMConstants].
+ 	self assert: InterpreterSimulator constMinusOne = -1.
- 	self assert: Interpreter constMinusOne = 16rFFFFFFFF
  !

Item was changed:
  ----- Method: VMMaker class>>versionString (in category 'version testing') -----
  versionString
  
  	"VMMaker versionString"
  
+ 	^'4.10.4'!
- 	^'4.10.3'!



More information about the Vm-dev mailing list