<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2016-07-07 21:33 GMT+02:00 Eliot Miranda <span dir="ltr">&lt;<a href="mailto:eliot.miranda@gmail.com" target="_blank">eliot.miranda@gmail.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> <br><div dir="ltr">Hi Henrik^H^H^H^H^H^H^HNicolas,<br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jul 7, 2016 at 12:16 PM, Nicolas Cellier <span dir="ltr">&lt;<a href="mailto:nicolas.cellier.aka.nice@gmail.com" target="_blank">nicolas.cellier.aka.nice@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> <br><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2016-07-07 20:20 GMT+02:00 Eliot Miranda <span dir="ltr">&lt;<a href="mailto:eliot.miranda@gmail.com" target="_blank">eliot.miranda@gmail.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> <br><div dir="ltr">Hi Henrik,<br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jul 7, 2016 at 9:51 AM, Henrik Sperre Johansen <span dir="ltr">&lt;<a href="mailto:henrik.s.johansen@veloxit.no" target="_blank">henrik.s.johansen@veloxit.no</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
...uintptr_t?<br>
<br>
*ducks and covers*<br></blockquote><div><br></div><div> uintptr_t implies four tasks:</div><div>- verifying uintptr_t is supported in the C compilation environments on (at least) the 5 standard platforms we have (and the FreeBSD folks would like to know too, and RiscOS).</div><div>- adding uintptr_t support in Slang&#39;s type inferrencer</div><div>- going through all the VMMaker methods that declare C types, identifying which type declarations should use uintptr_t and modifying them to do so</div><div>- going through all the platforms source for all functions that take pointer arguments (hundreds) and modifying them to use uintptr_t instead of long (the last default)</div><div></div></div> <div class="gmail_extra"><br></div>That&#39;s at least half a week&#39;s work.  Do you volunteer?</div><div class="gmail_extra"><br><div data-smartmail="gmail_signature"><div dir="ltr"><div><span style="font-size:small;border-collapse:separate"><div>_,,,^..^,,,_<br></div><div>best, Eliot</div></span></div></div></div>
</div></div>
<br></blockquote></div><br></div><div class="gmail_extra">Hi Eliot,<br></div><div class="gmail_extra">what about using a squeak specific type, something like<br><br></div><div class="gmail_extra">#if SIZEOF_LONG == SIZEOF_VOID_P<br></div><div class="gmail_extra">typedef long sqInt_ptr;<br>typedef unsigned long usqInt_ptr;</div><div class="gmail_extra">#else<br>typedef long long sqInt_ptr;<br>typedef unsigned long long usqInt_ptr;</div><div class="gmail_extra">#endif<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">sounds simple enough<br></div></div>
</blockquote></div><div class="gmail_extra"><br></div><div class="gmail_quote" style="color:rgb(0,0,0);font-size:14px"><div> <span style="color:rgb(34,34,34);font-size:small">sqInt_ptr</span> implies three tasks:</div><div>- adding <span style="color:rgb(34,34,34);font-size:small">sqInt_ptr</span> support in Slang&#39;s type inferrencer</div><div>- going through all the VMMaker methods that declare C types, identifying which type declarations should use <span style="color:rgb(34,34,34);font-size:small">sqInt_ptr</span> and modifying them to do so</div><div>- going through all the platforms source for all functions that take pointer arguments (hundreds) and modifying them to use <span style="color:rgb(34,34,34);font-size:small">sqInt_ptr</span> instead of long (the last default)</div><div></div></div><div class="gmail_extra" style="color:rgb(0,0,0);font-size:14px"><br></div><span style="color:rgb(0,0,0);font-size:14px">That&#39;s at least half a week&#39;s work.  Do you volunteer?</span></div><div class="gmail_extra"><font color="#000000"><br></font></div><div class="gmail_extra"><font color="#000000">[In this case I have no objection.  I just don&#39;t want to do the work].</font></div><div class="gmail_extra"><font color="#000000"><br></font></div><div class="gmail_extra"><font color="#000000">BTW, we don&#39;t need </font>sqInt_ptr and usqInt_ptr.  One or other.  Sq sqptr_t or sqIntptr_t would be better choices.</div><div class="gmail_extra"><br><div data-smartmail="gmail_signature"><div dir="ltr"><div><span style="font-size:small;border-collapse:separate"><div>_,,,^..^,,,_<br></div><div>best, Eliot</div></span></div></div></div>
</div></div>
<br></blockquote></div><br></div><div class="gmail_extra">Hi Eliot<br></div><div class="gmail_extra">agree on sqIntptr_t, the closest we are from the standard the better.<br></div><div class="gmail_extra">As I see it, this type will be primarily used in platforms/win32 to replace thing like (int)hInstance.<br></div><div class="gmail_extra">At this stage no need to make any change in VMMaker, so it&#39;s completely transparent.<br></div><div class="gmail_extra">Later we&#39;ll need to review usage of long in VMMaker in order to support LLP64.<br>But it will not necessarily be replaced with sqIntptr_t.<br></div><div class="gmail_extra">Either sqInt or sqLong in the oscog branch would do in most cases.<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">I let 32bits image on 64bits VM apart, currently the VMMaker branches are not compatible.<br>That&#39;s mostly this special case that requires introduction of sqIntptr_t in VMMaker.<br>I don&#39;t plan to invest time into it.<br></div><div class="gmail_extra">However if we can preserve some degree of compatibility in platforms source for a moderate cost, let&#39;s not spoil this possibility.<br><br></div><div class="gmail_extra">Nicolas<br></div></div>