[Larceny-users] this doesn't seem right, does it?

Felix Klock felixluser at pnkfx.org
Fri Apr 6 12:36:49 EDT 2007


On Apr 5, 2007, at 1:18 AM, Andreas Huber wrote:

> (define (plus-1-a n) (+ n 1))
> (plus-1-a 4294967293)
> => 2
>
> (define (plus-1-b n) (+ 1 n))
> (plus-1-b 4294967293)
> => 4294967294

Filed as Ticket #424 in the trac project management system.  You can  
see the ticket here:
http://larceny.ccs.neu.edu/larceny-trac/ticket/424

You can anonymously report new bugs to trac yourself by:
  1. First logging in a psellers (password: "ope")
  2. Then hitting the "New Ticket" tab, which takes you to the  
following url: http://larceny.ccs.neu.edu/larceny-trac/newticket

(If you would like your own account on the trac repository, feel free  
to contact us.)

> is this some fixnum-add-optimization gone wrong?

Sort of; the generated code was eliminating a mov instruction  
incorrectly with certain register assignments for the op2imm + code  
(that is, the code generated when the right hand side of an addition  
is an integer immediate).

-Felix




More information about the Larceny-users mailing list