hg: valhalla/valhalla/langtools: Enhanced support for BytecodeMapping attribute

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Fri Aug 8 21:09:58 UTC 2014


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).

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.

Maurizio
>
> 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