[Vm-dev] VM Maker: VMMaker.oscog-nice.2917.mcz
commits at source.squeak.org
commits at source.squeak.org
Sat Jan 2 17:53:14 UTC 2021
Nicolas Cellier uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-nice.2917.mcz
==================== Summary ====================
Name: VMMaker.oscog-nice.2917
Author: nice
Time: 2 January 2021, 6:53:04.133826 pm
UUID: 0440464e-a091-4fa2-8ab8-5f0e2f86364d
Ancestors: VMMaker.oscog-nice.2916
Squeakize the slang tests (isNotNil -> notNil)
IMHO, this kind of refactorings is completely useless, except if the goal is to maximize uncompatibilities.
=============== Diff against VMMaker.oscog-nice.2916 ===============
Item was changed:
----- Method: SlangBasicTypeInferenceTest>>testABigNegativeIntegerConstantNode (in category 'constant') -----
testABigNegativeIntegerConstantNode
| tMethod |
tMethod := ccg methodNamed: #aBigNegativeIntegerConstantNode.
+ self assert: tMethod notNil.
- self assert: tMethod isNotNil.
self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #'long long'!
Item was changed:
----- Method: SlangBasicTypeInferenceTest>>testAFalseConstantNode (in category 'constant') -----
testAFalseConstantNode
| tMethod |
tMethod := ccg methodNamed: #aFalseConstantNode.
+ self assert: tMethod notNil.
- self assert: tMethod isNotNil.
self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #int!
Item was changed:
----- Method: SlangBasicTypeInferenceTest>>testAFloatConstantNode (in category 'constant') -----
testAFloatConstantNode
| tMethod |
tMethod := ccg methodNamed: #aFloatConstantNode.
+ self assert: tMethod notNil.
- self assert: tMethod isNotNil.
self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #double!
Item was changed:
----- Method: SlangBasicTypeInferenceTest>>testANilConstantNode (in category 'constant') -----
testANilConstantNode
| tMethod |
tMethod := ccg methodNamed: #aNilConstantNode.
+ self assert: tMethod notNil.
- self assert: tMethod isNotNil.
self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #int!
Item was changed:
----- Method: SlangBasicTypeInferenceTest>>testASmallNegativeIntegerConstantNode (in category 'constant') -----
testASmallNegativeIntegerConstantNode
| tMethod |
tMethod := ccg methodNamed: #aSmallNegativeIntegerConstantNode.
+ self assert: tMethod notNil.
- self assert: tMethod isNotNil.
self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #int!
Item was changed:
----- Method: SlangBasicTypeInferenceTest>>testAStringConstantNode (in category 'constant') -----
testAStringConstantNode
| tMethod |
tMethod := ccg methodNamed: #aStringConstantNode.
+ self assert: tMethod notNil.
- self assert: tMethod isNotNil.
self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #'char *'!
Item was changed:
----- Method: SlangBasicTypeInferenceTest>>testATrueConstantNode (in category 'constant') -----
testATrueConstantNode
| tMethod |
tMethod := ccg methodNamed: #aTrueConstantNode.
+ self assert: tMethod notNil.
- self assert: tMethod isNotNil.
self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #int!
Item was changed:
----- Method: SlangBasicTypeInferenceTest>>testAnIntEqual32ConstantNode (in category 'constant') -----
testAnIntEqual32ConstantNode
| tMethod |
tMethod := ccg methodNamed: #anIntEqual32ConstantNode.
+ self assert: tMethod notNil.
- self assert: tMethod isNotNil.
self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #'unsigned int'!
Item was changed:
----- Method: SlangBasicTypeInferenceTest>>testAnIntEqual64ConstantNode (in category 'constant') -----
testAnIntEqual64ConstantNode
| tMethod |
tMethod := ccg methodNamed: #anIntEqual64ConstantNode.
+ self assert: tMethod notNil.
- self assert: tMethod isNotNil.
self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #'unsigned long long'!
Item was changed:
----- Method: SlangBasicTypeInferenceTest>>testAnIntGreater64ConstantNode (in category 'constant') -----
testAnIntGreater64ConstantNode
| tMethod |
tMethod := ccg methodNamed: #anIntGreater64ConstantNode.
+ self assert: tMethod notNil.
- self assert: tMethod isNotNil.
self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #'long long'!
Item was changed:
----- Method: SlangBasicTypeInferenceTest>>testAnIntLess32ConstantNode (in category 'constant') -----
testAnIntLess32ConstantNode
| tMethod |
tMethod := ccg methodNamed: #anIntLesser32ConstantNode.
+ self assert: tMethod notNil.
- self assert: tMethod isNotNil.
self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #int.
!
Item was changed:
----- Method: SlangBasicTypeInferenceTest>>testReturnABigNegativeIntegerConstantNode (in category 'return-constant') -----
testReturnABigNegativeIntegerConstantNode
| tMethod |
tMethod := ccg methodNamed: #returnABigNegativeIntegerConstantNode.
+ self assert: tMethod notNil.
- self assert: tMethod isNotNil.
self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #'long long'.
self assert: tMethod returnType equals: #sqLong!
Item was changed:
----- Method: SlangBasicTypeInferenceTest>>testReturnABigNegativeIntegerMessageSend (in category 'return-message-send') -----
testReturnABigNegativeIntegerMessageSend
| tMethod |
tMethod := ccg methodNamed: #returnABigNegativeIntegerMessageSend.
+ self assert: tMethod notNil.
- 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 changed:
----- Method: SlangBasicTypeInferenceTest>>testReturnAFalseConstantNode (in category 'return-constant') -----
testReturnAFalseConstantNode
| tMethod |
tMethod := ccg methodNamed: #returnAFalseConstantNode.
+ self assert: tMethod notNil.
- self assert: tMethod isNotNil.
self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #int.
self assert: tMethod returnType equals: #sqInt!
Item was changed:
----- Method: SlangBasicTypeInferenceTest>>testReturnAFalseMessageSend (in category 'return-message-send') -----
testReturnAFalseMessageSend
| tMethod |
tMethod := ccg methodNamed: #returnAFalseMessageSend.
+ self assert: tMethod notNil.
- 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 changed:
----- Method: SlangBasicTypeInferenceTest>>testReturnAFloatMessageSend (in category 'return-message-send') -----
testReturnAFloatMessageSend
| tMethod |
tMethod := ccg methodNamed: #returnAFloatMessageSend.
+ self assert: tMethod notNil.
- 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 changed:
----- Method: SlangBasicTypeInferenceTest>>testReturnANilConstantNode (in category 'return-constant') -----
testReturnANilConstantNode
| tMethod |
tMethod := ccg methodNamed: #returnANilConstantNode.
+ self assert: tMethod notNil.
- self assert: tMethod isNotNil.
self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #int.
self assert: tMethod returnType equals: #sqInt!
Item was changed:
----- Method: SlangBasicTypeInferenceTest>>testReturnANilMessageSend (in category 'return-message-send') -----
testReturnANilMessageSend
| tMethod |
tMethod := ccg methodNamed: #returnANilMessageSend.
+ self assert: tMethod notNil.
- 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 changed:
----- Method: SlangBasicTypeInferenceTest>>testReturnASmallNegativeIntegerConstantNode (in category 'return-constant') -----
testReturnASmallNegativeIntegerConstantNode
| tMethod |
tMethod := ccg methodNamed: #returnASmallNegativeIntegerConstantNode.
+ self assert: tMethod notNil.
- self assert: tMethod isNotNil.
self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #int.
self assert: tMethod returnType equals: #sqInt!
Item was changed:
----- Method: SlangBasicTypeInferenceTest>>testReturnASmallNegativeIntegerMessageSend (in category 'return-message-send') -----
testReturnASmallNegativeIntegerMessageSend
| tMethod |
tMethod := ccg methodNamed: #returnASmallNegativeIntegerMessageSend.
+ self assert: tMethod notNil.
- 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 changed:
----- Method: SlangBasicTypeInferenceTest>>testReturnAStringConstantNode (in category 'return-constant') -----
testReturnAStringConstantNode
| tMethod |
tMethod := ccg methodNamed: #returnAStringConstantNode.
+ self assert: tMethod notNil.
- self assert: tMethod isNotNil.
self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #'char *'.
self assert: tMethod returnType equals: #'char *'!
Item was changed:
----- Method: SlangBasicTypeInferenceTest>>testReturnAStringMessageSend (in category 'return-message-send') -----
testReturnAStringMessageSend
| tMethod |
tMethod := ccg methodNamed: #returnAStringMessageSend.
+ self assert: tMethod notNil.
- 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 changed:
----- Method: SlangBasicTypeInferenceTest>>testReturnATrueConstantNode (in category 'return-constant') -----
testReturnATrueConstantNode
| tMethod |
tMethod := ccg methodNamed: #returnATrueConstantNode.
+ self assert: tMethod notNil.
- self assert: tMethod isNotNil.
self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #int.
self assert: tMethod returnType equals: #sqInt!
Item was changed:
----- Method: SlangBasicTypeInferenceTest>>testReturnATrueMessageSend (in category 'return-message-send') -----
testReturnATrueMessageSend
| tMethod |
tMethod := ccg methodNamed: #returnATrueMessageSend.
+ self assert: tMethod notNil.
- 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 changed:
----- Method: SlangBasicTypeInferenceTest>>testReturnAnIntEqual32ConstantNode (in category 'return-constant') -----
testReturnAnIntEqual32ConstantNode
| tMethod |
tMethod := ccg methodNamed: #returnAnIntEqual32ConstantNode.
+ self assert: tMethod notNil.
- 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 changed:
----- Method: SlangBasicTypeInferenceTest>>testReturnAnIntEqual32MessageSend (in category 'return-message-send') -----
testReturnAnIntEqual32MessageSend
| tMethod |
tMethod := ccg methodNamed: #returnAnIntEqual32MessageSend.
+ self assert: tMethod notNil.
- 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 changed:
----- Method: SlangBasicTypeInferenceTest>>testReturnAnIntEqual64ConstantNode (in category 'return-constant') -----
testReturnAnIntEqual64ConstantNode
| tMethod |
tMethod := ccg methodNamed: #returnAnIntEqual64ConstantNode.
+ self assert: tMethod notNil.
- 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 changed:
----- Method: SlangBasicTypeInferenceTest>>testReturnAnIntEqual64MessageSend (in category 'return-message-send') -----
testReturnAnIntEqual64MessageSend
| tMethod |
tMethod := ccg methodNamed: #returnAnIntEqual64MessageSend.
+ self assert: tMethod notNil.
- 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 changed:
----- Method: SlangBasicTypeInferenceTest>>testReturnAnIntGreater64ConstantNode (in category 'return-constant') -----
testReturnAnIntGreater64ConstantNode
| tMethod |
tMethod := ccg methodNamed: #returnAnIntGreater64ConstantNode.
+ self assert: tMethod notNil.
- 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 changed:
----- Method: SlangBasicTypeInferenceTest>>testReturnAnIntGreater64MessageSend (in category 'return-message-send') -----
testReturnAnIntGreater64MessageSend
| tMethod |
tMethod := ccg methodNamed: #returnAnIntGreater64MessageSend.
+ self assert: tMethod notNil.
- 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 changed:
----- Method: SlangBasicTypeInferenceTest>>testReturnAnIntLess32ConstantNode (in category 'return-constant') -----
testReturnAnIntLess32ConstantNode
| tMethod |
tMethod := ccg methodNamed: #returnAnIntLesser32ConstantNode.
+ self assert: tMethod notNil.
- 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 changed:
----- Method: SlangBasicTypeInferenceTest>>testReturnAnIntLesser32MessageSend (in category 'return-message-send') -----
testReturnAnIntLesser32MessageSend
| tMethod |
tMethod := ccg methodNamed: #returnAnIntLesser32MessageSend.
+ self assert: tMethod notNil.
- 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 changed:
----- Method: SlangBasicTypeInferenceTest>>testReturnExplicitArgDouble (in category 'return-explicit-arg') -----
testReturnExplicitArgDouble
| tMethod |
tMethod := ccg methodNamed: #returnExplicitArgDouble:.
+ self assert: tMethod notNil.
- self assert: tMethod isNotNil.
self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #double.
self assert: tMethod returnType equals: #double!
Item was changed:
----- Method: SlangBasicTypeInferenceTest>>testReturnExplicitArgFloat (in category 'return-explicit-arg') -----
testReturnExplicitArgFloat
| tMethod |
tMethod := ccg methodNamed: #returnExplicitArgFloat:.
+ self assert: tMethod notNil.
- self assert: tMethod isNotNil.
self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #float.
self assert: tMethod returnType equals: #float!
Item was changed:
----- Method: SlangBasicTypeInferenceTest>>testReturnExplicitArgInt (in category 'return-explicit-arg') -----
testReturnExplicitArgInt
| tMethod |
tMethod := ccg methodNamed: #returnExplicitArgInt:.
+ self assert: tMethod notNil.
- self assert: tMethod isNotNil.
self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #int.
self assert: tMethod returnType equals: #sqInt!
Item was changed:
----- Method: SlangBasicTypeInferenceTest>>testReturnExplicitArgLongLong (in category 'return-explicit-arg') -----
testReturnExplicitArgLongLong
| tMethod |
tMethod := ccg methodNamed: #returnExplicitArgLongLong:.
+ self assert: tMethod notNil.
- self assert: tMethod isNotNil.
self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #'long long'.
self assert: tMethod returnType equals: #sqLong!
Item was changed:
----- Method: SlangBasicTypeInferenceTest>>testReturnExplicitArgRandom (in category 'return-explicit-arg') -----
testReturnExplicitArgRandom
| tMethod |
tMethod := ccg methodNamed: #returnExplicitArgRandom:.
+ self assert: tMethod notNil.
- self assert: tMethod isNotNil.
self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #completelyRandom.
self assert: tMethod returnType equals: #completelyRandom!
Item was changed:
----- Method: SlangBasicTypeInferenceTest>>testReturnExplicitArgString (in category 'return-explicit-arg') -----
testReturnExplicitArgString
| tMethod |
tMethod := ccg methodNamed: #returnExplicitArgString:.
+ self assert: tMethod notNil.
- self assert: tMethod isNotNil.
self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #'char *'.
self assert: tMethod returnType equals: #'char *'!
Item was changed:
----- Method: SlangBasicTypeInferenceTest>>testReturnExplicitArgUnsignedInt (in category 'return-explicit-arg') -----
testReturnExplicitArgUnsignedInt
| tMethod |
tMethod := ccg methodNamed: #returnExplicitArgUnsignedInt:.
+ self assert: tMethod notNil.
- self assert: tMethod isNotNil.
self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #'unsigned int'.
self assert: tMethod returnType equals: #usqInt!
Item was changed:
----- Method: SlangBasicTypeInferenceTest>>testReturnExplicitArgUnsignedLongLong (in category 'return-explicit-arg') -----
testReturnExplicitArgUnsignedLongLong
| tMethod |
tMethod := ccg methodNamed: #returnExplicitArgUnsignedLongLong:.
+ self assert: tMethod notNil.
- 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 changed:
----- Method: SlangBasicTypeInferenceTest>>testReturnExplicitTempDouble (in category 'return-explicit-temp') -----
testReturnExplicitTempDouble
| tMethod |
tMethod := ccg methodNamed: #returnExplicitTempDouble.
+ self assert: tMethod notNil.
- self assert: tMethod isNotNil.
self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #double.
self assert: tMethod returnType equals: #double!
Item was changed:
----- Method: SlangBasicTypeInferenceTest>>testReturnExplicitTempFloat (in category 'return-explicit-temp') -----
testReturnExplicitTempFloat
| tMethod |
tMethod := ccg methodNamed: #returnExplicitTempFloat.
+ self assert: tMethod notNil.
- self assert: tMethod isNotNil.
self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #float.
self assert: tMethod returnType equals: #float!
Item was changed:
----- Method: SlangBasicTypeInferenceTest>>testReturnExplicitTempInt (in category 'return-explicit-temp') -----
testReturnExplicitTempInt
| tMethod |
tMethod := ccg methodNamed: #returnExplicitTempInt.
+ self assert: tMethod notNil.
- self assert: tMethod isNotNil.
self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #int.
self assert: tMethod returnType equals: #sqInt!
Item was changed:
----- Method: SlangBasicTypeInferenceTest>>testReturnExplicitTempLongLong (in category 'return-explicit-temp') -----
testReturnExplicitTempLongLong
| tMethod |
tMethod := ccg methodNamed: #returnExplicitTempLongLong.
+ self assert: tMethod notNil.
- self assert: tMethod isNotNil.
self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #'long long'.
self assert: tMethod returnType equals: #sqLong!
Item was changed:
----- Method: SlangBasicTypeInferenceTest>>testReturnExplicitTempRandom (in category 'return-explicit-temp') -----
testReturnExplicitTempRandom
| tMethod |
tMethod := ccg methodNamed: #returnExplicitTempRandom.
+ self assert: tMethod notNil.
- self assert: tMethod isNotNil.
self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #completelyRandom.
self assert: tMethod returnType equals: #completelyRandom!
Item was changed:
----- Method: SlangBasicTypeInferenceTest>>testReturnExplicitTempString (in category 'return-explicit-temp') -----
testReturnExplicitTempString
| tMethod |
tMethod := ccg methodNamed: #returnExplicitTempString.
+ self assert: tMethod notNil.
- self assert: tMethod isNotNil.
self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #'char *'.
self assert: tMethod returnType equals: #'char *'!
Item was changed:
----- Method: SlangBasicTypeInferenceTest>>testReturnExplicitTempUnsignedInt (in category 'return-explicit-temp') -----
testReturnExplicitTempUnsignedInt
| tMethod |
tMethod := ccg methodNamed: #returnExplicitTempUnsignedInt.
+ self assert: tMethod notNil.
- self assert: tMethod isNotNil.
self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #'unsigned int'.
self assert: tMethod returnType equals: #usqInt!
Item was changed:
----- Method: SlangBasicTypeInferenceTest>>testReturnExplicitTempUnsignedLongLong (in category 'return-explicit-temp') -----
testReturnExplicitTempUnsignedLongLong
| tMethod |
tMethod := ccg methodNamed: #returnExplicitTempUnsignedLongLong.
+ self assert: tMethod notNil.
- 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 changed:
----- Method: SlangBasicTypeInferenceTest>>testReturnFloatConstantNode (in category 'return-constant') -----
testReturnFloatConstantNode
| tMethod |
tMethod := ccg methodNamed: #returnAFloatConstantNode.
+ self assert: tMethod notNil.
- self assert: tMethod isNotNil.
self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #double.
self assert: tMethod returnType equals: #double
!
Item was changed:
----- Method: SlangBasicTypeInferenceTest>>testReturnTempBigNegativeIntegerConstantNode (in category 'return-temp-assigned-const') -----
testReturnTempBigNegativeIntegerConstantNode
| tMethod |
tMethod := ccg methodNamed: #returnTempBigNegativeIntegerConstantNode.
+ self assert: tMethod notNil.
- 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 changed:
----- Method: SlangBasicTypeInferenceTest>>testReturnTempBigNegativeIntegerMessageNode (in category 'return-temp-assigned-message') -----
testReturnTempBigNegativeIntegerMessageNode
| tMethod |
tMethod := ccg methodNamed: #returnTempBigNegativeIntegerMessageNode.
+ self assert: tMethod notNil.
- 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 changed:
----- Method: SlangBasicTypeInferenceTest>>testReturnTempFalseConstantNode (in category 'return-temp-assigned-const') -----
testReturnTempFalseConstantNode
| tMethod |
tMethod := ccg methodNamed: #returnTempFalseConstantNode.
+ self assert: tMethod notNil.
- 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 changed:
----- Method: SlangBasicTypeInferenceTest>>testReturnTempFalseMessageNode (in category 'return-temp-assigned-message') -----
testReturnTempFalseMessageNode
| tMethod |
tMethod := ccg methodNamed: #returnTempFalseMessageNode.
+ self assert: tMethod notNil.
- 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 changed:
----- Method: SlangBasicTypeInferenceTest>>testReturnTempFloatConstantNode (in category 'return-temp-assigned-const') -----
testReturnTempFloatConstantNode
| tMethod |
tMethod := ccg methodNamed: #returnTempFloatConstantNode.
+ self assert: tMethod notNil.
- 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 changed:
----- Method: SlangBasicTypeInferenceTest>>testReturnTempFloatMessageNode (in category 'return-temp-assigned-message') -----
testReturnTempFloatMessageNode
| tMethod |
tMethod := ccg methodNamed: #returnTempFloatMessageNode.
+ self assert: tMethod notNil.
- 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 changed:
----- Method: SlangBasicTypeInferenceTest>>testReturnTempIntEqual32ConstantNode (in category 'return-temp-assigned-const') -----
testReturnTempIntEqual32ConstantNode
| tMethod |
tMethod := ccg methodNamed: #returnTempIntEqual32ConstantNode.
+ self assert: tMethod notNil.
- 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 changed:
----- Method: SlangBasicTypeInferenceTest>>testReturnTempIntEqual32MessageNode (in category 'return-temp-assigned-message') -----
testReturnTempIntEqual32MessageNode
| tMethod |
tMethod := ccg methodNamed: #returnTempIntEqual32MessageNode.
+ self assert: tMethod notNil.
- 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 changed:
----- Method: SlangBasicTypeInferenceTest>>testReturnTempIntEqual64ConstantNode (in category 'return-temp-assigned-const') -----
testReturnTempIntEqual64ConstantNode
| tMethod |
tMethod := ccg methodNamed: #returnTempIntEqual64ConstantNode.
+ self assert: tMethod notNil.
- 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 changed:
----- Method: SlangBasicTypeInferenceTest>>testReturnTempIntEqual64MessageNode (in category 'return-temp-assigned-message') -----
testReturnTempIntEqual64MessageNode
| tMethod |
tMethod := ccg methodNamed: #returnTempIntEqual64MessageNode.
+ self assert: tMethod notNil.
- 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 changed:
----- Method: SlangBasicTypeInferenceTest>>testReturnTempIntGreater64ConstantNode (in category 'return-temp-assigned-const') -----
testReturnTempIntGreater64ConstantNode
| tMethod |
tMethod := ccg methodNamed: #returnTempIntGreater64ConstantNode.
+ self assert: tMethod notNil.
- 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 changed:
----- Method: SlangBasicTypeInferenceTest>>testReturnTempIntGreater64MessageNode (in category 'return-temp-assigned-message') -----
testReturnTempIntGreater64MessageNode
| tMethod |
tMethod := ccg methodNamed: #returnTempIntGreater64MessageNode.
+ self assert: tMethod notNil.
- 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 changed:
----- Method: SlangBasicTypeInferenceTest>>testReturnTempIntLesser32ConstantNode (in category 'return-temp-assigned-const') -----
testReturnTempIntLesser32ConstantNode
| tMethod |
tMethod := ccg methodNamed: #returnTempIntLesser32ConstantNode.
+ self assert: tMethod notNil.
- 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 changed:
----- Method: SlangBasicTypeInferenceTest>>testReturnTempIntLesser32MessageNode (in category 'return-temp-assigned-message') -----
testReturnTempIntLesser32MessageNode
| tMethod |
tMethod := ccg methodNamed: #returnTempIntLesser32MessageNode.
+ self assert: tMethod notNil.
- 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 changed:
----- Method: SlangBasicTypeInferenceTest>>testReturnTempNilConstantNode (in category 'return-temp-assigned-const') -----
testReturnTempNilConstantNode
| tMethod |
tMethod := ccg methodNamed: #returnTempNilConstantNode.
+ self assert: tMethod notNil.
- 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 changed:
----- Method: SlangBasicTypeInferenceTest>>testReturnTempNilMessageNode (in category 'return-temp-assigned-message') -----
testReturnTempNilMessageNode
| tMethod |
tMethod := ccg methodNamed: #returnTempNilMessageNode.
+ self assert: tMethod notNil.
- 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 changed:
----- Method: SlangBasicTypeInferenceTest>>testReturnTempSmallNegativeIntegerConstantNode (in category 'return-temp-assigned-const') -----
testReturnTempSmallNegativeIntegerConstantNode
| tMethod |
tMethod := ccg methodNamed: #returnTempSmallNegativeIntegerConstantNode.
+ self assert: tMethod notNil.
- 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 changed:
----- Method: SlangBasicTypeInferenceTest>>testReturnTempSmallNegativeIntegerMessageNode (in category 'return-temp-assigned-message') -----
testReturnTempSmallNegativeIntegerMessageNode
| tMethod |
tMethod := ccg methodNamed: #returnTempSmallNegativeIntegerMessageNode.
+ self assert: tMethod notNil.
- 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 changed:
----- Method: SlangBasicTypeInferenceTest>>testReturnTempStringConstantNode (in category 'return-temp-assigned-const') -----
testReturnTempStringConstantNode
| tMethod |
tMethod := ccg methodNamed: #returnTempStringConstantNode.
+ self assert: tMethod notNil.
- 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 changed:
----- Method: SlangBasicTypeInferenceTest>>testReturnTempStringMessageNode (in category 'return-temp-assigned-message') -----
testReturnTempStringMessageNode
| tMethod |
tMethod := ccg methodNamed: #returnTempStringMessageNode.
+ self assert: tMethod notNil.
- 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 changed:
----- Method: SlangBasicTypeInferenceTest>>testReturnTempTrueConstantNode (in category 'return-temp-assigned-const') -----
testReturnTempTrueConstantNode
| tMethod |
tMethod := ccg methodNamed: #returnTempTrueConstantNode.
+ self assert: tMethod notNil.
- 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 changed:
----- Method: SlangBasicTypeInferenceTest>>testReturnTempTrueMessageNode (in category 'return-temp-assigned-message') -----
testReturnTempTrueMessageNode
| tMethod |
tMethod := ccg methodNamed: #returnTempTrueMessageNode.
+ self assert: tMethod notNil.
- 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 changed:
----- Method: SlangTypeForArithmeticTest>>testAtOnMatrix (in category 'tests') -----
testAtOnMatrix
| tMethod |
tMethod := ccg methodNamed: #aMethodReturningAnAtOnAMatrix.
+ self assert: tMethod notNil.
- 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 changed:
----- Method: SlangTypeForDereferenceTest>>testAtOnArray (in category 'tests') -----
testAtOnArray
| tMethod |
tMethod := ccg methodNamed: #aMethodReturningAnAtOnAnArray.
+ self assert: tMethod notNil.
- 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 changed:
----- Method: SlangTypeForDereferenceTest>>testAtOnMatrix (in category 'tests') -----
testAtOnMatrix
| tMethod |
tMethod := ccg methodNamed: #aMethodReturningAnAtOnAMatrix.
+ self assert: tMethod notNil.
- 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 changed:
----- Method: SlangTypeForDereferenceTest>>testReturnPointerTypeExplicitTempVariable (in category 'tests') -----
testReturnPointerTypeExplicitTempVariable
| tMethod |
tMethod := ccg methodNamed: #aMethodReturningAPointerType.
+ self assert: tMethod notNil.
- 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 changed:
----- Method: SlangTypeForDereferenceTest>>testSelfMessageReturningPointerType (in category 'tests') -----
testSelfMessageReturningPointerType
| tMethod |
tMethod := ccg methodNamed: #aMethodReturningAPointerType.
+ self assert: tMethod notNil.
- 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 changed:
----- Method: SlangTypeForDereferenceTest>>testTwoAtOnMatrix (in category 'tests') -----
testTwoAtOnMatrix
| tMethod |
tMethod := ccg methodNamed: #aMethodReturningTwoAtOnAMatrix.
+ self assert: tMethod notNil.
- 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"!
More information about the Vm-dev
mailing list