Mercurial > hg > graal-jvmci-8
comparison src/share/vm/prims/jvm.cpp @ 226:d5ba4f8aa38a
6714758: hotspot: provide an entry point to the BootStrap Class loader[dholmes,acorn]
Summary: adds JVM_FindClassFromBootLoader entry point, for jdk's use
Reviewed-by: dholmes, acorn
author | ksrini |
---|---|
date | Tue, 17 Jun 2008 13:08:15 -0700 |
parents | 018d5b58dd4f |
children | 9c2ecc2ffb12 |
comparison
equal
deleted
inserted
replaced
199:f139919897d2 | 226:d5ba4f8aa38a |
---|---|
622 JVM_ENTRY(void, JVM_ResolveClass(JNIEnv* env, jclass cls)) | 622 JVM_ENTRY(void, JVM_ResolveClass(JNIEnv* env, jclass cls)) |
623 JVMWrapper("JVM_ResolveClass"); | 623 JVMWrapper("JVM_ResolveClass"); |
624 if (PrintJVMWarnings) warning("JVM_ResolveClass not implemented"); | 624 if (PrintJVMWarnings) warning("JVM_ResolveClass not implemented"); |
625 JVM_END | 625 JVM_END |
626 | 626 |
627 // Rationale behind JVM_FindClassFromBootLoader | |
628 // a> JVM_FindClassFromClassLoader was never exported in the export tables. | |
629 // b> because of (a) java.dll has a direct dependecy on the unexported | |
630 // private symbol "_JVM_FindClassFromClassLoader@20". | |
631 // c> the launcher cannot use the private symbol as it dynamically opens | |
632 // the entry point, so if something changes, the launcher will fail | |
633 // unexpectedly at runtime, it is safest for the launcher to dlopen a | |
634 // stable exported interface. | |
635 // d> re-exporting JVM_FindClassFromClassLoader as public, will cause its | |
636 // signature to change from _JVM_FindClassFromClassLoader@20 to | |
637 // JVM_FindClassFromClassLoader and will not be backward compatible | |
638 // with older JDKs. | |
639 // Thus a public/stable exported entry point is the right solution, | |
640 // public here means public in linker semantics, and is exported only | |
641 // to the JDK, and is not intended to be a public API. | |
642 | |
643 JVM_ENTRY(jclass, JVM_FindClassFromBootLoader(JNIEnv* env, | |
644 const char* name, | |
645 jboolean throwError)) | |
646 JVMWrapper3("JVM_FindClassFromBootLoader %s throw %s", name, | |
647 throwError ? "error" : "exception"); | |
648 return JVM_FindClassFromClassLoader(env, name, JNI_FALSE, | |
649 (jobject)NULL, throwError); | |
650 JVM_END | |
627 | 651 |
628 JVM_ENTRY(jclass, JVM_FindClassFromClassLoader(JNIEnv* env, const char* name, | 652 JVM_ENTRY(jclass, JVM_FindClassFromClassLoader(JNIEnv* env, const char* name, |
629 jboolean init, jobject loader, | 653 jboolean init, jobject loader, |
630 jboolean throwError)) | 654 jboolean throwError)) |
631 JVMWrapper3("JVM_FindClassFromClassLoader %s throw %s", name, | 655 JVMWrapper3("JVM_FindClassFromClassLoader %s throw %s", name, |