8153514: Whitebox API should allow compilation of <clinit>

Added Whitebox API method to trigger compilation of static initializer.

Reviewed-by: zmajo, kvn, iignatyev
This commit is contained in:
Tobias Hartmann 2016-04-07 16:51:21 +02:00
parent 95430ad167
commit 1f9273ca3b

View File

@ -307,6 +307,11 @@ public class WhiteBox {
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);