<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Jan 26, 2017 at 5:52 PM, Eliot Miranda <span dir="ltr"><<a href="mailto:eliot.miranda@gmail.com" target="_blank">eliot.miranda@gmail.com</a>></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="auto"><div><br></div><div>- a) change the code generator to use <span style="background-color:rgba(255,255,255,0)">usqInt as the default type in place of sqInt?</span></div><div>- b) add a new default type, e.g. oop_t, which is the same as u<span style="background-color:rgba(255,255,255,0)">sqInt?</span></div><div><span style="background-color:rgba(255,255,255,0)">- c) change sqInt to be unsigned and add e.g. ssqInt as a signed type</span><br></div><div><span style="background-color:rgba(255,255,255,0)">- d) add a new default type, e.g. oop_t, which is the same as char *?</span><br></div><div><div>- e) use void * instead of char * (too horrible bow to contemplate cuz one can't compare void *)<br></div></div></div></blockquote><div><br></div><div>I'd think b should work fine. sqOop as suggested by Tim sounds good.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div><div></div><div>Bert, is there a similar analysis for SqueakJS or are the C types irrelevant and ignored?<br></div></div></div></blockquote><div><br></div><div>Well, most of SqueakJS is written by hand and not generated. That is the interpreter, jit, most plugins. Non-immediate oops are direct object references, there is no way to access their numeric value.</div><div><br></div><div>Where it is relevant is in the Slang sources for a couple of plugins that I translated to JS. My VMMakerJS subclasses the regular code generator and I had to add a crude type inference mechanism and some special-case hacks to make sized pointer arithmetic and signed/unsigned stuff work.<br></div><div><br></div><div>I guess if I had to touch it again (still using the generated code from 2 years ago) I may be better off using the oscog version instead of baking my own type inferencer. In any case, a clear distinction between pointers and arithmetic types would be a Good Thing.</div></div><br></div><div class="gmail_extra">- Bert -</div></div>