<div dir="ltr"><div><div><div><div><div>Hi,<br><br></div><div>The following slang:<br><br>shortPrintContext: aContext<br>    | theFP |<br>    <inline: false><br>    <var: #theFP type: #'char *'><br>    (objectMemory isContext: aContext) ifFalse:<br>        [self printHex: aContext; print: ' is not a context'; cr.<br>        ^nil].<br>    self printHex: aContext.<br>    (self isMarriedOrWidowedContext: aContext)<br>        ifTrue: [(self checkIsStillMarriedContext: aContext currentFP: framePointer)<br>                    ifTrue:<br>                        [(self isMachineCodeFrame: (theFP := self frameOfMarriedContext: aContext))<br>                            ifTrue: [self print: ' M (']<br>                            ifFalse: [self print: ' I ('].<br>                         self printHex: theFP asUnsignedInteger; print: ') ']<br>                    ifFalse:<br>                        [self print: ' w ']]<br></div><div>... snip ...<br></div><div><br></div>is generated in spurstacksrc as:<br><br>shortPrintContext(sqInt aContext)<br>{   DECL_MAYBE_SQ_GLOBAL_STRUCT<br>    sqInt home;<br>    char *theFP;<br><br>    if (!(((aContext & (tagMask())) == 0)<br>         && (((longAt(aContext)) & (classIndexMask())) == ClassMethodContextCompactIndex))) {<br>        printHex(aContext);<br>        print(" is not a context");<br>        /* begin cr */<br>        printf("\n");<br>        return null;<br>    }<br>    printHex(aContext);<br>    if (((longAt((aContext + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord())))))) & 1)) {<br>        if (checkIsStillMarriedContextcurrentFP(aContext, GIV(framePointer))) {<br>            print(" I (");<br><br>            printHex(((usqInt)theFP));<br>            print(") ");<br>        }<br>        else {<br>            print(" w ");<br>        }<br>    }<br>... snip ...<br><br>It has a problem:<br></div><br>opensmalltalk-vm\spurstacksrc\vm\interp.c(59772): warning C4700: uninitialized local variable 'theFP' used<br><br></div>This is because the inliner cleverly eliminated a branch, thanks to allways false condition in stack flavour:<br><br>isMachineCodeFrame: theFP<br>    "For compatibility with CoInterpreter.  Needed to avoid slowPrimitiveResponse<br>     failing within ceSend:to:numArgs: et al with an unbalanced stack."<br>    <var: #theFP type: #'char *'><br>    <inline: true><br>    ^false<br><br></div>Great... Except that eliminated code had a side effect of setting theFP...<br><br></div>For now I will patch the slang, but it would be good to fix the inliner (at least check for side effects before eliminating).<br><br><div><div><br><div><br></div></div></div></div>