[Vm-dev] VM Maker: VMMaker.oscog-nice.2916.mcz

commits at source.squeak.org commits at source.squeak.org
Sat Jan 2 17:36:46 UTC 2021


Nicolas Cellier uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-nice.2916.mcz

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

Name: VMMaker.oscog-nice.2916
Author: nice
Time: 2 January 2021, 6:36:37.586827 pm
UUID: 54320c7b-5fee-4999-8bf3-53731ca0f088
Ancestors: VMMaker.oscog-eem.2915

Save the slang tests provided by Pierre Misse in mailing list - as is.

Thanks Pierre!

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

Item was added:
+ TestCase subclass: #SlangAbstractTestCase
+ 	instanceVariableNames: 'ccg'
+ 	classVariableNames: ''
+ 	poolDictionaries: ''
+ 	category: 'VMMaker-Tests'!

Item was added:
+ ----- Method: SlangAbstractTestCase>>setUp (in category 'running') -----
+ setUp
+ 	super setUp.
+ 	ccg := CCodeGenerator new.
+ !

Item was added:
+ SlangAbstractTestCase subclass: #SlangBasicTypeInferenceTest
+ 	instanceVariableNames: ''
+ 	classVariableNames: ''
+ 	poolDictionaries: ''
+ 	category: 'VMMaker-Tests'!
+ 
+ !SlangBasicTypeInferenceTest commentStamp: '' prior: 0!
+ Basic tests for the type inference used in CCodeGenerator.
+ Support methods are in SlangTypeInferenceTestClass.
+ There is only one possible type by node, no ambiguities.
+ 
+ 1 Constant
+ 	test constantNode in a method.
+ 	tests are tailor made for the current TConstantNode >> #typeOrNilFrom:in:.
+ 
+ 2 Return-constant
+ 	test return a constant node in a method.
+ 	uses the previous categorie's values.
+ 
+ 3 Return-temp-assigned-constant
+ 	assign a temporary node with a constant
+ 	then returns the temporary variable in the next statement.
+ 	
+ 4 Return-temp-assigned-message
+ 	assign a temporary node with a message
+ 	then returns the temporary variable in the next statement.
+ 	
+ 5 Return-explicit-temp
+ 	returns a temporary typed by a pragma #var:type:.
+ 
+ 6 Return-explicit-arg
+ 	returns an argument typed by a pragma #var:type:.!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTest>>setUp (in category 'running') -----
+ setUp
+ 	super setUp.
+ 	ccg addClass: SlangBasicTypeInferenceTestClass.
+ 	ccg inferTypesForImplicitlyTypedVariablesAndMethods.
+ !

Item was added:
+ ----- Method: SlangBasicTypeInferenceTest>>testABigNegativeIntegerConstantNode (in category 'constant') -----
+ testABigNegativeIntegerConstantNode
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #aBigNegativeIntegerConstantNode.
+ 	
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #'long long'!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTest>>testAFalseConstantNode (in category 'constant') -----
+ testAFalseConstantNode
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #aFalseConstantNode.
+ 	
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #int!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTest>>testAFloatConstantNode (in category 'constant') -----
+ testAFloatConstantNode
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #aFloatConstantNode.
+ 	
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #double!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTest>>testANilConstantNode (in category 'constant') -----
+ testANilConstantNode
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #aNilConstantNode.
+ 	
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #int!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTest>>testASmallNegativeIntegerConstantNode (in category 'constant') -----
+ testASmallNegativeIntegerConstantNode
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #aSmallNegativeIntegerConstantNode.
+ 	
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #int!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTest>>testAStringConstantNode (in category 'constant') -----
+ testAStringConstantNode
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #aStringConstantNode.
+ 	
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #'char *'!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTest>>testATrueConstantNode (in category 'constant') -----
+ testATrueConstantNode
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #aTrueConstantNode.
+ 	
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #int!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTest>>testAnIntEqual32ConstantNode (in category 'constant') -----
+ testAnIntEqual32ConstantNode
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #anIntEqual32ConstantNode.
+ 		
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #'unsigned int'!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTest>>testAnIntEqual64ConstantNode (in category 'constant') -----
+ testAnIntEqual64ConstantNode
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #anIntEqual64ConstantNode.
+ 		
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #'unsigned long long'!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTest>>testAnIntGreater64ConstantNode (in category 'constant') -----
+ testAnIntGreater64ConstantNode
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #anIntGreater64ConstantNode.
+ 		
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #'long long'!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTest>>testAnIntLess32ConstantNode (in category 'constant') -----
+ testAnIntLess32ConstantNode
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #anIntLesser32ConstantNode.
+ 	
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #int.
+ !

Item was added:
+ ----- Method: SlangBasicTypeInferenceTest>>testReturnABigNegativeIntegerConstantNode (in category 'return-constant') -----
+ testReturnABigNegativeIntegerConstantNode
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #returnABigNegativeIntegerConstantNode.
+ 	
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #'long long'.
+ 	self assert: tMethod returnType equals: #sqLong!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTest>>testReturnABigNegativeIntegerMessageSend (in category 'return-message-send') -----
+ testReturnABigNegativeIntegerMessageSend
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #returnABigNegativeIntegerMessageSend.
+ 	
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #sqLong.
+ 	self assert: (ccg typeFor: tMethod statements first expression in: tMethod) equals: #sqLong.
+ 	self assert: tMethod returnType equals: #sqLong.!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTest>>testReturnAFalseConstantNode (in category 'return-constant') -----
+ testReturnAFalseConstantNode
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #returnAFalseConstantNode.
+ 	
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #int.
+ 	self assert: tMethod returnType equals: #sqInt!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTest>>testReturnAFalseMessageSend (in category 'return-message-send') -----
+ testReturnAFalseMessageSend
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #returnAFalseMessageSend.
+ 	
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #sqInt.
+ 	self assert: (ccg typeFor: tMethod statements first expression in: tMethod) equals: #sqInt.
+ 	self assert: tMethod returnType equals: #sqInt.!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTest>>testReturnAFloatMessageSend (in category 'return-message-send') -----
+ testReturnAFloatMessageSend
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #returnAFloatMessageSend.
+ 	
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #double.
+ 	self assert: (ccg typeFor: tMethod statements first expression in: tMethod) equals: #double.
+ 	self assert: tMethod returnType equals: #double.!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTest>>testReturnANilConstantNode (in category 'return-constant') -----
+ testReturnANilConstantNode
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #returnANilConstantNode.
+ 	
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #int.
+ 	self assert: tMethod returnType equals: #sqInt!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTest>>testReturnANilMessageSend (in category 'return-message-send') -----
+ testReturnANilMessageSend
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #returnANilMessageSend.
+ 	
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #sqInt.
+ 	self assert: (ccg typeFor: tMethod statements first expression in: tMethod) equals: #sqInt.
+ 	self assert: tMethod returnType equals: #sqInt.!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTest>>testReturnASmallNegativeIntegerConstantNode (in category 'return-constant') -----
+ testReturnASmallNegativeIntegerConstantNode
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #returnASmallNegativeIntegerConstantNode.
+ 	
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #int.
+ 	self assert: tMethod returnType equals: #sqInt!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTest>>testReturnASmallNegativeIntegerMessageSend (in category 'return-message-send') -----
+ testReturnASmallNegativeIntegerMessageSend
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #returnASmallNegativeIntegerMessageSend.
+ 	
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #sqInt.
+ 	self assert: (ccg typeFor: tMethod statements first expression in: tMethod) equals: #sqInt.
+ 	self assert: tMethod returnType equals: #sqInt.!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTest>>testReturnAStringConstantNode (in category 'return-constant') -----
+ testReturnAStringConstantNode
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #returnAStringConstantNode.
+ 	
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #'char *'.
+ 	self assert: tMethod returnType equals: #'char *'!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTest>>testReturnAStringMessageSend (in category 'return-message-send') -----
+ testReturnAStringMessageSend
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #returnAStringMessageSend.
+ 	
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #'char *'.
+ 	self assert: (ccg typeFor: tMethod statements first expression in: tMethod) equals: #'char *'.
+ 	self assert: tMethod returnType equals: #'char *'.!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTest>>testReturnATrueConstantNode (in category 'return-constant') -----
+ testReturnATrueConstantNode
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #returnATrueConstantNode.
+ 	
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #int.
+ 	self assert: tMethod returnType equals: #sqInt!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTest>>testReturnATrueMessageSend (in category 'return-message-send') -----
+ testReturnATrueMessageSend
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #returnATrueMessageSend.
+ 	
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #sqInt.
+ 	self assert: (ccg typeFor: tMethod statements first expression in: tMethod) equals: #sqInt.
+ 	self assert: tMethod returnType equals: #sqInt.!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTest>>testReturnAnIntEqual32ConstantNode (in category 'return-constant') -----
+ testReturnAnIntEqual32ConstantNode
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #returnAnIntEqual32ConstantNode.
+ 	
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #'unsigned int'.
+ 	self assert: tMethod returnType equals: #sqInt
+ 	"returning an integer constants is the same as returning nothing"
+ 	"this therefore return a sqInt"
+ 	"see start of the CCodeGenerator >> harmonizeReturnTypesIn: method"!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTest>>testReturnAnIntEqual32MessageSend (in category 'return-message-send') -----
+ testReturnAnIntEqual32MessageSend
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #returnAnIntEqual32MessageSend.
+ 	
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #sqInt.
+ 	self assert: (ccg typeFor: tMethod statements first expression in: tMethod) equals: #sqInt.
+ 	self assert: tMethod returnType equals: #sqInt.
+ 	"the method return type is sqint, so it's coherent, see testReturnAnIntEqual32MessageSend"!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTest>>testReturnAnIntEqual64ConstantNode (in category 'return-constant') -----
+ testReturnAnIntEqual64ConstantNode
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #returnAnIntEqual64ConstantNode.
+ 	
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #'unsigned long long'.
+ 	self assert: tMethod returnType equals: #sqInt
+ 	"returning an integer constants is the same as returning nothing"
+ 	"this therefore return a sqInt"
+ 	"see start of the CCodeGenerator >> harmonizeReturnTypesIn: method"!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTest>>testReturnAnIntEqual64MessageSend (in category 'return-message-send') -----
+ testReturnAnIntEqual64MessageSend
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #returnAnIntEqual64MessageSend.
+ 	
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #sqInt.
+ 	self assert: (ccg typeFor: tMethod statements first expression in: tMethod) equals: #sqInt.
+ 	self assert: tMethod returnType equals: #sqInt.
+ 	"the method return type is sqint, so it's coherent, see testReturnAnIntEqual64MessageSend"!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTest>>testReturnAnIntGreater64ConstantNode (in category 'return-constant') -----
+ testReturnAnIntGreater64ConstantNode
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #returnAnIntGreater64ConstantNode.
+ 		
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #'long long'.
+ 	self assert: tMethod returnType equals: #sqInt
+ 	"returning an integer constants is the same as returning nothing"
+ 	"this therefore return a sqInt"
+ 	"see start of the CCodeGenerator >> harmonizeReturnTypesIn: method"!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTest>>testReturnAnIntGreater64MessageSend (in category 'return-message-send') -----
+ testReturnAnIntGreater64MessageSend
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #returnAnIntGreater64MessageSend.
+ 	
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #sqInt.
+ 	self assert: (ccg typeFor: tMethod statements first expression in: tMethod) equals: #sqInt.
+ 	self assert: tMethod returnType equals: #sqInt.
+ 	"the method return type is sqint, so it's coherent, see testReturnAnIntGreater64MessageSend"!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTest>>testReturnAnIntLess32ConstantNode (in category 'return-constant') -----
+ testReturnAnIntLess32ConstantNode
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #returnAnIntLesser32ConstantNode.
+ 	
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #int.
+ 	self assert: tMethod returnType equals: #sqInt
+ 	"returning constants is the same as returning nothing"
+ 	"this therefore return a sqInt"
+ 	"see start of the CCodeGenerator >> harmonizeReturnTypesIn: method"!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTest>>testReturnAnIntLesser32MessageSend (in category 'return-message-send') -----
+ testReturnAnIntLesser32MessageSend
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #returnAnIntLesser32MessageSend.
+ 	
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #sqInt.
+ 	self assert: (ccg typeFor: tMethod statements first expression in: tMethod) equals: #sqInt.
+ 	self assert: tMethod returnType equals: #sqInt.
+ 	"the method return type is sqint, so it's coherent, see testReturnAnIntLesser64MessageSend"!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTest>>testReturnExplicitArgDouble (in category 'return-explicit-arg') -----
+ testReturnExplicitArgDouble
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #returnExplicitArgDouble:.
+ 	
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #double.
+ 	self assert: tMethod returnType equals: #double!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTest>>testReturnExplicitArgFloat (in category 'return-explicit-arg') -----
+ testReturnExplicitArgFloat
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #returnExplicitArgFloat:.
+ 	
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #float.
+ 	self assert: tMethod returnType equals: #float!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTest>>testReturnExplicitArgInt (in category 'return-explicit-arg') -----
+ testReturnExplicitArgInt
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #returnExplicitArgInt:.
+ 	
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #int.
+ 	self assert: tMethod returnType equals: #sqInt!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTest>>testReturnExplicitArgLongLong (in category 'return-explicit-arg') -----
+ testReturnExplicitArgLongLong
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #returnExplicitArgLongLong:.
+ 	
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #'long long'.
+ 	self assert: tMethod returnType equals: #sqLong!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTest>>testReturnExplicitArgRandom (in category 'return-explicit-arg') -----
+ testReturnExplicitArgRandom
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #returnExplicitArgRandom:.
+ 	
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #completelyRandom.
+ 	self assert: tMethod returnType equals: #completelyRandom!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTest>>testReturnExplicitArgString (in category 'return-explicit-arg') -----
+ testReturnExplicitArgString
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #returnExplicitArgString:.
+ 	
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #'char *'.
+ 	self assert: tMethod returnType equals: #'char *'!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTest>>testReturnExplicitArgUnsignedInt (in category 'return-explicit-arg') -----
+ testReturnExplicitArgUnsignedInt
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #returnExplicitArgUnsignedInt:.
+ 	
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #'unsigned int'.
+ 	self assert: tMethod returnType equals: #usqInt!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTest>>testReturnExplicitArgUnsignedLongLong (in category 'return-explicit-arg') -----
+ testReturnExplicitArgUnsignedLongLong
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #returnExplicitArgUnsignedLongLong:.
+ 	
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #'unsigned long long'.
+ 	self assert: tMethod returnType equals: #usqLong!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTest>>testReturnExplicitTempDouble (in category 'return-explicit-temp') -----
+ testReturnExplicitTempDouble
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #returnExplicitTempDouble.
+ 	
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #double.
+ 	self assert: tMethod returnType equals: #double!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTest>>testReturnExplicitTempFloat (in category 'return-explicit-temp') -----
+ testReturnExplicitTempFloat
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #returnExplicitTempFloat.
+ 	
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #float.
+ 	self assert: tMethod returnType equals: #float!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTest>>testReturnExplicitTempInt (in category 'return-explicit-temp') -----
+ testReturnExplicitTempInt
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #returnExplicitTempInt.
+ 	
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #int.
+ 	self assert: tMethod returnType equals: #sqInt!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTest>>testReturnExplicitTempLongLong (in category 'return-explicit-temp') -----
+ testReturnExplicitTempLongLong
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #returnExplicitTempLongLong.
+ 	
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #'long long'.
+ 	self assert: tMethod returnType equals: #sqLong!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTest>>testReturnExplicitTempRandom (in category 'return-explicit-temp') -----
+ testReturnExplicitTempRandom
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #returnExplicitTempRandom.
+ 	
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #completelyRandom.
+ 	self assert: tMethod returnType equals: #completelyRandom!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTest>>testReturnExplicitTempString (in category 'return-explicit-temp') -----
+ testReturnExplicitTempString
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #returnExplicitTempString.
+ 	
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #'char *'.
+ 	self assert: tMethod returnType equals: #'char *'!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTest>>testReturnExplicitTempUnsignedInt (in category 'return-explicit-temp') -----
+ testReturnExplicitTempUnsignedInt
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #returnExplicitTempUnsignedInt.
+ 	
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #'unsigned int'.
+ 	self assert: tMethod returnType equals: #usqInt!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTest>>testReturnExplicitTempUnsignedLongLong (in category 'return-explicit-temp') -----
+ testReturnExplicitTempUnsignedLongLong
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #returnExplicitTempUnsignedLongLong.
+ 	
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #'unsigned long long'.
+ 	self assert: tMethod returnType equals: #usqLong!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTest>>testReturnFloatConstantNode (in category 'return-constant') -----
+ testReturnFloatConstantNode
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #returnAFloatConstantNode.
+ 	
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #double.
+ 	self assert: tMethod returnType equals: #double
+ 	!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTest>>testReturnTempBigNegativeIntegerConstantNode (in category 'return-temp-assigned-const') -----
+ testReturnTempBigNegativeIntegerConstantNode
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #returnTempBigNegativeIntegerConstantNode.
+ 	
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #'long long'. " assignementNode "
+ 	self assert: (ccg typeFor: tMethod statements first value in: tMethod) equals: #'long long'. " value, constantNode "
+ 	self assert: (ccg typeFor: tMethod statements first variable in: tMethod) equals: #sqInt. " variable, temporaryNode "
+ 	self assert: tMethod returnType equals: #sqInt.
+ 	
+ 	self assert: false "unexpected type conversion, shouldn't it be a sqLong?"!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTest>>testReturnTempBigNegativeIntegerMessageNode (in category 'return-temp-assigned-message') -----
+ testReturnTempBigNegativeIntegerMessageNode
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #returnTempBigNegativeIntegerMessageNode.
+ 	
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #sqLong.
+ 	self assert: (ccg typeFor: tMethod statements first variable in: tMethod) equals: #sqLong.
+ 	self assert: tMethod returnType equals: #sqLong.!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTest>>testReturnTempFalseConstantNode (in category 'return-temp-assigned-const') -----
+ testReturnTempFalseConstantNode
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #returnTempFalseConstantNode.
+ 	
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #int. " assignementNode "
+ 	self assert: (ccg typeFor: tMethod statements first value in: tMethod) equals: #int. " value, constantNode "
+ 	self assert: (ccg typeFor: tMethod statements first variable in: tMethod) equals: #sqInt. " variable, temporaryNode "
+ 	self assert: tMethod returnType equals: #sqInt.
+ 	
+ 	self assert: false "unexpected type conversion"!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTest>>testReturnTempFalseMessageNode (in category 'return-temp-assigned-message') -----
+ testReturnTempFalseMessageNode
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #returnTempFalseMessageNode.
+ 	
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #sqInt.
+ 	self assert: (ccg typeFor: tMethod statements first variable in: tMethod) equals: #sqInt.
+ 	self assert: tMethod returnType equals: #sqInt.!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTest>>testReturnTempFloatConstantNode (in category 'return-temp-assigned-const') -----
+ testReturnTempFloatConstantNode
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #returnTempFloatConstantNode.
+ 	
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #double. " assignementNode "
+ 	self assert: (ccg typeFor: tMethod statements first value in: tMethod) equals: #double. " value, constantNode "
+ 	self assert: (ccg typeFor: tMethod statements first variable in: tMethod) equals: #sqInt. " variable, temporaryNode "
+ 	self assert: tMethod returnType equals: #sqInt.
+ 	
+ 	self assert: false "type lost"!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTest>>testReturnTempFloatMessageNode (in category 'return-temp-assigned-message') -----
+ testReturnTempFloatMessageNode
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #returnTempFloatMessageNode.
+ 	
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #double.
+ 	self assert: (ccg typeFor: tMethod statements first variable in: tMethod) equals: #sqInt.
+ 	self assert: tMethod returnType equals: #sqInt.
+ 	
+ 	self assert: false "wait what"!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTest>>testReturnTempIntEqual32ConstantNode (in category 'return-temp-assigned-const') -----
+ testReturnTempIntEqual32ConstantNode
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #returnTempIntEqual32ConstantNode.
+ 	
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #'unsigned int'. " assignementNode "
+ 	self assert: (ccg typeFor: tMethod statements first value in: tMethod) equals: #'unsigned int'. " value, constantNode "
+ 	self assert: (ccg typeFor: tMethod statements first variable in: tMethod) equals: #sqInt. " variable, temporaryNode "
+ 	self assert: tMethod returnType equals: #sqInt.
+ 	
+ 	self assert: false "unexpected type conversion"!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTest>>testReturnTempIntEqual32MessageNode (in category 'return-temp-assigned-message') -----
+ testReturnTempIntEqual32MessageNode
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #returnTempIntEqual32MessageNode.
+ 	
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #sqInt.
+ 	self assert: (ccg typeFor: tMethod statements first variable in: tMethod) equals: #sqInt.
+ 	self assert: tMethod returnType equals: #sqInt.!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTest>>testReturnTempIntEqual64ConstantNode (in category 'return-temp-assigned-const') -----
+ testReturnTempIntEqual64ConstantNode
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #returnTempIntEqual64ConstantNode.
+ 	
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #'unsigned long long'. " assignementNode "
+ 	self assert: (ccg typeFor: tMethod statements first value in: tMethod) equals: #'unsigned long long'. " value, constantNode "
+ 	self assert: (ccg typeFor: tMethod statements first variable in: tMethod) equals: #sqInt. " variable, temporaryNode "
+ 	self assert: tMethod returnType equals: #sqInt.
+ 	
+ 	self assert: false "unexpected type conversion, shouldn't it at least be an sqLong? or better, an uSqLong"!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTest>>testReturnTempIntEqual64MessageNode (in category 'return-temp-assigned-message') -----
+ testReturnTempIntEqual64MessageNode
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #returnTempIntEqual64MessageNode.
+ 	
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #sqInt.
+ 	self assert: (ccg typeFor: tMethod statements first variable in: tMethod) equals: #sqInt.
+ 	self assert: tMethod returnType equals: #sqInt.!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTest>>testReturnTempIntGreater64ConstantNode (in category 'return-temp-assigned-const') -----
+ testReturnTempIntGreater64ConstantNode
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #returnTempIntGreater64ConstantNode.
+ 	
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #'long long'. " assignementNode "
+ 	self assert: (ccg typeFor: tMethod statements first value in: tMethod) equals: #'long long'. " value, constantNode "
+ 	self assert: (ccg typeFor: tMethod statements first variable in: tMethod) equals: #sqInt. " variable, temporaryNode "
+ 	self assert: tMethod returnType equals: #sqInt.
+ 	
+ 	self assert: false "unexpected type conversion, shouldn't it be at least an sqLong?"!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTest>>testReturnTempIntGreater64MessageNode (in category 'return-temp-assigned-message') -----
+ testReturnTempIntGreater64MessageNode
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #returnTempIntGreater64MessageNode.
+ 	
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #sqInt.
+ 	self assert: (ccg typeFor: tMethod statements first variable in: tMethod) equals: #sqInt.
+ 	self assert: tMethod returnType equals: #sqInt.!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTest>>testReturnTempIntLesser32ConstantNode (in category 'return-temp-assigned-const') -----
+ testReturnTempIntLesser32ConstantNode
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #returnTempIntLesser32ConstantNode.
+ 	
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #int. " assignementNode "
+ 	self assert: (ccg typeFor: tMethod statements first value in: tMethod) equals: #int. " value, constantNode "
+ 	self assert: (ccg typeFor: tMethod statements first variable in: tMethod) equals: #sqInt. " variable, temporaryNode "
+ 	self assert: tMethod returnType equals: #sqInt.
+ 	
+ 	self assert: false "unexpected type conversion"!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTest>>testReturnTempIntLesser32MessageNode (in category 'return-temp-assigned-message') -----
+ testReturnTempIntLesser32MessageNode
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #returnTempIntLesser32MessageNode.
+ 	
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #sqInt.
+ 	self assert: (ccg typeFor: tMethod statements first variable in: tMethod) equals: #sqInt.
+ 	self assert: tMethod returnType equals: #sqInt.!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTest>>testReturnTempNilConstantNode (in category 'return-temp-assigned-const') -----
+ testReturnTempNilConstantNode
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #returnTempNilConstantNode.
+ 	
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #int. " assignementNode "
+ 	self assert: (ccg typeFor: tMethod statements first value in: tMethod) equals: #int. " value, constantNode "
+ 	self assert: (ccg typeFor: tMethod statements first variable in: tMethod) equals: #sqInt. " variable, temporaryNode "
+ 	self assert: tMethod returnType equals: #sqInt.
+ 	
+ 	self assert: false "unexpected type conversion"!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTest>>testReturnTempNilMessageNode (in category 'return-temp-assigned-message') -----
+ testReturnTempNilMessageNode
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #returnTempNilMessageNode.
+ 	
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #sqInt.
+ 	self assert: (ccg typeFor: tMethod statements first variable in: tMethod) equals: #sqInt.
+ 	self assert: tMethod returnType equals: #sqInt.!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTest>>testReturnTempSmallNegativeIntegerConstantNode (in category 'return-temp-assigned-const') -----
+ testReturnTempSmallNegativeIntegerConstantNode
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #returnTempSmallNegativeIntegerConstantNode.
+ 	
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #int. " assignementNode "
+ 	self assert: (ccg typeFor: tMethod statements first value in: tMethod) equals: #int. " value, constantNode "
+ 	self assert: (ccg typeFor: tMethod statements first variable in: tMethod) equals: #sqInt. " variable, temporaryNode "
+ 	self assert: tMethod returnType equals: #sqInt.
+ 	
+ 	self assert: false "unexpected type conversion"!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTest>>testReturnTempSmallNegativeIntegerMessageNode (in category 'return-temp-assigned-message') -----
+ testReturnTempSmallNegativeIntegerMessageNode
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #returnTempSmallNegativeIntegerMessageNode.
+ 	
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #sqInt.
+ 	self assert: (ccg typeFor: tMethod statements first variable in: tMethod) equals: #sqInt.
+ 	self assert: tMethod returnType equals: #sqInt.!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTest>>testReturnTempStringConstantNode (in category 'return-temp-assigned-const') -----
+ testReturnTempStringConstantNode
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #returnTempStringConstantNode.
+ 	
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #'char *'. " assignementNode "
+ 	self assert: (ccg typeFor: tMethod statements first value in: tMethod) equals: #'char *'. " value, constantNode "
+ 	self assert: (ccg typeFor: tMethod statements first variable in: tMethod) equals: #sqInt. " variable, temporaryNode "
+ 	self assert: tMethod returnType equals: #sqInt.
+ 	
+ 	self assert: false "type lost"!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTest>>testReturnTempStringMessageNode (in category 'return-temp-assigned-message') -----
+ testReturnTempStringMessageNode
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #returnTempStringMessageNode.
+ 	
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #'char *'.
+ 	self assert: (ccg typeFor: tMethod statements first variable in: tMethod) equals: #'char *'.
+ 	self assert: tMethod returnType equals: #'char *'.!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTest>>testReturnTempTrueConstantNode (in category 'return-temp-assigned-const') -----
+ testReturnTempTrueConstantNode
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #returnTempTrueConstantNode.
+ 	
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #int. " assignementNode "
+ 	self assert: (ccg typeFor: tMethod statements first value in: tMethod) equals: #int. " value, constantNode "
+ 	self assert: (ccg typeFor: tMethod statements first variable in: tMethod) equals: #sqInt. " variable, temporaryNode "
+ 	self assert: tMethod returnType equals: #sqInt.
+ 	
+ 	self assert: false "Unexpected conversion"!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTest>>testReturnTempTrueMessageNode (in category 'return-temp-assigned-message') -----
+ testReturnTempTrueMessageNode
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #returnTempTrueMessageNode.
+ 	
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #sqInt.
+ 	self assert: (ccg typeFor: tMethod statements first variable in: tMethod) equals: #sqInt.
+ 	self assert: tMethod returnType equals: #sqInt.!

Item was added:
+ InterpreterPlugin subclass: #SlangBasicTypeInferenceTestClass
+ 	instanceVariableNames: ''
+ 	classVariableNames: ''
+ 	poolDictionaries: ''
+ 	category: 'VMMaker-Tests'!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTestClass>>aBigNegativeIntegerConstantNode (in category 'constant') -----
+ aBigNegativeIntegerConstantNode
+ 	"SmallInteger maxVal on a 64bit system"
+ 	-1152921504606846975!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTestClass>>aFalseConstantNode (in category 'constant') -----
+ aFalseConstantNode
+ 	false!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTestClass>>aFloatConstantNode (in category 'constant') -----
+ aFloatConstantNode
+ 	1.0!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTestClass>>aNilConstantNode (in category 'constant') -----
+ aNilConstantNode
+ 	nil!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTestClass>>aSmallNegativeIntegerConstantNode (in category 'constant') -----
+ aSmallNegativeIntegerConstantNode
+ 	-30!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTestClass>>aStringConstantNode (in category 'constant') -----
+ aStringConstantNode
+ 	'aString'!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTestClass>>aTrueConstantNode (in category 'constant') -----
+ aTrueConstantNode
+ 	true!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTestClass>>anIntEqual32ConstantNode (in category 'constant') -----
+ anIntEqual32ConstantNode
+ 	" 2 ^ 32 - 1"
+ 	4294967295!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTestClass>>anIntEqual64ConstantNode (in category 'constant') -----
+ anIntEqual64ConstantNode
+ 	" 2 raisedTo: 64 "
+ 	18446744073709551615!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTestClass>>anIntGreater64ConstantNode (in category 'constant') -----
+ anIntGreater64ConstantNode
+ 	"SmallInteger maxVal on a 64bit system"
+ 	1152921504606846975!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTestClass>>anIntLesser32ConstantNode (in category 'constant') -----
+ anIntLesser32ConstantNode
+ 	30!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTestClass>>returnABigNegativeIntegerConstantNode (in category 'return-constant') -----
+ returnABigNegativeIntegerConstantNode
+ "SmallInteger maxVal on a 64bit system"
+ 	^ -1152921504606846975
+ 	!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTestClass>>returnABigNegativeIntegerMessageSend (in category 'return-message-send') -----
+ returnABigNegativeIntegerMessageSend
+ 	^ self returnABigNegativeIntegerConstantNode!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTestClass>>returnAFalseConstantNode (in category 'return-constant') -----
+ returnAFalseConstantNode
+ 	^ false!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTestClass>>returnAFalseMessageSend (in category 'return-message-send') -----
+ returnAFalseMessageSend
+ 	^ self returnAFalseConstantNode!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTestClass>>returnAFloatConstantNode (in category 'return-constant') -----
+ returnAFloatConstantNode
+ 	^ 1.0!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTestClass>>returnAFloatMessageSend (in category 'return-message-send') -----
+ returnAFloatMessageSend
+ 	^ self returnAFloatConstantNode!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTestClass>>returnANilConstantNode (in category 'return-constant') -----
+ returnANilConstantNode
+ 	^ nil!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTestClass>>returnANilMessageSend (in category 'return-message-send') -----
+ returnANilMessageSend
+ 	^ self returnANilConstantNode!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTestClass>>returnASmallNegativeIntegerConstantNode (in category 'return-constant') -----
+ returnASmallNegativeIntegerConstantNode
+ 	^ -30!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTestClass>>returnASmallNegativeIntegerMessageSend (in category 'return-message-send') -----
+ returnASmallNegativeIntegerMessageSend
+ 	^ self returnASmallNegativeIntegerConstantNode!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTestClass>>returnAStringConstantNode (in category 'return-constant') -----
+ returnAStringConstantNode
+ 	^ 'aString'!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTestClass>>returnAStringMessageSend (in category 'return-message-send') -----
+ returnAStringMessageSend
+ 	^ self returnAStringConstantNode!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTestClass>>returnATrueConstantNode (in category 'return-constant') -----
+ returnATrueConstantNode
+ 	^ true!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTestClass>>returnATrueMessageSend (in category 'return-message-send') -----
+ returnATrueMessageSend
+ 	^ self returnATrueConstantNode!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTestClass>>returnAnIntEqual32ConstantNode (in category 'return-constant') -----
+ returnAnIntEqual32ConstantNode
+ 	" 2 ^ 32 - 1"
+ 	^ 4294967295!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTestClass>>returnAnIntEqual32MessageSend (in category 'return-message-send') -----
+ returnAnIntEqual32MessageSend
+ 	^ self returnAnIntEqual32ConstantNode!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTestClass>>returnAnIntEqual64ConstantNode (in category 'return-constant') -----
+ returnAnIntEqual64ConstantNode
+ 	" 2 raisedTo: 64 "
+ 	^ 18446744073709551615!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTestClass>>returnAnIntEqual64MessageSend (in category 'return-message-send') -----
+ returnAnIntEqual64MessageSend
+ 	^ self returnAnIntEqual64ConstantNode!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTestClass>>returnAnIntGreater64ConstantNode (in category 'return-constant') -----
+ returnAnIntGreater64ConstantNode
+ 	"SmallInteger maxVal on a 64bit system"
+ 	^ 1152921504606846975!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTestClass>>returnAnIntGreater64MessageSend (in category 'return-message-send') -----
+ returnAnIntGreater64MessageSend
+ 	^ self returnAnIntGreater64ConstantNode!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTestClass>>returnAnIntLesser32ConstantNode (in category 'return-constant') -----
+ returnAnIntLesser32ConstantNode
+ 	^ 30!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTestClass>>returnAnIntLesser32MessageSend (in category 'return-message-send') -----
+ returnAnIntLesser32MessageSend
+ 	^ self returnAnIntLesser32ConstantNode!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTestClass>>returnExplicitArgDouble: (in category 'return-explicit-arg') -----
+ returnExplicitArgDouble: t
+ 	<var:#t type:#double>
+ 	^ t!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTestClass>>returnExplicitArgFloat: (in category 'return-explicit-arg') -----
+ returnExplicitArgFloat: t
+ 	<var:#t type:#float>
+ 	^ t!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTestClass>>returnExplicitArgInt: (in category 'return-explicit-arg') -----
+ returnExplicitArgInt: t
+ 	<var:#t type:#int>
+ 	^ t!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTestClass>>returnExplicitArgLongLong: (in category 'return-explicit-arg') -----
+ returnExplicitArgLongLong: t
+ 	<var:#t type:#'long long'>
+ 	^ t!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTestClass>>returnExplicitArgRandom: (in category 'return-explicit-arg') -----
+ returnExplicitArgRandom: t
+ 	<var:#t type:#completelyRandom>
+ 	^ t!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTestClass>>returnExplicitArgString: (in category 'return-explicit-arg') -----
+ returnExplicitArgString: t
+ 	<var:#t type:#'char *'>
+ 	^ t!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTestClass>>returnExplicitArgUnsignedInt: (in category 'return-explicit-arg') -----
+ returnExplicitArgUnsignedInt: t
+ 	<var:#t type:#'unsigned int'>
+ 	^ t!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTestClass>>returnExplicitArgUnsignedLongLong: (in category 'return-explicit-arg') -----
+ returnExplicitArgUnsignedLongLong: t
+ 	<var:#t type:#'unsigned long long'>
+ 	^ t!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTestClass>>returnExplicitTempDouble (in category 'return-explicit-temp') -----
+ returnExplicitTempDouble
+ 	<var:#t type:#double>
+ 	| t |
+ 	^ t!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTestClass>>returnExplicitTempFloat (in category 'return-explicit-temp') -----
+ returnExplicitTempFloat
+ 	<var:#t type:#float>
+ 	| t |
+ 	^ t!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTestClass>>returnExplicitTempInt (in category 'return-explicit-temp') -----
+ returnExplicitTempInt
+ 	<var:#t type:#int>
+ 	| t |
+ 	^ t!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTestClass>>returnExplicitTempLongLong (in category 'return-explicit-temp') -----
+ returnExplicitTempLongLong
+ 	<var:#t type:#'long long'>
+ 	| t | 
+ 	^ t!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTestClass>>returnExplicitTempRandom (in category 'return-explicit-temp') -----
+ returnExplicitTempRandom
+ 	<var:#t type:#completelyRandom>
+ 	| t |
+ 	^ t!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTestClass>>returnExplicitTempString (in category 'return-explicit-temp') -----
+ returnExplicitTempString
+ 	<var:#t type:#'char *'>
+ 	| t |
+ 	^ t!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTestClass>>returnExplicitTempUnsignedInt (in category 'return-explicit-temp') -----
+ returnExplicitTempUnsignedInt
+ 	<var:#t type:#'unsigned int'>
+ 	| t |
+ 	^ t!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTestClass>>returnExplicitTempUnsignedLongLong (in category 'return-explicit-temp') -----
+ returnExplicitTempUnsignedLongLong
+ 	<var:#t type:#'unsigned long long'>
+ 	| t |
+ 	^ t!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTestClass>>returnTempBigNegativeIntegerConstantNode (in category 'return-temp-assigned-const') -----
+ returnTempBigNegativeIntegerConstantNode
+ 	| t |
+ 	"SmallInteger maxVal on a 64bit system"
+ 	t := -1152921504606846975.
+ 	^ t!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTestClass>>returnTempBigNegativeIntegerMessageNode (in category 'return-temp-assigned-message') -----
+ returnTempBigNegativeIntegerMessageNode
+ 	| t |
+ 	t := self returnABigNegativeIntegerConstantNode.
+ 	^ t!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTestClass>>returnTempFalseConstantNode (in category 'return-temp-assigned-const') -----
+ returnTempFalseConstantNode
+ 	| t |
+ 	t := false.
+ 	^ t!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTestClass>>returnTempFalseMessageNode (in category 'return-temp-assigned-message') -----
+ returnTempFalseMessageNode
+ 	| t |
+ 	t := self returnAFalseConstantNode.
+ 	^ t!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTestClass>>returnTempFloatConstantNode (in category 'return-temp-assigned-const') -----
+ returnTempFloatConstantNode
+ 	| t |
+ 	t := 1.0.
+ 	^ t!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTestClass>>returnTempFloatMessageNode (in category 'return-temp-assigned-message') -----
+ returnTempFloatMessageNode
+ 	| t |
+ 	t := self returnAFloatMessageSend.
+ 	^ t!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTestClass>>returnTempIntEqual32ConstantNode (in category 'return-temp-assigned-const') -----
+ returnTempIntEqual32ConstantNode
+ 	" 2 ^ 32 - 1"
+ 	| t |
+ 	t := 4294967295.
+ 	^ t!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTestClass>>returnTempIntEqual32MessageNode (in category 'return-temp-assigned-message') -----
+ returnTempIntEqual32MessageNode
+ 	| t |
+ 	t := self returnAnIntEqual32ConstantNode.
+ 	^ t!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTestClass>>returnTempIntEqual64ConstantNode (in category 'return-temp-assigned-const') -----
+ returnTempIntEqual64ConstantNode
+ 	" 2 raisedTo: 64 "
+ 	| t | 
+ 	t := 18446744073709551615.
+ 	^ t!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTestClass>>returnTempIntEqual64MessageNode (in category 'return-temp-assigned-message') -----
+ returnTempIntEqual64MessageNode
+ 	| t | 
+ 	t := self returnAnIntEqual64ConstantNode.
+ 	^ t!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTestClass>>returnTempIntGreater64ConstantNode (in category 'return-temp-assigned-const') -----
+ returnTempIntGreater64ConstantNode
+ 	| t |
+ 	"SmallInteger maxVal on a 64bit system"
+ 	t := 1152921504606846975.
+ 	^ t!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTestClass>>returnTempIntGreater64MessageNode (in category 'return-temp-assigned-message') -----
+ returnTempIntGreater64MessageNode
+ 	| t |
+ 	t := self returnAnIntGreater64ConstantNode.
+ 	^ t!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTestClass>>returnTempIntLesser32ConstantNode (in category 'return-temp-assigned-const') -----
+ returnTempIntLesser32ConstantNode
+ 	| t |
+ 	t := 30.
+ 	^ t!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTestClass>>returnTempIntLesser32MessageNode (in category 'return-temp-assigned-message') -----
+ returnTempIntLesser32MessageNode
+ 	| t |
+ 	t := self returnAnIntLesser32ConstantNode.
+ 	^ t!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTestClass>>returnTempNilConstantNode (in category 'return-temp-assigned-const') -----
+ returnTempNilConstantNode
+ 	| t |
+ 	t := nil.
+ 	^ t!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTestClass>>returnTempNilMessageNode (in category 'return-temp-assigned-message') -----
+ returnTempNilMessageNode
+ 	| t |
+ 	t := self returnANilConstantNode.
+ 	^ t!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTestClass>>returnTempSmallNegativeIntegerConstantNode (in category 'return-temp-assigned-const') -----
+ returnTempSmallNegativeIntegerConstantNode
+ 	| t |
+ 	t := -30.
+ 	^ t!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTestClass>>returnTempSmallNegativeIntegerMessageNode (in category 'return-temp-assigned-message') -----
+ returnTempSmallNegativeIntegerMessageNode
+ 	| t |
+ 	t := self returnASmallNegativeIntegerConstantNode.
+ 	^ t!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTestClass>>returnTempStringConstantNode (in category 'return-temp-assigned-const') -----
+ returnTempStringConstantNode
+ 	| t |
+ 	t := 'aString'.
+ 	^ t!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTestClass>>returnTempStringMessageNode (in category 'return-temp-assigned-message') -----
+ returnTempStringMessageNode
+ 	| t |
+ 	t := self returnAStringConstantNode.
+ 	^ t!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTestClass>>returnTempTrueConstantNode (in category 'return-temp-assigned-const') -----
+ returnTempTrueConstantNode
+ 	| t |
+ 	t := true.
+ 	^ t!

Item was added:
+ ----- Method: SlangBasicTypeInferenceTestClass>>returnTempTrueMessageNode (in category 'return-temp-assigned-message') -----
+ returnTempTrueMessageNode
+ 	| t |
+ 	t := self returnATrueConstantNode.
+ 	^ t!

Item was added:
+ SlangAbstractTestCase subclass: #SlangTypeForArithmeticTest
+ 	instanceVariableNames: 'visitor propertyName'
+ 	classVariableNames: ''
+ 	poolDictionaries: ''
+ 	category: 'VMMaker-Tests'!

Item was added:
+ ----- Method: SlangTypeForArithmeticTest>>setUp (in category 'running') -----
+ setUp
+ 	super setUp.
+ 	ccg addClass: SlangTypeForDereferenceTestClass
+ !

Item was added:
+ ----- Method: SlangTypeForArithmeticTest>>testAtOnMatrix (in category 'tests') -----
+ testAtOnMatrix
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #aMethodReturningAnAtOnAMatrix.
+ 	
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first expression in: tMethod) equals: #sqInt."at: node"
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #sqInt."returnNode"
+ 	self assert: tMethod returnType equals: #sqInt. " euuu, looks weird. Did i do something wrong?"!

Item was added:
+ SlangAbstractTestCase subclass: #SlangTypeForDereferenceTest
+ 	instanceVariableNames: ''
+ 	classVariableNames: ''
+ 	poolDictionaries: ''
+ 	category: 'VMMaker-Tests'!

Item was added:
+ ----- Method: SlangTypeForDereferenceTest>>setUp (in category 'running') -----
+ setUp
+ 	super setUp.
+ 	ccg addClass: SlangTypeForDereferenceTestClass.
+ 	ccg inferTypesForImplicitlyTypedVariablesAndMethods.!

Item was added:
+ ----- Method: SlangTypeForDereferenceTest>>testAtOnArray (in category 'tests') -----
+ testAtOnArray
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #aMethodReturningAnAtOnAnArray.
+ 	
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first expression in: tMethod) equals: #int."at: node"
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #int."returnNode"
+ 	self assert: tMethod returnType equals: #sqInt.
+ 	
+ 	self assert: false. "Unexpected type conversion"!

Item was added:
+ ----- Method: SlangTypeForDereferenceTest>>testAtOnMatrix (in category 'tests') -----
+ testAtOnMatrix
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #aMethodReturningAnAtOnAMatrix.
+ 	
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first expression in: tMethod) equals: #'int *'."at: node"
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #'int *'."returnNode"
+ 	self assert: tMethod returnType equals: #'int *'.!

Item was added:
+ ----- Method: SlangTypeForDereferenceTest>>testReturnPointerTypeExplicitTempVariable (in category 'tests') -----
+ testReturnPointerTypeExplicitTempVariable
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #aMethodReturningAPointerType.
+ 	
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first expression in: tMethod) equals: #'int *'."variable node"
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #'int *'."return node"
+ 	self assert: tMethod returnType equals: #'int *'!

Item was added:
+ ----- Method: SlangTypeForDereferenceTest>>testSelfMessageReturningPointerType (in category 'tests') -----
+ testSelfMessageReturningPointerType
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #aMethodReturningAPointerType.
+ 	
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first expression in: tMethod) equals: #'int *'."message node"
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #'int *'."returnNode"
+ 	self assert: tMethod returnType equals: #'int *'!

Item was added:
+ ----- Method: SlangTypeForDereferenceTest>>testTwoAtOnMatrix (in category 'tests') -----
+ testTwoAtOnMatrix
+ 	| tMethod |
+ 	tMethod := ccg methodNamed: #aMethodReturningTwoAtOnAMatrix.
+ 	
+ 	self assert: tMethod isNotNil.
+ 	self assert: (ccg typeFor: tMethod statements first expression receiver in: tMethod) equals: #'int *'."inner at:"
+ 	self assert: (ccg typeFor: tMethod statements first expression in: tMethod) equals: #int."outer at:"
+ 	self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #int."return node"
+ 	self assert: tMethod returnType equals: #sqInt.
+ 
+ 	self assert: false. "Unexpected type conversion"!

Item was added:
+ InterpreterPlugin subclass: #SlangTypeForDereferenceTestClass
+ 	instanceVariableNames: ''
+ 	classVariableNames: ''
+ 	poolDictionaries: ''
+ 	category: 'VMMaker-Tests'!

Item was added:
+ ----- Method: SlangTypeForDereferenceTestClass>>aMethodReturningAMessageSendToSelf (in category 'as yet unclassified') -----
+ aMethodReturningAMessageSendToSelf
+ 	^ self aMethodReturningAPointerType!

Item was added:
+ ----- Method: SlangTypeForDereferenceTestClass>>aMethodReturningAPointerType (in category 'as yet unclassified') -----
+ aMethodReturningAPointerType
+ 	<var:#a type:#'int*'>
+ 	| a |
+ 	^ a!

Item was added:
+ ----- Method: SlangTypeForDereferenceTestClass>>aMethodReturningAnAtOnAMatrix (in category 'as yet unclassified') -----
+ aMethodReturningAnAtOnAMatrix
+ 	<var:#a type:#'int**'>
+ 	| a |
+ 	^ a at: 2!

Item was added:
+ ----- Method: SlangTypeForDereferenceTestClass>>aMethodReturningAnAtOnAnArray (in category 'as yet unclassified') -----
+ aMethodReturningAnAtOnAnArray
+ 	<var:#a type:#'int*'>
+ 	| a |
+ 	^ a at: 2!

Item was added:
+ ----- Method: SlangTypeForDereferenceTestClass>>aMethodReturningTwoAtOnAMatrix (in category 'as yet unclassified') -----
+ aMethodReturningTwoAtOnAMatrix
+ 	<var:#a type:#'int**'>
+ 	| a |
+ 	^ (a at: 2) at: 2!

Item was added:
+ SlangAbstractTestCase subclass: #SlangTypePromotionTest
+ 	instanceVariableNames: ''
+ 	classVariableNames: ''
+ 	poolDictionaries: ''
+ 	category: 'VMMaker-Tests'!

Item was added:
+ ----- Method: SlangTypePromotionTest>>testCharAndChar (in category 'integer-types') -----
+ testCharAndChar
+ 	"representative of two types smaller than sizeOf(int) with same size"
+ 	| firstType secondType resType |
+ 	firstType := #char.
+ 	secondType := #char.
+ 	resType := ccg promoteArithmeticTypes: firstType and: secondType.
+ 	
+ 	self assert: resType equals: #int.
+ 	
+ 
+ 	"check that the system is in the assumed state."
+ 	self assert: (ccg isIntegralCType: #char).
+ 	self assert: (ccg sizeOfIntegralCType: #char) equals: 1.!

Item was added:
+ ----- Method: SlangTypePromotionTest>>testCharAndFloat (in category 'float-types') -----
+ testCharAndFloat
+ 	"representative of two types bigger than sizeOf(int) and with same size"
+ 	| firstType secondType resType |
+ 	firstType := #char.
+ 	secondType := #float.
+ 	resType := ccg promoteArithmeticTypes: firstType and: secondType.
+ 	
+ 	self assert: resType equals: #float.
+ 	self assert: (ccg isFloatingPointCType: resType).!

Item was added:
+ ----- Method: SlangTypePromotionTest>>testCharAndLongLong (in category 'integer-types') -----
+ testCharAndLongLong
+ 	"representative of two types bigger than sizeOf(int) and with same size"
+ 	| firstType secondType resType |
+ 	firstType := #char.
+ 	secondType := #'long long'.
+ 	resType := ccg promoteArithmeticTypes: firstType and: secondType.
+ 	
+ 	self assert: resType equals: #'long long'.
+ 	
+ 	"check that the system is in the assumed state."
+ 	self assert: (ccg isIntegralCType: #char).
+ 	self assert: (ccg sizeOfIntegralCType: #char) equals: 1.
+ 	self assert: (ccg isIntegralCType: #'long long').
+ 	self assert: (ccg sizeOfIntegralCType: #'long long') equals: 8.!

Item was added:
+ ----- Method: SlangTypePromotionTest>>testDoubleAndDouble (in category 'float-types') -----
+ testDoubleAndDouble
+ 	| firstType secondType resType |
+ 	firstType := #double.
+ 	secondType := #double.
+ 	resType := ccg promoteArithmeticTypes: firstType and: secondType.
+ 	
+ 	self assert: resType equals: #double.
+ 	self assert: (ccg isFloatingPointCType: resType).!

Item was added:
+ ----- Method: SlangTypePromotionTest>>testDoubleAndFloat (in category 'float-types') -----
+ testDoubleAndFloat
+ 	| firstType secondType resType |
+ 	firstType := #double.
+ 	secondType := #float.
+ 	resType := ccg promoteArithmeticTypes: firstType and: secondType.
+ 	
+ 	self assert: resType equals: #double.
+ 	self assert: (ccg isFloatingPointCType: resType).
+ 	!

Item was added:
+ ----- Method: SlangTypePromotionTest>>testFloatAndDouble (in category 'float-types') -----
+ testFloatAndDouble
+ 	| firstType secondType resType |
+ 	firstType := #float.
+ 	secondType := #double.
+ 	resType := ccg promoteArithmeticTypes: firstType and: secondType.
+ 	
+ 	self assert: resType equals: #double.
+ 	self assert: (ccg isFloatingPointCType: resType).
+ 	!

Item was added:
+ ----- Method: SlangTypePromotionTest>>testFloatAndFloat (in category 'float-types') -----
+ testFloatAndFloat
+ 	| firstType secondType resType |
+ 	firstType := #float.
+ 	secondType := #float.
+ 	resType := ccg promoteArithmeticTypes: firstType and: secondType.
+ 	
+ 	self assert: resType equals: #float.
+ 	self assert: (ccg isFloatingPointCType: resType).
+ 	!

Item was added:
+ ----- Method: SlangTypePromotionTest>>testFloatAndNil (in category 'general') -----
+ testFloatAndNil
+ 	| firstType secondType resType |
+ 	firstType := #float.
+ 	secondType := nil.
+ 	resType := ccg promoteArithmeticTypes: firstType and: secondType.
+ 	
+ 	self assert: resType equals: #float.
+ 	
+ 	"this feels wrong"
+ 	"inconsistent with integer types too"
+ 	self assert: false.!

Item was added:
+ ----- Method: SlangTypePromotionTest>>testIntAndFloat (in category 'float-types') -----
+ testIntAndFloat
+ 	| firstType secondType resType |
+ 	firstType := #int.
+ 	secondType := #float.
+ 	resType := ccg promoteArithmeticTypes: firstType and: secondType.
+ 	
+ 	self assert: resType equals: #float.
+ 	self assert: (ccg isFloatingPointCType: resType).
+ 	!

Item was added:
+ ----- Method: SlangTypePromotionTest>>testIntAndInt (in category 'integer-types') -----
+ testIntAndInt
+ 	"representative of two types with size = sizeOf(int) of same size"
+ 	| firstType secondType resType |
+ 	firstType := #int.
+ 	secondType := #int.
+ 	resType := ccg promoteArithmeticTypes: firstType and: secondType.
+ 	
+ 	self assert: resType equals: #int.
+ 	
+ 	"check that the system is in the assumed state."
+ 	self assert: (ccg isIntegralCType: #int).
+ 	self assert: (ccg sizeOfIntegralCType: #int) equals: 4.!

Item was added:
+ ----- Method: SlangTypePromotionTest>>testIntAndLongLong (in category 'integer-types') -----
+ testIntAndLongLong
+ 	"representative of a different size types"
+ 	| firstType secondType resType |
+ 	firstType := #int .
+ 	secondType := #'long long'.
+ 	resType := ccg promoteArithmeticTypes: firstType and: secondType.
+ 	
+ 	self assert: resType equals: #'long long'.
+ 	
+ 	"check that the system is in the assumed state."
+ 	self assert: (ccg isIntegralCType: #int).
+ 	self assert: (ccg sizeOfIntegralCType: #int) equals: 4.
+ 	self assert: (ccg isIntegralCType: #'long long').
+ 	self assert: (ccg sizeOfIntegralCType: #'long long') equals: 8.!

Item was added:
+ ----- Method: SlangTypePromotionTest>>testIntAndNil (in category 'general') -----
+ testIntAndNil
+ 	| firstType secondType resType |
+ 	firstType := #int.
+ 	secondType := nil.
+ 	resType := ccg promoteArithmeticTypes: firstType and: secondType.
+ 	
+ 	self assert: resType equals: nil.
+ 	!

Item was added:
+ ----- Method: SlangTypePromotionTest>>testIntAndUnsignedChar (in category 'unsigned-priority') -----
+ testIntAndUnsignedChar
+ 	"representative of an unsigned that is ignored because of integerType promotion"
+ 	| firstType secondType resType |
+ 	firstType := #int.
+ 	secondType := #'unsigned char'.
+ 	resType := ccg promoteArithmeticTypes: firstType and: secondType.
+ 	
+ 	self assert: resType equals: #int.
+ 	
+ 	"check that the system is in the assumed state."
+ 	self assert: (ccg isIntegralCType: #int).
+ 	self assert: (ccg sizeOfIntegralCType: #int) equals: 4.
+ 	self assert: (ccg isIntegralCType: #'unsigned char').
+ 	self assert: (ccg sizeOfIntegralCType: #'unsigned char') equals: 1.!

Item was added:
+ ----- Method: SlangTypePromotionTest>>testIntAndUnsignedInt (in category 'unsigned-priority') -----
+ testIntAndUnsignedInt
+ 	"representative of two types bigger than sizeOf(int) and with same size"
+ 	| firstType secondType resType |
+ 	firstType := #int.
+ 	secondType := #'unsigned int'.
+ 	resType := ccg promoteArithmeticTypes: firstType and: secondType.
+ 	
+ 	self assert: resType equals: #'unsigned int'.
+ 	
+ 	"check that the system is in the assumed state."
+ 	self assert: (ccg isIntegralCType: #int).
+ 	self assert: (ccg sizeOfIntegralCType: #int) equals: 4.
+ 	self assert: (ccg isIntegralCType: #'unsigned int').
+ 	self assert: (ccg sizeOfIntegralCType: #'unsigned int') equals: 4.!

Item was added:
+ ----- Method: SlangTypePromotionTest>>testLongLongAndChar (in category 'integer-types') -----
+ testLongLongAndChar
+ 	"representative of different sized types"
+ 	| firstType secondType resType |
+ 	firstType := #'long long'.
+ 	secondType := #char.
+ 	resType := ccg promoteArithmeticTypes: firstType and: secondType.
+ 	
+ 	self assert: resType equals: #'long long'.
+ 	
+ 	"check that the system is in the assumed state."
+ 	self assert: (ccg isIntegralCType: #'long long').
+ 	self assert: (ccg sizeOfIntegralCType: #'long long') equals: 8.
+ 	self assert: (ccg isIntegralCType: #char).
+ 	self assert: (ccg sizeOfIntegralCType: #char) equals: 1.!

Item was added:
+ ----- Method: SlangTypePromotionTest>>testLongLongAndFloat (in category 'float-types') -----
+ testLongLongAndFloat
+ 	| firstType secondType resType |
+ 	firstType := #'long long'.
+ 	secondType := #float.
+ 	resType := ccg promoteArithmeticTypes: firstType and: secondType.
+ 	
+ 	self assert: resType equals: #float.
+ 	self assert: (ccg isFloatingPointCType: resType).
+ 	!

Item was added:
+ ----- Method: SlangTypePromotionTest>>testLongLongAndInt (in category 'integer-types') -----
+ testLongLongAndInt
+ 	"representative of different sized types"
+ 	| firstType secondType resType |
+ 	firstType := #'long long'.
+ 	secondType := #int.
+ 	resType := ccg promoteArithmeticTypes: firstType and: secondType.
+ 	
+ 	self assert: resType equals: #'long long'.
+ 
+ 	"check that the system is in the assumed state."
+ 	self assert: (ccg isIntegralCType: #'long long').
+ 	self assert: (ccg sizeOfIntegralCType: #'long long') equals: 8.
+ 	self assert: (ccg isIntegralCType: #int).
+ 	self assert: (ccg sizeOfIntegralCType: #int) equals: 4.!

Item was added:
+ ----- Method: SlangTypePromotionTest>>testLongLongAndSqLong (in category 'integer-types') -----
+ testLongLongAndSqLong
+ 	"representative of two types bigger than sizeOf(int)"
+ 	| firstType secondType resType |
+ 	firstType := #'long long'.
+ 	secondType := #sqLong.
+ 	resType := ccg promoteArithmeticTypes: firstType and: secondType.
+ 	
+ 	self assert: resType equals: #'long long'.
+ 	
+ 	"check that the system is in the assumed state."
+ 	self assert: (ccg isIntegralCType: #'long long').
+ 	self assert: (ccg sizeOfIntegralCType: #'long long') equals: 8.
+ 	self assert: (ccg isIntegralCType: #sqLong).
+ 	self assert: (ccg sizeOfIntegralCType: #sqLong) equals: 8.!

Item was added:
+ ----- Method: SlangTypePromotionTest>>testNilAndFloat (in category 'general') -----
+ testNilAndFloat
+ 	| firstType secondType resType |
+ 	firstType := nil.
+ 	secondType := #float.
+ 	resType := ccg promoteArithmeticTypes: firstType and: secondType.
+ 	
+ 	self assert: resType equals: #float.
+ 	
+ 	"this feels wrong"
+ 	"inconsistent with integer types too"
+ 	self assert: false.!

Item was added:
+ ----- Method: SlangTypePromotionTest>>testNilAndInt (in category 'general') -----
+ testNilAndInt
+ 	| firstType secondType resType |
+ 	firstType := nil.
+ 	secondType := #int.
+ 	resType := ccg promoteArithmeticTypes: firstType and: secondType.
+ 	
+ 	self assert: resType equals: nil.
+ 	!

Item was added:
+ ----- Method: SlangTypePromotionTest>>testNilAndNil (in category 'general') -----
+ testNilAndNil
+ 	| firstType secondType resType |
+ 	firstType := nil.
+ 	secondType := nil.
+ 	resType := ccg promoteArithmeticTypes: firstType and: secondType.
+ 	
+ 	self assert: resType equals: nil.
+ 	!

Item was added:
+ ----- Method: SlangTypePromotionTest>>testUnsignedIntAndInt (in category 'unsigned-priority') -----
+ testUnsignedIntAndInt
+ 	"representative of two types bigger than sizeOf(int) and with same size"
+ 	| firstType secondType resType |
+ 	firstType := #'unsigned int'.
+ 	secondType := #'int'.
+ 	resType := ccg promoteArithmeticTypes: firstType and: secondType.
+ 	
+ 	self assert: resType equals: #'unsigned int'.
+ 	
+ 	"check that the system is in the assumed state."
+ 	self assert: (ccg isIntegralCType: #'unsigned int').
+ 	self assert: (ccg sizeOfIntegralCType: #'unsigned int') equals: 4.
+ 	self assert: (ccg isIntegralCType: #int).
+ 	self assert: (ccg sizeOfIntegralCType: #int) equals: 4.!

Item was added:
+ ----- Method: SlangTypePromotionTest>>testUnsignedIntAndLongLong (in category 'unsigned-priority') -----
+ testUnsignedIntAndLongLong
+ 	"representative of an unsigned that is ignored because of integerType promotion"
+ 	| firstType secondType resType |
+ 	firstType := #'unsigned int'.
+ 	secondType := #'long long'.
+ 	resType := ccg promoteArithmeticTypes: firstType and: secondType.
+ 	
+ 	self assert: resType equals: #'long long'.
+ 	
+ 	"check that the system is in the assumed state."
+ 	self assert: (ccg isIntegralCType: #'unsigned int').
+ 	self assert: (ccg sizeOfIntegralCType: #'unsigned int') equals: 4.
+ 	self assert: (ccg isIntegralCType: #'long long').
+ 	self assert: (ccg sizeOfIntegralCType: #'long long') equals: 8.!

Item was added:
+ ----- Method: SlangTypePromotionTest>>testsqLongAndLongLong (in category 'integer-types') -----
+ testsqLongAndLongLong
+ 	"representative of two types bigger than sizeOf(int) and with same size"
+ 	| firstType secondType resType |
+ 	firstType := #sqLong.
+ 	secondType := #'long long'.
+ 	resType := ccg promoteArithmeticTypes: firstType and: secondType.
+ 	
+ 	self assert: resType equals: #sqLong.
+ 	
+ 	"check that the system is in the assumed state."
+ 	self assert: (ccg isIntegralCType: #sqLong).
+ 	self assert: (ccg sizeOfIntegralCType: #sqLong) equals: 8.
+ 	self assert: (ccg isIntegralCType: #'long long').
+ 	self assert: (ccg sizeOfIntegralCType: #'long long') equals: 8.!



More information about the Vm-dev mailing list