<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'><div><span style="font-size: 12pt; ">Rodney, Do you have a test case that was broken before and fixed afterward?</span></div><div><br></div><div>If possible, though not required, check something into m3-sys/m3tests?</div><div><br></div><div>I don't mean to imply the code was correct before. I don't know, at all.</div><div><br></div><div>Thank you,</div><div> - Jay<br><br><br><br><div>Date: Sat, 1 Aug 2015 17:36:54 -0700<br>From: rodney.m.bates@acm.org<br>To: m3commit@elegosoft.com<br>Subject: [M3commit] [modula3/cm3] 496e9b: Fix compiler-generated FINALLY procedure using par...<br><br><pre>  Branch: refs/heads/master<br>  Home:   <a href="https://github.com/modula3/cm3" target="_blank">https://github.com/modula3/cm3</a><br>  Commit: 496e9be1dcdcf87bda8e72239fc90132591b4cf4<br>      <a href="https://github.com/modula3/cm3/commit/496e9be1dcdcf87bda8e72239fc90132591b4cf4" target="_blank">https://github.com/modula3/cm3/commit/496e9be1dcdcf87bda8e72239fc90132591b4cf4</a><br>  Author: Rodney Bates <rodney.m.bates@acm.org><br>  Date:   2015-08-01 (Sat, 01 Aug 2015)<br> <br>  Changed paths:<br>    M m3-sys/m3front/src/misc/CG.m3<br> <br>  Log Message:<br>  -----------<br>  Fix compiler-generated FINALLY procedure using parent procedure's temporary.<br> <br> Changes to be committed:<br> <br>       modified:   m3-sys/m3front/src/misc/CG.m3<br> <br>CG was not stacking global variables used for keeping track of temporaries<br>when entering nested procedures.  In the case of a compiler-generated<br>nested procedure for the finally part of a TRY--FINALLY block, this<br>meant the finally code could use a temporary allocated by the parent,<br>though not in use at the time.  This violated the comment in M3CG_Ops.i3:<br> <br>    declare_temp (s: ByteSize;  a: Alignment;  t: Type;<br>            in_memory: BOOLEAN): Var;<br>    (* declares an anonymous local variable.  Temps are declared<br>       and freed between their containing procedure's begin_procedure and<br>       end_procedure calls.  Temps are never referenced by nested procedures. *)<br> <br>In cases of nested procedures explicitly declared in source code, this<br>didn't matter because they are located ahead of any of the parent<br>procedure's executable code, when it has no allocated temps, and they<br>free their own temps at their end, restoring the previous state.<br> <br> <br></pre><br>_______________________________________________
M3commit mailing list
M3commit@elegosoft.com
https://mail.elegosoft.com/cgi-bin/mailman/listinfo/m3commit</div></div>                                      </div></body>
</html>