<html><body bgcolor="#FFFFFF"><div>Ah. That is also an incompatible change but slightly cleaner. Ok?</div><div><br> - Jay (briefly/pocket-sized-computer-aka-phone)</div><div><br>On Sep 6, 2012, at 2:07 PM, Antony Hosking <<a href="mailto:hosking@cs.purdue.edu">hosking@cs.purdue.edu</a>> wrote:<br><br></div><div></div><blockquote type="cite"><div>Why not simply write it out as an extra field of the command in the text.<div><div>That way you don’t need to hack the check on Int.Convert.</div><div><br></div><div>So, wherever there is VName(u, v) M3CG_Wr would also have Txt(.name).</div><div>SImilarly, when M3CG_Rd has Scan_var it would follow that with Scan_text.</div><div>It just seems more principled to have both sides grok the same format instead of relying on CvtInt silently ignoring some non-integer suffix.</div><div>
<br><div><div>On Sep 6, 2012, at 3:46 PM, Jay <<a href="mailto:jay.krell@cornell.edu"><a href="mailto:jay.krell@cornell.edu">jay.krell@cornell.edu</a></a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div bgcolor="#FFFFFF"><div>Does there really exist other code that parses this stuff? Anything is possible but one needs to make judgement calls & confident guesses.</div><div><br></div><div><br></div><div>I would imagine everyone should read them with M3CG_Rd. And that everyone would really use the binary form usually, that the verbose text is really for humans.</div><div><br></div><div><br></div><div>Heck, I assume that we even have a persistent format only to workaround the gcc backend license. </div><div><br></div><div><br></div><div>My use is temporary convenience but a bit of a while & very convenient. Anyway, I could add a runtime flag to trigger this change if necessary.<br><br></div><div><br></div><div>All the backends (gcc, x86, C) do their own tracing as well..almost the same as this ouput, some redundancy there, but it helps to have it output while the backend is running & not just using a tool on the side -- you can see right away where it got too before failing an assertion or such.</div><div><br></div><div><br></div><div><br> - Jay (briefly/pocket-sized-computer-aka-phone)</div><div><br>On Sep 6, 2012, at 6:24 AM, Antony Hosking <<a href="mailto:hosking@cs.purdue.edu"><a href="mailto:hosking@cs.purdue.edu">hosking@cs.purdue.edu</a></a>> wrote:<br><br></div><div></div><blockquote type="cite">Yes, that is a HACK.<div>How do you know that your change to include the name doesn’t break other parts of the tool chain.</div><div>Yes, I know that numbers are less readable, but the binding between name and numbers is explicit in the code.</div><div>I’ve never found it to be too difficult to manage with.</div><div>I think in this instance it would be better to revert to the numbers. Short-term convenience for potential sacrifice of robustness represents a step backward.</div><div>
<br><div><div>On Sep 6, 2012, at 4:29 AM, Jay K <<a href="mailto:jay.krell@cornell.edu"></a><a href="mailto:jay.krell@cornell.edu"><a href="mailto:jay.krell@cornell.edu">jay.krell@cornell.edu</a></a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div class="hmmessage" 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; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div dir="ltr"><div><font face="Calibri"><a href="http://modula3.elegosoft.com/cgi-bin/cvsweb.cgi/cm3/m3-sys/m3middle/src/M3CG_Rd.m3.diff?r1=1.14;r2=1.15;f=u"></a><a href="http://modula3.elegosoft.com/cgi-bin/cvsweb.cgi/cm3/m3-sys/m3middle/src/M3CG_Rd.m3.diff?r1=1.14;r2=1.15;f=u"><a href="http://modula3.elegosoft.com/cgi-bin/cvsweb.cgi/cm3/m3-sys/m3middle/src/M3CG_Rd.m3.diff?r1=1.14;r2=1.15;f=u">http://modula3.elegosoft.com/cgi-bin/cvsweb.cgi/cm3/m3-sys/m3middle/src/M3CG_Rd.m3.diff?r1=1.14;r2=1.15;f=u</a></a></font></div><div><span style="font-family: Calibri; "><br></span></div><div><span style="font-family: Calibri; "><br></span></div><div><span style="font-family: Calibri; ">Tony, now I'm reviewing your changes (CVS sure doesn't make this easy!)</span></div><div><span style="font-family: Calibri; ">Apparent problem here.</span></div><div><span style="font-family: Calibri; ">Granted, I could have left a comment in the code as to what was going on.</span></div><div><span style="font-family: Calibri; ">(not that the vast bulk of m3-sys is well commented!)</span></div><div><span style="font-family: Calibri; "><br></span></div><div><br></div><div><br></div><div><span style="font-family: Calibri; ">Revision 1.15: download - view: text, markup, annotated - select for diffs</span></div><div><font face="Calibri">Tue Sep 4 16:52:46 2012 (41 hours, 23 minutes ago) by hosking</font></div><div><font face="Calibri">Branches: MAIN</font></div><div><font face="Calibri">CVS tags: HEAD</font></div><div><font face="Calibri">Diff to: previous 1.14: preferred, unified</font></div><div><font face="Calibri">Changes since revision 1.14: +2 -2 lines</font></div><div><font face="Calibri">Best to retain error checking on return values from Convert.ToInt.</font></div><div><font face="Calibri"><br></font></div><div><font face="Calibri"><br></font></div><div><span style="font-family: Calibri; ">See here:</span></div><div><font face="Calibri"><br></font></div><div><font face="Calibri">Revision 1.14: download - view: text, markup, annotated - select for diffs</font></div><div><font face="Calibri">Wed Aug 22 16:15:40 2012 (2 weeks ago) by jkrell</font></div><div><font face="Calibri">Branches: MAIN</font></div><div><font face="Calibri">Diff to: previous 1.13: preferred, unified</font></div><div><font face="Calibri">Changes since revision 1.13: +2 -2 lines</font></div><div><font face="Calibri">when printing variables and procedures:</font></div><div><font face="Calibri">e.g:</font></div><div><font face="Calibri"><span class="Apple-tab-span" style="white-space: pre; "> </span>begin_procedure<span class="Apple-tab-span" style="white-space: pre; "> </span><span class="Apple-converted-space"> </span>p.32</font></div><div><font face="Calibri"><span class="Apple-tab-span" style="white-space: pre; "> </span>store<span class="Apple-tab-span" style="white-space: pre; "> </span><span class="Apple-converted-space"> </span>v.33 0 Addr Addr</font></div><div><font face="Calibri"><br></font></div><div><font face="Calibri">instead:</font></div><div><font face="Calibri"><span class="Apple-tab-span" style="white-space: pre; "> </span>begin_procedure<span class="Apple-tab-span" style="white-space: pre; "> </span><span class="Apple-converted-space"> </span>p.32.Makefile__NoteSourceFile</font></div><div><font face="Calibri"><span class="Apple-tab-span" style="white-space: pre; "> </span>store<span class="Apple-tab-span" style="white-space: pre; "> </span><span class="Apple-converted-space"> </span>v.33.file 0 Addr Addr</font></div><div><font face="Calibri"><br></font></div><div><font face="Calibri">i.e. much more readable</font></div><div><font face="Calibri">granted, less compact, not "normalized" (redundant data)</font></div><div><font face="Calibri"><br></font></div><div><font face="Calibri">I verified that m3cgcat still roundtrips.</font></div><div><font face="Calibri"> Not that I ever tried that before, but that is what</font></div><div><font face="Calibri"> the design implied the ability to do. Not that</font></div><div><font face="Calibri"> it is likely important these days/years/decades.</font></div><div><font face="Calibri"><br></font></div><div><font face="Calibri">The delimiting "." is chosen to stop integer parsing</font></div><div><font face="Calibri">It is presumed names don't contain spaces, or whatever,</font></div><div><font face="Calibri">that M3CG_Rd is ok with this extra output from M3CG_Wr.</font></div><div><font face="Calibri">I only tried with one file.</font></div><div><font face="Calibri"><br></font></div><div><font face="Calibri">Note that I hacked M3CG_Rd__CvtInt to not complain about the extra text.</font></div><div><font face="Calibri">It might be better to have it verify it some, like that it is dot</font></div><div><font face="Calibri">followed by star or a valid pair of "__" delimited identifiers.</font></div></div></div></blockquote></div><br></div></blockquote></div></blockquote></div><br></div></div></div></blockquote></body></html>