Minor class loading optimization.

In internal bug 1836311, the String.replace() in PathLoader.findClass
was identifed by traceview as 6.6% of startup time for an app.  This
adds a (hidden) alternative that takes a "binary name" like the
functions in ClassLoader, and we do the slash-to-dot conversion inside
the VM as we convert it to a descriptor.  (This is really how it should
have been done in the first place, but now it's part of the visible API
and engraved in stone.)

The original function now does a slash-to-dot conversion and calls the
new one.

(We may want to un-hide the method for the benefit of people writing
custom class loaders.  If so, we can do that in a separate API-update
commit.)
3 files changed