<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>For now I'll just check if min < 0, like cm3cg does.<br>m3gdb does not appear to use or parse out domain_typeid.<br>domain_typeid doesn't seem needed.<br><br><br>I think this stuff was clearly done slightly incorrectly in the first place.<br>Not a huge mistake.<br><br><br>There is also wierdness imho around empty subranges.<br>i.e. it is an unobvious language detail.<br>If it were up to me,<br>[10..0]  <br><br><br>would either be illegal, OR would be the same as [0..10], OR would contain the same elements as [0..10] but would iterate in reverse FOR i := FIRST([10..0]) TO LAST([10..0]) would be equivalent to FOR i := 10 to 0 BY -1.<br><br><br>However, it not any of those. It is legal and "empty". The FOR loop, I believe, never runs.<br>NUMBER of such an array is 0.<br><br><br><br> - Jay<br><br><br><div><div id="SkyDrivePlaceholder"></div><hr id="stopSpelling">From: jay.krell@cornell.edu<br>Date: Tue, 5 Mar 2013 05:30:08 -0800<br>To: hosking@cs.purdue.edu<br>CC: m3devel@elegosoft.com; jay.krell@cornell.edu<br>Subject: Re: [M3devel] cg.declare_subrange should pass on cgtype<br><br><div><br></div><div>I want to view the value in a debugger. </div><div>Without having to cast it.</div><div><br></div><div><br></div><div>By your reasoning, for record fields, among float, double, int32, int64, uint32, uint64, we'd only need 2.</div><div><br></div><div><br></div><div>We want strong accurate types in "declare", not just operations like "add".</div><div>  </div><div><br></div><div>Declare_subrange: is there a point to domain_type? I.e. how about declare_subrange(cgtype, min, max)? I'd have to see if cm3cg and then m3gdb use it.</div><div><br></div><div><br> - Jay</div><div><br>On Mar 4, 2013, at 10:29 PM, Tony Hosking <<a href="mailto:hosking@cs.purdue.edu">hosking@cs.purdue.edu</a>> wrote:<br><br></div><blockquote><div>Signedness should be irrelevant.<br><div>It is only the storage that is specified by this.</div><div>The interpretation of the bits, including signed/unsigned, is in the operations performed on those bits.</div><div>e.g., load 8 bits sign extended.</div><div><br></div><div>Why do you need to know the signedness?</div><div><br></div><div><br><div>
<span class="ecxApple-style-span" style="border-collapse:separate;color:rgb(0, 0, 0);font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;orphans:2;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;widows:2;word-spacing:0px;font-size:medium;"><span class="ecxApple-style-span" style="border-collapse:separate;color:rgb(0, 0, 0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;orphans:2;text-indent:0px;text-transform:none;white-space:normal;widows:2;word-spacing:0px;"><div style="word-wrap:break-word;"><span class="ecxApple-style-span" style="border-collapse:separate;color:rgb(0, 0, 0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;orphans:2;white-space:normal;widows:2;word-spacing:0px;"><div style="word-wrap:break-word;"><span class="ecxApple-style-span" style="border-collapse:separate;color:rgb(0, 0, 0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;orphans:2;white-space:normal;widows:2;word-spacing:0px;"><span class="ecxApple-style-span" style="border-collapse:separate;color:rgb(0, 0, 0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;orphans:2;white-space:normal;widows:2;word-spacing:0px;"><span class="ecxApple-style-span" style="border-collapse:separate;color:rgb(0, 0, 0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;orphans:2;white-space:normal;widows:2;word-spacing:0px;"><span class="ecxApple-style-span" style="border-collapse:separate;color:rgb(0, 0, 0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;orphans:2;white-space:normal;widows:2;word-spacing:0px;"><span class="ecxApple-style-span" style="border-collapse:separate;color:rgb(0, 0, 0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;orphans:2;white-space:normal;widows:2;word-spacing:0px;"><span class="ecxApple-style-span" style="border-collapse:separate;color:rgb(0, 0, 0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;orphans:2;white-space:normal;widows:2;word-spacing:0px;"><span class="ecxApple-style-span" style="border-collapse:separate;color:rgb(0, 0, 0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;orphans:2;white-space:normal;widows:2;word-spacing:0px;"><span class="ecxApple-style-span" style="border-collapse:separate;color:rgb(0, 0, 0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;orphans:2;white-space:normal;widows:2;word-spacing:0px;"><div><font class="ecxApple-style-span" color="#0000FF"><font class="ecxApple-style-span" face="Gill Sans"><span class="ecxApple-style-span" style="color:rgb(0, 0, 255);font-family:'Gill Sans';"><span class="ecxApple-style-span" style="color:rgb(0, 0, 255);font-family:'Gill Sans';">Antony Hosking</span></span></font></font><font class="ecxApple-style-span" face="Gill Sans"><span class="ecxApple-style-span" style="font-family:'Gill Sans';"><span class="ecxApple-style-span" style="font-family:'Gill Sans';"><span class="ecxApple-converted-space"> </span>|<span class="ecxApple-converted-space"> </span></span></span><span class="ecxApple-style-span" style="font-family:'Gill Sans';"><span class="ecxApple-style-span" style="font-family:'Gill Sans';">Associate Professor</span></span><span class="ecxApple-style-span" style="font-family:'Gill Sans';"><span class="ecxApple-style-span" style="font-family:'Gill Sans';"> | Computer Science | Purdue University</span></span></font></div><div><font class="ecxApple-style-span" face="GillSans-Light"><span class="ecxApple-style-span" style="font-family:GillSans-Light;">305 N. University Street | West Lafayette | IN 47907 | USA</span></font></div><div><font class="ecxApple-style-span" color="#0000FF" face="Gill Sans"><span class="ecxApple-style-span" style="color:rgb(0, 0, 255);font-family:'Gill Sans';"><span class="ecxApple-style-span" style="color:rgb(0, 0, 255);font-family:'Gill Sans';">Mobile</span></span></font><font class="ecxApple-style-span" face="GillSans-Light"><span class="ecxApple-style-span" style="font-family:GillSans-Light;"><span class="ecxApple-style-span" style="font-family:GillSans-Light;"><span class="ecxApple-converted-space"> </span>+1 765 427 5484</span></span></font></div><div><font class="ecxApple-style-span" face="GillSans-Light"><br class="ecxkhtml-block-placeholder"></font></div></span></span></span></span></span></span></span><br class="ecxApple-interchange-newline"></span></div></span></div></span><br class="ecxApple-interchange-newline"></span><br class="ecxApple-interchange-newline">
</div>
<br><div><div>On Mar 5, 2013, at 5:21 PM, Jay <<a href="mailto:jay.krell@cornell.edu">jay.krell@cornell.edu</a>> wrote:</div><br class="ecxApple-interchange-newline"><blockquote><div dir="auto"><div>Close, but also signedness.<br><br> - Jay</div><div><br>On Mar 4, 2013, at 9:56 PM, Tony Hosking <<a href="mailto:hosking@cs.purdue.edu">hosking@cs.purdue.edu</a>> wrote:<br><br></div><blockquote><div><span class="ecxApple-style-span" style="border-collapse:separate;orphans:2;text-align:-webkit-auto;text-indent:0px;widows:2;border-spacing:0px;"><span class="ecxApple-style-span" style="border-collapse:separate;orphans:2;text-indent:0px;widows:2;border-spacing:0px;"><div style="word-wrap:break-word;"><span class="ecxApple-style-span" style="border-collapse:separate;border-spacing:0px;text-indent:0px;orphans:2;widows:2;"><div style="word-wrap:break-word;"><span class="ecxApple-style-span" style="border-collapse:separate;border-spacing:0px;text-indent:0px;orphans:2;widows:2;"><span class="ecxApple-style-span" style="border-collapse:separate;border-spacing:0px;text-indent:0px;orphans:2;widows:2;"><span class="ecxApple-style-span" style="border-collapse:separate;border-spacing:0px;text-indent:0px;orphans:2;widows:2;"><span class="ecxApple-style-span" style="border-collapse:separate;border-spacing:0px;text-indent:0px;orphans:2;widows:2;"><span class="ecxApple-style-span" style="border-collapse:separate;border-spacing:0px;text-indent:0px;orphans:2;widows:2;"><span class="ecxApple-style-span" style="border-collapse:separate;border-spacing:0px;text-indent:0px;orphans:2;widows:2;"><span class="ecxApple-style-span" style="border-collapse:separate;border-spacing:0px;text-indent:0px;orphans:2;widows:2;"><span class="ecxApple-style-span" style="border-collapse:separate;border-spacing:0px;text-indent:0px;orphans:2;widows:2;"><div>Isn’t it already there (implicitly) in the bitsize to be used to represent the range?</div><div>The representation CG.Type chosen in the front-end dictates exactly what is needed in terms of bits (8, 16, 32, 64).</div><div>The backend is supposed to respect the bitsize.</div><div>So, why do you need to duplicate that information?</div><div><br></div></span></span></span></span></span></span></span></span></div></span></div></span></span></div><div><div>On Mar 5, 2013, at 4:33 PM, Jay K <<a href="mailto:jay.krell@cornell.edu">jay.krell@cornell.edu</a>> wrote:</div><br class="ecxApple-interchange-newline"><blockquote><div class="ecxhmmessage" style="font-size:12pt;font-family:Calibri;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;orphans:2;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;widows:2;word-spacing:0px;"><div dir="ltr">cg.declare_subrange should include the cgtype the frontend<br>is going to use for the type.<br><br><br>I'm pretty darn certain of this.<br><br><br>Otherwise a backend very might want/need to duplicate<br>the logic in m3front/types/SubrangeType.m3 SetRep.<br><br>The logic isn't that complicated, but really, declare_subrange<br>should take the information.<br><br>I intend to write and commit that either tonight or within a week.<br>I assume this is ok..as I'm pretty certain of it..<br><br><br> - Jay<br><br><br></div></div></blockquote></div><br></blockquote></div></blockquote></div><br></div></div></blockquote></div>                                          </div></body>
</html>