Source

pypy / pypy / translator / jvm / constant.py

Author Commit Message Labels Comments Date
nikomatsakis
implement new-style weakrefs in the jvm
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
don't try to access custom eq&hash functions on a null dict.
nikomatsakis
implement weak refs for genjvm; refactor test_objectmodel from cli into oosupport
nikomatsakis
Implement custom dicts (rdicts) in the JVM backend. All tests in objectmodel now pass. The technique is to find all functions which could be used as hashCode() or equals() functions, and to make any static functions that are defined implement either pypy.Equals or pypy.HashCode, then allowing them to be passed to pypy.CustomDict.
nikomatsakis
(niko, antocuni) fix all of test_class.py for the jvm backend
nikomatsakis
1. adapt the JVM code to the changes I made in cli/oosupport; though I checked this in before, but apparently not. 2. make the CLI constants for Records and Instances rely only upon the generic setup code in oosupport; others remain the same
nikomatsakis
Next iteration of unified JVM/CLI constant support. In this version, the CLI code uses the same constant code as JVM, but the CLI has its own version of the methods which generate bytecode. Final iteration is to remove those methods by implementing them generically in oosupport and implementing the required methods in the "metavm" generator interface. Towards that end, this check-in also includes a "CLIBaseGenerator" class that includes most of the metavm generator implementation, but not those parts that are specific to a particular function (like loading a variable). All tests continue to pass in CLI and JS on my machine.
nikomatsakis
Rather large check-in with JVM restructing. Warning: new code in oosupport will likely change to match CLI more closely as I integrate those. Highlights: 1. Begin the work pulling out constant generation and database code and making it common between CLI and JVM. Right now, it's only used by the JVM. Next check-in will be to integrate with CLI. 2. Unify database nodes and type system both for instances and built-ins. This simplifies JVM code considerably. 3. Implement several other random bug fixes.