<br><br><div class="gmail_quote">On Sun, Jun 22, 2008 at 6:11 PM, stephane ducasse <<a href="mailto:stephane.ducasse@free.fr">stephane.ducasse@free.fr</a>> 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> <a href="http://code.google.com/p/squeaknewcompiler/issues/">http://code.google.com/p/squeaknewcompiler/issues/</a></div>
<div><br></div><div> Marcus</div><div><br></div><div> </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't belong here. Mantis is a usability-nightmare<br>
and I didn'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't been posted to in over<br>
six months.<br>
<br>
I've noticed that BytecodeGenerator>>#jump:if: has a bug when given a<br>
distance >= 1024.<br>
<br>
It states<br>
<br>
hi := distance // 256.<br>
<br>
and then goes on checking if hi < 8. If that's false, the jump is<br>
assumed to be too big. However, the check should be hi < 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've attached a changeset that checks both jump conditions for hi < 4.<br>
<br>
Regards,<br>
André<br>
'From Squeak3.10.1 of ''26 May 2008'' [latest update: #7175] on 22 June 2008 at 12:36:17 pm'!<br>
<br>
!BytecodeGenerator methodsFor: 'private' stamp: 'awe 6/22/2008 12:35'!<br>
jump: distance if: condition<br>
<br>
| hi |<br>
distance = 0 ifTrue: [<br>
"jumps to fall through, no-op"<br>
^ self nextPut: (Bytecodes at: #popStackBytecode)].<br>
condition ifTrue: [<br>
hi := distance // 256.<br>
hi < 4 ifFalse: [self error: 'true jump too big'].<br>
self nextPut: (Bytecodes at: #longJumpIfTrue) first + hi.<br>
self nextPut: distance \\ 256.<br>
] ifFalse: [<br>
distance <= 8 ifTrue: [<br>
self nextPut: (Bytecodes at: #shortConditionalJump) first + distance - 1.<br>
] ifFalse: [<br>
hi := distance // 256.<br>
hi < 4 ifFalse: [self error: 'false jump too big'].<br>
self nextPut: (Bytecodes at: #longJumpIfFalse) first + hi.<br>
self nextPut: distance \\ 256.<br>
].<br>
] <br>
! !<br>
<br>
<br>
</blockquote>
<br>
</blockquote></div><br>