Oh...I just did:<div><br></div><div><div>Interpreter>>primitiveSetOSErrorCode</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>| value |</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>self export: true.</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>value := self stackIntegerValue: 0.</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>successFlag ifTrue:[</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>osErrorCode := value.</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>self pop: argumentCount.</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>].</div><div><br></div><div>where </div><div><br></div><div>
osErrorCode is an instvar in Interpreter...</div><div><br></div><div>(I found the variable declarations in interp.c, including gcBiasToGrowGCLimit like you pointed out, but I don't see how it ended up there!)</div><div>
<br></div><div>Rob</div><br><div class="gmail_quote">On Wed, Nov 25, 2009 at 11:08 PM, John M McIntosh <span dir="ltr"><<a href="mailto:johnmci@smalltalkconsulting.com">johnmci@smalltalkconsulting.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">How about pasting your smalltalk code for primitiveSetOSErrorCode<br>
<div class="im"><br>
On 2009-11-25, at 7:06 PM, Rob Rothwell wrote:<br>
<br>
> I miraculously managed to somehow load VMMaker in Pharo on Windows XP.<br>
><br>
> Furthermore, I managed to create a new Primitive: Interpreter>>primitiveSetOSErrorCode.<br>
><br>
> I was even able to use that primitive without the VM crashing!<br>
><br>
> But I can't seem to find the declaration of my instance variable osErrorCode outside the scope of the primitive so I can use it in ioExit...<br>
><br>
> Any tips? Is there something special you have to do to create the instance variables?<br>
><br>
> Thanks again for pointing me in the right direction...<br>
><br>
> Rob<br>
</div><div><div></div><div class="h5">--<br>
===========================================================================<br>
John M. McIntosh <<a href="mailto:johnmci@smalltalkconsulting.com">johnmci@smalltalkconsulting.com</a>> Twitter: squeaker68882<br>
Corporate Smalltalk Consulting Ltd. <a href="http://www.smalltalkconsulting.com" target="_blank">http://www.smalltalkconsulting.com</a><br>
===========================================================================<br>
<br>
<br>
<br>
<br>
</div></div></blockquote></div><br></div>