Skip to content

Commit

Permalink
[Backport] commit/369f0ff8, native method deletions
Browse files Browse the repository at this point in the history
This is a partial backport of:
"Introudce a mode to unconditionally include classes"
oracle/graal@369f0ff
to address oracle/graal#9672

Changes from the original commit 369f0ff:
Unused substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/SubstrateOptions.java
Unused substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jdk/FileSystemProviderSupport.java
Unused substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jdk/NonWindowsOS.java
Unused substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jdk/Target_java_security_AccessControlContext.java
Unused substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jdk/Target_jdk_internal_loader_BuiltinClassLoader.java
Unused substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jdk/Target_jdk_internal_vm_vector_VectorSupport.java
Unused substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jdk/Target_sun_nio_ch_Net.java
Used substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/methodhandles/Target_java_lang_invoke_MethodHandleNatives.java
Used substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/methodhandles/Target_java_lang_invoke_MethodHandles_Lookup.java
Used substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/thread/Target_java_lang_Thread.java
Unused substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/ClassLoaderSupportImpl.java
Unused substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/ClassLoaderSupportImpl.java
Unused substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/NativeImageClassLoaderSupport.java
Unused substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/NativeImageGenerator.java
Unused substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/jdk/JDKInitializationFeature.java
  • Loading branch information
Karm committed Dec 19, 2024
1 parent 8dd038b commit 5b44e49
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,9 @@ static Target_java_lang_invoke_MemberName resolve(Target_java_lang_invoke_Member
}
return resolved;
}

@Delete
static native MethodHandle linkMethodHandleConstant(Class<?> callerClass, int refKind, Class<?> defc, String name, Object type);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ private IllegalAccessException makeAccessException(Class<?> targetClass) {
return new IllegalAccessException(message);
}

@Delete
native MethodHandle linkMethodHandleConstant(byte refKind, Class<?> defc, String name, Object type) throws ReflectiveOperationException;

/** This call is a noop without the security manager. */
@SuppressWarnings("unused")
@Substitute
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -623,6 +623,10 @@ private StackTraceElement[] getStackTrace() {
return JavaThreads.getStackTrace(false, JavaThreads.fromTarget(this));
}

@Delete
@SuppressWarnings({"static-method"})
private native Object getStackTrace0();

/** @see com.oracle.svm.core.jdk.StackTraceUtils#asyncGetStackTrace */
@Delete
@TargetElement(onlyWith = JDK19OrLater.class)
Expand Down Expand Up @@ -798,6 +802,9 @@ boolean isTerminated() {
@Alias
@TargetElement(onlyWith = JDK19OrLater.class)
native long threadId();

@Delete
static native long getNextThreadIdOffset();
}

@TargetClass(value = Thread.class, innerClass = "Builder", onlyWith = JDK19OrLater.class)
Expand Down

0 comments on commit 5b44e49

Please sign in to comment.