<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><p style="margin: 0.0px 0.0px 0.0px 0.0px">Change 20080724-dda-2 by <a href="mailto:dda@lester.local">dda@lester.local</a> on 2008-07-24 16:43:04 EDT</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px"><span class="Apple-converted-space">&nbsp; &nbsp; </span>in /Users/dda/laszlo/src/svn/openlaszlo/trunk-a</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px"><span class="Apple-converted-space">&nbsp; &nbsp; </span>for <a href="http://svn.openlaszlo.org/openlaszlo/trunk">http://svn.openlaszlo.org/openlaszlo/trunk</a></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px">Summary: minor cleanup of SWF6 compiler transforms</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px">New Features:</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px">Bugs Fixed: LPP-6669 (Remove swf6 byte-code kludges from CodeGenerator.java)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px">Technical Reviewer: ptw (pending)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px">QA Reviewer: (pending)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px">Doc Reviewer: (pending)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px">Documentation:</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px">Release Notes:</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px">Details:</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px">Most of the issues implied by the LPP-6669 cannot be fixed - but details are listed here.</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px">0)<span class="Apple-converted-space">&nbsp; </span>Removed some code specific to swf6 involving using lower case for variable and register names</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px">Examined and tested the various transforms in question:</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px">1)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px"><span class="Apple-converted-space">&nbsp; &nbsp; </span>// swf6 returns undefined for comparisons with NaN, it</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px"><span class="Apple-converted-space">&nbsp; &nbsp; </span>// is supposed to return false (note that you cannot</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px"><span class="Apple-converted-space">&nbsp; &nbsp; </span>// eliminate one NOT by inverting the sense of the</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px"><span class="Apple-converted-space">&nbsp; &nbsp; </span>// comparison</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px"><span class="Apple-converted-space">&nbsp; &nbsp; </span>BinopInstrs.put(ParserConstants.LT, new Instruction[] {Instructions.LessThan, Instructions.NOT, Instructions.NOT});</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px">Tried setting this to just Instructions.LesThan, but smokecheck gives errors on NaN comparisons.</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px">2)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px"><span class="Apple-converted-space">&nbsp; &nbsp; </span>// swf6 does not have GE or LE, but inverting the</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px"><span class="Apple-converted-space">&nbsp; &nbsp; </span>// complement operator does not work for NaN ordering</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px"><span class="Apple-converted-space">&nbsp; &nbsp; </span>// Luckily, LogicalOr coerces undefined to false, so we</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px"><span class="Apple-converted-space">&nbsp; &nbsp; </span>// don't have to play the NOT NOT trick above</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px"><span class="Apple-converted-space">&nbsp; &nbsp; </span>BinopInstrs.put(ParserConstants.LE, new Instruction[]</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px">Tried setting LE to { Instructions.GT, Instructions.NOT }</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px"><span class="Apple-converted-space">&nbsp;&nbsp; </span>smokecheck also gives errors on NaN comparisons.</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px">For kicks, also tried setting LE to { Instructions.GT, Instructions.NOT , Instructions.NOT , Instructions.NOT }</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px"><span class="Apple-converted-space">&nbsp;&nbsp; </span>to see if the 'double NOT' trick might work, but also gives the same smokecheck errors.</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px">Also examined flasm source to see if GE or LE has been added (they have not).</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px">3)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px"><span class="Apple-converted-space">&nbsp; &nbsp; </span>// swf6 does not have NE or SNE either, but inverting</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px"><span class="Apple-converted-space">&nbsp; &nbsp; </span>// the complement is correct for NaN</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px">There are no new opcodes for NE or SNE (at least as known to flasm)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px">4)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px"><span class="Apple-converted-space">&nbsp; &nbsp; </span>// Approximate a in b as b.a =! void 0</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px">No new opcodes for 'in'</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px">5)<span class="Apple-converted-space">&nbsp; </span>Special case of 'is' in translateBinaryExpression.</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px">No new opcodes for 'is'</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px">6)<span class="Apple-converted-space">&nbsp; </span>Special case of 'cast' in translateBinaryExpression.</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px">There is a SWF 'CAST' operator that leaves a 'null' on the stack in case of error.</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px">This is not being utilized, and there's already a separate TODO for this item.</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px">It didn't seem to be under the purvue of this Jira bug.</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px">Tests:</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px"><span class="Apple-converted-space">&nbsp;&nbsp; </span>regression: smokecheck swf8/dhtml</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px">Files:</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px">M<span class="Apple-converted-space">&nbsp; &nbsp; &nbsp; </span>WEB-INF/lps/server/src/org/openlaszlo/sc/CodeGenerator.java</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px">Changeset: <a href="http://svn.openlaszlo.org/openlaszlo/patches/20080724-dda-2.tar">http://svn.openlaszlo.org/openlaszlo/patches/20080724-dda-2.tar</a></p>
<br><br><div> <span class="Apple-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-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-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; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-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; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><span class="Apple-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; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br class="Apple-interchange-newline">--</div><div><br>Don Anderson<br>Java/C/C++, Berkeley DB, systems consultant<br><br>voice: 617-547-7881<br>email:&nbsp;<a href="mailto:dda@ddanderson.com">dda@ddanderson.com</a><br>www:&nbsp;<a href="http://www.ddanderson.com/">http://www.ddanderson.com</a><br></div></div></span></span><br class="Apple-interchange-newline"></div></span></div></span><br class="Apple-interchange-newline"> </div><br></body></html>