Hi All,<br><br> does anyone know (or even better has anyone fixed it) how hard it is to make Slang inline methods that contain simple type declarations?<br><br>I would like to eliminate compile-time integer/pointer mismatch errors in the new StackInterpreter I'm writing. I'd like to say things like:<br>
<br><div><span class="Apple-style-span" style="font-weight: bold;">callerSPOf: </span>theFP</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>"Answer the SP of the caller provided theFP is not a base frame.</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span> This points to the hottest item on the frame's stack."</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>self var: #theFP type: 'char *'.</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>self returnTypeC: 'char *'.</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>self assert: (self isBaseFrame: theFP) not.</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>^theFP + FoxCallerSavedIP + ((self frameNumArgs: theFP) + 2 * BytesPerWord)</div><div><br>but Slang refuses to inline anything that has C declarations. I'm guessing that the issue is moving the type information from the method to its inlined form. It took me half a day to discover where Slang refuses to inline (should have looked in the obvious place CCodeGenerator>>collectInlineList, instead of in the inlining code :/ ). So I'm afraid to waste the time trying to find out where the restriction bites. Anyone know how to fix this or better still have a fix?<br>
<br>best<br>Eliot<br></div>