[hotspot]The VM support of static and private interface method
Brian Goetz
brian.goetz at oracle.com
Fri Jan 11 10:19:42 PST 2013
Good catch!
On 1/11/2013 1:35 AM, bitter_fox wrote:
> Hi,
> I have a question about the VM support of static and private interface
> method.
>
> The compiler has the support of static and private interface method from
> Dec. 3 and Dec. 17.
> And a several people said that there is no VM support.
>
> But I found a commit[1] for hotspot which supports static and private
> interface method. However it was overridden by merging[2].
> Is this merging correct?
>
> Regards,
> bitter_fox
>
> [1]: hg: lambda/lambda/hotspot: 2 new changesets
> http://mail.openjdk.java.net/pipermail/lambda-dev/2012-October/006225.html
>
> Changeset: 9b8772388190
> Author: kamg
> Date: 2012-10-19 17:23 -0400
> URL: http://hg.openjdk.java.net/lambda/lambda/hotspot/rev/9b8772388190
>
> Summary: Accept private and state methods in interfaces
>
> ! src/share/vm/classfile/classFileParser.cpp
>
> @@ -4334,10 +4334,11 @@
> bool is_illegal = false;
>
> if (is_interface) {
> - if (!is_public || is_static || is_final || is_native ||
> - ((is_synchronized || is_strict) && major_gte_15 &&
> - (!major_gte_8 || is_abstract)) ||
> - (!major_gte_8 && !is_abstract)) {
> + if (!is_public && !(is_private && major_gte_8) ||
> + (is_static && !major_gte_8) ||
> + is_final || is_native ||
> + (!is_abstract && !major_gte_8) ||
> + (is_synchronized || is_strict) && major_gte_15 && is_abstract) {
> is_illegal = true;
> }
> } else { // not interface
>
> [2]: hg: lambda/lambda/hotspot: 130 new changesets
> http://mail.openjdk.java.net/pipermail/lambda-dev/2012-December/006987.html
>
> Changeset: a35a1dd6cd6a
> Author: mduigou
> Date: 2012-11-20 12:21 -0800
> URL: http://hg.openjdk.java.net/lambda/lambda/hotspot/rev/a35a1dd6cd6a
>
> Merge
>
> ! src/share/vm/classfile/classFileParser.cpp
>
> @@ -4350,11 +4357,10 @@
> bool is_illegal = false;
>
> if (is_interface) {
> - if (!is_public && !(is_private && major_gte_8) ||
> - (is_static && !major_gte_8) ||
> - is_final || is_native ||
> - (!is_abstract && !major_gte_8) ||
> - (is_synchronized || is_strict) && major_gte_15 && is_abstract) {
> + if (!is_public || is_static || is_final || is_native ||
> + ((is_synchronized || is_strict) && major_gte_15 &&
> + (!major_gte_8 || is_abstract)) ||
> + (!major_gte_8 && !is_abstract)) {
> is_illegal = true;
> }
> } else { // not interface
>
More information about the lambda-dev
mailing list