src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/CompilerToVM.java
--- a/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/CompilerToVM.java Thu Oct 17 20:27:44 2019 +0100
+++ b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/CompilerToVM.java Thu Oct 17 20:53:35 2019 +0100
@@ -211,20 +211,13 @@
native HotSpotResolvedJavaType lookupClass(Class<?> javaClass);
/**
- * Resolves the entry at index {@code cpi} in {@code constantPool} to an object.
- *
- * The behavior of this method is undefined if {@code cpi} does not denote one of the following
- * entry types: {@code JVM_CONSTANT_MethodHandle}, {@code JVM_CONSTANT_MethodHandleInError},
- * {@code JVM_CONSTANT_MethodType} and {@code JVM_CONSTANT_MethodTypeInError}.
- */
- native HotSpotObjectConstantImpl resolveConstantInPool(HotSpotConstantPool constantPool, int cpi);
-
- /**
* Resolves the entry at index {@code cpi} in {@code constantPool} to an object, looking in the
* constant pool cache first.
*
- * The behavior of this method is undefined if {@code cpi} does not denote a
- * {@code JVM_CONSTANT_String} entry.
+ * The behavior of this method is undefined if {@code cpi} does not denote one of the following
+ * entry types: {@code JVM_CONSTANT_String}, {@code JVM_CONSTANT_MethodHandle},
+ * {@code JVM_CONSTANT_MethodHandleInError}, {@code JVM_CONSTANT_MethodType} and
+ * {@code JVM_CONSTANT_MethodTypeInError}.
*/
native HotSpotObjectConstantImpl resolvePossiblyCachedConstantInPool(HotSpotConstantPool constantPool, int cpi);
@@ -379,9 +372,8 @@
* @return the outcome of the installation which will be one of
* {@link HotSpotVMConfig#codeInstallResultOk},
* {@link HotSpotVMConfig#codeInstallResultCacheFull},
- * {@link HotSpotVMConfig#codeInstallResultCodeTooLarge},
- * {@link HotSpotVMConfig#codeInstallResultDependenciesFailed} or
- * {@link HotSpotVMConfig#codeInstallResultDependenciesInvalid}.
+ * {@link HotSpotVMConfig#codeInstallResultCodeTooLarge} or
+ * {@link HotSpotVMConfig#codeInstallResultDependenciesFailed}.
* @throws JVMCIError if there is something wrong with the compiled code or the associated
* metadata.
*/
@@ -397,9 +389,8 @@
* @return the outcome of the installation which will be one of
* {@link HotSpotVMConfig#codeInstallResultOk},
* {@link HotSpotVMConfig#codeInstallResultCacheFull},
- * {@link HotSpotVMConfig#codeInstallResultCodeTooLarge},
- * {@link HotSpotVMConfig#codeInstallResultDependenciesFailed} or
- * {@link HotSpotVMConfig#codeInstallResultDependenciesInvalid}.
+ * {@link HotSpotVMConfig#codeInstallResultCodeTooLarge} or
+ * {@link HotSpotVMConfig#codeInstallResultDependenciesFailed}.
* @throws JVMCIError if there is something wrong with the compiled code or the metadata
*/
native int getMetadata(TargetDescription target, HotSpotCompiledCode compiledCode, HotSpotMetaData metaData);
@@ -560,6 +551,18 @@
native long[] collectCounters();
/**
+ * Get the current number of counters allocated for use by JVMCI. Should be the same value as
+ * the flag {@code JVMCICounterSize}.
+ */
+ native int getCountersSize();
+
+ /**
+ * Change the size of the counters allocated for JVMCI. This requires a safepoint to
+ * safely reallocate the storage but it's advisable to increase the size in reasonable chunks.
+ */
+ native void setCountersSize(int newSize);
+
+ /**
* Determines if {@code metaspaceMethodData} is mature.
*/
native boolean isMature(long metaspaceMethodData);
@@ -759,6 +762,12 @@
native HotSpotResolvedJavaType getComponentType(HotSpotResolvedObjectTypeImpl type);
/**
+ * Get the array class for {@code type}. This can't be done symbolically since anonymous types
+ * can't be looked up by name.
+ */
+ native HotSpotResolvedObjectTypeImpl getArrayType(HotSpotResolvedJavaType type);
+
+ /**
* Forces initialization of {@code type}.
*/
native void ensureInitialized(HotSpotResolvedObjectTypeImpl type);
@@ -966,4 +975,9 @@
* @see HotSpotJVMCIRuntime#detachCurrentThread()
*/
native void detachCurrentThread();
+
+ /**
+ * @see HotSpotJVMCIRuntime#exitHotSpot(int)
+ */
+ native void callSystemExit(int status);
}