hg: valhalla/valhalla/langtools: Enhanced support for BytecodeMapping attribute
Remi Forax
forax at univ-mlv.fr
Fri Aug 8 22:16:50 UTC 2014
On 08/09/2014 12:06 AM, Brian Goetz wrote:
> Generic methods are a separate beast, so we'll handle them separately.
yes, forget that, my brain was in classdynamic mode.
Rémi
>
> On 8/8/2014 5:46 PM, Remi Forax wrote:
>>
>> On 08/08/2014 11:09 PM, Maurizio Cimadamore wrote:
>>>
>>> On 08/08/14 21:49, Remi Forax wrote:
>>>> Hi Maurizio,
>>>> why invokestatic (and invokedynamic) are not supported ?
>>> For now the implementation tags the invokeXYZ opcodes that could point
>>> to 'stale' descriptors in the CP - i.e. method descriptors whose
>>> 'owner' is bound to change after class specialization. Under this
>>> assumption, I believe that calling a static method should not require
>>> any mangling - i.e. class statics should probably continue to live in
>>> the main unspecialized class (handwaving).
>>
>> even if it's a generics static method:
>> class A<any T> {
>> T t;
>> void foo() {
>> bar(t);
>> }
>> static <any T> void bar(T t) {
>> ...
>> }
>> }
>>
>>>
>>> A bit of the same holds for indy - the descriptor generated for an
>>> indy does not have a direct correspondence with the source code - i.e.
>>> it is a synthetic descriptor that is only used for the purpose of
>>> describing the types of the dynamic arguments. It is possible that, if
>>> we decide to implement specialized generic methods with indy, that
>>> might change in the future.
>>
>> I don't think that javac can currently generate a code that use indy and
>> need to be specialized but
>> the descriptor of indy is verified by the verifier like any other
>> descriptors so it's not something that comes from the vacuum.
>> Currently, indy is used by lambda/method ref, if we one day support
>> lambda with a generics signature or wunderbar '_' in method reference,
>> both will require to be able to specialized indy.
>>
>>>
>>> Maurizio
>>
>> Rémi
>>
>>>>
>>>> Rémi
>>>>
>>>> On 08/08/2014 06:20 PM, maurizio.cimadamore at oracle.com wrote:
>>>>> Changeset: 7904f37d7d98
>>>>> Author: mcimadamore
>>>>> Date: 2014-08-08 17:16 +0100
>>>>> URL:
>>>>> http://hg.openjdk.java.net/valhalla/valhalla/langtools/rev/7904f37d7d98
>>>>>
>>>>>
>>>>> Enhanced support for BytecodeMapping attribute
>>>>> *) new opcodes supported:
>>>>> putfield/getfield/invokespecial/invokevirtual/invokeinterface
>>>>> *) Add test harness to check correctness of BytecodeMapping
>>>>> attributes
>>>>> *) Add javap support for BytecodeMapping and TypeVariablesMap
>>>>> *) Fix bug in SpecializeTypes where super symbol was not being
>>>>> replaced correctly
>>>>> *) Fix missing call to 'synthetizeIfMissing' in SymTab (for
>>>>> VarHandle related classes)
>>>>>
>>>>> ! src/share/classes/com/sun/tools/classfile/Attribute.java
>>>>> +
>>>>> src/share/classes/com/sun/tools/classfile/BytecodeMapping_attribute.java
>>>>>
>>>>>
>>>>> ! src/share/classes/com/sun/tools/classfile/ClassWriter.java
>>>>> +
>>>>> src/share/classes/com/sun/tools/classfile/TypeVariablesMap_attribute.java
>>>>>
>>>>>
>>>>> ! src/share/classes/com/sun/tools/javac/code/Symtab.java
>>>>> ! src/share/classes/com/sun/tools/javac/comp/SpecializeTypes.java
>>>>> ! src/share/classes/com/sun/tools/javac/jvm/Gen.java
>>>>> ! src/share/classes/com/sun/tools/javac/jvm/Items.java
>>>>> ! src/share/classes/com/sun/tools/javap/AttributeWriter.java
>>>>> ! test/tools/javac/MethodParameters/AttributeVisitor.java
>>>>> + test/tools/javac/valhalla/typespec/items/BytecodeMapping.java
>>>>> +
>>>>> test/tools/javac/valhalla/typespec/items/BytecodeMappingHarness.java
>>>>> + test/tools/javac/valhalla/typespec/items/Opcodes.java
>>>>> + test/tools/javac/valhalla/typespec/items/tests/TestAnyMembers.java
>>>>> +
>>>>> test/tools/javac/valhalla/typespec/items/tests/TestArrayLoadAndStore.java
>>>>>
>>>>>
>>>>> + test/tools/javac/valhalla/typespec/items/tests/TestCmp.java
>>>>> + test/tools/javac/valhalla/typespec/items/tests/TestDup.java
>>>>> +
>>>>> test/tools/javac/valhalla/typespec/items/tests/TestLoadAndStore.java
>>>>> + test/tools/javac/valhalla/typespec/items/tests/TestPop.java
>>>>> + test/tools/javac/valhalla/typespec/items/tests/TestSuper.java
>>>>>
>>>>
>>>
>>
More information about the valhalla-dev
mailing list