mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 02:54:35 +02:00
8143078: Remove JVM_DefineClassWithSourceCond() API
Remove the method and remove unneeded argument to jvm_define_class_common() Reviewed-by: dholmes, coleenp
This commit is contained in:
parent
dcd4a03963
commit
71fe04f939
3 changed files with 4 additions and 27 deletions
|
@ -31,7 +31,6 @@
|
||||||
JVM_CurrentTimeMillis;
|
JVM_CurrentTimeMillis;
|
||||||
JVM_DefineClass;
|
JVM_DefineClass;
|
||||||
JVM_DefineClassWithSource;
|
JVM_DefineClassWithSource;
|
||||||
JVM_DefineClassWithSourceCond;
|
|
||||||
JVM_DesiredAssertionStatus;
|
JVM_DesiredAssertionStatus;
|
||||||
JVM_DoPrivileged;
|
JVM_DoPrivileged;
|
||||||
JVM_DumpAllStacks;
|
JVM_DumpAllStacks;
|
||||||
|
|
|
@ -861,11 +861,10 @@ static void is_lock_held_by_thread(Handle loader, PerfCounter* counter, TRAPS) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// common code for JVM_DefineClass() and JVM_DefineClassWithSource()
|
// common code for JVM_DefineClass() and JVM_DefineClassWithSource()
|
||||||
// and JVM_DefineClassWithSourceCond()
|
|
||||||
static jclass jvm_define_class_common(JNIEnv *env, const char *name,
|
static jclass jvm_define_class_common(JNIEnv *env, const char *name,
|
||||||
jobject loader, const jbyte *buf,
|
jobject loader, const jbyte *buf,
|
||||||
jsize len, jobject pd, const char *source,
|
jsize len, jobject pd, const char *source,
|
||||||
jboolean verify, TRAPS) {
|
TRAPS) {
|
||||||
if (source == NULL) source = "__JVM_DefineClass__";
|
if (source == NULL) source = "__JVM_DefineClass__";
|
||||||
|
|
||||||
assert(THREAD->is_Java_thread(), "must be a JavaThread");
|
assert(THREAD->is_Java_thread(), "must be a JavaThread");
|
||||||
|
@ -906,8 +905,7 @@ static jclass jvm_define_class_common(JNIEnv *env, const char *name,
|
||||||
Handle protection_domain (THREAD, JNIHandles::resolve(pd));
|
Handle protection_domain (THREAD, JNIHandles::resolve(pd));
|
||||||
Klass* k = SystemDictionary::resolve_from_stream(class_name, class_loader,
|
Klass* k = SystemDictionary::resolve_from_stream(class_name, class_loader,
|
||||||
protection_domain, &st,
|
protection_domain, &st,
|
||||||
verify != 0,
|
true, CHECK_NULL);
|
||||||
CHECK_NULL);
|
|
||||||
|
|
||||||
if (TraceClassResolution && k != NULL) {
|
if (TraceClassResolution && k != NULL) {
|
||||||
trace_class_resolution(k);
|
trace_class_resolution(k);
|
||||||
|
@ -920,23 +918,14 @@ static jclass jvm_define_class_common(JNIEnv *env, const char *name,
|
||||||
JVM_ENTRY(jclass, JVM_DefineClass(JNIEnv *env, const char *name, jobject loader, const jbyte *buf, jsize len, jobject pd))
|
JVM_ENTRY(jclass, JVM_DefineClass(JNIEnv *env, const char *name, jobject loader, const jbyte *buf, jsize len, jobject pd))
|
||||||
JVMWrapper2("JVM_DefineClass %s", name);
|
JVMWrapper2("JVM_DefineClass %s", name);
|
||||||
|
|
||||||
return jvm_define_class_common(env, name, loader, buf, len, pd, NULL, true, THREAD);
|
return jvm_define_class_common(env, name, loader, buf, len, pd, NULL, THREAD);
|
||||||
JVM_END
|
JVM_END
|
||||||
|
|
||||||
|
|
||||||
JVM_ENTRY(jclass, JVM_DefineClassWithSource(JNIEnv *env, const char *name, jobject loader, const jbyte *buf, jsize len, jobject pd, const char *source))
|
JVM_ENTRY(jclass, JVM_DefineClassWithSource(JNIEnv *env, const char *name, jobject loader, const jbyte *buf, jsize len, jobject pd, const char *source))
|
||||||
JVMWrapper2("JVM_DefineClassWithSource %s", name);
|
JVMWrapper2("JVM_DefineClassWithSource %s", name);
|
||||||
|
|
||||||
return jvm_define_class_common(env, name, loader, buf, len, pd, source, true, THREAD);
|
return jvm_define_class_common(env, name, loader, buf, len, pd, source, THREAD);
|
||||||
JVM_END
|
|
||||||
|
|
||||||
JVM_ENTRY(jclass, JVM_DefineClassWithSourceCond(JNIEnv *env, const char *name,
|
|
||||||
jobject loader, const jbyte *buf,
|
|
||||||
jsize len, jobject pd,
|
|
||||||
const char *source, jboolean verify))
|
|
||||||
JVMWrapper2("JVM_DefineClassWithSourceCond %s", name);
|
|
||||||
|
|
||||||
return jvm_define_class_common(env, name, loader, buf, len, pd, source, verify, THREAD);
|
|
||||||
JVM_END
|
JVM_END
|
||||||
|
|
||||||
JVM_ENTRY(jclass, JVM_FindLoadedClass(JNIEnv *env, jobject loader, jstring name))
|
JVM_ENTRY(jclass, JVM_FindLoadedClass(JNIEnv *env, jobject loader, jstring name))
|
||||||
|
|
|
@ -378,17 +378,6 @@ JVM_DefineClassWithSource(JNIEnv *env, const char *name, jobject loader,
|
||||||
const jbyte *buf, jsize len, jobject pd,
|
const jbyte *buf, jsize len, jobject pd,
|
||||||
const char *source);
|
const char *source);
|
||||||
|
|
||||||
/* Define a class with a source with conditional verification (added HSX 14)
|
|
||||||
* -Xverify:all will verify anyway, -Xverify:none will not verify,
|
|
||||||
* -Xverify:remote (default) will obey this conditional
|
|
||||||
* i.e. true = should_verify_class
|
|
||||||
*/
|
|
||||||
JNIEXPORT jclass JNICALL
|
|
||||||
JVM_DefineClassWithSourceCond(JNIEnv *env, const char *name,
|
|
||||||
jobject loader, const jbyte *buf,
|
|
||||||
jsize len, jobject pd, const char *source,
|
|
||||||
jboolean verify);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Reflection support functions
|
* Reflection support functions
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue