[pypy-dev] RPython rendering of % operator

Ben Mellor cumber at netspace.net.au
Thu Mar 26 01:41:27 CET 2009

Does anyone know why

lambda x, y: x % y

is being converted to a flow graph as:

v2 = int_mod(x_0, y_0)
v1 = int_add(v2, [int_mul([int_and([cast_bool_to_int([int_le([int_xor(x_0,
y_0)], (0))])], [cast_bool_to_int([int_ne(v2, (0))])])], y_0)])

(v1 is returned)

What's wrong with just v1 = int_mod(x_0, y_0)?

-- Ben

More information about the Pypy-dev mailing list