Source

pypy / pypy / translator / jvm / generator.py

Author Commit Message Labels Comments Date
Amaury Forgeot d'Arc
Move float/double related code from rarithmetic.py to rfloat.py
Branches
move-rfloat
Armin Rigo
Finish the merge of trunk into pyjitpl5.
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.
nikomatsakis
fix two bugs in JVM backend: * llshl takes a long, not an int, for # of bits to shift * rejigger exc. handling so we translate from CLI exceptions in the catch block rather than at the site they are thrown. This allows us to handle StackOverflow and (in theory) OutOfMemory exceptions.
Antonio Cuni
don't put unnecessary spaces at the end of the line
Antonio Cuni
dump the state of the program in case jtype is None; this should help to fix the inconsistently failing test_weakref_simple
nikomatsakis
fix math.modf in the jvm: 1. the code in PyPy.java was slightly wrong 2. the static signature cannot reference generated objects, so when they are returned we must use jObject instead and insert a downcast 3. add a test to oosupport/builtin for modf
nikomatsakis
update the debug info we print out: now the line number corresponds to the line in the file, and we emit local variable debug information with the name of the variable from the rpython source. this helps when viewing code in java debuggers
nikomatsakis
Refactor so that we can support multiple interpreters simultaneously. Instead of storing the interlink interface in a static field of PyPy.java, we now create a new instance of PyPy.java which has a custom interlink, and then dispatch to that as needed. This means that different PyPy interpters can each have their own PyPy instance customized to their specific interlink class.
Antonio Cuni
proper handling of unicode strings for genjvm
Maciej Fijalkowski
(antocuni, cfbolz, fijal) - Merge the unicode-objspace branch, history below ------------------------------------------------------------------------ r48508 | cfbolz | 2007-11-10 16:14:06 +0100 (Sat, 10 Nov 2007) | 3 lines Changed paths: M /pypy/branch/unicode-objspace/pypy/objspace/std/unicodetype.py helper function for unwrapping encoding and error. will be needed in various places ------------------------------------------------------------------------ r48507 | cfb…
Alexander Schremmer
Removed three other isnan or isinf occurences in the code.
nikomatsakis
fix stupid typo: s/int(val)/int(value)/
nikomatsakis
fix test compare_big_ullong: bug was that we were doing math with rpython rulonglong objects when we wanted normal python longs
nikomatsakis
implement new-style weakrefs in the jvm
Antonio Cuni
enable stack_optimizations for jvm; to do this, we must compare Variables by name and not by identity.
Antonio Cuni
prepare genjvm to use stack_optimizations, though it's disabled right now. Move the smart version of render_bool_switch from cli to oosupport, so genjvm uses it. Move the old non-smart version to js.
Antonio Cuni
use jvm's tableswitch to implement numeric switch.
Antonio Cuni
move test_backendopt to oosupport, and port it to genvjm
Antonio Cuni
implement branch_if_not_equal for genjvm; this is needed by backendopts.
Antonio Cuni
we can't assume MALLOC_ZERO_FILLED for jvm!
Antonio Cuni
move ll_os_* to their own class. Wrap std{out,in,err} into file descriptors.
Antonio Cuni
Split the methods that initialize the constants, if they become too large.
nikomatsakis
modify jvm constant generation so that it spreads the constants out over several classes, rather than grouping all of the static fields together into one class. This avoids overflowing the constant pool when there are too many constants, but doens't fix test_manyconstant, which has a single list with 7500 elements, and simply generates too much code.
Antonio Cuni
these are needed for pypy-jvm to compile
Antonio Cuni
correctly implement generator.call_primitive. Implement ll_math.{fmod,floor}.
Antonio Cuni
refactor metavm._Call: now most of the logic is shared between jvm and cli
Antonio Cuni
bugfix && test passes
Antonio Cuni
correct implementation of uint_mul and uint_div
  1. Prev
  2. 1
  3. 2
  4. 3
  5. Next