RFR (L) JDK-8230199: consolidate signature parsing code in HotSpot sources
John Rose
john.r.rose at oracle.com
Wed Feb 5 05:04:59 UTC 2020
On Feb 4, 2020, at 2:46 PM, David Holmes <david.holmes at oracle.com> wrote:
>
> Klass* SignatureStream::as_klass(Handle class_loader, Handle protection_domain,
> FailureMode failure_mode, TRAPS) {
> if (!is_reference()) return NULL;
> Symbol* name = as_symbol();
> if (name == NULL) {
> assert(failure_mode == CachedOrNull, "signature incorrect failure mode");
> return NULL;
> }
That looks like partially evolved code. The failure_mode
argument allows the user to ask for NULL if the symbol
isn’t resolved, and if the symbol in fact isn’t in the string
table it cannot be resolved. Perhaps an earlier version of
that code said something like “name = as_symbol_or_null()”?
— John
More information about the hotspot-runtime-dev
mailing list