Source

pypy / pypy / translator / jvm / cmpopcodes.py

Author Commit Message Labels Comments Date
nikomatsakis
(niko, arigo and antocuni looking) merge fixed-list-ootype-2 branch to trunk, introducing a different ootype type for lists that are not resized after they are created.
nikomatsakis
rework the way that comparisons work in the JVM backend: we now detect when the branch depends on a boolean variable defined by the last instruction, and try to inline the comparison. Since the jvm doesn't have opcodes to load the result of a comparison onto the stack, this means that instead of generating code for "if (x<y) f1 else f2" like if (x < y) b = 1; else b = 0; if (b) goto l1; else goto l2; we generate if (x < y) goto l1; else goto l2; which is much shorter and easier to read.