[M3devel] M3CG_Rd.m3

Antony Hosking hosking at cs.purdue.edu
Thu Sep 6 15:24:39 CEST 2012


Yes, that is a HACK.
How do you know that your change to include the name doesn’t break other parts of the tool chain.
Yes, I know that numbers are less readable, but the binding between name and numbers is explicit in the code.
I’ve never found it to be too difficult to manage with.
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.

On Sep 6, 2012, at 4:29 AM, Jay K <jay.krell at cornell.edu> wrote:

> 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
> 
> 
> Tony, now I'm reviewing your changes (CVS sure doesn't make this easy!)
> Apparent problem here.
> Granted, I could have left a comment in the code as to what was going on.
> (not that the vast bulk of m3-sys is well commented!)
> 
> 
> 
> Revision 1.15: download - view: text, markup, annotated - select for diffs
> Tue Sep 4 16:52:46 2012 (41 hours, 23 minutes ago) by hosking
> Branches: MAIN
> CVS tags: HEAD
> Diff to: previous 1.14: preferred, unified
> Changes since revision 1.14: +2 -2 lines
> Best to retain error checking on return values from Convert.ToInt.
> 
> 
> See here:
> 
> Revision 1.14: download - view: text, markup, annotated - select for diffs
> Wed Aug 22 16:15:40 2012 (2 weeks ago) by jkrell
> Branches: MAIN
> Diff to: previous 1.13: preferred, unified
> Changes since revision 1.13: +2 -2 lines
> when printing variables and procedures:
> e.g:
> 	begin_procedure	 p.32
> 	store		 v.33 0 Addr Addr
> 
> instead:
> 	begin_procedure	 p.32.Makefile__NoteSourceFile
> 	store		 v.33.file 0 Addr Addr
> 
> i.e. much more readable
> granted, less compact, not "normalized" (redundant data)
> 
> I verified that m3cgcat still roundtrips.
>   Not that I ever tried that before, but that is what
>   the design implied the ability to do. Not that
>   it is likely important these days/years/decades.
> 
> The delimiting "." is chosen to stop integer parsing
> It is presumed names don't contain spaces, or whatever,
> that M3CG_Rd is ok with this extra output from M3CG_Wr.
> I only tried with one file.
> 
> Note that I hacked M3CG_Rd__CvtInt to not complain about the extra text.
> It might be better to have it verify it some, like that it is dot
> followed by star or a valid pair of "__" delimited identifiers.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20120906/399e92d7/attachment-0002.html>


More information about the M3devel mailing list