<div dir="ltr">JIT builds still <a href="https://travis-ci.org/newspeaklanguage/nsvm-linux-ci/jobs/96659717">failing</a>.<div><br></div>/home/travis/build/newspeaklanguage/nsvm-linux-ci/oscogvm/nsspursrc/vm/cogitIA32.c: In function ‘genNSSendnumArgsdepthsendTable’:<br>/home/travis/build/newspeaklanguage/nsvm-linux-ci/oscogvm/nsspursrc/vm/cogitIA32.c:23996:15: warning: assignment makes integer from pointer without a cast [enabled by default]<div>/home/travis/build/newspeaklanguage/nsvm-linux-ci/oscogvm/nsspursrc/vm/cogitIA32.c:23997:10: error: called object ‘selector’ is not a function<br>/home/travis/build/newspeaklanguage/nsvm-linux-ci/oscogvm/nsspursrc/vm/cogitIA32.c:23998:9: error: called object ‘numArgs’ is not a function<br>/home/travis/build/newspeaklanguage/nsvm-linux-ci/oscogvm/nsspursrc/vm/cogitIA32.c:23999:7: error: called object ‘depth’ is not a function</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Dec 13, 2015 at 5:25 PM,  <span dir="ltr">&lt;<a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Eliot Miranda uploaded a new version of VMMaker to project VM Maker:<br>
<a href="http://source.squeak.org/VMMaker/VMMaker.oscog-eem.1594.mcz" rel="noreferrer" target="_blank">http://source.squeak.org/VMMaker/VMMaker.oscog-eem.1594.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: VMMaker.oscog-eem.1594<br>
Author: eem<br>
Time: 13 December 2015, 5:24:57.076 pm<br>
UUID: 79da8b81-d1f3-469a-869c-16c79d12649a<br>
Ancestors: VMMaker.oscog-eem.1593<br>
<br>
Cogit:<br>
Don&#39;t inline AndCq:R:R: because its translation contains a jump and hence won&#39;t work in a statement list expression (e.g. as in x86&#39;s genJumpSmallInteger:scratchReg:).<br>
<br>
Nuke genJump[Not]SmallInteger:scratch: in favour of genJump[Not]SmallInteger:scratchReg:<br>
<br>
Slang:<br>
Eliminate leaves in statement lists generated as expressions.<br>
<br>
=============== Diff against VMMaker.oscog-eem.1593 ===============<br>
<br>
Item was removed:<br>
- ----- Method: CogObjectRepresentation&gt;&gt;genJumpNotSmallInteger:scratch: (in category &#39;compile abstract instructions&#39;) -----<br>
- genJumpNotSmallInteger: aRegister scratch: scratchReg<br>
-       &quot;Generate a test for aRegister containing a SmallInteger and a jump if not, answering the jump.<br>
-        If necessary use scratch reg (since testing for SmallInteger may be destructive).&quot;<br>
-       &lt;returnTypeC: #&#39;AbstractInstruction *&#39;&gt;<br>
-       | jumpNotInt |<br>
-       &lt;inline: true&gt;<br>
-       &lt;var: &#39;jumpNotInt&#39; type: #&#39;AbstractInstruction *&#39;&gt;<br>
-       jumpNotInt := self genJumpNotSmallInteger: aRegister.<br>
-       jumpNotInt asInteger = UnimplementedOperation ifTrue:<br>
-               [cogit MoveR: aRegister R: scratchReg.<br>
-                jumpNotInt := self genJumpNotSmallIntegerInScratchReg: TempReg].<br>
-       ^jumpNotInt!<br>
<br>
Item was changed:<br>
  ----- Method: CogObjectRepresentation&gt;&gt;genJumpNotSmallInteger:scratchReg: (in category &#39;compile abstract instructions&#39;) -----<br>
  genJumpNotSmallInteger: aRegister scratchReg: scratch<br>
        &quot;Generate a compare and branch to test if aRegister contains other than a SmallInteger.<br>
         Answer the jump.  Use scratch if required.  Subclasses will override if scratch is needed.&quot;<br>
+       &lt;inline: true&gt;<br>
-       &lt;returnTypeC: #&#39;AbstractInstruction *&#39;&gt;<br>
        ^self genJumpNotSmallInteger: aRegister!<br>
<br>
Item was removed:<br>
- ----- Method: CogObjectRepresentation&gt;&gt;genJumpSmallInteger:scratch: (in category &#39;compile abstract instructions&#39;) -----<br>
- genJumpSmallInteger: aRegister scratch: scratchReg<br>
-       &quot;Generate a test for aRegister containing a SmallInteger and a jump if so, answering the jump.<br>
-        If necessary use scratch reg (since testing for SmallInteger may be destructive).&quot;<br>
-       &lt;returnTypeC: #&#39;AbstractInstruction *&#39;&gt;<br>
-       | jumpInt |<br>
-       &lt;inline: true&gt;<br>
-       &lt;var: &#39;jumpInt&#39; type: #&#39;AbstractInstruction *&#39;&gt;<br>
-       jumpInt := self genJumpSmallInteger: aRegister.<br>
-       jumpInt asInteger = UnimplementedOperation ifTrue:<br>
-               [cogit MoveR: aRegister R: scratchReg.<br>
-                jumpInt := self genJumpSmallIntegerInScratchReg: TempReg].<br>
-       ^jumpInt!<br>
<br>
Item was changed:<br>
  ----- Method: CogObjectRepresentation&gt;&gt;genJumpSmallInteger:scratchReg: (in category &#39;compile abstract instructions&#39;) -----<br>
  genJumpSmallInteger: aRegister scratchReg: scratch<br>
        &quot;Generate a compare and branch to test if aRegister contains a SmallInteger.<br>
         Answer the jump.  Use scratch if required.  Subclasses will override if scratch is needed.&quot;<br>
-       &lt;returnTypeC: #&#39;AbstractInstruction *&#39;&gt;<br>
        ^self genJumpSmallInteger: aRegister!<br>
<br>
Item was changed:<br>
  ----- Method: CogObjectRepresentationFor32BitSpur&gt;&gt;genInnerPrimitiveAt: (in category &#39;primitive generators&#39;) -----<br>
  genInnerPrimitiveAt: retNoffset<br>
        &quot;Implement the guts of primitiveAt&quot;<br>
        | formatReg convertToIntAndReturn<br>
          jumpNotIndexable jumpImmediate jumpBadIndex<br>
          jumpIsBytes jumpIsShorts jumpIsWords jumpWordTooBig jumpIsArray jumpHasFixedFields jumpIsContext<br>
          jumpBytesOutOfBounds jumpShortsOutOfBounds jumpWordsOutOfBounds jumpArrayOutOfBounds jumpFixedFieldsOutOfBounds |<br>
        &lt;inline: true&gt;<br>
        &quot;c.f. StackInterpreter&gt;&gt;stSizeOf: SpurMemoryManager&gt;&gt;lengthOf:format: fixedFieldsOf:format:length:&quot;<br>
        &lt;var: #jumpIsBytes type: #&#39;AbstractInstruction *&#39;&gt;<br>
        &lt;var: #jumpIsShorts type: #&#39;AbstractInstruction *&#39;&gt;<br>
        &lt;var: #jumpBadIndex type: #&#39;AbstractInstruction *&#39;&gt;<br>
        &lt;var: #jumpIsContext type: #&#39;AbstractInstruction *&#39;&gt;<br>
        &lt;var: #jumpImmediate type: #&#39;AbstractInstruction *&#39;&gt;<br>
        &lt;var: #jumpWordTooBig type: #&#39;AbstractInstruction *&#39;&gt;<br>
        &lt;var: #jumpNotIndexable type: #&#39;AbstractInstruction *&#39;&gt;<br>
        &lt;var: #jumpHasFixedFields type: #&#39;AbstractInstruction *&#39;&gt;<br>
        &lt;var: #convertToIntAndReturn type: #&#39;AbstractInstruction *&#39;&gt;<br>
        &lt;var: #jumpArrayOutOfBounds type: #&#39;AbstractInstruction *&#39;&gt;<br>
        &lt;var: #jumpBytesOutOfBounds type: #&#39;AbstractInstruction *&#39;&gt;<br>
        &lt;var: #jumpShortsOutOfBounds type: #&#39;AbstractInstruction *&#39;&gt;<br>
        &lt;var: #jumpWordsOutOfBounds type: #&#39;AbstractInstruction *&#39;&gt;<br>
        &lt;var: #jumpFixedFieldsOutOfBounds type: #&#39;AbstractInstruction *&#39;&gt;<br>
<br>
        jumpImmediate := self genJumpImmediate: ReceiverResultReg.<br>
        cogit MoveR: Arg0Reg R: Arg1Reg.<br>
+       jumpBadIndex := self genJumpNotSmallInteger: Arg0Reg scratchReg: TempReg.<br>
-       jumpBadIndex := self genJumpNotSmallInteger: Arg0Reg scratch: TempReg.<br>
        self genConvertSmallIntegerToIntegerInReg: Arg1Reg.<br>
        cogit SubCq: 1 R: Arg1Reg. &quot;1-rel =&gt; 0-rel&quot;<br>
<br>
        &quot;formatReg := self formatOf: ReceiverResultReg&quot;<br>
        self genGetFormatOf: ReceiverResultReg<br>
                into: (formatReg := SendNumArgsReg)<br>
                leastSignificantHalfOfBaseHeaderIntoScratch: TempReg.<br>
<br>
        self genGetNumSlotsOf: ReceiverResultReg into: ClassReg.<br>
<br>
        &quot;dispatch on format in a combination of highest dynamic frequency order first and convenience.<br>
                  0 = 0 sized objects (UndefinedObject True False et al)<br>
                  1 = non-indexable objects with inst vars (Point et al)<br>
                  2 = indexable objects with no inst vars (Array et al)<br>
                  3 = indexable objects with inst vars (MethodContext AdditionalMethodState et al)<br>
                  4 = weak indexable objects with inst vars (WeakArray et al)<br>
                  5 = weak non-indexable objects with inst vars (ephemerons) (Ephemeron)<br>
                  6 unused, reserved for exotic pointer objects?<br>
                  7 Forwarded Object, 1st field is pointer, rest of fields are ignored<br>
                  8 unused, reserved for exotic non-pointer objects?<br>
                  9 (?) 64-bit indexable<br>
                10 - 11 32-bit indexable<br>
                12 - 15 16-bit indexable<br>
                16 - 23 byte indexable<br>
                24 - 31 compiled method&quot;<br>
        cogit CmpCq: objectMemory firstByteFormat R: formatReg.<br>
        jumpIsBytes := cogit JumpAboveOrEqual: 0.<br>
                                        cogit CmpCq: objectMemory arrayFormat R: formatReg.<br>
        jumpIsArray := cogit JumpZero: 0.<br>
        jumpNotIndexable := cogit JumpBelow: 0.<br>
                                        cogit CmpCq: objectMemory weakArrayFormat R: formatReg.<br>
        jumpHasFixedFields := cogit JumpBelowOrEqual: 0.<br>
                                        cogit CmpCq: objectMemory firstShortFormat R: formatReg.<br>
        jumpIsShorts := cogit JumpAboveOrEqual: 0.<br>
                                        cogit CmpCq: objectMemory firstLongFormat R: formatReg.<br>
        jumpIsWords := cogit JumpAboveOrEqual: 0.<br>
        &quot;For now ignore 64-bit indexability.&quot;<br>
        jumpNotIndexable jmpTarget: cogit Label.<br>
        jumpNotIndexable := cogit Jump: 0.<br>
<br>
        jumpIsBytes jmpTarget:<br>
                (cogit LogicalShiftLeftCq: objectMemory shiftForWord R: ClassReg).<br>
                cogit AndCq: objectMemory wordSize - 1 R: formatReg.<br>
                cogit SubR: formatReg R: ClassReg;<br>
                CmpR: Arg1Reg R: ClassReg.<br>
        jumpBytesOutOfBounds := cogit JumpBelowOrEqual: 0.<br>
        cogit AddCq: objectMemory baseHeaderSize R: Arg1Reg.<br>
        cogit backEnd byteReadsZeroExtend<br>
                ifTrue:<br>
                        [cogit MoveXbr: Arg1Reg R: ReceiverResultReg R: ReceiverResultReg]<br>
                ifFalse:<br>
                        [cogit &quot;formatReg already contains a value &lt;= 16r1f, so no need to zero it&quot;<br>
                                MoveXbr: Arg1Reg R: ReceiverResultReg R: formatReg;<br>
                                MoveR: formatReg R: ReceiverResultReg].<br>
        convertToIntAndReturn := cogit Label.<br>
        self genConvertIntegerToSmallIntegerInReg: ReceiverResultReg.<br>
        cogit RetN: retNoffset.<br>
<br>
        jumpIsShorts jmpTarget:<br>
                (cogit LogicalShiftLeftCq: objectMemory shiftForWord - 1 R: ClassReg).<br>
                cogit AndCq: 1 R: formatReg.<br>
                cogit SubR: formatReg R: ClassReg;<br>
                CmpR: Arg1Reg R: ClassReg.<br>
        jumpShortsOutOfBounds := cogit JumpBelowOrEqual: 0.<br>
        cogit AddR: Arg1Reg R: ReceiverResultReg.<br>
        cogit MoveM16: objectMemory baseHeaderSize r: ReceiverResultReg R: ReceiverResultReg.<br>
        cogit Jump: convertToIntAndReturn.<br>
<br>
        jumpIsWords jmpTarget:<br>
                (cogit CmpR: Arg1Reg R: ClassReg).<br>
        jumpWordsOutOfBounds := cogit JumpBelowOrEqual: 0.<br>
        cogit AddCq: objectMemory baseHeaderSize &gt;&gt; objectMemory shiftForWord R: Arg1Reg.<br>
        cogit MoveXwr: Arg1Reg R: ReceiverResultReg R: TempReg.<br>
        cogit SubCq: objectMemory baseHeaderSize &gt;&gt; objectMemory shiftForWord R: Arg1Reg.<br>
        jumpWordTooBig := self jumpNotSmallIntegerUnsignedValueInRegister: TempReg.<br>
        cogit MoveR: TempReg R: ReceiverResultReg.<br>
        cogit Jump: convertToIntAndReturn.<br>
<br>
        jumpHasFixedFields jmpTarget:<br>
                (cogit AndCq: objectMemory classIndexMask R: TempReg).<br>
        cogit MoveR: TempReg R: formatReg.<br>
        cogit CmpCq: ClassMethodContextCompactIndex R: TempReg.<br>
        jumpIsContext := cogit JumpZero: 0.<br>
        cogit PushR: ClassReg.<br>
        self genGetClassObjectOfClassIndex: formatReg into: ClassReg scratchReg: TempReg.<br>
        self genLoadSlot: InstanceSpecificationIndex sourceReg: ClassReg destReg: formatReg.<br>
        cogit PopR: ClassReg.<br>
        self genConvertSmallIntegerToIntegerInReg: formatReg.<br>
        cogit<br>
                AndCq: objectMemory fixedFieldsOfClassFormatMask R: formatReg;<br>
                SubR: formatReg R: ClassReg;<br>
                CmpR: Arg1Reg R: ClassReg.<br>
        jumpFixedFieldsOutOfBounds := cogit JumpBelowOrEqual: 0.<br>
        &quot;index is (formatReg (fixed fields) + Arg1Reg (0-rel index)) * wordSize + baseHeaderSize&quot;<br>
        cogit AddR: formatReg R: Arg1Reg.<br>
        cogit AddCq: objectMemory baseHeaderSize &gt;&gt; objectMemory shiftForWord R: Arg1Reg.<br>
        cogit MoveXwr: Arg1Reg R: ReceiverResultReg R: ReceiverResultReg.<br>
        cogit RetN: retNoffset.<br>
<br>
        jumpIsArray jmpTarget:<br>
                (cogit CmpR: Arg1Reg R: ClassReg).<br>
        jumpArrayOutOfBounds := cogit JumpBelowOrEqual: 0.<br>
        cogit AddCq: objectMemory baseHeaderSize &gt;&gt; objectMemory shiftForWord R: Arg1Reg.<br>
        cogit MoveXwr: Arg1Reg R: ReceiverResultReg R: ReceiverResultReg.<br>
        cogit RetN: retNoffset.<br>
<br>
        jumpFixedFieldsOutOfBounds jmpTarget:<br>
        (jumpArrayOutOfBounds jmpTarget:<br>
        (jumpBytesOutOfBounds jmpTarget:<br>
        (jumpShortsOutOfBounds jmpTarget:<br>
        (jumpWordsOutOfBounds jmpTarget:<br>
        (jumpWordTooBig jmpTarget:<br>
        (jumpNotIndexable jmpTarget:<br>
        (jumpIsContext jmpTarget:<br>
        (jumpBadIndex jmpTarget:<br>
        (jumpImmediate jmpTarget: cogit Label))))))))).<br>
<br>
        ^0!<br>
<br>
Item was changed:<br>
  ----- Method: CogObjectRepresentationFor64BitSpur&gt;&gt;genInnerPrimitiveAt: (in category &#39;primitive generators&#39;) -----<br>
  genInnerPrimitiveAt: retNoffset<br>
        &quot;Implement the guts of primitiveAt&quot;<br>
        | formatReg convertToIntAndReturn<br>
          jumpNotIndexable jumpImmediate jumpBadIndex<br>
          jumpIsBytes jumpIsShorts jumpIsWords jumpIsArray jumpHasFixedFields jumpIsContext<br>
          jumpBytesOutOfBounds jumpShortsOutOfBounds jumpWordsOutOfBounds jumpArrayOutOfBounds jumpFixedFieldsOutOfBounds |<br>
        &lt;inline: true&gt;<br>
        &quot;c.f. StackInterpreter&gt;&gt;stSizeOf: SpurMemoryManager&gt;&gt;lengthOf:format: fixedFieldsOf:format:length:&quot;<br>
        &lt;var: #jumpIsBytes type: #&#39;AbstractInstruction *&#39;&gt;<br>
        &lt;var: #jumpIsShorts type: #&#39;AbstractInstruction *&#39;&gt;<br>
        &lt;var: #jumpBadIndex type: #&#39;AbstractInstruction *&#39;&gt;<br>
        &lt;var: #jumpIsContext type: #&#39;AbstractInstruction *&#39;&gt;<br>
        &lt;var: #jumpImmediate type: #&#39;AbstractInstruction *&#39;&gt;<br>
        &lt;var: #jumpNotIndexable type: #&#39;AbstractInstruction *&#39;&gt;<br>
        &lt;var: #jumpHasFixedFields type: #&#39;AbstractInstruction *&#39;&gt;<br>
        &lt;var: #convertToIntAndReturn type: #&#39;AbstractInstruction *&#39;&gt;<br>
        &lt;var: #jumpArrayOutOfBounds type: #&#39;AbstractInstruction *&#39;&gt;<br>
        &lt;var: #jumpBytesOutOfBounds type: #&#39;AbstractInstruction *&#39;&gt;<br>
        &lt;var: #jumpShortsOutOfBounds type: #&#39;AbstractInstruction *&#39;&gt;<br>
        &lt;var: #jumpWordsOutOfBounds type: #&#39;AbstractInstruction *&#39;&gt;<br>
        &lt;var: #jumpFixedFieldsOutOfBounds type: #&#39;AbstractInstruction *&#39;&gt;<br>
<br>
        jumpImmediate := self genJumpImmediate: ReceiverResultReg.<br>
        cogit MoveR: Arg0Reg R: Arg1Reg.<br>
+       jumpBadIndex := self genJumpNotSmallInteger: Arg0Reg scratchReg: TempReg.<br>
-       jumpBadIndex := self genJumpNotSmallInteger: Arg0Reg scratch: TempReg.<br>
        self genConvertSmallIntegerToIntegerInReg: Arg1Reg.<br>
        cogit SubCq: 1 R: Arg1Reg. &quot;1-rel =&gt; 0-rel&quot;<br>
<br>
        &quot;formatReg := self formatOf: ReceiverResultReg&quot;<br>
        self genGetFormatOf: ReceiverResultReg<br>
                into: (formatReg := SendNumArgsReg)<br>
                leastSignificantHalfOfBaseHeaderIntoScratch: TempReg.<br>
<br>
        self genGetNumSlotsOf: ReceiverResultReg into: ClassReg.<br>
<br>
        &quot;dispatch on format in a combination of highest dynamic frequency order first and convenience.<br>
                  0 = 0 sized objects (UndefinedObject True False et al)<br>
                  1 = non-indexable objects with inst vars (Point et al)<br>
                  2 = indexable objects with no inst vars (Array et al)<br>
                  3 = indexable objects with inst vars (MethodContext AdditionalMethodState et al)<br>
                  4 = weak indexable objects with inst vars (WeakArray et al)<br>
                  5 = weak non-indexable objects with inst vars (ephemerons) (Ephemeron)<br>
                  6 unused, reserved for exotic pointer objects?<br>
                  7 Forwarded Object, 1st field is pointer, rest of fields are ignored<br>
                  8 unused, reserved for exotic non-pointer objects?<br>
                  9 (?) 64-bit indexable<br>
                10 - 11 32-bit indexable<br>
                12 - 15 16-bit indexable<br>
                16 - 23 byte indexable<br>
                24 - 31 compiled method&quot;<br>
        cogit CmpCq: objectMemory firstByteFormat R: formatReg.<br>
        jumpIsBytes := cogit JumpAboveOrEqual: 0.<br>
                                        cogit CmpCq: objectMemory arrayFormat R: formatReg.<br>
        jumpIsArray := cogit JumpZero: 0.<br>
        jumpNotIndexable := cogit JumpBelow: 0.<br>
                                        cogit CmpCq: objectMemory weakArrayFormat R: formatReg.<br>
        jumpHasFixedFields := cogit JumpBelowOrEqual: 0.<br>
                                        cogit CmpCq: objectMemory firstShortFormat R: formatReg.<br>
        jumpIsShorts := cogit JumpAboveOrEqual: 0.<br>
                                        cogit CmpCq: objectMemory firstLongFormat R: formatReg.<br>
        jumpIsWords := cogit JumpAboveOrEqual: 0.<br>
        &quot;For now ignore 64-bit indexability.&quot;<br>
        jumpNotIndexable jmpTarget: cogit Label.<br>
        jumpNotIndexable := cogit Jump: 0.<br>
<br>
        jumpIsBytes jmpTarget:<br>
                (cogit LogicalShiftLeftCq: objectMemory shiftForWord R: ClassReg).<br>
                cogit AndCq: objectMemory wordSize - 1 R: formatReg.<br>
                cogit SubR: formatReg R: ClassReg;<br>
                CmpR: Arg1Reg R: ClassReg.<br>
        jumpBytesOutOfBounds := cogit JumpBelowOrEqual: 0.<br>
        cogit AddCq: objectMemory baseHeaderSize R: Arg1Reg.<br>
        cogit backEnd byteReadsZeroExtend<br>
                ifTrue:<br>
                        [cogit MoveXbr: Arg1Reg R: ReceiverResultReg R: ReceiverResultReg]<br>
                ifFalse:<br>
                        [cogit &quot;formatReg already contains a value &lt;= 16r1f, so no need to zero it&quot;<br>
                                MoveXbr: Arg1Reg R: ReceiverResultReg R: formatReg;<br>
                                MoveR: formatReg R: ReceiverResultReg].<br>
        convertToIntAndReturn := cogit Label.<br>
        self genConvertIntegerToSmallIntegerInReg: ReceiverResultReg.<br>
        cogit RetN: retNoffset.<br>
<br>
        jumpIsShorts jmpTarget:<br>
                (cogit LogicalShiftLeftCq: objectMemory shiftForWord - 1 R: ClassReg).<br>
                cogit AndCq: 1 R: formatReg.<br>
                cogit SubR: formatReg R: ClassReg;<br>
                CmpR: Arg1Reg R: ClassReg.<br>
        jumpShortsOutOfBounds := cogit JumpBelowOrEqual: 0.<br>
        cogit AddR: Arg1Reg R: ReceiverResultReg.<br>
        cogit MoveM16: objectMemory baseHeaderSize r: ReceiverResultReg R: ReceiverResultReg.<br>
        cogit Jump: convertToIntAndReturn.<br>
<br>
        jumpIsWords jmpTarget:<br>
                (cogit CmpR: Arg1Reg R: ClassReg).<br>
        jumpWordsOutOfBounds := cogit JumpBelowOrEqual: 0.<br>
        cogit AddCq: objectMemory baseHeaderSize &gt;&gt;  (objectMemory shiftForWord - 1) R: Arg1Reg.<br>
        cogit MoveX32r: Arg1Reg R: ReceiverResultReg R: TempReg.<br>
        cogit MoveR: TempReg R: ReceiverResultReg.<br>
        cogit Jump: convertToIntAndReturn.<br>
<br>
        jumpHasFixedFields jmpTarget:<br>
                (cogit AndCq: objectMemory classIndexMask R: TempReg).<br>
        cogit MoveR: TempReg R: formatReg.<br>
        cogit CmpCq: ClassMethodContextCompactIndex R: TempReg.<br>
        jumpIsContext := cogit JumpZero: 0.<br>
        self genGetClassObjectOfClassIndex: formatReg into: Scratch0Reg scratchReg: TempReg.<br>
        self genLoadSlot: InstanceSpecificationIndex sourceReg: Scratch0Reg destReg: formatReg.<br>
        self genConvertSmallIntegerToIntegerInReg: formatReg.<br>
        cogit<br>
                AndCq: objectMemory fixedFieldsOfClassFormatMask R: formatReg;<br>
                SubR: formatReg R: ClassReg;<br>
                CmpR: Arg1Reg R: ClassReg.<br>
        jumpFixedFieldsOutOfBounds := cogit JumpBelowOrEqual: 0.<br>
        &quot;index is (formatReg (fixed fields) + Arg1Reg (0-rel index)) * wordSize + baseHeaderSize&quot;<br>
        cogit AddR: formatReg R: Arg1Reg.<br>
        cogit AddCq: objectMemory baseHeaderSize &gt;&gt; objectMemory shiftForWord R: Arg1Reg.<br>
        cogit MoveXwr: Arg1Reg R: ReceiverResultReg R: ReceiverResultReg.<br>
        cogit RetN: retNoffset.<br>
<br>
        jumpIsArray jmpTarget:<br>
                (cogit CmpR: Arg1Reg R: ClassReg).<br>
        jumpArrayOutOfBounds := cogit JumpBelowOrEqual: 0.<br>
        cogit AddCq: objectMemory baseHeaderSize &gt;&gt; objectMemory shiftForWord R: Arg1Reg.<br>
        cogit MoveXwr: Arg1Reg R: ReceiverResultReg R: ReceiverResultReg.<br>
        cogit RetN: retNoffset.<br>
<br>
        jumpFixedFieldsOutOfBounds jmpTarget:<br>
        (jumpArrayOutOfBounds jmpTarget:<br>
        (jumpBytesOutOfBounds jmpTarget:<br>
        (jumpShortsOutOfBounds jmpTarget:<br>
        (jumpWordsOutOfBounds jmpTarget:<br>
        (jumpNotIndexable jmpTarget:<br>
        (jumpIsContext jmpTarget:<br>
        (jumpBadIndex jmpTarget:<br>
        (jumpImmediate jmpTarget: cogit Label)))))))).<br>
<br>
        ^0!<br>
<br>
Item was changed:<br>
  ----- Method: CogObjectRepresentationFor64BitSpur&gt;&gt;genInnerPrimitiveNewWithArg: (in category &#39;primitive generators&#39;) -----<br>
  genInnerPrimitiveNewWithArg: retNoffset<br>
        &quot;Implement primitiveNewWithArg for convenient cases:<br>
        - the receiver has a hash<br>
        - the receiver is variable and not compiled method<br>
        - single word header/num slots &lt; numSlotsMask<br>
        - the result fits in eden<br>
        See superclass method for dynamic frequencies of formats.<br>
        For the moment we implement only arrayFormat, firstByteFormat &amp; firstLongFormat&quot;<br>
<br>
        | headerReg fillReg instSpecReg byteSizeReg maxSlots<br>
          jumpArrayTooBig jumpByteTooBig jumpLongTooBig<br>
          jumpArrayFormat jumpByteFormat jumpBytePrepDone jumpLongPrepDone<br>
          jumpUnhashed jumpNElementsNonInt jumpFailCuzFixed jumpNoSpace jumpHasSlots fillLoop skip |<br>
        &lt;var: &#39;skip&#39; type: #&#39;AbstractInstruction *&#39;&gt;<br>
        &lt;var: &#39;fillLoop&#39; type: #&#39;AbstractInstruction *&#39;&gt;<br>
        &lt;var: &#39;jumpHasSlots&#39; type: #&#39;AbstractInstruction *&#39;&gt;<br>
        &lt;var: &#39;jumpNoSpace&#39; type: #&#39;AbstractInstruction *&#39;&gt;<br>
        &lt;var: &#39;jumpUnhashed&#39; type: #&#39;AbstractInstruction *&#39;&gt;<br>
        &lt;var: &#39;jumpByteFormat&#39; type: #&#39;AbstractInstruction *&#39;&gt;<br>
        &lt;var: &#39;jumpByteTooBig&#39; type: #&#39;AbstractInstruction *&#39;&gt;<br>
        &lt;var: &#39;jumpLongTooBig&#39; type: #&#39;AbstractInstruction *&#39;&gt;<br>
        &lt;var: &#39;jumpArrayFormat&#39; type: #&#39;AbstractInstruction *&#39;&gt;<br>
        &lt;var: &#39;jumpArrayTooBig&#39; type: #&#39;AbstractInstruction *&#39;&gt;<br>
        &lt;var: &#39;jumpFailCuzFixed&#39; type: #&#39;AbstractInstruction *&#39;&gt;<br>
        &lt;var: &#39;jumpBytePrepDone&#39; type: #&#39;AbstractInstruction *&#39;&gt;<br>
        &lt;var: &#39;jumpLongPrepDone&#39; type: #&#39;AbstractInstruction *&#39;&gt;<br>
        &lt;var: &#39;jumpNElementsNonInt&#39; type: #&#39;AbstractInstruction *&#39;&gt;<br>
<br>
        &quot;header will contain classIndex/class&#39;s hash &amp; format &amp; numSlots/fixed size&quot;<br>
        headerReg := SendNumArgsReg.<br>
        &quot;Assume there&#39;s an available scratch register on 64-bit machines.  This holds the saved numFixedFileds and then the value to fill with&quot;<br>
        fillReg := Scratch0Reg.<br>
        self assert: (cogit backEnd concreteRegister: fillReg) &gt; 0.<br>
        &quot;inst spec will hold class&#39;s instance specification and then byte size&quot;<br>
        instSpecReg := byteSizeReg := ClassReg.<br>
        &quot;The max slots we&#39;ll allocate here are those for a single header&quot;<br>
        maxSlots := objectMemory numSlotsMask - 1.<br>
<br>
        &quot;get freeStart as early as possible so as not to wait later...&quot;<br>
        cogit MoveAw: objectMemory freeStartAddress R: Arg1Reg.<br>
        &quot;get class&#39;s hash &amp; fail if 0&quot;<br>
        self genGetHashFieldNonImmOf: ReceiverResultReg into: headerReg.<br>
        jumpUnhashed := cogit JumpZero: 0.<br>
        &quot;get index and fail if not a +ve integer&quot;<br>
+       jumpNElementsNonInt := self genJumpNotSmallInteger: Arg0Reg scratchReg: TempReg.<br>
-       jumpNElementsNonInt := self genJumpNotSmallInteger: Arg0Reg scratch: TempReg.<br>
        &quot;get class&#39;s format inst var for inst spec (format field)&quot;<br>
        self genLoadSlot: InstanceSpecificationIndex sourceReg: ReceiverResultReg destReg: instSpecReg.<br>
        cogit LogicalShiftRightCq: objectMemory fixedFieldsFieldWidth + self numSmallIntegerTagBits R: instSpecReg.<br>
        cogit AndCq: objectMemory formatMask R: instSpecReg.<br>
        &quot;Add format to classIndex/format header now&quot;<br>
        cogit MoveR: instSpecReg R: TempReg.<br>
        cogit LogicalShiftLeftCq: objectMemory formatShift R: TempReg.<br>
        cogit AddR: TempReg R: headerReg.<br>
        &quot;get integer value of num fields in fillReg now&quot;<br>
        cogit MoveR: Arg0Reg R: fillReg.<br>
        self genConvertSmallIntegerToIntegerInReg: fillReg.<br>
        &quot;dispatch on format, failing if not variable or if compiled method&quot;<br>
        cogit CmpCq: objectMemory arrayFormat R: instSpecReg.<br>
        jumpArrayFormat := cogit JumpZero: 0.<br>
        cogit CmpCq: objectMemory firstByteFormat R: instSpecReg.<br>
        jumpByteFormat := cogit JumpZero: 0.<br>
        cogit CmpCq: objectMemory firstLongFormat R: instSpecReg.<br>
        jumpFailCuzFixed := cogit JumpNonZero: 0.<br>
<br>
        cogit CmpCq: (objectMemory integerObjectOf: maxSlots * 2) R: Arg0Reg.<br>
        jumpLongTooBig := cogit JumpAbove: 0.<br>
        &quot;save num elements/slot size to instSpecReg&quot;<br>
        cogit MoveR: fillReg R: instSpecReg.<br>
        &quot;compute odd bits and add into headerReg; oddBits := 2 - nElements bitAnd: 1&quot;<br>
        cogit MoveCq: objectMemory wordSize / 4 R: TempReg.<br>
        cogit SubR: instSpecReg R: TempReg.<br>
        cogit AndCq: objectMemory wordSize / 4 - 1 R: TempReg.<br>
        cogit LogicalShiftLeftCq: objectMemory formatShift R: TempReg.<br>
        cogit AddR: TempReg R: headerReg.<br>
        &quot;round up num elements to numSlots in instSpecReg&quot;<br>
        cogit AddCq: objectMemory wordSize / 4 - 1 R: instSpecReg.<br>
        cogit LogicalShiftRightCq: objectMemory shiftForWord - 2 R: instSpecReg.<br>
        cogit MoveCq: 0 R: fillReg.<br>
        jumpLongPrepDone := cogit Jump: 0. &quot;go allocate&quot;<br>
<br>
        jumpByteFormat jmpTarget:<br>
        (cogit CmpCq: (objectMemory integerObjectOf: maxSlots * objectMemory wordSize) R: Arg0Reg).<br>
        jumpByteTooBig := cogit JumpAbove: 0.<br>
        &quot;save num elements to instSpecReg&quot;<br>
        cogit MoveR: fillReg R: instSpecReg.<br>
        &quot;compute odd bits and add into headerReg; oddBits := 4 - nElements bitAnd: 3&quot;<br>
        cogit MoveCq: objectMemory wordSize R: TempReg.<br>
        cogit SubR: instSpecReg R: TempReg.<br>
        cogit AndCq: objectMemory wordSize - 1 R: TempReg.<br>
        cogit LogicalShiftLeftCq: objectMemory formatShift R: TempReg.<br>
        cogit AddR: TempReg R: headerReg.<br>
        &quot;round up num elements to numSlots in instSpecReg&quot;<br>
        cogit AddCq: objectMemory wordSize - 1 R: instSpecReg.<br>
        cogit LogicalShiftRightCq: objectMemory shiftForWord R: instSpecReg.<br>
        cogit MoveCq: 0 R: fillReg.<br>
        jumpBytePrepDone := cogit Jump: 0. &quot;go allocate&quot;<br>
<br>
        jumpArrayFormat jmpTarget:<br>
                (cogit CmpCq: (objectMemory integerObjectOf: maxSlots) R: Arg0Reg).<br>
        jumpArrayTooBig := cogit JumpAbove: 0.<br>
        &quot;save num elements/slot size to instSpecReg&quot;<br>
        cogit MoveR: fillReg R: instSpecReg.<br>
        cogit MoveCq: objectMemory nilObject R: fillReg.<br>
        &quot;fall through to allocate&quot;<br>
<br>
        jumpBytePrepDone jmpTarget:<br>
        (jumpLongPrepDone jmpTarget: cogit Label).<br>
<br>
        &quot;store numSlots to headerReg&quot;<br>
        cogit MoveR: instSpecReg R: TempReg.<br>
        cogit LogicalShiftLeftCq: objectMemory numSlotsFullShift R: TempReg.<br>
        cogit AddR: TempReg R: headerReg.<br>
        &quot;compute byte size; remember 0-sized objects still need 1 slot.&quot;<br>
        cogit CmpCq: 0 R: byteSizeReg. &quot;a.k.a. instSpecReg&quot;<br>
        jumpHasSlots := cogit JumpNonZero: 0.<br>
        cogit MoveCq: objectMemory baseHeaderSize * 2 R: byteSizeReg.<br>
        skip := cogit Jump: 0.<br>
        jumpHasSlots jmpTarget:<br>
        (cogit AddCq: objectMemory baseHeaderSize / objectMemory wordSize R: byteSizeReg).<br>
        cogit LogicalShiftLeftCq: objectMemory shiftForWord R: byteSizeReg.<br>
        skip jmpTarget:<br>
        &quot;check if allocation fits&quot;<br>
        (cogit AddR: Arg1Reg R: byteSizeReg).<br>
        cogit CmpCq: objectMemory getScavengeThreshold R: byteSizeReg.<br>
        jumpNoSpace := cogit JumpAboveOrEqual: 0.<br>
        &quot;get result, increment freeStart and write it back. Arg1Reg holds new freeStart, the limit of the object&quot;<br>
        cogit MoveR: Arg1Reg R: ReceiverResultReg.<br>
        cogit MoveR: byteSizeReg Aw: objectMemory freeStartAddress.<br>
        &quot;write other half of header (numSlots/0 identityHash)&quot;<br>
        cogit MoveR: headerReg Mw: 0 r: ReceiverResultReg.<br>
        &quot;now fill&quot;<br>
        cogit LoadEffectiveAddressMw: objectMemory baseHeaderSize r: ReceiverResultReg R: Arg1Reg.<br>
        fillLoop :=<br>
        cogit MoveR: fillReg Mw: 0 r: Arg1Reg.<br>
        cogit AddCq: 8 R: Arg1Reg.<br>
        cogit CmpR: Arg1Reg R: byteSizeReg.<br>
        cogit JumpAbove: fillLoop.<br>
        cogit RetN: retNoffset.<br>
<br>
        jumpNoSpace jmpTarget:<br>
        (jumpUnhashed jmpTarget:<br>
        (jumpFailCuzFixed jmpTarget:<br>
        (jumpArrayTooBig jmpTarget:<br>
        (jumpByteTooBig jmpTarget:<br>
        (jumpLongTooBig jmpTarget:<br>
        (jumpNElementsNonInt jmpTarget: cogit Label)))))).<br>
<br>
        ^0!<br>
<br>
Item was changed:<br>
  ----- Method: CogObjectRepresentationForSpur&gt;&gt;genInnerPrimitiveAsCharacter:inReg: (in category &#39;primitive generators&#39;) -----<br>
  genInnerPrimitiveAsCharacter: retNOffset inReg: reg<br>
        | jumpNotInt jumpOutOfRange |<br>
        &lt;var: &#39;jumpNotInt&#39; type: #&#39;AbstractInstruction *&#39;&gt;<br>
        &lt;var: &#39;jumpOutOfRange&#39; type: #&#39;AbstractInstruction *&#39;&gt;<br>
        reg ~= ReceiverResultReg ifTrue:<br>
+               [jumpNotInt := self genJumpNotSmallInteger: reg scratchReg: TempReg].<br>
-               [jumpNotInt := self genJumpNotSmallInteger: reg scratch: TempReg].<br>
        cogit MoveR: reg R: TempReg.<br>
        self genConvertSmallIntegerToIntegerInReg: TempReg.<br>
        cogit CmpCq: 1 &lt;&lt; 30 - 1 R: TempReg.<br>
        jumpOutOfRange := cogit JumpAbove: 0.<br>
        self genConvertSmallIntegerToCharacterInReg: reg.<br>
        reg ~= ReceiverResultReg ifTrue:<br>
                [cogit MoveR: reg R: ReceiverResultReg].<br>
        cogit RetN: retNOffset.<br>
        jumpOutOfRange jmpTarget: cogit Label.<br>
        reg ~= ReceiverResultReg ifTrue:<br>
                [jumpNotInt jmpTarget: jumpOutOfRange getJmpTarget].<br>
        ^0!<br>
<br>
Item was changed:<br>
  ----- Method: CogObjectRepresentationForSpur&gt;&gt;genInnerPrimitiveObjectAt: (in category &#39;primitive generators&#39;) -----<br>
  genInnerPrimitiveObjectAt: retNOffset<br>
        | headerReg<br>
          jumpBadIndex jumpNotCogMethod jumpBounds jumpNotHeaderIndex |<br>
        &lt;var: #jumpBounds type: #&#39;AbstractInstruction *&#39;&gt;<br>
        &lt;var: #jumpBadIndex type: #&#39;AbstractInstruction *&#39;&gt;<br>
        &lt;var: #jumpNotCogMethod type: #&#39;AbstractInstruction *&#39;&gt;<br>
        &lt;var: #jumpNotHeaderIndex type: #&#39;AbstractInstruction *&#39;&gt;<br>
+       jumpBadIndex := self genJumpNotSmallInteger: Arg0Reg scratchReg: TempReg.<br>
-       jumpBadIndex := self genJumpNotSmallInteger: Arg0Reg scratch: TempReg.<br>
        &quot;get header into Arg1Reg...&quot;<br>
        cogit MoveMw: objectMemory baseHeaderSize r: ReceiverResultReg R: (headerReg := Arg1Reg).<br>
+       jumpNotCogMethod := self genJumpSmallInteger: headerReg scratchReg: TempReg.<br>
-       jumpNotCogMethod := self genJumpSmallInteger: headerReg scratch: TempReg.<br>
        cogit MoveMw: (cogit offset: CogMethod of: #methodHeader) r: headerReg R: headerReg.<br>
        jumpNotCogMethod jmpTarget: (cogit<br>
                CmpCq: (objectMemory integerObjectOf: 1) R: Arg0Reg).<br>
        jumpNotHeaderIndex := cogit JumpNonZero: 0.<br>
        cogit<br>
                MoveR: headerReg R: ReceiverResultReg;<br>
                RetN: retNOffset.<br>
        jumpNotHeaderIndex jmpTarget: (cogit<br>
                AndCq: (objectMemory integerObjectOf: coInterpreter alternateHeaderNumLiteralsMask) R: headerReg).<br>
        cogit<br>
                SubCq: (objectMemory integerObjectOf: 1) - objectMemory smallIntegerTag R: Arg0Reg;<br>
                CmpR: headerReg R: Arg0Reg.<br>
        jumpBounds := cogit JumpAbove: 0.<br>
<br>
        self genConvertSmallIntegerToIntegerInReg: Arg0Reg.<br>
        cogit<br>
                AddCq: objectMemory baseHeaderSize &gt;&gt; objectMemory shiftForWord R: Arg0Reg;<br>
                MoveXwr: Arg0Reg R: ReceiverResultReg R: ReceiverResultReg;<br>
                RetN: retNOffset.<br>
<br>
        jumpBounds jmpTarget: (cogit<br>
                AddCq: (objectMemory integerObjectOf: 1) - objectMemory smallIntegerTag R: Arg0Reg).<br>
        jumpBadIndex jmpTarget: cogit Label.<br>
        ^CompletePrimitive!<br>
<br>
Item was changed:<br>
  ----- Method: CogObjectRepresentationForSpur&gt;&gt;genInnerPrimitiveStringAt: (in category &#39;primitive generators&#39;) -----<br>
  genInnerPrimitiveStringAt: retNoffset<br>
        &quot;Implement the guts of primitiveStringAt; dispatch on size&quot;<br>
        | formatReg jumpNotIndexable jumpBadIndex done<br>
          jumpIsBytes jumpIsShorts jumpIsWords jumpWordTooBig<br>
          jumpBytesOutOfBounds jumpShortsOutOfBounds jumpWordsOutOfBounds |<br>
        &lt;inline: true&gt;<br>
        &quot;c.f. StackInterpreter&gt;&gt;stSizeOf: SpurMemoryManager&gt;&gt;lengthOf:format: fixedFieldsOf:format:length:&quot;<br>
        &lt;var: #done type: #&#39;AbstractInstruction *&#39;&gt;<br>
        &lt;var: #jumpIsBytes type: #&#39;AbstractInstruction *&#39;&gt;<br>
        &lt;var: #jumpIsShorts type: #&#39;AbstractInstruction *&#39;&gt;<br>
        &lt;var: #jumpIsWords type: #&#39;AbstractInstruction *&#39;&gt;<br>
        &lt;var: #jumpBadIndex type: #&#39;AbstractInstruction *&#39;&gt;<br>
        &lt;var: #jumpWordTooBig type: #&#39;AbstractInstruction *&#39;&gt;<br>
        &lt;var: #jumpNotIndexable type: #&#39;AbstractInstruction *&#39;&gt;<br>
        &lt;var: #jumpBytesOutOfBounds type: #&#39;AbstractInstruction *&#39;&gt;<br>
        &lt;var: #jumpShortsOutOfBounds type: #&#39;AbstractInstruction *&#39;&gt;<br>
        &lt;var: #jumpWordsOutOfBounds type: #&#39;AbstractInstruction *&#39;&gt;<br>
<br>
        cogit MoveR: Arg0Reg R: Arg1Reg.<br>
+       jumpBadIndex := self genJumpNotSmallInteger: Arg0Reg scratchReg: TempReg.<br>
-       jumpBadIndex := self genJumpNotSmallInteger: Arg0Reg scratch: TempReg.<br>
        self genConvertSmallIntegerToIntegerInReg: Arg1Reg.<br>
        cogit SubCq: 1 R: Arg1Reg. &quot;1-rel =&gt; 0-rel&quot;<br>
<br>
        self genGetFormatOf: ReceiverResultReg<br>
                into: (formatReg := SendNumArgsReg)<br>
                leastSignificantHalfOfBaseHeaderIntoScratch: NoReg.<br>
<br>
        self genGetNumSlotsOf: ReceiverResultReg into: ClassReg.<br>
<br>
        &quot;dispatch on format in a combination of highest dynamic frequency order first and convenience.<br>
                  0 = 0 sized objects (UndefinedObject True False et al)<br>
                  1 = non-indexable objects with inst vars (Point et al)<br>
                  2 = indexable objects with no inst vars (Array et al)<br>
                  3 = indexable objects with inst vars (MethodContext AdditionalMethodState et al)<br>
                  4 = weak indexable objects with inst vars (WeakArray et al)<br>
                  5 = weak non-indexable objects with inst vars (ephemerons) (Ephemeron)<br>
                  6 unused, reserved for exotic pointer objects?<br>
                  7 Forwarded Object, 1st field is pointer, rest of fields are ignored<br>
                  8 unused, reserved for exotic non-pointer objects?<br>
                  9 (?) 64-bit indexable<br>
                10 - 11 32-bit indexable<br>
                12 - 15 16-bit indexable<br>
                16 - 23 byte indexable<br>
                24 - 31 compiled method&quot;<br>
        cogit CmpCq: objectMemory firstByteFormat R: formatReg.<br>
        jumpIsBytes := cogit JumpGreaterOrEqual: 0.<br>
                                        cogit CmpCq: objectMemory firstShortFormat R: formatReg.<br>
        jumpIsShorts := cogit JumpGreaterOrEqual: 0.<br>
                                        cogit CmpCq: objectMemory firstLongFormat R: formatReg.<br>
        jumpIsWords := cogit JumpGreaterOrEqual: 0.<br>
        jumpNotIndexable := cogit Jump: 0.<br>
<br>
        jumpIsBytes jmpTarget:<br>
                (cogit LogicalShiftLeftCq: objectMemory shiftForWord R: ClassReg).<br>
                cogit AndCq: objectMemory wordSize - 1 R: formatReg.<br>
                cogit SubR: formatReg R: ClassReg;<br>
                CmpR: Arg1Reg R: ClassReg.<br>
        jumpBytesOutOfBounds := cogit JumpBelowOrEqual: 0.<br>
        cogit AddCq: objectMemory baseHeaderSize R: Arg1Reg.<br>
        cogit MoveXbr: Arg1Reg R: ReceiverResultReg R: ReceiverResultReg.<br>
        cogit backEnd byteReadsZeroExtend ifFalse:<br>
                        [cogit AndCq: 255 R: ReceiverResultReg].<br>
        done := cogit Label.<br>
        self genConvertIntegerToCharacterInReg: ReceiverResultReg.<br>
        cogit RetN: retNoffset.<br>
<br>
        jumpIsShorts jmpTarget:<br>
                (cogit LogicalShiftLeftCq: objectMemory shiftForWord - 1 R: ClassReg).<br>
                cogit AndCq: 1 R: formatReg.<br>
                cogit SubR: formatReg R: ClassReg;<br>
                CmpR: Arg1Reg R: ClassReg.<br>
        jumpShortsOutOfBounds := cogit JumpBelowOrEqual: 0.<br>
        cogit AddR: Arg1Reg R: ReceiverResultReg.<br>
        cogit MoveM16: objectMemory baseHeaderSize r: ReceiverResultReg R: ReceiverResultReg.<br>
        cogit Jump: done.<br>
<br>
        jumpIsWords jmpTarget:<br>
                (cogit CmpR: Arg1Reg R: ClassReg).<br>
        jumpWordsOutOfBounds := cogit JumpBelowOrEqual: 0.<br>
        cogit AddCq: objectMemory baseHeaderSize &gt;&gt; objectMemory shiftForWord R: Arg1Reg.<br>
        cogit MoveXwr: Arg1Reg R: ReceiverResultReg R: TempReg.<br>
        cogit SubCq: objectMemory baseHeaderSize &gt;&gt; objectMemory shiftForWord R: Arg1Reg.<br>
        jumpWordTooBig := self jumpNotCharacterUnsignedValueInRegister: TempReg.<br>
        cogit MoveR: TempReg R: ReceiverResultReg.<br>
        cogit Jump: done.<br>
<br>
        jumpBytesOutOfBounds jmpTarget:<br>
        (jumpShortsOutOfBounds jmpTarget:<br>
        (jumpWordsOutOfBounds jmpTarget:<br>
        (jumpWordTooBig jmpTarget:<br>
        (jumpNotIndexable jmpTarget:<br>
        (jumpBadIndex jmpTarget: cogit Label))))).<br>
<br>
        ^0!<br>
<br>
Item was changed:<br>
  ----- Method: Cogit&gt;&gt;AndCq:R:R: (in category &#39;abstract instructions&#39;) -----<br>
  AndCq: quickConstant R: srcReg R: destReg<br>
+       &lt;inline: false&gt;<br>
-       &lt;inline: true&gt;<br>
        &lt;returnTypeC: #&#39;AbstractInstruction *&#39;&gt;<br>
        | first |<br>
        &lt;var: &#39;first&#39; type: #&#39;AbstractInstruction *&#39;&gt;<br>
        backEnd hasThreeAddressArithmetic ifTrue:<br>
                [^self gen: AndCqRR quickConstant: quickConstant operand: srcReg operand: destReg].<br>
        srcReg = destReg ifTrue:<br>
                [^self gen: AndCqR quickConstant: quickConstant operand: destReg.].<br>
        first := self gen: MoveRR operand: srcReg operand: destReg.<br>
        self gen: AndCqR quickConstant: quickConstant operand: destReg.<br>
        ^first!<br>
<br>
Item was changed:<br>
  ----- Method: OutOfLineLiteralsManager&gt;&gt;checkQuickConstant:forInstruction: (in category &#39;compile abstract instructions&#39;) -----<br>
  checkQuickConstant: literal forInstruction: anInstruction<br>
        &lt;var: #anInstruction type: #&#39;AbstractInstruction *&#39;&gt;<br>
        &lt;returnTypeC: #&#39;AbstractInstruction *&#39;&gt;<br>
+       &lt;inline: true&gt;<br>
        anInstruction usesOutOfLineLiteral ifTrue:<br>
+               [anInstruction dependent: (self locateLiteral: (self cCode: [literal] inSmalltalk: [literal bitAnd: 1 &lt;&lt; (objectMemory wordSize * 8) - 1]))].<br>
-               [anInstruction dependent: (self locateLiteral: (self cCode: [literal] inSmalltalk: [literal bitAnd: 16rFFFFFFFF]))].<br>
        ^anInstruction!<br>
<br>
Item was changed:<br>
  ----- Method: StackToRegisterMappingCogit&gt;&gt;genDoubleArithmetic:preOpCheck: (in category &#39;primitive generators&#39;) -----<br>
  genDoubleArithmetic: arithmeticOperator preOpCheck: preOpCheckOrNil<br>
        &quot;Receiver and arg in registers.<br>
         Stack looks like<br>
                return address&quot;<br>
        &lt;var: #preOpCheckOrNil declareC: &#39;AbstractInstruction *(*preOpCheckOrNil)(int rcvrReg, int argReg)&#39;&gt;<br>
        | jumpFailClass jumpFailClass2 jumpFailAlloc jumpFailCheck jumpImmediate jumpNonInt doOp |<br>
        &lt;var: #jumpFailClass type: #&#39;AbstractInstruction *&#39;&gt;<br>
        &lt;var: #jumpFailClass2 type: #&#39;AbstractInstruction *&#39;&gt;<br>
        &lt;var: #jumpFailAlloc type: #&#39;AbstractInstruction *&#39;&gt;<br>
        &lt;var: #jumpImmediate type: #&#39;AbstractInstruction *&#39;&gt;<br>
        &lt;var: #jumpNonInt type: #&#39;AbstractInstruction *&#39;&gt;<br>
        &lt;var: #jumpFailCheck type: #&#39;AbstractInstruction *&#39;&gt;<br>
        &lt;var: #doOp type: #&#39;AbstractInstruction *&#39;&gt;<br>
        objectRepresentation genGetDoubleValueOf: ReceiverResultReg into: DPFPReg0.<br>
        self MoveR: Arg0Reg R: ClassReg.<br>
        jumpImmediate := objectRepresentation genJumpImmediate: Arg0Reg.<br>
        objectRepresentation genGetCompactClassIndexNonImmOf: Arg0Reg into: SendNumArgsReg.<br>
        objectRepresentation genCmpClassFloatCompactIndexR: SendNumArgsReg.<br>
        jumpFailClass := self JumpNonZero: 0.<br>
        objectRepresentation genGetDoubleValueOf: Arg0Reg into: DPFPReg1.<br>
        doOp := self Label.<br>
        preOpCheckOrNil ifNotNil:<br>
                [jumpFailCheck := self perform: preOpCheckOrNil with: DPFPReg0 with: DPFPReg1].<br>
        self gen: arithmeticOperator operand: DPFPReg1 operand: DPFPReg0.<br>
        jumpFailAlloc := objectRepresentation<br>
                                                genAllocFloatValue: DPFPReg0<br>
                                                into: SendNumArgsReg<br>
                                                scratchReg: ClassReg<br>
                                                scratchReg: TempReg.<br>
        self MoveR: SendNumArgsReg R: ReceiverResultReg.<br>
        self RetN: 0.<br>
        jumpImmediate jmpTarget: self Label.<br>
        objectRepresentation maybeGenConvertIfSmallFloatIn: Arg0Reg scratchReg: TempReg into: DPFPReg1 andJumpTo: doOp.<br>
        objectRepresentation smallIntegerIsOnlyImmediateType ifFalse:<br>
+               [jumpNonInt := objectRepresentation genJumpNotSmallInteger: Arg0Reg scratchReg: TempReg].<br>
-               [jumpNonInt := objectRepresentation genJumpNotSmallInteger: Arg0Reg scratch: TempReg].<br>
        objectRepresentation genConvertSmallIntegerToIntegerInReg: ClassReg.<br>
        self ConvertR: ClassReg Rd: DPFPReg1.<br>
        self Jump: doOp.<br>
        &quot;We need to push the register args on two paths; this one and the interpreter primitive path.<br>
        But the interpreter primitive path won&#39;t unless regArgsHaveBeenPushed is false.&quot;<br>
        self assert: methodOrBlockNumArgs &lt;= self numRegArgs.<br>
        jumpFailClass jmpTarget: self Label.<br>
        objectRepresentation smallIntegerIsOnlyImmediateType ifFalse:<br>
                [jumpNonInt jmpTarget: jumpFailClass getJmpTarget].<br>
        preOpCheckOrNil ifNotNil:<br>
                [jumpFailCheck jmpTarget: jumpFailClass getJmpTarget].<br>
        backEnd genPushRegisterArgsForNumArgs: methodOrBlockNumArgs scratchReg: SendNumArgsReg.<br>
        jumpFailClass2 := self Jump: 0.<br>
        jumpFailAlloc jmpTarget: self Label.<br>
        self compileFallbackToInterpreterPrimitive: 0.<br>
        jumpFailClass2 jmpTarget: self Label.<br>
        ^0!<br>
<br>
Item was changed:<br>
  ----- Method: TReturnNode&gt;&gt;emitCCodeOn:level:generator: (in category &#39;C code generation&#39;) -----<br>
  emitCCodeOn: aStream level: level generator: aCodeGen<br>
<br>
        (expression isSwitch<br>
         or: [expression isCaseStmt]) ifTrue:<br>
                [^expression emitCCodeOn: aStream addToEndOfCases: self level: level generator: aCodeGen].<br>
<br>
        (expression isSend and: [expression isValueExpansion]) ifTrue:<br>
                [^self emitValueExpansionOn: aStream level: level generator: aCodeGen].<br>
<br>
        &#39;void&#39; = aCodeGen currentMethod returnType ifTrue: &quot;If the function is void, don&#39;t say &#39;return x&#39; instead say &#39; x; return&#39; &quot;<br>
                [expression isLeaf ifFalse:<br>
                        [expression emitCCodeAsArgumentOn: aStream level: level generator: aCodeGen.<br>
                         aStream nextPut: $;; crtab: level].<br>
                 aStream nextPutAll: &#39;return&#39;.<br>
                 ^self].<br>
        aStream nextPutAll: &#39;return &#39;.<br>
+       expression<br>
+               emitCCodeAsArgumentOn: aStream<br>
+               level: (expression isStmtList ifTrue: [level + 1] ifFalse: [level])<br>
+               generator: aCodeGen!<br>
-       expression emitCCodeAsArgumentOn: aStream level: level generator: aCodeGen!<br>
<br>
Item was changed:<br>
  ----- Method: TStmtListNode&gt;&gt;emitCCodeAsArgumentOn:level:generator: (in category &#39;C code generation&#39;) -----<br>
  emitCCodeAsArgumentOn: aStream level: level generator: aCodeGen<br>
+       | size |<br>
+       (size := statements size) = 1 ifTrue:<br>
-<br>
-       | statementWasComment |<br>
-       statements size = 1 ifTrue:<br>
                [^statements first emitCCodeAsArgumentOn: aStream level: level generator: aCodeGen].<br>
-       statementWasComment := false.<br>
        aStream nextPut: $(. &quot;N.B.  Comma binds weakest of all C operators.&quot;<br>
+       statements withIndexDo:<br>
+               [:s :idx| | p1 p2 |<br>
+               p1 := aStream position.<br>
+               s emitCCommentOn: aStream level: level.<br>
+               (s isLeaf and: [s isLabel not and: [idx &lt; statements size]]) ifFalse:<br>
+                       [s emitCCodeAsArgumentOn: aStream level: level + 1 generator: aCodeGen].<br>
+               p2 := aStream position.<br>
+               (idx &lt; size and: [p2 &gt; p1]) ifTrue:<br>
-       statements<br>
-               do:<br>
-                       [:s |<br>
-                       s emitCCommentOn: aStream level: level.<br>
-                       s emitCCodeAsArgumentOn: aStream level: level + 1 generator: aCodeGen.<br>
-                       statementWasComment := s isComment]<br>
-               separatedBy:<br>
                        [((self endsWithCloseBracket: aStream)<br>
+                         or: [s isComment]) ifFalse: [aStream nextPut: $,].<br>
+                        aStream crtab: level]].<br>
-                         or: [statementWasComment]) ifFalse: [aStream nextPut: $,].<br>
-                       aStream crtab: level].<br>
        aStream nextPut: $)!<br>
<br>
</blockquote></div><br></div>