<div dir="ltr">If things are not going better this evening, I'll retract some of these changes.<br></div><div class="gmail_extra"><br><div class="gmail_quote">2016-04-24 22:31 GMT+02:00 <span dir="ltr"><<a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Nicolas Cellier uploaded a new version of VMMaker to project VM Maker:<br>
<a href="http://source.squeak.org/VMMaker/VMMaker.oscog-nice.1840.mcz" rel="noreferrer" target="_blank">http://source.squeak.org/VMMaker/VMMaker.oscog-nice.1840.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: VMMaker.oscog-nice.1840<br>
Author: nice<br>
Time: 24 April 2016, 10:30:31.797 pm<br>
UUID: 218875e3-8515-4804-a608-9e3228ffb843<br>
Ancestors: VMMaker.oscog-nice.1839<br>
<br>
Oops, correct the inversion of type inference for left/right shift.<br>
Protect the type of most used integerValueOf:/isIntegerObject:<br>
<br>
This restore good health for CogSpur32 tests, but not yet for CogSpur64 which has a problem with SmallFloat, and definitely not for CogV3 which now fails to start.<br>
<br>
=============== Diff against VMMaker.oscog-nice.1839 ===============<br>
<br>
Item was changed:<br>
----- Method: CCodeGenerator>>returnTypeForSend:in: (in category 'type inference') -----<br>
returnTypeForSend: sendNode in: aTMethod<br>
"Answer the return type for a send. Absent sends default to #sqInt.<br>
The inferred type should match as closely as possible the C type of<br>
generated expessions so that inlining would not change the expression."<br>
| sel methodOrNil |<br>
methodOrNil := self anyMethodNamed: (sel := sendNode selector).<br>
(methodOrNil notNil and: [methodOrNil returnType notNil]) ifTrue:<br>
[^self baseTypeForType: methodOrNil returnType].<br>
^kernelReturnTypes<br>
at: sel<br>
ifAbsent:<br>
[sel<br>
caseOf: {<br>
+ [#integerValueOf:] -> [#sqInt].<br>
+ [#isIntegerObject:] -> [#int].<br>
[#negated] -> [self promoteArithmeticTypes: (self typeFor: sendNode receiver in: aTMethod) and: #int].<br>
[#+] -> [self typeForArithmetic: sendNode in: aTMethod].<br>
[#-] -> [self typeForArithmetic: sendNode in: aTMethod].<br>
[#*] -> [self typeForArithmetic: sendNode in: aTMethod].<br>
[#/] -> [self typeForArithmetic: sendNode in: aTMethod].<br>
[#//] -> [self typeForArithmetic: sendNode in: aTMethod].<br>
[#\\] -> [self typeForArithmetic: sendNode in: aTMethod].<br>
+ [#>>] -> [self<br>
- [#>>] -> [self typeForArithmetic: sendNode in: aTMethod].<br>
- [#<<] -> [self<br>
promoteArithmeticTypes: (self unsignedTypeForIntegralType: (self typeFor: sendNode receiver in: aTMethod))<br>
and: (self typeFor: sendNode args first in: aTMethod)].<br>
+ [#<<] -> [self typeForArithmetic: sendNode in: aTMethod].<br>
[#rem:] -> [self typeForArithmetic: sendNode in: aTMethod].<br>
[#quo:] -> [self typeForArithmetic: sendNode in: aTMethod].<br>
[#addressOf:] -> [(self typeFor: sendNode receiver in: aTMethod)<br>
ifNil: [#sqInt]<br>
ifNotNil: [:type| type, (type last isLetter ifTrue: [' *'] ifFalse: ['*'])]].<br>
[#at:] -> [self typeForDereference: sendNode in: aTMethod].<br>
[#bitAnd:] -> [self typeForArithmetic: sendNode in: aTMethod].<br>
[#bitOr:] -> [self typeForArithmetic: sendNode in: aTMethod].<br>
[#bitXor:] -> [self typeForArithmetic: sendNode in: aTMethod].<br>
[#bitClear:] -> [self typeForArithmetic: sendNode in: aTMethod].<br>
[#bitInvert32] -> [#'unsigned int'].<br>
[#bitInvert64] -> [self promoteArithmeticTypes: (self typeFor: sendNode receiver in: aTMethod) and: #int].<br>
[#byteSwap32] -> [#'unsigned int'].<br>
[#byteSwap64] -> [#'unsigned long long'].<br>
[#byteSwapped32IfBigEndian:] -> [#'unsigned int'].<br>
[#byteSwapped64IfBigEndian:] -> [#'unsigned long long'].<br>
[#=] -> [#int].<br>
[#~=] -> [#int].<br>
[#==] -> [#int].<br>
[#~~] -> [#int].<br>
[#<] -> [#int].<br>
[#<=] -> [#int].<br>
[#>] -> [#int].<br>
[#>=] -> [#int].<br>
[#between:and:] -> [#int].<br>
[#anyMask:] -> [#int].<br>
[#allMask:] -> [#int].<br>
[#noMask:] -> [#int].<br>
[#isNil] -> [#int].<br>
[#notNil] -> [#int].<br>
[#&] -> [#int].<br>
[#|] -> [#int].<br>
[#not] -> [#int].<br>
[#asFloat] -> [#double].<br>
[#atan] -> [#double].<br>
[#exp] -> [#double].<br>
[#log] -> [#double].<br>
[#sin] -> [#double].<br>
[#sqrt] -> [#double].<br>
[#asLong] -> [#long].<br>
[#asInteger] -> [#sqInt].<br>
[#asUnsignedInteger] -> [#usqInt].<br>
[#asUnsignedLong] -> [#'unsigned long'].<br>
[#asVoidPointer] -> [#'void *'].<br>
[#signedIntToLong] -> [#usqInt]. "c.f. generateSignedIntToLong:on:indent:"<br>
[#signedIntToShort] -> [#usqInt]. "c.f. generateSignedIntToShort:on:indent:"<br>
[#cCoerce:to:] -> [sendNode args last value].<br>
[#cCoerceSimple:to:] -> [sendNode args last value].<br>
[#sizeof:] -> [#'unsigned long']. "Technically it's a size_t but it matches unsigned long on target architectures so far..."<br>
[#ifTrue:ifFalse:] -> [self typeForConditional: sendNode in: aTMethod].<br>
[#ifFalse:ifTrue:] -> [self typeForConditional: sendNode in: aTMethod].<br>
[#ifTrue:] -> [self typeForConditional: sendNode in: aTMethod].<br>
[#ifFalse:] -> [self typeForConditional: sendNode in: aTMethod] }<br>
otherwise: "If there /is/ a method for sel but its retrn type is as yet unknown we /mustn't/ default it.<br>
We can only default unbound selectors."<br>
[methodOrNil ifNotNil: [nil] ifNil: [#sqInt]]]!<br>
<br>
</blockquote></div><br></div>