<br><br><div class="gmail_quote">On Tue, Feb 12, 2013 at 11:48 AM, tim Rowledge <span dir="ltr">&lt;<a href="mailto:tim@rowledge.org" target="_blank">tim@rowledge.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>
OK, reposted her eas Eliot suggested-<br>
<div class="im">On 11-02-2013, at 8:42 PM, Eliot Miranda &lt;<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>&gt; wrote:<br>
<br>
&gt; Tim, ask again on vm-dev.  This is all VM stuff.<br>
&gt;<br>
&gt; On Mon, Feb 11, 2013 at 5:53 PM, tim Rowledge &lt;<a href="mailto:tim@rowledge.org">tim@rowledge.org</a>&gt; wrote:<br>
&gt; Can anyone (Bert?) provide the intended effect and limits of ioSetCursorARGB() ? This is a new one on me and the implementations I see in the SVN tree mean very little.<br>
&gt;<br>
&gt; Can anyone explain why totally inappropriate and highly OS dependant code like push/popOutputFile() are in CROSS/sqVirtualMachine.c? The definition of stdin/out/err is not a safe one to assume everywhere. Not every OS trivially maps a FILE* to a number.<br>
</div></blockquote><div><br></div><div>Well, this is really useful for debugging and I was under the impression that the stdio facilities used here-in are part of the standard C library.  Personally I&#39;d much rather see the code guarded by an ifdef excluding RISCOS than I would see three identical copies of the code.  The platform code is a mess of duplications, and whereeever possible I&#39;ve been putting common code in Cross.</div>
<div><br></div><div>BTW, this is a pet peeve of mine.  Not only is there significant duplication of code, there is egregious difference.  e.g. we have platforms/Mac OS/vm/sqMacMain.c, platforms/unix/vm/sqUnixMain.c and platforms/win32/vm/sqWin32Intel.c, whereas platforms/Mac OS/vm/sqMain.c, platforms/unix/vm/sqMain.c and platforms/win32/vm/sqMain.c would be far more rational and easy to search.</div>
<div><br></div><div>So IMO that code is better placed in sqVirtualMachine.c than elsewhere, and the entire platform hierarchy could do with some serious renaming.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">
&gt;<br>
&gt; It looks like the primitiveFunctionPointer global got changed fro mvoid* in 4.0 to void(*)() in 4.4. This is a good thing *if* the matching usages are correctly modified; which they aren&#39;t. For example in primitiveExecuteMethodArgsArray(). On my compiler that is a fatal error - as it should be. Is anyone currently fixing that or shall I? </div>
</blockquote><div><br></div><div>Please do, or send me a pointer.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">Possibly as a side effect primitiveFunctionPointer is no longer in the global struct, which may well adversely impact performance.<br>
</div></blockquote><div><br></div><div>Two issues here.  a) if it&#39;s excluded from the global struct as a a side-effect it&#39;s a bug. b) you need to run a performance comparison to verify whether the struct works well or not.  For x86 it does not.  Note that in the Cog branch I went to so,e effort to allow you to select which variant (struct or flat) at compile time instead of VM generation time.</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
<br>
</div>Working on the third item since it is if nothing else a good excuse to trawl through a lot of code and remind myself of what is where and just how much still needs cleaning. I suspect I&#39;ll find a lot of it sorted out in the stack/cog code anyway but I guess the exercise is good for me.<br>

<br>
I never knew that you could declare an argument in C with &quot;sqInt (*thingy[])(void)&quot; ! I hope it actually does what i think it oughta.<br></blockquote><div><br></div><div>yes it does :)</div><div><br></div><div>
<br></div><div>And WELCOME BACK!!!!</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im"><br>
tim<br>
--<br>
tim Rowledge; <a href="mailto:tim@rowledge.org">tim@rowledge.org</a>; <a href="http://www.rowledge.org/tim" target="_blank">http://www.rowledge.org/tim</a><br>
</div>Useful random insult:- Pedaling real fast, but not getting anywhere.<br>
<br>
<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>best,<div>Eliot</div>