RFR: 8043275 8u40 backport: Interface initialization for default methods

Daniel D. Daugherty daniel.daugherty at oracle.com
Fri Oct 24 16:40:41 UTC 2014


On 10/24/14 10:06 AM, Karen Kinnear wrote:
> Please review 8u40 backport:
>
> webrev: http://cr.openjdk.java.net/~acorn/8043275.8u40/webrev/

I compared the JDK9-hs-rt version with the JDK8u40-hs version.

src/share/vm/classfile/classFileParser.cpp
     No comments.

src/share/vm/classfile/classFileParser.hpp
     No comments.

src/share/vm/oops/instanceKlass.cpp

  799         if (HAS_PENDING_EXCEPTION) {
  800           Handle e(THREAD, PENDING_EXCEPTION);
  801           CLEAR_PENDING_EXCEPTION;
  802           {
  803             EXCEPTION_MARK;
  804             // Locks object, set state, and notify all waiting threads
  805             this_oop->set_initialization_state_and_notify(
  806                 initialization_error, THREAD);
  807
  808             // ignore any exception thrown, superclass 
initialization error is
  809             // thrown below
  810             CLEAR_PENDING_EXCEPTION;
  811           }
  812         }

     The JDK9 version has this between lines 811 and 812:

         THROW_OOP(e());

     Is there reason for the difference?

src/share/vm/oops/instanceKlass.hpp
     No comments.

src/share/vm/utilities/dtrace_disabled.hpp
     The JDK9 patch modified this file, but the file doesn't
     exist in JDK8u40-hs.

test/runtime/lambda-features/InvokespecialInterface.java
     The @run changes already existed in JDK9 before your patch.

test/runtime/lambda-features/TestInterfaceInit.java

     The second line has a blank at the end of it:

     +   public static void main(String[] args) {
     +       // Trigger initialization

test/runtime/lambda-features/TestInterfaceOrder.java
     No comments.

Dan


> bug: https://bugs.openjdk.java.net/browse/JDK-8043275
>
> Summary:
>   Fix superinterface initialization to be based on declaring a non-static instance method rather than
> on declaring or inheriting one
>
> Tested (linux-x64) 8u40:
> jtreg hotspot lambda-features which includes the two new tests: TestInterfaceInit and TestInterfaceOrder
> InvokespecialInterface was changed to use nested classes so there is no name conflict for C.class in that directory
>
> thanks,
> Karen



More information about the hotspot-dev mailing list