RFR: 8013635 Lambda: vm conditionally create bridges for generic signatures
Coleen Phillimore
coleen.phillimore at oracle.com
Tue Jun 25 10:48:45 PDT 2013
Karen,
http://cr.openjdk.java.net/~acorn/8013635.1/webrev/src/share/vm/classfile/defaultMethods.cpp.frames.html
If someone calls this version of print_on(), won't it call the one at
440 and then crash because signature is null?
437 void print_on(outputStream* str) const {
438 print_on(str, 0);
439 }
Shouldn't it just be removed?
You could rename "curslotidx" to current_slot_index...
774 InstanceKlass* sub = current_depth() > 0 ? class_at_depth(1) : NULL;
Variable sub is not used.
ShadowChecker::path_has_shadow() should be pure virtual because if you
don't override ShadowChecker the visit function will never find a
shadow. line 1088.
1109 InstanceKlass* sub = class_at_depth(i + 1);
Variable 'sub' is not used here (trying to understand this).
1097 // Only called if the resolved_klass is a direct superinterface of
1098 // the caller's class.
This comment seems out of context, in that which is resolved_klass?
Should this comment be in the caller or the caller's caller. It doesn't
seem helpful here to understand what this is doing or why. Except:
1111 if (ik->is_interface()) {
And why does this only check for if an interface class shadows the
method? I thought a method of a non-interface class can also shadow a
method?
1307 if (!direction->is_interface()) {
1308 // We should not be here
1309 return NULL;
1310 }
Should this be an assert instead? The caller of find_super_default
won't be happy to get a NULL back without an exception pending.
I don't have any other comments. This looks good!
Coleen
On 06/20/2013 04:18 PM, Karen Kinnear wrote:
> Please review:
> https://jbs.oracle.com/bugs/browse/JDK-8013635: BridgeMethodsLinearTest.java fails in
> Lambda nightly runs
>
> webrev: http://cr.openjdk.java.net/~acorn/8013635.1/webrev/
>
> This particular set of changes modifies the vm to conditionally handle generic signatures
> when processing default methods. Basically this code refactors the defaultMethods logic
> to work either with generic signatures or only with erased signatures.
>
> The flag: ParseGenericDefaults is set to "true" in this webrev to continue to work with
> the current javac and lambda metafactory components.
>
> The intention is to change ParseGenericDefaults to false and simultaneously change
> javac to generate bridges to handle generic signatures in interface methods, and
> the metafactory to no longer generate bridges.
> With the flag change, the vm will no longer generate bridges for generic
> signatures.
>
> A subsequent fix: 8012294 will completely remove the vm generic interface handling
> for jdk8.
>
> Please approve this change with both flag settings, so we can coordinate making
> those changes in the order that is least disruptive.
>
> Testing:
>
> I. hotspot-rt: ParseGenericDefaults=true:
> jprt
> vm.quick.testlist
> jdk-jtreg - in progress
> jck-lang, vm - in progress
>
> II. Lambda repo: ParseGenericDefaults=false:
> These two files, with other changes not currently needed - tested in lambda repository for a month
> including tl nightlies and updated BridgeMethodsLinearTest
>
> III. Current hotspot-rt with these two files only and ParseGenericDefaults=false
> with jdk8tl repository with 8015402: metafactory changes and 8013789: javac changes:
>
> vm.quick.testlist - in progress
> jdk-jtreg - in progress
> jck-lang, vm - in progress
>
> thanks,
> Karen
More information about the hotspot-runtime-dev
mailing list