<br><br><div class="gmail_quote">On Sun, Jun 22, 2008 at 6:11 PM, stephane ducasse &lt;<a href="mailto:stephane.ducasse@free.fr">stephane.ducasse@free.fr</a>&gt; wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Normally there is a mailing-list for the newcompiler but indeed we should have a bugtracker.<br></blockquote><div><br></div><div>I have now set up a google code bugtracker for the NewCompiler:</div><div><br></div><div>&nbsp;&nbsp;&nbsp;<a href="http://code.google.com/p/squeaknewcompiler/issues/">http://code.google.com/p/squeaknewcompiler/issues/</a></div>
<div><br></div><div>&nbsp;&nbsp; Marcus</div><div><br></div><div>&nbsp;</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
Stef<br>
<br>
On Jun 22, 2008, at 12:54 PM, André Wendt wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi all,<br>
<br>
apologies if this doesn&#39;t belong here. Mantis is a usability-nightmare<br>
and I didn&#39;t know where else to report a bug in the NewCompiler. The<br>
corresponding ML on <a href="http://squeakfoundation.org" target="_blank">squeakfoundation.org</a> hasn&#39;t been posted to in over<br>
six months.<br>
<br>
I&#39;ve noticed that BytecodeGenerator&gt;&gt;#jump:if: has a bug when given a<br>
distance &gt;= 1024.<br>
<br>
It states<br>
<br>
hi := distance // 256.<br>
<br>
and then goes on checking if hi &lt; 8. If that&#39;s false, the jump is<br>
assumed to be too big. However, the check should be hi &lt; 4.<br>
<br>
Assume the method gets an argument of 1024, and hi is 4. The following<br>
<br>
self nextPut: (Bytecodes at: #longJumpIfFalse) first + hi.<br>
<br>
generates bytecode 176, which is an arithmetic message send instead of a<br>
conditional jump.<br>
<br>
I&#39;ve attached a changeset that checks both jump conditions for hi &lt; 4.<br>
<br>
Regards,<br>
André<br>
&#39;From Squeak3.10.1 of &#39;&#39;26 May 2008&#39;&#39; [latest update: #7175] on 22 June 2008 at 12:36:17 pm&#39;!<br>
<br>
!BytecodeGenerator methodsFor: &#39;private&#39; stamp: &#39;awe 6/22/2008 12:35&#39;!<br>
jump: distance if: condition<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp;| hi |<br>
 &nbsp; &nbsp; &nbsp; &nbsp;distance = 0 ifTrue: [<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;jumps to fall through, no-op&quot;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;^ self nextPut: (Bytecodes at: #popStackBytecode)].<br>
 &nbsp; &nbsp; &nbsp; &nbsp;condition ifTrue: [<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;hi := distance // 256.<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;hi &lt; 4 ifFalse: [self error: &#39;true jump too big&#39;].<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;self nextPut: (Bytecodes at: #longJumpIfTrue) first + hi.<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;self nextPut: distance \\ 256.<br>
 &nbsp; &nbsp; &nbsp; &nbsp;] ifFalse: [<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;distance &lt;= 8 ifTrue: [<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;self nextPut: (Bytecodes at: #shortConditionalJump) first + distance - 1.<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;] ifFalse: [<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;hi := distance // 256.<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;hi &lt; 4 ifFalse: [self error: &#39;false jump too big&#39;].<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;self nextPut: (Bytecodes at: #longJumpIfFalse) first + hi.<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;self nextPut: distance \\ 256.<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;].<br>
 &nbsp; &nbsp; &nbsp; &nbsp;] &nbsp; &nbsp; &nbsp; <br>
! !<br>
<br>
<br>
</blockquote>
<br>
</blockquote></div><br>