mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-22 12:04:39 +02:00
8057846: ClassVerifier::change_sig_to_verificationType temporary symbol creation code is hot
Only update the refcount without looking it up in the symbol table. Reviewed-by: hseigel, lfoltan, shade
This commit is contained in:
parent
ade3cd1920
commit
866de7bb9c
1 changed files with 12 additions and 7 deletions
|
@ -406,13 +406,20 @@ class ClassVerifier : public StackObj {
|
|||
}
|
||||
|
||||
// Keep a list of temporary symbols created during verification because
|
||||
// their reference counts need to be decrememented when the verifier object
|
||||
// their reference counts need to be decremented when the verifier object
|
||||
// goes out of scope. Since these symbols escape the scope in which they're
|
||||
// created, we can't use a TempNewSymbol.
|
||||
Symbol* create_temporary_symbol(
|
||||
const Symbol* s, int begin, int end, TRAPS);
|
||||
Symbol* create_temporary_symbol(const Symbol* s, int begin, int end, TRAPS);
|
||||
Symbol* create_temporary_symbol(const char *s, int length, TRAPS);
|
||||
|
||||
Symbol* create_temporary_symbol(Symbol* s) {
|
||||
// This version just updates the reference count and saves the symbol to be
|
||||
// dereferenced later.
|
||||
s->increment_refcount();
|
||||
_symbols->push(s);
|
||||
return s;
|
||||
}
|
||||
|
||||
TypeOrigin ref_ctx(const char* str, TRAPS);
|
||||
|
||||
};
|
||||
|
@ -425,10 +432,8 @@ inline int ClassVerifier::change_sig_to_verificationType(
|
|||
case T_ARRAY:
|
||||
{
|
||||
Symbol* name = sig_type->as_symbol(CHECK_0);
|
||||
// Create another symbol to save as signature stream unreferences
|
||||
// this symbol.
|
||||
Symbol* name_copy =
|
||||
create_temporary_symbol(name, 0, name->utf8_length(), CHECK_0);
|
||||
// Create another symbol to save as signature stream unreferences this symbol.
|
||||
Symbol* name_copy = create_temporary_symbol(name);
|
||||
assert(name_copy == name, "symbols don't match");
|
||||
*inference_type =
|
||||
VerificationType::reference_type(name_copy);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue