mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 11:34:38 +02:00
6655646: dynamic languages need dynamically linked call sites
Invokedynamic instruction (JSR 292 RI) Reviewed-by: twisti, never
This commit is contained in:
parent
fd05c28901
commit
34c1d72421
65 changed files with 1457 additions and 264 deletions
|
@ -249,32 +249,41 @@ klassOop constantPoolOopDesc::klass_ref_at_if_loaded_check(constantPoolHandle th
|
|||
}
|
||||
|
||||
|
||||
symbolOop constantPoolOopDesc::uncached_name_ref_at(int which) {
|
||||
jint ref_index = name_and_type_at(uncached_name_and_type_ref_index_at(which));
|
||||
int name_index = extract_low_short_from_int(ref_index);
|
||||
symbolOop constantPoolOopDesc::impl_name_ref_at(int which, bool uncached) {
|
||||
int name_index = name_ref_index_at(impl_name_and_type_ref_index_at(which, uncached));
|
||||
return symbol_at(name_index);
|
||||
}
|
||||
|
||||
|
||||
symbolOop constantPoolOopDesc::uncached_signature_ref_at(int which) {
|
||||
jint ref_index = name_and_type_at(uncached_name_and_type_ref_index_at(which));
|
||||
int signature_index = extract_high_short_from_int(ref_index);
|
||||
symbolOop constantPoolOopDesc::impl_signature_ref_at(int which, bool uncached) {
|
||||
int signature_index = signature_ref_index_at(impl_name_and_type_ref_index_at(which, uncached));
|
||||
return symbol_at(signature_index);
|
||||
}
|
||||
|
||||
|
||||
int constantPoolOopDesc::uncached_name_and_type_ref_index_at(int which) {
|
||||
jint ref_index = field_or_method_at(which, true);
|
||||
int constantPoolOopDesc::impl_name_and_type_ref_index_at(int which, bool uncached) {
|
||||
jint ref_index = field_or_method_at(which, uncached);
|
||||
return extract_high_short_from_int(ref_index);
|
||||
}
|
||||
|
||||
|
||||
int constantPoolOopDesc::uncached_klass_ref_index_at(int which) {
|
||||
jint ref_index = field_or_method_at(which, true);
|
||||
int constantPoolOopDesc::impl_klass_ref_index_at(int which, bool uncached) {
|
||||
jint ref_index = field_or_method_at(which, uncached);
|
||||
return extract_low_short_from_int(ref_index);
|
||||
}
|
||||
|
||||
|
||||
|
||||
int constantPoolOopDesc::map_instruction_operand_to_index(int operand) {
|
||||
if (constantPoolCacheOopDesc::is_secondary_index(operand)) {
|
||||
return cache()->main_entry_at(operand)->constant_pool_index();
|
||||
}
|
||||
assert((int)(u2)operand == operand, "clean u2");
|
||||
int index = Bytes::swap_u2(operand);
|
||||
return cache()->entry_at(index)->constant_pool_index();
|
||||
}
|
||||
|
||||
|
||||
void constantPoolOopDesc::verify_constant_pool_resolve(constantPoolHandle this_oop, KlassHandle k, TRAPS) {
|
||||
if (k->oop_is_instance() || k->oop_is_objArray()) {
|
||||
instanceKlassHandle holder (THREAD, this_oop->pool_holder());
|
||||
|
@ -290,26 +299,14 @@ void constantPoolOopDesc::verify_constant_pool_resolve(constantPoolHandle this_o
|
|||
}
|
||||
|
||||
|
||||
int constantPoolOopDesc::klass_ref_index_at(int which) {
|
||||
jint ref_index = field_or_method_at(which, false);
|
||||
int constantPoolOopDesc::name_ref_index_at(int which_nt) {
|
||||
jint ref_index = name_and_type_at(which_nt);
|
||||
return extract_low_short_from_int(ref_index);
|
||||
}
|
||||
|
||||
|
||||
int constantPoolOopDesc::name_and_type_ref_index_at(int which) {
|
||||
jint ref_index = field_or_method_at(which, false);
|
||||
return extract_high_short_from_int(ref_index);
|
||||
}
|
||||
|
||||
|
||||
int constantPoolOopDesc::name_ref_index_at(int which) {
|
||||
jint ref_index = name_and_type_at(which);
|
||||
return extract_low_short_from_int(ref_index);
|
||||
}
|
||||
|
||||
|
||||
int constantPoolOopDesc::signature_ref_index_at(int which) {
|
||||
jint ref_index = name_and_type_at(which);
|
||||
int constantPoolOopDesc::signature_ref_index_at(int which_nt) {
|
||||
jint ref_index = name_and_type_at(which_nt);
|
||||
return extract_high_short_from_int(ref_index);
|
||||
}
|
||||
|
||||
|
@ -353,20 +350,6 @@ char* constantPoolOopDesc::string_at_noresolve(int which) {
|
|||
}
|
||||
|
||||
|
||||
symbolOop constantPoolOopDesc::name_ref_at(int which) {
|
||||
jint ref_index = name_and_type_at(name_and_type_ref_index_at(which));
|
||||
int name_index = extract_low_short_from_int(ref_index);
|
||||
return symbol_at(name_index);
|
||||
}
|
||||
|
||||
|
||||
symbolOop constantPoolOopDesc::signature_ref_at(int which) {
|
||||
jint ref_index = name_and_type_at(name_and_type_ref_index_at(which));
|
||||
int signature_index = extract_high_short_from_int(ref_index);
|
||||
return symbol_at(signature_index);
|
||||
}
|
||||
|
||||
|
||||
BasicType constantPoolOopDesc::basic_type_for_signature_at(int which) {
|
||||
return FieldType::basic_type(symbol_at(which));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue