[squeak-dev] Bug in BytecodeGenerator>>#jump:if:
andre.wendt at hpi.uni-potsdam.de
Sun Jun 22 10:54:32 UTC 2008
apologies if this doesn't belong here. Mantis is a usability-nightmare
and I didn't know where else to report a bug in the NewCompiler. The
corresponding ML on squeakfoundation.org hasn't been posted to in over
I've noticed that BytecodeGenerator>>#jump:if: has a bug when given a
distance >= 1024.
hi := distance // 256.
and then goes on checking if hi < 8. If that's false, the jump is
assumed to be too big. However, the check should be hi < 4.
Assume the method gets an argument of 1024, and hi is 4. The following
self nextPut: (Bytecodes at: #longJumpIfFalse) first + hi.
generates bytecode 176, which is an arithmetic message send instead of a
I've attached a changeset that checks both jump conditions for hi < 4.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 830 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20080622/0f001823/BytecodeGenerator.awe.1.bin
More information about the Squeak-dev