<div dir="ltr">With that commit the VM is stable again. </div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 17, 2016 at 4:11 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>
ClementBera uploaded a new version of VMMaker to project VM Maker:<br>
<a href="http://source.squeak.org/VMMaker/VMMaker.oscog-cb.1919.mcz" rel="noreferrer" target="_blank">http://source.squeak.org/<wbr>VMMaker/VMMaker.oscog-cb.1919.<wbr>mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: VMMaker.oscog-cb.1919<br>
Author: cb<br>
Time: 17 August 2016, 4:10:53.445475 pm<br>
UUID: 00a8dd2a-bc8d-4552-b400-<wbr>be781c8aabec<br>
Ancestors: VMMaker.oscog-cb.1918<br>
<br>
fixed bug in scanner related to twoPath methods<br>
<br>
=============== Diff against VMMaker.oscog-cb.1918 ===============<br>
<br>
Item was changed:<br>
  ----- Method: StackToRegisterMappingCogit&gt;&gt;<wbr>compileFrameBuild (in category &#39;compile abstract instructions&#39;) -----<br>
  compileFrameBuild<br>
        &quot;Build a frame for a CogMethod activation.  See CoInterpreter class&gt;&gt;initializeFrameIndices.<br>
         Override to push the register receiver and register arguments, if any.&quot;<br>
        self cppIf: IMMUTABILITY ifTrue:<br>
                [useTwoPaths ifTrue:<br>
                        [self compileTwoPathFrameBuild.<br>
                        ^self]].<br>
        needsFrame ifFalse:<br>
                [useTwoPaths ifTrue:<br>
                        [self compileTwoPathFramelessInit].<br>
                 self initSimStackForFramelessMethod<wbr>: initialPC.<br>
                 ^self].<br>
+       self deny: useTwoPaths.<br>
        self genPushRegisterArgs.<br>
        super compileFrameBuild.<br>
        self initSimStackForFramefulMethod: initialPC!<br>
<br>
Item was changed:<br>
  ----- Method: StackToRegisterMappingCogit&gt;&gt;<wbr>scanMethod (in category &#39;compile abstract instructions&#39;) -----<br>
  scanMethod<br>
        &quot;Scan the method (and all embedded blocks) to determine<br>
                - what the last bytecode is; extra bytes at the end of a method are used to encode things like source pointers or temp names<br>
                - if the method needs a frame or not<br>
                - what are the targets of any backward branches.<br>
                - how many blocks it creates<br>
         Answer the block count or on error a negative error code&quot;<br>
        | latestContinuation nExts descriptor pc numBlocks distance targetPC framelessStackDelta seenInstVarStore |<br>
        &lt;var: #descriptor type: #&#39;BytecodeDescriptor *&#39;&gt;<br>
        needsFrame := useTwoPaths := seenInstVarStore := false.<br>
        self maybeInitNumFixups.<br>
        self maybeInitNumCounters.<br>
        prevBCDescriptor := nil.<br>
        NewspeakVM ifTrue:<br>
                [numIRCs := 0].<br>
        (primitiveIndex &gt; 0<br>
         and: [coInterpreter isQuickPrimitiveIndex: primitiveIndex]) ifTrue:<br>
                [^0].<br>
        pc := latestContinuation := initialPC.<br>
        numBlocks := framelessStackDelta := nExts := extA := extB := 0.<br>
        [pc &lt;= endPC] whileTrue:<br>
                [byte0 := (objectMemory fetchByte: pc ofObject: methodObj) + bytecodeSetOffset.<br>
                 descriptor := self generatorAt: byte0.<br>
                 descriptor isExtension ifTrue:<br>
                        [descriptor opcode = Nop ifTrue: &quot;unknown bytecode tag; see Cogit class&gt;&gt;#generatorTableFrom:&quot;<br>
                                [^EncounteredUnknownBytecode].<br>
                         self loadSubsequentBytesForDescript<wbr>or: descriptor at: pc.<br>
                         self perform: descriptor generator].<br>
                 (descriptor isReturn<br>
                  and: [pc &gt;= latestContinuation]) ifTrue:<br>
                        [endPC := pc].<br>
<br>
                  needsFrame ifFalse:<br>
                        [(descriptor needsFrameFunction isNil<br>
                          or: [self perform: descriptor needsFrameFunction with: framelessStackDelta])<br>
                                        ifTrue:<br>
                                                [&quot;With immutability we win simply by avoiding a frame build if the receiver is young and not immutable.&quot;<br>
                                                 self cppIf: IMMUTABILITY<br>
                                                        ifTrue: [descriptor is1ByteInstVarStore<br>
                                                                        ifTrue: [useTwoPaths := true]<br>
                                                                        ifFalse: [needsFrame := true. useTwoPaths := false]]<br>
+                                                       ifFalse: [needsFrame := true. useTwoPaths := false]]<br>
-                                                       ifFalse: [needsFrame := true]]<br>
                                        ifFalse:<br>
                                                [framelessStackDelta := framelessStackDelta + descriptor stackDelta.<br>
                                                 &quot;Without immutability we win if there are two or more stores and the receiver is new.&quot;<br>
                                                 self cppIf: IMMUTABILITY<br>
                                                        ifTrue: []<br>
                                                        ifFalse:<br>
                                                                [descriptor is1ByteInstVarStore ifTrue:<br>
                                                                        [seenInstVarStore<br>
                                                                                ifTrue: [useTwoPaths := true]<br>
                                                                                ifFalse: [seenInstVarStore := true]]]]].<br>
<br>
                 descriptor isBranch ifTrue:<br>
                        [distance := self spanFor: descriptor at: pc exts: nExts in: methodObj.<br>
                         targetPC := pc + descriptor numBytes + distance.<br>
                         (self isBackwardBranch: descriptor at: pc exts: nExts in: methodObj)<br>
                                ifTrue: [self initializeFixupAt: targetPC - initialPC]<br>
                                ifFalse:<br>
                                        [latestContinuation := latestContinuation max: targetPC.<br>
                                         self maybeCountFixup.<br>
                                         self maybeCountCounter]].<br>
                 descriptor isBlockCreation ifTrue:<br>
                        [numBlocks := numBlocks + 1.<br>
                         distance := self spanFor: descriptor at: pc exts: nExts in: methodObj.<br>
                         targetPC := pc + descriptor numBytes + distance.<br>
                         latestContinuation := latestContinuation max: targetPC.<br>
                         self maybeCountFixup].<br>
<br>
                 NewspeakVM ifTrue:<br>
                        [descriptor hasIRC ifTrue:<br>
                                [numIRCs := numIRCs + 1]].<br>
                 pc := pc + descriptor numBytes.<br>
                 descriptor isExtension<br>
                        ifTrue: [nExts := nExts + 1]<br>
                        ifFalse: [nExts := extA := extB := 0].<br>
                 prevBCDescriptor := descriptor].<br>
        ^numBlocks!<br>
<br>
</blockquote></div><br></div>