< prev index next > src/hotspot/share/oops/constantPool.hpp
Print this page
/*
! * Copyright (c) 1997, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
/*
! * Copyright (c) 1997, 2026, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
const intStack& reference_map,
int constant_pool_map_length,
TRAPS);
// resolved strings, methodHandles and callsite objects from the constant pool
! objArrayOop resolved_references() const;
! objArrayOop resolved_references_or_null() const;
oop resolved_reference_at(int obj_index) const;
oop set_resolved_reference_at(int index, oop new_value);
// mapping resolved object array indexes to cp indexes and back.
int object_to_cp_index(int index) { return reference_map()->at(index); }
const intStack& reference_map,
int constant_pool_map_length,
TRAPS);
// resolved strings, methodHandles and callsite objects from the constant pool
! refArrayOop resolved_references() const;
! refArrayOop resolved_references_or_null() const;
oop resolved_reference_at(int obj_index) const;
oop set_resolved_reference_at(int index, oop new_value);
// mapping resolved object array indexes to cp indexes and back.
int object_to_cp_index(int index) { return reference_map()->at(index); }
static ByteSize pool_holder_offset() { return byte_offset_of(ConstantPool, _pool_holder); }
static ByteSize resolved_klasses_offset() { return byte_offset_of(ConstantPool, _resolved_klasses); }
// Storing constants
! // For temporary use while constructing constant pool
void klass_index_at_put(int cp_index, int name_index) {
tag_at_put(cp_index, JVM_CONSTANT_ClassIndex);
*int_at_addr(cp_index) = name_index;
}
static ByteSize pool_holder_offset() { return byte_offset_of(ConstantPool, _pool_holder); }
static ByteSize resolved_klasses_offset() { return byte_offset_of(ConstantPool, _resolved_klasses); }
// Storing constants
! // For temporary use while constructing constant pool. Used during a retransform/class redefinition as well.
void klass_index_at_put(int cp_index, int name_index) {
tag_at_put(cp_index, JVM_CONSTANT_ClassIndex);
*int_at_addr(cp_index) = name_index;
}
resolve_string_constants_impl(h_this, CHECK);
}
#if INCLUDE_CDS
// CDS support
! objArrayOop prepare_resolved_references_for_archiving() NOT_CDS_JAVA_HEAP_RETURN_(nullptr);
void remove_unshareable_info();
void restore_unshareable_info(TRAPS);
private:
void remove_unshareable_entries();
void remove_resolved_klass_if_non_deterministic(int cp_index);
resolve_string_constants_impl(h_this, CHECK);
}
#if INCLUDE_CDS
// CDS support
! refArrayOop prepare_resolved_references_for_archiving() NOT_CDS_JAVA_HEAP_RETURN_(nullptr);
void remove_unshareable_info();
void restore_unshareable_info(TRAPS);
private:
void remove_unshareable_entries();
void remove_resolved_klass_if_non_deterministic(int cp_index);
return resolve_constant_at_impl(h_this, cp_index, _possible_index_sentinel, &found_it, THREAD);
}
void copy_bootstrap_arguments_at(int cp_index,
int start_arg, int end_arg,
! objArrayHandle info, int pos,
bool must_resolve, Handle if_not_available, TRAPS) {
constantPoolHandle h_this(THREAD, this);
copy_bootstrap_arguments_at_impl(h_this, cp_index, start_arg, end_arg,
info, pos, must_resolve, if_not_available, THREAD);
}
return resolve_constant_at_impl(h_this, cp_index, _possible_index_sentinel, &found_it, THREAD);
}
void copy_bootstrap_arguments_at(int cp_index,
int start_arg, int end_arg,
! refArrayHandle info, int pos,
bool must_resolve, Handle if_not_available, TRAPS) {
constantPoolHandle h_this(THREAD, this);
copy_bootstrap_arguments_at_impl(h_this, cp_index, start_arg, end_arg,
info, pos, must_resolve, if_not_available, THREAD);
}
static oop resolve_constant_at_impl(const constantPoolHandle& this_cp, int cp_index, int cache_index,
bool* status_return, TRAPS);
static void copy_bootstrap_arguments_at_impl(const constantPoolHandle& this_cp, int cp_index,
int start_arg, int end_arg,
! objArrayHandle info, int pos,
bool must_resolve, Handle if_not_available, TRAPS);
// Exception handling
static void save_and_throw_exception(const constantPoolHandle& this_cp, int cp_index, constantTag tag, TRAPS);
static oop resolve_constant_at_impl(const constantPoolHandle& this_cp, int cp_index, int cache_index,
bool* status_return, TRAPS);
static void copy_bootstrap_arguments_at_impl(const constantPoolHandle& this_cp, int cp_index,
int start_arg, int end_arg,
! refArrayHandle info, int pos,
bool must_resolve, Handle if_not_available, TRAPS);
// Exception handling
static void save_and_throw_exception(const constantPoolHandle& this_cp, int cp_index, constantTag tag, TRAPS);
< prev index next >