<html><head></head><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div id="yui_3_16_0_ym19_1_1489327866170_13757">Hi Jay and all:</div><div dir="ltr" id="yui_3_16_0_ym19_1_1489327866170_13764">if it doesn't bother try to read the first chapter of UWM CS Chair Johhn Boyland on his PhD Thesis. He cites in its examples Gcc and Modula-3 rational, although he develops an internal laanguage to handle compiler phases to Gcc RTL (and C). It's almost 500 pages, and uses Oberon2; I know he from a long time while I was in the US studying language theoretic things. Hope you find it fun.</div><div style="white-space:nowrap" id="yui_3_16_0_ym19_1_1489327866170_16084"><div dir="ltr" id="yui_3_16_0_ym19_1_1489327866170_16157">https://www2.eecs.berkeley.edu/Pubs/TechRpts/1996/5816.html</div></div><div dir="ltr" id="yui_3_16_0_ym19_1_1489327866170_17338"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1489327866170_17499">Thanks in advance<br></div><div id="yui_3_16_0_ym19_1_1489327866170_13758"><span></span></div> <div class="qtdSeparateBR"><br><br></div><div class="yahoo_quoted" style="display: block;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div dir="ltr"><font face="Arial" size="2"> El Sábado 11 de marzo de 2017 17:21, Jay K <jayk123@hotmail.com> escribió:<br></font></div>  <br><br> <div class="y_msg_container"><div id="yiv0943922932"><style type="text/css">#yiv0943922932 #yiv0943922932 -- P {margin-top:0;margin-bottom:0;}#yiv0943922932 </style><div dir="ltr">
<div dir="ltr" id="yiv0943922932divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri, Arial, Helvetica, sans-serif;">
<div>> same source?</div>
<div><br clear="none">
</div>
<div>I did this a while ago but yes I suspect so. I'll have to restart the experiment.</div>
<div><br clear="none">
</div>
<div> - Jay<br clear="none">
</div>
<div><br clear="none">
</div>
<div id="yiv0943922932Signature"><br clear="none">
</div>
<div class="yiv0943922932yqt0228823588" id="yiv0943922932yqt08767"><div style="color:rgb(0, 0, 0);">
<div>
<hr tabindex="-1" style="width:98%;display:inline-block;">
<div dir="ltr" id="yiv0943922932x_divRplyFwdMsg"><font style="font-size:11pt;" face="Calibri, sans-serif" color="#000000"><b>From:</b> M3devel <m3devel-bounces@elegosoft.com> on behalf of Rodney M. Bates <rodney_bates@lcwb.coop><br clear="none">
<b>Sent:</b> Saturday, March 11, 2017 10:12 PM<br clear="none">
<b>To:</b> m3devel@elegosoft.com<br clear="none">
<b>Subject:</b> Re: [M3devel] subtle IR differences for platforms that are really the same</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
</span></font><div class="yiv0943922932PlainText">Hmm, looks like all reveal_opaque ops in a unit are are emitted at one time by<br clear="none">
Revelation.Declare.  It uses a "Set" that has both a linear linked list and a<br clear="none">
hash table.  The hash table sounds suspicious, but at a glance, I don't see<br clear="none">
anything other than all the reveal_opaque's being emitted here, with nothing<br clear="none">
interspersed. So that would only reorder multiple reveal_opaque's relative<br clear="none">
to each other, with nothing in between them.<br clear="none">
<br clear="none">
<br clear="none">
If there is only one, maybe something about the calls to Revelation.Declare in<br clear="none">
Module.CompileModule?  The comment at :979:<br clear="none">
<br clear="none">
<br clear="none">
  (**** moved below **** External.GenImports (t.externals); *)<br clear="none">
<br clear="none">
would change where the reveal_opaque's were relative to other things.<br clear="none">
Are both targets compiled using identical source code for Module.m3?<br clear="none">
<br clear="none">
<br clear="none">
On 03/11/2017 06:38 AM, Jay K wrote:<br clear="none">
> Trying to get back into things..not sure I sent this from a while ago..<br clear="none">
><br clear="none">
><br clear="none">
><br clear="none">
> This is both a question and an explanation<br clear="none">
> of hopefully an uncoming chnage, if I figure it out.<br clear="none">
><br clear="none">
><br clear="none">
> Most platforms are almost the same.<br clear="none">
><br clear="none">
> For example I386_FREEBSD and I386_NETBSD.<br clear="none">
><br clear="none">
> You want their IR to generally be the same, along<br clear="none">
> as they aren't printing their actual target name.<br clear="none">
><br clear="none">
> And they mostly are.<br clear="none">
><br clear="none">
> Here is a difference for example:<br clear="none">
><br clear="none">
> jair:libm3 jay$ diff -du I386_NETBSD/NullRd.mc.txt I386_FREEBSD/NullRd.mc.txt<br clear="none">
> --- I386_NETBSD/NullRd.mc.txt    2016-06-30 19:13:11.000000000 -0700<br clear="none">
> +++ I386_FREEBSD/NullRd.mc.txt    2016-06-30 19:13:23.000000000 -0700<br clear="none">
> @@ -44,7 +44,6 @@<br clear="none">
>      declare_procedure     NullRd__Length 1 Int.32 0 0 F * p.7<br clear="none">
>      declare_param     rd 4 4 Addr 34129018 F F 50 v.10<br clear="none">
>      declare_local     _result 4 4 Int.32 425470580 F F 50 v.11<br clear="none">
> -    reveal_opaque     34129018 -885236436<br clear="none">
>      declare_opaque     483796623 -1651526519<br clear="none">
>      declare_proctype     -2116580915 2 -915982019 2 0<br clear="none">
>      declare_formal     n -1746782238<br clear="none">
> @@ -85,6 +84,7 @@<br clear="none">
>      declare_field     closed 416 8 509158269<br clear="none">
>      declare_field     seekable 424 8 509158269<br clear="none">
>      declare_field     intermittent 432 8 509158269<br clear="none">
> +    reveal_opaque     34129018 -885236436<br clear="none">
>      # Init<br clear="none">
>                      -----LINE 22  -----<br clear="none">
>      begin_procedure     p.5<br clear="none">
><br clear="none">
><br clear="none">
> One line of the IR is moved.<br clear="none">
> The meaning is the same (the IR is somewhat order-independent, e.g. for type declarations).<br clear="none">
><br clear="none">
> What causes this?<br clear="none">
><br clear="none">
> Do we output sometimes in hash order?<br clear="none">
> And target affects that?<br clear="none">
><br clear="none">
> Or when buffers fill up, and target length can affect that?<br clear="none">
><br clear="none">
> I'd like to remove these differences.<br clear="none">
> If it is a buffer length matter, I might just expand the buffers,<br clear="none">
> as systems have far far more memory than when this was all written.<br clear="none">
><br clear="none">
><br clear="none">
> If it is hash ordering matter -- one should avoid outputting data<br clear="none">
> in hash order.<br clear="none">
><br clear="none">
> so:<br clear="none">
> 1. if anyone knows the difference, please tell me, before I debug it?<br clear="none">
> 2. Ok if I make changes to converge the IR, i.e. I386_LINUX/Darwin/Solaris/FreeBSD/NetBSD/OpenBSD/Interix should all<br clear="none">
> be the same, AMD64/ditto, SPARC32/ditto, SPARC64/ditto. Only variation should be endian and word size,<br clear="none">
> and maybe NT vs. Posix but probably not.<br clear="none">
><br clear="none">
>  - Jay<br clear="none">
><br clear="none">
><br clear="none">
><br clear="none">
><br clear="none">
> _______________________________________________<br clear="none">
> M3devel mailing list<br clear="none">
> M3devel@elegosoft.com<br clear="none">
> <a rel="nofollow" shape="rect" id="yiv0943922932LPlnk422571" target="_blank" href="https://m3lists.elegosoft.com/mailman/listinfo/m3devel">
https://m3lists.elegosoft.com/mailman/listinfo/m3devel</a><br clear="none">
><br clear="none">
<br clear="none">
-- <br clear="none">
Rodney Bates<br clear="none">
rodney.m.bates@acm.org<br clear="none">
_______________________________________________<br clear="none">
M3devel mailing list<br clear="none">
M3devel@elegosoft.com<br clear="none">
<a rel="nofollow" shape="rect" id="yiv0943922932LPlnk379143" target="_blank" href="https://m3lists.elegosoft.com/mailman/listinfo/m3devel">https://m3lists.elegosoft.com/mailman/listinfo/m3devel</a><br clear="none">
</div>
</div></div>
</div>
</div></div><div class="yqt0228823588" id="yqt44209">_______________________________________________<br clear="none">M3devel mailing list<br clear="none"><a shape="rect" ymailto="mailto:M3devel@elegosoft.com" href="mailto:M3devel@elegosoft.com">M3devel@elegosoft.com</a><br clear="none"><a shape="rect" href="https://m3lists.elegosoft.com/mailman/listinfo/m3devel" target="_blank">https://m3lists.elegosoft.com/mailman/listinfo/m3devel</a><br clear="none"></div><br><br></div>  </div> </div>  </div></div></body></html>