[pypy-dev] Towards pypy-jvm
anto.cuni at gmail.com
Wed Apr 4 14:39:21 CEST 2007
Niko Matsakis wrote:
>> Some weeks ago I also tried to translate pypy-jvm; it seems that the
>> two most important missing features are r_dict and weakrefs.
> Ok, I implemented r_dicts now and checked it in. Not too much work,
> actually, ended up fitting fairly naturally into the existing code. I
This is very cool! :-)
Most of r_dict tests are in test_objectmodel, though you may want to
have also a look at rpython/test/test_rconstantdict.
About the distinction between r_dict and "custom dict": do you find any
place where they are used interchangeably?
I would say that r_dict referes so the rpython-level type
(objectmodel.r_dict), while "custom dict" should refer to the low level
type used by the rtyper (ootype.CustomDict). Also, probably CustomDict
would be a better name than RDict for your java class, I guess.
> guess I'll look at weakrefs next, though no promises as to when that
> will be. :)
Adding weakrefs to gencli was very simple: I just needed to map
lltypesystem.llmemory.WeakGcAddress to 'System.WeakReference', add the
straightforward support for constants to cli/constant.py and add the
also straightforward 'cast_ptr_to_weakadr' and 'cast_weakadr_to_ptr'
operations in opcodes.py.
I don't know for jvm, but I guess it would not be much more complicate.
More information about the Pypy-dev