Status of Anno Class loader with constant patches?

Rémi Forax forax at univ-mlv.fr
Mon Dec 27 10:38:03 PST 2010


On 12/27/2010 06:33 PM, Charles Oliver Nutter wrote:
> I am curious what you mean here...storing atypical object values (not
> string, int, etc) in the constant pool? Is that possible?

The idea is to use the bytecode of an existing class
as a template and to instantiate a new class from this template
by replacing some constants of the template by some live objects.

There is another way to do something similar,
you can call invokedynamic, use the bootstrap arguments to send
the primitive values composing the object value and when the
BSM is called returns a ConstantCallSite with as target a method handle
created by MethodHandles.constant().

The former offer a push way to store atypical constants, the later
offer a pull way to store atypical constants.

Rémi

> On Sunday, December 26, 2010, Mark Roos<mroos at roos.com>  wrote:
>> We are working on a port of Smalltalk to
>> the MLVM.  For this we were thinking of using the
>>
>> constant patch feature of the anonymous
>> class loader in java.dyn.anon to create constant pool
>>
>> entries with instances of our Smalltalk
>> types.
>>
>>
>> Is this feature expected to continue?
>> If so in which package will it be located in the JDK7
>>
>> release?
>>
>>
>> If not then I assume that we have to
>> hold these constants as static fields and create an initializer.
>>
>> Any other suggestions?
>>
>>
>> thanks for all of the good work
>>
>>
>> mark roos
>>
>>
> _______________________________________________
> mlvm-dev mailing list
> mlvm-dev at openjdk.java.net
> http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev



More information about the mlvm-dev mailing list