<div dir="ltr">Hi Bert,<br><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Nov 22, 2014 at 5:12 AM, Bert Freudenberg <span dir="ltr"><<a href="mailto:bert@freudenbergs.de" target="_blank">bert@freudenbergs.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"> <br>On 21.11.2014, at 23:01, Eliot Miranda uploaded VMMaker.oscog-eem.950.mcz<br>
><br>
> Introduce >>> as an explicitly signed shift.<br>
<br>
Ugh, can we pick something else, please? It's really confusing. In various languages (notably Java and JavaScript), >> is signed and >>> unsigned. I don't know any language that has both operators and the meaning reversed.<br></blockquote><div><br></div><div>This is confused because of history. What I'd like is to use >> as a signed shift (because that's what it is) and >>> as an unsigned shift. And I'd like to change bitShift: to generate signed shifts and introduce unsignedBitShift: and ditch signedBitShift:. But that means changing all uses of >> in VMMaker. This would be my preferred solution but I think its *really* important that if we go this route we change VMMaker.oscog, VMMaker and VMMakerJS at the same time. Can we synchronise this?</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
And >> still means signed or unsigned depending on context. Not nice at all.<br></blockquote><div><br></div><div>Right. And there's the signedBitShift: bogosity too.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
How about ...<br>
<br>
>> signed/unsigned depending on type (what we have now)<br>
>>+ force unsigned shift<br>
>>- force signed shift<br></blockquote><div><br></div><div>That's funny. For me the + screams signed. So I would accept</div><div><br></div><div> <span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px"> >> signed/unsigned depending on type (what we have now)</span></div><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px"> >>+ force signed shift</span><br style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px"> >>- force unsigned shift</span></div><div class="gmail_quote"><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px"><br></span></div><div class="gmail_quote"><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">But I don't think you're right about >> being context dependent. At least in VMMaker.oscog >> is always unsigned. The change I made to generation was to not coerce a 64-bit receiver to 32-bits, but I didn't change the signedness.</span></div><div><br></div>-- <br><div class="gmail_signature">best,<div>Eliot</div></div>
</div></div>