Skip to content

Commit

Permalink
8230199: consolidate signature parsing code in HotSpot sources
Browse files Browse the repository at this point in the history
Add a new Signature class to support basic signature queries and enhance SignatureStream class to parse field signatures in addition to methods.

Co-authored-by: John Rose <john.r.rose@oracle.com>
Reviewed-by: coleenp, dholmes, fparain, hseigel
  • Loading branch information
Lois Foltan and rose00 committed Feb 6, 2020
1 parent 2ede36b commit d19a396
Show file tree
Hide file tree
Showing 57 changed files with 1,382 additions and 1,486 deletions.
24 changes: 6 additions & 18 deletions src/hotspot/cpu/aarch64/sharedRuntime_aarch64.cpp
@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2019, Red Hat Inc. All rights reserved. * Copyright (c) 2014, 2019, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
Expand Down Expand Up @@ -1333,28 +1333,16 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm,
// Arrays are passed as int, elem* pair // Arrays are passed as int, elem* pair
out_sig_bt[argc++] = T_INT; out_sig_bt[argc++] = T_INT;
out_sig_bt[argc++] = T_ADDRESS; out_sig_bt[argc++] = T_ADDRESS;
Symbol* atype = ss.as_symbol(); ss.skip_array_prefix(1); // skip one '['
const char* at = atype->as_C_string(); assert(ss.is_primitive(), "primitive type expected");
if (strlen(at) == 2) { in_elem_bt[i] = ss.type();
assert(at[0] == '[', "must be");
switch (at[1]) {
case 'B': in_elem_bt[i] = T_BYTE; break;
case 'C': in_elem_bt[i] = T_CHAR; break;
case 'D': in_elem_bt[i] = T_DOUBLE; break;
case 'F': in_elem_bt[i] = T_FLOAT; break;
case 'I': in_elem_bt[i] = T_INT; break;
case 'J': in_elem_bt[i] = T_LONG; break;
case 'S': in_elem_bt[i] = T_SHORT; break;
case 'Z': in_elem_bt[i] = T_BOOLEAN; break;
default: ShouldNotReachHere();
}
}
} else { } else {
out_sig_bt[argc++] = in_sig_bt[i]; out_sig_bt[argc++] = in_sig_bt[i];
in_elem_bt[i] = T_VOID; in_elem_bt[i] = T_VOID;
} }
if (in_sig_bt[i] != T_VOID) { if (in_sig_bt[i] != T_VOID) {
assert(in_sig_bt[i] == ss.type(), "must match"); assert(in_sig_bt[i] == ss.type() ||
in_sig_bt[i] == T_ARRAY, "must match");
ss.next(); ss.next();
} }
} }
Expand Down
24 changes: 6 additions & 18 deletions src/hotspot/cpu/ppc/sharedRuntime_ppc.cpp
@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2019 SAP SE. All rights reserved. * Copyright (c) 2012, 2019 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
Expand Down Expand Up @@ -1934,27 +1934,15 @@ nmethod *SharedRuntime::generate_native_wrapper(MacroAssembler *masm,
for (int i = 0; i < total_in_args ; i++, o++) { for (int i = 0; i < total_in_args ; i++, o++) {
if (in_sig_bt[i] == T_ARRAY) { if (in_sig_bt[i] == T_ARRAY) {
// Arrays are passed as int, elem* pair // Arrays are passed as int, elem* pair
Symbol* atype = ss.as_symbol(); ss.skip_array_prefix(1); // skip one '['
const char* at = atype->as_C_string(); assert(ss.is_primitive(), "primitive type expected");
if (strlen(at) == 2) { in_elem_bt[o] = ss.type();
assert(at[0] == '[', "must be");
switch (at[1]) {
case 'B': in_elem_bt[o] = T_BYTE; break;
case 'C': in_elem_bt[o] = T_CHAR; break;
case 'D': in_elem_bt[o] = T_DOUBLE; break;
case 'F': in_elem_bt[o] = T_FLOAT; break;
case 'I': in_elem_bt[o] = T_INT; break;
case 'J': in_elem_bt[o] = T_LONG; break;
case 'S': in_elem_bt[o] = T_SHORT; break;
case 'Z': in_elem_bt[o] = T_BOOLEAN; break;
default: ShouldNotReachHere();
}
}
} else { } else {
in_elem_bt[o] = T_VOID; in_elem_bt[o] = T_VOID;
} }
if (in_sig_bt[i] != T_VOID) { if (in_sig_bt[i] != T_VOID) {
assert(in_sig_bt[i] == ss.type(), "must match"); assert(in_sig_bt[i] == ss.type() ||
in_sig_bt[i] == T_ARRAY, "must match");
ss.next(); ss.next();
} }
} }
Expand Down
24 changes: 6 additions & 18 deletions src/hotspot/cpu/s390/sharedRuntime_s390.cpp
@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2019, SAP SE. All rights reserved. * Copyright (c) 2016, 2019, SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
Expand Down Expand Up @@ -1626,27 +1626,15 @@ nmethod *SharedRuntime::generate_native_wrapper(MacroAssembler *masm,
for (int i = 0; i < total_in_args; i++, o++) { for (int i = 0; i < total_in_args; i++, o++) {
if (in_sig_bt[i] == T_ARRAY) { if (in_sig_bt[i] == T_ARRAY) {
// Arrays are passed as tuples (int, elem*). // Arrays are passed as tuples (int, elem*).
Symbol* atype = ss.as_symbol(); ss.skip_array_prefix(1); // skip one '['
const char* at = atype->as_C_string(); assert(ss.is_primitive(), "primitive type expected");
if (strlen(at) == 2) { in_elem_bt[o] = ss.type();
assert(at[0] == '[', "must be");
switch (at[1]) {
case 'B': in_elem_bt[o] = T_BYTE; break;
case 'C': in_elem_bt[o] = T_CHAR; break;
case 'D': in_elem_bt[o] = T_DOUBLE; break;
case 'F': in_elem_bt[o] = T_FLOAT; break;
case 'I': in_elem_bt[o] = T_INT; break;
case 'J': in_elem_bt[o] = T_LONG; break;
case 'S': in_elem_bt[o] = T_SHORT; break;
case 'Z': in_elem_bt[o] = T_BOOLEAN; break;
default: ShouldNotReachHere();
}
}
} else { } else {
in_elem_bt[o] = T_VOID; in_elem_bt[o] = T_VOID;
} }
if (in_sig_bt[i] != T_VOID) { if (in_sig_bt[i] != T_VOID) {
assert(in_sig_bt[i] == ss.type(), "must match"); assert(in_sig_bt[i] == ss.type() ||
in_sig_bt[i] == T_ARRAY, "must match");
ss.next(); ss.next();
} }
} }
Expand Down
24 changes: 6 additions & 18 deletions src/hotspot/cpu/sparc/sharedRuntime_sparc.cpp
@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -1907,28 +1907,16 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm,
// Arrays are passed as int, elem* pair // Arrays are passed as int, elem* pair
out_sig_bt[argc++] = T_INT; out_sig_bt[argc++] = T_INT;
out_sig_bt[argc++] = T_ADDRESS; out_sig_bt[argc++] = T_ADDRESS;
Symbol* atype = ss.as_symbol(); ss.skip_array_prefix(1); // skip one '['
const char* at = atype->as_C_string(); assert(ss.is_primitive(), "primitive type expected");
if (strlen(at) == 2) { in_elem_bt[i] = ss.type();
assert(at[0] == '[', "must be");
switch (at[1]) {
case 'B': in_elem_bt[i] = T_BYTE; break;
case 'C': in_elem_bt[i] = T_CHAR; break;
case 'D': in_elem_bt[i] = T_DOUBLE; break;
case 'F': in_elem_bt[i] = T_FLOAT; break;
case 'I': in_elem_bt[i] = T_INT; break;
case 'J': in_elem_bt[i] = T_LONG; break;
case 'S': in_elem_bt[i] = T_SHORT; break;
case 'Z': in_elem_bt[i] = T_BOOLEAN; break;
default: ShouldNotReachHere();
}
}
} else { } else {
out_sig_bt[argc++] = in_sig_bt[i]; out_sig_bt[argc++] = in_sig_bt[i];
in_elem_bt[i] = T_VOID; in_elem_bt[i] = T_VOID;
} }
if (in_sig_bt[i] != T_VOID) { if (in_sig_bt[i] != T_VOID) {
assert(in_sig_bt[i] == ss.type(), "must match"); assert(in_sig_bt[i] == ss.type() ||
in_sig_bt[i] == T_ARRAY, "must match");
ss.next(); ss.next();
} }
} }
Expand Down
24 changes: 6 additions & 18 deletions src/hotspot/cpu/x86/sharedRuntime_x86_32.cpp
@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -1697,28 +1697,16 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm,
// Arrays are passed as int, elem* pair // Arrays are passed as int, elem* pair
out_sig_bt[argc++] = T_INT; out_sig_bt[argc++] = T_INT;
out_sig_bt[argc++] = T_ADDRESS; out_sig_bt[argc++] = T_ADDRESS;
Symbol* atype = ss.as_symbol(); ss.skip_array_prefix(1); // skip one '['
const char* at = atype->as_C_string(); assert(ss.is_primitive(), "primitive type expected");
if (strlen(at) == 2) { in_elem_bt[i] = ss.type();
assert(at[0] == '[', "must be");
switch (at[1]) {
case 'B': in_elem_bt[i] = T_BYTE; break;
case 'C': in_elem_bt[i] = T_CHAR; break;
case 'D': in_elem_bt[i] = T_DOUBLE; break;
case 'F': in_elem_bt[i] = T_FLOAT; break;
case 'I': in_elem_bt[i] = T_INT; break;
case 'J': in_elem_bt[i] = T_LONG; break;
case 'S': in_elem_bt[i] = T_SHORT; break;
case 'Z': in_elem_bt[i] = T_BOOLEAN; break;
default: ShouldNotReachHere();
}
}
} else { } else {
out_sig_bt[argc++] = in_sig_bt[i]; out_sig_bt[argc++] = in_sig_bt[i];
in_elem_bt[i] = T_VOID; in_elem_bt[i] = T_VOID;
} }
if (in_sig_bt[i] != T_VOID) { if (in_sig_bt[i] != T_VOID) {
assert(in_sig_bt[i] == ss.type(), "must match"); assert(in_sig_bt[i] == ss.type() ||
in_sig_bt[i] == T_ARRAY, "must match");
ss.next(); ss.next();
} }
} }
Expand Down
24 changes: 6 additions & 18 deletions src/hotspot/cpu/x86/sharedRuntime_x86_64.cpp
@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -2002,28 +2002,16 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm,
// Arrays are passed as int, elem* pair // Arrays are passed as int, elem* pair
out_sig_bt[argc++] = T_INT; out_sig_bt[argc++] = T_INT;
out_sig_bt[argc++] = T_ADDRESS; out_sig_bt[argc++] = T_ADDRESS;
Symbol* atype = ss.as_symbol(); ss.skip_array_prefix(1); // skip one '['
const char* at = atype->as_C_string(); assert(ss.is_primitive(), "primitive type expected");
if (strlen(at) == 2) { in_elem_bt[i] = ss.type();
assert(at[0] == '[', "must be");
switch (at[1]) {
case 'B': in_elem_bt[i] = T_BYTE; break;
case 'C': in_elem_bt[i] = T_CHAR; break;
case 'D': in_elem_bt[i] = T_DOUBLE; break;
case 'F': in_elem_bt[i] = T_FLOAT; break;
case 'I': in_elem_bt[i] = T_INT; break;
case 'J': in_elem_bt[i] = T_LONG; break;
case 'S': in_elem_bt[i] = T_SHORT; break;
case 'Z': in_elem_bt[i] = T_BOOLEAN; break;
default: ShouldNotReachHere();
}
}
} else { } else {
out_sig_bt[argc++] = in_sig_bt[i]; out_sig_bt[argc++] = in_sig_bt[i];
in_elem_bt[i] = T_VOID; in_elem_bt[i] = T_VOID;
} }
if (in_sig_bt[i] != T_VOID) { if (in_sig_bt[i] != T_VOID) {
assert(in_sig_bt[i] == ss.type(), "must match"); assert(in_sig_bt[i] == ss.type() ||
in_sig_bt[i] == T_ARRAY, "must match");
ss.next(); ss.next();
} }
} }
Expand Down
16 changes: 8 additions & 8 deletions src/hotspot/share/c1/c1_ValueMap.cpp
@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1999, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -265,8 +265,8 @@ class ShortLoopOptimizer : public ValueNumberingVisitor {
GlobalValueNumbering* _gvn; GlobalValueNumbering* _gvn;
BlockList _loop_blocks; BlockList _loop_blocks;
bool _too_complicated_loop; bool _too_complicated_loop;
bool _has_field_store[T_ARRAY + 1]; bool _has_field_store[T_VOID];
bool _has_indexed_store[T_ARRAY + 1]; bool _has_indexed_store[T_VOID];


// simplified access to methods of GlobalValueNumbering // simplified access to methods of GlobalValueNumbering
ValueMap* current_map() { return _gvn->current_map(); } ValueMap* current_map() { return _gvn->current_map(); }
Expand All @@ -276,12 +276,12 @@ class ShortLoopOptimizer : public ValueNumberingVisitor {
void kill_memory() { _too_complicated_loop = true; } void kill_memory() { _too_complicated_loop = true; }
void kill_field(ciField* field, bool all_offsets) { void kill_field(ciField* field, bool all_offsets) {
current_map()->kill_field(field, all_offsets); current_map()->kill_field(field, all_offsets);
assert(field->type()->basic_type() >= 0 && field->type()->basic_type() <= T_ARRAY, "Invalid type"); assert(field->type()->basic_type() >= 0 && field->type()->basic_type() < T_VOID, "Invalid type");
_has_field_store[field->type()->basic_type()] = true; _has_field_store[field->type()->basic_type()] = true;
} }
void kill_array(ValueType* type) { void kill_array(ValueType* type) {
current_map()->kill_array(type); current_map()->kill_array(type);
BasicType basic_type = as_BasicType(type); assert(basic_type >= 0 && basic_type <= T_ARRAY, "Invalid type"); BasicType basic_type = as_BasicType(type); assert(basic_type >= 0 && basic_type < T_VOID, "Invalid type");
_has_indexed_store[basic_type] = true; _has_indexed_store[basic_type] = true;
} }


Expand All @@ -291,19 +291,19 @@ class ShortLoopOptimizer : public ValueNumberingVisitor {
, _loop_blocks(ValueMapMaxLoopSize) , _loop_blocks(ValueMapMaxLoopSize)
, _too_complicated_loop(false) , _too_complicated_loop(false)
{ {
for (int i=0; i<= T_ARRAY; i++){ for (int i = 0; i < T_VOID; i++) {
_has_field_store[i] = false; _has_field_store[i] = false;
_has_indexed_store[i] = false; _has_indexed_store[i] = false;
} }
} }


bool has_field_store(BasicType type) { bool has_field_store(BasicType type) {
assert(type >= 0 && type <= T_ARRAY, "Invalid type"); assert(type >= 0 && type < T_VOID, "Invalid type");
return _has_field_store[type]; return _has_field_store[type];
} }


bool has_indexed_store(BasicType type) { bool has_indexed_store(BasicType type) {
assert(type >= 0 && type <= T_ARRAY, "Invalid type"); assert(type >= 0 && type < T_VOID, "Invalid type");
return _has_indexed_store[type]; return _has_indexed_store[type];
} }


Expand Down
19 changes: 9 additions & 10 deletions src/hotspot/share/ci/ciEnv.cpp
Expand Up @@ -413,12 +413,10 @@ ciKlass* ciEnv::get_klass_by_name_impl(ciKlass* accessing_klass,


// Now we need to check the SystemDictionary // Now we need to check the SystemDictionary
Symbol* sym = name->get_symbol(); Symbol* sym = name->get_symbol();
if (sym->char_at(0) == JVM_SIGNATURE_CLASS && if (Signature::has_envelope(sym)) {
sym->char_at(sym->utf8_length()-1) == JVM_SIGNATURE_ENDCLASS) {
// This is a name from a signature. Strip off the trimmings. // This is a name from a signature. Strip off the trimmings.
// Call recursive to keep scope of strippedsym. // Call recursive to keep scope of strippedsym.
TempNewSymbol strippedsym = SymbolTable::new_symbol(sym->as_utf8()+1, TempNewSymbol strippedsym = Signature::strip_envelope(sym);
sym->utf8_length()-2);
ciSymbol* strippedname = get_symbol(strippedsym); ciSymbol* strippedname = get_symbol(strippedsym);
return get_klass_by_name_impl(accessing_klass, cpool, strippedname, require_local); return get_klass_by_name_impl(accessing_klass, cpool, strippedname, require_local);
} }
Expand Down Expand Up @@ -466,18 +464,17 @@ ciKlass* ciEnv::get_klass_by_name_impl(ciKlass* accessing_klass,
// we must build an array type around it. The CI requires array klasses // we must build an array type around it. The CI requires array klasses
// to be loaded if their element klasses are loaded, except when memory // to be loaded if their element klasses are loaded, except when memory
// is exhausted. // is exhausted.
if (sym->char_at(0) == JVM_SIGNATURE_ARRAY && if (Signature::is_array(sym) &&
(sym->char_at(1) == JVM_SIGNATURE_ARRAY || sym->char_at(1) == JVM_SIGNATURE_CLASS)) { (sym->char_at(1) == JVM_SIGNATURE_ARRAY || sym->char_at(1) == JVM_SIGNATURE_CLASS)) {
// We have an unloaded array. // We have an unloaded array.
// Build it on the fly if the element class exists. // Build it on the fly if the element class exists.
TempNewSymbol elem_sym = SymbolTable::new_symbol(sym->as_utf8()+1, SignatureStream ss(sym, false);
sym->utf8_length()-1); ss.skip_array_prefix(1);

// Get element ciKlass recursively. // Get element ciKlass recursively.
ciKlass* elem_klass = ciKlass* elem_klass =
get_klass_by_name_impl(accessing_klass, get_klass_by_name_impl(accessing_klass,
cpool, cpool,
get_symbol(elem_sym), get_symbol(ss.as_symbol()),
require_local); require_local);
if (elem_klass != NULL && elem_klass->is_loaded()) { if (elem_klass != NULL && elem_klass->is_loaded()) {
// Now make an array for it // Now make an array for it
Expand Down Expand Up @@ -609,7 +606,7 @@ ciConstant ciEnv::get_constant_by_index_impl(const constantPoolHandle& cpool,
} }
BasicType bt = T_OBJECT; BasicType bt = T_OBJECT;
if (cpool->tag_at(index).is_dynamic_constant()) if (cpool->tag_at(index).is_dynamic_constant())
bt = FieldType::basic_type(cpool->uncached_signature_ref_at(index)); bt = Signature::basic_type(cpool->uncached_signature_ref_at(index));
if (is_reference_type(bt)) { if (is_reference_type(bt)) {
} else { } else {
// we have to unbox the primitive value // we have to unbox the primitive value
Expand Down Expand Up @@ -791,6 +788,8 @@ Method* ciEnv::lookup_method(ciInstanceKlass* accessor,
ciMethod* ciEnv::get_method_by_index_impl(const constantPoolHandle& cpool, ciMethod* ciEnv::get_method_by_index_impl(const constantPoolHandle& cpool,
int index, Bytecodes::Code bc, int index, Bytecodes::Code bc,
ciInstanceKlass* accessor) { ciInstanceKlass* accessor) {
assert(cpool.not_null(), "need constant pool");
assert(accessor != NULL, "need origin of access");
if (bc == Bytecodes::_invokedynamic) { if (bc == Bytecodes::_invokedynamic) {
ConstantPoolCacheEntry* cpce = cpool->invokedynamic_cp_cache_entry_at(index); ConstantPoolCacheEntry* cpce = cpool->invokedynamic_cp_cache_entry_at(index);
bool is_resolved = !cpce->is_f1_null(); bool is_resolved = !cpce->is_f1_null();
Expand Down
4 changes: 2 additions & 2 deletions src/hotspot/share/ci/ciField.cpp
@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1999, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -86,7 +86,7 @@ ciField::ciField(ciInstanceKlass* klass, int index) :
Symbol* signature = cpool->symbol_at(sig_index); Symbol* signature = cpool->symbol_at(sig_index);
_signature = ciEnv::current(THREAD)->get_symbol(signature); _signature = ciEnv::current(THREAD)->get_symbol(signature);


BasicType field_type = FieldType::basic_type(signature); BasicType field_type = Signature::basic_type(signature);


// If the field is a pointer type, get the klass of the // If the field is a pointer type, get the klass of the
// field. // field.
Expand Down
3 changes: 2 additions & 1 deletion src/hotspot/share/ci/ciKlass.hpp
@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1999, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -44,6 +44,7 @@ class ciKlass : public ciType {
friend class ciMethod; friend class ciMethod;
friend class ciMethodData; friend class ciMethodData;
friend class ciObjArrayKlass; friend class ciObjArrayKlass;
friend class ciSignature;
friend class ciReceiverTypeData; friend class ciReceiverTypeData;


private: private:
Expand Down

0 comments on commit d19a396

Please sign in to comment.