8153514: Whitebox API should allow compilation of <clinit>
authorthartmann
Thu, 07 Apr 2016 16:51:21 +0200
changeset 37955 0e25f6f1d8f0
parent 37026 4b57da77f080
child 37956 552c8a62ea8b
8153514: Whitebox API should allow compilation of <clinit> Summary: Added Whitebox API method to trigger compilation of static initializer. Reviewed-by: zmajo, kvn, iignatyev
test/lib/sun/hotspot/WhiteBox.java
--- a/test/lib/sun/hotspot/WhiteBox.java	Tue Apr 05 15:39:34 2016 -0400
+++ b/test/lib/sun/hotspot/WhiteBox.java	Thu Apr 07 16:51:21 2016 +0200
@@ -307,6 +307,11 @@
     Objects.requireNonNull(method);
     return enqueueMethodForCompilation0(method, compLevel, entry_bci);
   }
+  private native boolean enqueueInitializerForCompilation0(Class<?> aClass, int compLevel);
+  public  boolean enqueueInitializerForCompilation(Class<?> aClass, int compLevel) {
+    Objects.requireNonNull(aClass);
+    return enqueueInitializerForCompilation0(aClass, compLevel);
+  }
   private native void    clearMethodState0(Executable method);
   public         void    clearMethodState(Executable method) {
     Objects.requireNonNull(method);