Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8249257 Rename ValueKlass to InlineKlass #109

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -108,7 +108,7 @@ class MacroAssembler: public Assembler {
// Get the default value oop for the given InlineKlass
void get_default_value_oop(Register value_klass, Register temp_reg, Register obj);
// The empty value oop, for the given InlineKlass ("empty" as in no instance fields)
// get_default_value_oop with extra assertion for empty value klass
// get_default_value_oop with extra assertion for empty inline klass
void get_empty_value_oop(Register value_klass, Register temp_reg, Register obj);

void test_field_is_inline_type(Register flags, Register temp_reg, Label& is_inline);
@@ -39,7 +39,6 @@
#include "oops/oop.inline.hpp"
#include "oops/typeArrayKlass.hpp"
#include "oops/typeArrayOop.inline.hpp"
#include "oops/inlineKlass.hpp"
#include "oops/valueArrayKlass.hpp"
#include "oops/valueArrayOop.inline.hpp"
#include "oops/valueArrayOop.hpp"
@@ -186,9 +186,8 @@ class InlineKlass: public InstanceKlass {
// Casting from Klass*
static InlineKlass* cast(Klass* k);

// Use this to return the size of an instance in heap words
// Implementation is currently simple because all inline types are allocated
// in Java heap like Java objects.
// Use this to return the size of an instance in heap words.
// Note that this size only applies to heap allocated stand-alone instances.
virtual int size_helper() const {
return layout_helper_to_size_helper(layout_helper());
}
@@ -3248,7 +3248,7 @@ void ConnectionGraph::split_unique_types(GrowableArray<Node *> &alloc_worklist,
intptr_t ptr = igvn->type(klass)->isa_rawptr()->get_con();
clear_nth_bit(ptr, 0);
assert(Metaspace::contains((void*)ptr), "should be klass");
assert(((InlineKlass*)ptr)->contains_oops(), "returned value type must contain a reference field");
assert(((InlineKlass*)ptr)->contains_oops(), "returned inline type must contain a reference field");
} else {
uint op = use->Opcode();
if ((op == Op_StrCompressedCopy || op == Op_StrInflatedCopy) &&
@@ -1391,13 +1391,13 @@ static int reassign_fields_by_klass(InstanceKlass* klass, frame* fr, RegisterMap
return svIndex;
}

// restore fields of an eliminated value type array
// restore fields of an eliminated inline type array
void Deoptimization::reassign_value_array_elements(frame* fr, RegisterMap* reg_map, ObjectValue* sv, valueArrayOop obj, ValueArrayKlass* vak, TRAPS) {
InlineKlass* vk = vak->element_klass();
assert(vk->flatten_array(), "should only be used for flattened value type arrays");
assert(vk->flatten_array(), "should only be used for flattened inline type arrays");
// Adjust offset to omit oop header
int base_offset = arrayOopDesc::base_offset_in_bytes(T_INLINE_TYPE) - InlineKlass::cast(vk)->first_field_offset();
// Initialize all elements of the flattened value type array
// Initialize all elements of the flattened inline type array
for (int i = 0; i < sv->field_size(); i++) {
ScopeValue* val = sv->field_at(i);
int offset = base_offset + (i << Klass::layout_helper_log2_element_size(vak->layout_helper()));
@@ -2833,7 +2833,7 @@ CodeOffsets::Entries CompiledEntrySignature::c1_value_ro_entry_type() const {


void CompiledEntrySignature::compute_calling_conventions() {
// Get the (non-scalarized) signature and check for value type arguments
// Get the (non-scalarized) signature and check for inline type arguments
if (!_method->is_static()) {
if (_method->method_holder()->is_inline_klass() && InlineKlass::cast(_method->method_holder())->can_be_passed_as_fields()) {
_has_value_recv = true;
@@ -2914,7 +2914,7 @@ void CompiledEntrySignature::compute_calling_conventions() {
// bailing out of compilation ("unsupported incoming calling sequence").
// TODO we need a reasonable limit (flag?) here
if (_args_on_stack_cc > 50) {
// Don't scalarize value type arguments
// Don't scalarize inline type arguments
_sig_cc = _sig;
_sig_cc_ro = _sig;
_regs_cc = _regs;
@@ -2967,7 +2967,7 @@ AdapterHandlerEntry* AdapterHandlerLibrary::get_adapter0(const methodHandle& met

if (method->is_abstract()) {
if (ces.has_scalarized_args()) {
// Save a C heap allocated version of the signature for abstract methods with scalarized value type arguments
// Save a C heap allocated version of the signature for abstract methods with scalarized inline type arguments
address wrong_method_abstract = SharedRuntime::get_handle_wrong_method_abstract_stub();
entry = AdapterHandlerLibrary::new_entry(new AdapterFingerPrint(NULL),
StubRoutines::throw_AbstractMethodError_entry(),
@@ -3589,7 +3589,7 @@ void SharedRuntime::on_slowpath_allocation_exit(JavaThread* thread) {
}

// We are at a compiled code to interpreter call. We need backing
// buffers for all value type arguments. Allocate an object array to
// buffers for all inline type arguments. Allocate an object array to
// hold them (convenient because once we're done with it we don't have
// to worry about freeing it).
oop SharedRuntime::allocate_value_types_impl(JavaThread* thread, methodHandle callee, bool allocate_receiver, TRAPS) {
@@ -3636,7 +3636,7 @@ JRT_END

// TODO remove this once the AARCH64 dependency is gone
// Iterate over the array of heap allocated value types and apply the GC post barrier to all reference fields.
// This is called from the C2I adapter after value type arguments are heap allocated and initialized.
// This is called from the C2I adapter after inline type arguments are heap allocated and initialized.
JRT_LEAF(void, SharedRuntime::apply_post_barriers(JavaThread* thread, objArrayOopDesc* array))
{
assert(InlineTypePassFieldsAsArgs, "no reason to call this");
@@ -572,7 +572,7 @@ class SigEntryFilter;
typedef GrowableArrayFilterIterator<SigEntry, SigEntryFilter> ExtendedSignature;

// Used for adapter generation. One SigEntry is used per element of
// the signature of the method. Value type arguments are treated
// the signature of the method. Inline type arguments are treated
// specially. See comment for InlineKlass::collect_fields().
class SigEntry {
public: