Mercurial > hg > truffle
diff 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 |
line wrap: on
line diff
--- a/src/share/vm/prims/jvm.cpp Tue Jun 17 09:59:59 2008 -0700 +++ b/src/share/vm/prims/jvm.cpp Tue Jun 17 13:08:15 2008 -0700 @@ -624,6 +624,30 @@ if (PrintJVMWarnings) warning("JVM_ResolveClass not implemented"); JVM_END +// Rationale behind JVM_FindClassFromBootLoader +// a> JVM_FindClassFromClassLoader was never exported in the export tables. +// b> because of (a) java.dll has a direct dependecy on the unexported +// private symbol "_JVM_FindClassFromClassLoader@20". +// c> the launcher cannot use the private symbol as it dynamically opens +// the entry point, so if something changes, the launcher will fail +// unexpectedly at runtime, it is safest for the launcher to dlopen a +// stable exported interface. +// d> re-exporting JVM_FindClassFromClassLoader as public, will cause its +// signature to change from _JVM_FindClassFromClassLoader@20 to +// JVM_FindClassFromClassLoader and will not be backward compatible +// with older JDKs. +// Thus a public/stable exported entry point is the right solution, +// public here means public in linker semantics, and is exported only +// to the JDK, and is not intended to be a public API. + +JVM_ENTRY(jclass, JVM_FindClassFromBootLoader(JNIEnv* env, + const char* name, + jboolean throwError)) + JVMWrapper3("JVM_FindClassFromBootLoader %s throw %s", name, + throwError ? "error" : "exception"); + return JVM_FindClassFromClassLoader(env, name, JNI_FALSE, + (jobject)NULL, throwError); +JVM_END JVM_ENTRY(jclass, JVM_FindClassFromClassLoader(JNIEnv* env, const char* name, jboolean init, jobject loader,