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 all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -35,7 +35,7 @@
#include "oops/markWord.hpp"
#include "oops/method.hpp"
#include "oops/methodData.hpp"
#include "oops/valueKlass.hpp"
#include "oops/inlineKlass.hpp"
#include "prims/jvmtiExport.hpp"
#include "prims/jvmtiThreadState.hpp"
#include "runtime/basicLock.hpp"
@@ -700,8 +700,8 @@ void InterpreterMacroAssembler::remove_activation(
// Load fields from a buffered value with a value class specific handler

load_klass(rscratch1 /*dst*/, r0 /*src*/);
ldr(rscratch1, Address(rscratch1, InstanceKlass::adr_valueklass_fixed_block_offset()));
ldr(rscratch1, Address(rscratch1, ValueKlass::unpack_handler_offset()));
ldr(rscratch1, Address(rscratch1, InstanceKlass::adr_inlineklass_fixed_block_offset()));
ldr(rscratch1, Address(rscratch1, InlineKlass::unpack_handler_offset()));
cbz(rscratch1, skip);

blr(rscratch1);
@@ -5281,12 +5281,12 @@ int MacroAssembler::store_value_type_fields_to_buf(ciValueKlass* vk, bool from_i

if (vk != NULL) {
// Called from C1, where the return type is statically known.
mov(r1, (intptr_t)vk->get_ValueKlass());
mov(r1, (intptr_t)vk->get_InlineKlass());
jint lh = vk->layout_helper();
assert(lh != Klass::_lh_neutral_value, "inline class in return type must have been resolved");
mov(r14, lh);
} else {
// Call from interpreter. R0 contains ((the ValueKlass* of the return type) | 0x01)
// Call from interpreter. R0 contains ((the InlineKlass* of the return type) | 0x01)
andr(r1, r0, -2);
// get obj size
ldrw(r14, Address(rscratch1 /*klass*/, Klass::layout_helper_offset()));
@@ -5326,8 +5326,8 @@ int MacroAssembler::store_value_type_fields_to_buf(ciValueKlass* vk, bool from_i

// We have our new buffered value, initialize its fields with a
// value class specific handler
ldr(r1, Address(r0, InstanceKlass::adr_valueklass_fixed_block_offset()));
ldr(r1, Address(r1, ValueKlass::pack_handler_offset()));
ldr(r1, Address(r0, InstanceKlass::adr_inlineklass_fixed_block_offset()));
ldr(r1, Address(r1, InlineKlass::pack_handler_offset()));

// Mov new class to r0 and call pack_handler
mov(r0, r13);
@@ -3324,7 +3324,7 @@ void OptoRuntime::generate_exception_blob() {
_exception_blob = ExceptionBlob::create(&buffer, oop_maps, SimpleRuntimeFrame::framesize >> 1);
}

BufferedValueTypeBlob* SharedRuntime::generate_buffered_value_type_adapter(const ValueKlass* vk) {
BufferedValueTypeBlob* SharedRuntime::generate_buffered_inline_type_adapter(const InlineKlass* vk) {
BufferBlob* buf = BufferBlob::create("value types pack/unpack", 16 * K);
CodeBuffer buffer(buf);
short buffer_locs[20];
@@ -375,8 +375,8 @@ class StubGenerator: public StubCodeGenerator {
// Initialize pre-allocated buffer
__ mov(r1, r0);
__ andr(r1, r1, -2);
__ ldr(r1, Address(r1, InstanceKlass::adr_valueklass_fixed_block_offset()));
__ ldr(r1, Address(r1, ValueKlass::pack_handler_offset()));
__ ldr(r1, Address(r1, InstanceKlass::adr_inlineklass_fixed_block_offset()));
__ ldr(r1, Address(r1, InlineKlass::pack_handler_offset()));
__ ldr(r0, Address(j_rarg2, 0));
__ blr(r1);
__ b(exit);
@@ -38,7 +38,7 @@
#include "oops/methodData.hpp"
#include "oops/method.hpp"
#include "oops/oop.inline.hpp"
#include "oops/valueKlass.hpp"
#include "oops/inlineKlass.hpp"
#include "prims/jvmtiExport.hpp"
#include "prims/jvmtiThreadState.hpp"
#include "runtime/arguments.hpp"
@@ -31,7 +31,7 @@
#include "oops/markWord.hpp"
#include "oops/methodData.hpp"
#include "oops/method.hpp"
#include "oops/valueKlass.hpp"
#include "oops/inlineKlass.hpp"
#include "prims/jvmtiExport.hpp"
#include "prims/jvmtiThreadState.hpp"
#include "runtime/basicLock.hpp"
@@ -1170,8 +1170,8 @@ void InterpreterMacroAssembler::remove_activation(
// Load fields from a buffered value with a value class specific handler
Register tmp_load_klass = LP64_ONLY(rscratch1) NOT_LP64(noreg);
load_klass(rdi, rax, tmp_load_klass);
movptr(rdi, Address(rdi, InstanceKlass::adr_valueklass_fixed_block_offset()));
movptr(rdi, Address(rdi, ValueKlass::unpack_handler_offset()));
movptr(rdi, Address(rdi, InstanceKlass::adr_inlineklass_fixed_block_offset()));
movptr(rdi, Address(rdi, InlineKlass::unpack_handler_offset()));

testptr(rdi, rdi);
jcc(Assembler::equal, skip);
@@ -3640,8 +3640,8 @@ void MacroAssembler::get_default_value_oop(Register value_klass, Register temp_r
#endif
Register offset = temp_reg;
// Getting the offset of the pre-allocated default value
movptr(offset, Address(value_klass, in_bytes(InstanceKlass::adr_valueklass_fixed_block_offset())));
movl(offset, Address(offset, in_bytes(ValueKlass::default_value_offset_offset())));
movptr(offset, Address(value_klass, in_bytes(InstanceKlass::adr_inlineklass_fixed_block_offset())));
movl(offset, Address(offset, in_bytes(InlineKlass::default_value_offset_offset())));

// Getting the mirror
movptr(obj, Address(value_klass, in_bytes(Klass::java_mirror_offset())));
@@ -4683,8 +4683,8 @@ void MacroAssembler::access_value_copy(DecoratorSet decorators, Register src, Re
}

void MacroAssembler::first_field_offset(Register value_klass, Register offset) {
movptr(offset, Address(value_klass, InstanceKlass::adr_valueklass_fixed_block_offset()));
movl(offset, Address(offset, ValueKlass::first_field_offset_offset()));
movptr(offset, Address(value_klass, InstanceKlass::adr_inlineklass_fixed_block_offset()));
movl(offset, Address(offset, InlineKlass::first_field_offset_offset()));
}

void MacroAssembler::data_for_oop(Register oop, Register data, Register value_klass) {
@@ -5228,7 +5228,7 @@ int MacroAssembler::store_value_type_fields_to_buf(ciValueKlass* vk, bool from_i
assert(lh != Klass::_lh_neutral_value, "inline class in return type must have been resolved");
movl(r14, lh);
} else {
// Call from interpreter. RAX contains ((the ValueKlass* of the return type) | 0x01)
// Call from interpreter. RAX contains ((the InlineKlass* of the return type) | 0x01)
mov(rbx, rax);
andptr(rbx, -2);
movl(r14, Address(rbx, Klass::layout_helper_offset()));
@@ -5258,8 +5258,8 @@ int MacroAssembler::store_value_type_fields_to_buf(ciValueKlass* vk, bool from_i
mov(rax, r13);
call(RuntimeAddress(vk->pack_handler())); // no need for call info as this will not safepoint.
} else {
movptr(rbx, Address(rax, InstanceKlass::adr_valueklass_fixed_block_offset()));
movptr(rbx, Address(rbx, ValueKlass::pack_handler_offset()));
movptr(rbx, Address(rax, InstanceKlass::adr_inlineklass_fixed_block_offset()));
movptr(rbx, Address(rbx, InlineKlass::pack_handler_offset()));
mov(rax, r13);
call(rbx);
}
@@ -105,10 +105,10 @@ class MacroAssembler: public Assembler {
void test_klass_is_value(Register klass, Register temp_reg, Label& is_value);
void test_klass_is_empty_value(Register klass, Register temp_reg, Label& is_empty_value);

// Get the default value oop for the given ValueKlass
// 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 ValueKlass ("empty" as in no instance fields)
// get_default_value_oop with extra assertion for empty value klass
// The empty value oop, for the given InlineKlass ("empty" as in no instance fields)
// 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);
@@ -3325,7 +3325,7 @@ RuntimeStub* SharedRuntime::generate_resolve_blob(address destination, const cha
return RuntimeStub::new_runtime_stub(name, &buffer, frame_complete, frame_size_words, oop_maps, true);
}

BufferedValueTypeBlob* SharedRuntime::generate_buffered_value_type_adapter(const ValueKlass* vk) {
BufferedValueTypeBlob* SharedRuntime::generate_buffered_inline_type_adapter(const InlineKlass* vk) {
Unimplemented();
return NULL;
}
@@ -4323,7 +4323,7 @@ void OptoRuntime::generate_exception_blob() {
}
#endif // COMPILER2

BufferedValueTypeBlob* SharedRuntime::generate_buffered_value_type_adapter(const ValueKlass* vk) {
BufferedValueTypeBlob* SharedRuntime::generate_buffered_inline_type_adapter(const InlineKlass* vk) {
BufferBlob* buf = BufferBlob::create("value types pack/unpack", 16 * K);
CodeBuffer buffer(buf);
short buffer_locs[20];
@@ -421,8 +421,8 @@ class StubGenerator: public StubCodeGenerator {
__ jcc(Assembler::zero, is_long);
// Load pack handler address
__ andptr(rax, -2);
__ movptr(rax, Address(rax, InstanceKlass::adr_valueklass_fixed_block_offset()));
__ movptr(rbx, Address(rax, ValueKlass::pack_handler_jobject_offset()));
__ movptr(rax, Address(rax, InstanceKlass::adr_inlineklass_fixed_block_offset()));
__ movptr(rbx, Address(rax, InlineKlass::pack_handler_jobject_offset()));
// Call pack handler to initialize the buffer
__ call(rbx);
__ jmp(exit);
@@ -36,7 +36,7 @@
#include "oops/methodData.hpp"
#include "oops/method.hpp"
#include "oops/oop.inline.hpp"
#include "oops/valueKlass.hpp"
#include "oops/inlineKlass.hpp"
#include "prims/jvmtiExport.hpp"
#include "prims/jvmtiThreadState.hpp"
#include "runtime/arguments.hpp"
@@ -33,7 +33,7 @@
#include "oops/methodData.hpp"
#include "oops/objArrayKlass.hpp"
#include "oops/oop.inline.hpp"
#include "oops/valueKlass.hpp"
#include "oops/inlineKlass.hpp"
#include "prims/methodHandles.hpp"
#include "runtime/frame.inline.hpp"
#include "runtime/safepointMechanism.hpp"
@@ -4421,7 +4421,7 @@ void TemplateTable::defaultvalue() {
__ cmpb(Address(rcx, InstanceKlass::init_state_offset()), InstanceKlass::fully_initialized);
__ jcc(Assembler::notEqual, slow_case);

// have a resolved ValueKlass in rcx, return the default value oop from it
// have a resolved InlineKlass in rcx, return the default value oop from it
__ get_default_value_oop(rcx, rdx, rax);
__ jmp(done);

@@ -27,7 +27,7 @@
#include "asm/assembler.hpp"
#include "asm/assembler.inline.hpp"
#include "asm/macroAssembler.hpp"
#include "oops/valueKlass.inline.hpp"
#include "oops/inlineKlass.inline.hpp"
#include "runtime/signature_cc.hpp"
#include "runtime/sharedRuntime.hpp"
#ifdef COMPILER2
@@ -148,7 +148,7 @@ int MacroAssembler::unpack_value_args_common(Compile* C, bool receiver_only) {
} else {
// Only unpack the receiver, all other arguments are already scalarized
InstanceKlass* holder = method->method_holder();
int rec_len = holder->is_inline_klass() ? ValueKlass::cast(holder)->extended_sig()->length() : 1;
int rec_len = holder->is_inline_klass() ? InlineKlass::cast(holder)->extended_sig()->length() : 1;
// Copy scalarized signature but skip receiver, value type delimiters and reserved entries
for (int i = 0; i < sig_cc->length(); i++) {
if (!SigEntry::is_reserved_entry(sig_cc, i)) {
@@ -34,7 +34,7 @@
#include "memory/resourceArea.hpp"
#include "oops/oop.inline.hpp"
#include "oops/fieldStreams.inline.hpp"
#include "oops/valueKlass.inline.hpp"
#include "oops/inlineKlass.inline.hpp"
#include "runtime/fieldDescriptor.inline.hpp"
#include "runtime/handles.inline.hpp"
#include "runtime/jniHandles.inline.hpp"
@@ -551,7 +551,7 @@ GrowableArray<ciField*>* ciInstanceKlass::compute_nonstatic_fields_impl(Growable
if (fd.is_inlined() && flatten) {
// Value type fields are embedded
int field_offset = fd.offset();
// Get ValueKlass and adjust number of fields
// Get InlineKlass and adjust number of fields
Klass* k = get_instanceKlass()->get_inline_type_field_klass(fd.index());
ciValueKlass* vk = CURRENT_ENV->get_klass(k)->as_value_klass();
flen += vk->nof_nonstatic_fields() - 1;
@@ -821,7 +821,7 @@ void StaticFieldPrinter::do_field_helper(fieldDescriptor* fd, oop mirror, bool f
Klass* k = SystemDictionary::find(name, Handle(THREAD, holder->class_loader()),
Handle(THREAD, holder->protection_domain()), THREAD);
assert(k != NULL && !HAS_PENDING_EXCEPTION, "can resolve klass?");
ValueKlass* vk = ValueKlass::cast(k);
InlineKlass* vk = InlineKlass::cast(k);
oop obj;
if (flattened) {
int field_offset = fd->offset() - vk->first_field_offset();
@@ -37,7 +37,7 @@
#include "oops/constantPool.hpp"
#include "oops/method.inline.hpp"
#include "oops/oop.inline.hpp"
#include "oops/valueKlass.inline.hpp"
#include "oops/inlineKlass.inline.hpp"
#include "runtime/fieldDescriptor.inline.hpp"
#include "runtime/handles.inline.hpp"
#include "utilities/copy.hpp"
@@ -852,7 +852,7 @@ class CompileReplay : public StackObj {
break;
}
case T_INLINE_TYPE: {
ValueKlass* vk = ValueKlass::cast(fd->field_holder()->get_inline_type_field_klass(fd->index()));
InlineKlass* vk = InlineKlass::cast(fd->field_holder()->get_inline_type_field_klass(fd->index()));
if (fd->is_inlined()) {
int field_offset = fd->offset() - vk->first_field_offset();
oop obj = (oop)(cast_from_oop<address>(_vt) + field_offset);
@@ -1001,7 +1001,7 @@ class CompileReplay : public StackObj {
java_mirror->double_field_put(fd.offset(), value);
} else if (field_signature[0] == JVM_SIGNATURE_INLINE_TYPE) {
Klass* kelem = resolve_klass(field_signature, CHECK);
ValueKlass* vk = ValueKlass::cast(kelem);
InlineKlass* vk = InlineKlass::cast(kelem);
oop value = vk->allocate_instance(CHECK);
ValueTypeFieldInitializer init_fields(value, this);
vk->do_nonstatic_fields(&init_fields);
@@ -42,7 +42,7 @@
// Constructor for loaded value array klasses.
ciValueArrayKlass::ciValueArrayKlass(Klass* h_k) : ciArrayKlass(h_k) {
assert(get_Klass()->is_valueArray_klass(), "wrong type");
ValueKlass* element_Klass = get_ValueArrayKlass()->element_klass();
InlineKlass* element_Klass = get_ValueArrayKlass()->element_klass();
_base_element_klass = CURRENT_ENV->get_klass(element_Klass);
assert(_base_element_klass->is_valuetype(), "bad base klass");
if (dimension() == 1) {
@@ -26,7 +26,7 @@
#include "ci/ciField.hpp"
#include "ci/ciUtilities.inline.hpp"
#include "ci/ciValueKlass.hpp"
#include "oops/valueKlass.inline.hpp"
#include "oops/inlineKlass.inline.hpp"

int ciValueKlass::compute_nonstatic_fields() {
int result = ciInstanceKlass::compute_nonstatic_fields();
@@ -134,6 +134,6 @@ address ciValueKlass::unpack_handler() const {
GUARDED_VM_ENTRY(return get_ValueKlass()->unpack_handler();)
}

ValueKlass* ciValueKlass::get_ValueKlass() const {
InlineKlass* ciValueKlass::get_ValueKlass() const {
GUARDED_VM_ENTRY(return to_ValueKlass();)
}
@@ -30,7 +30,7 @@
#include "ci/ciFlags.hpp"
#include "ci/ciInstanceKlass.hpp"
#include "ci/ciSymbol.hpp"
#include "oops/valueKlass.hpp"
#include "oops/inlineKlass.hpp"

// ciValueKlass
//
@@ -42,13 +42,13 @@ class ciValueKlass : public ciInstanceKlass {
// Fields declared in the bytecode (without flattened value type fields)
GrowableArray<ciField*>* _declared_nonstatic_fields;

ValueKlass* to_ValueKlass() const {
return ValueKlass::cast(get_Klass());
InlineKlass* to_ValueKlass() const {
return InlineKlass::cast(get_Klass());
}

protected:
ciValueKlass(Klass* h_k) : ciInstanceKlass(h_k), _declared_nonstatic_fields(NULL) {
assert(is_final(), "ValueKlass must be final");
assert(is_final(), "InlineKlass must be final");
};

ciValueKlass(ciSymbol* name, jobject loader, jobject protection_domain) :
@@ -89,7 +89,7 @@ class ciValueKlass : public ciInstanceKlass {
Array<SigEntry>* extended_sig() const;
address pack_handler() const;
address unpack_handler() const;
ValueKlass* get_ValueKlass() const;
InlineKlass* get_ValueKlass() const;
};

#endif // SHARE_VM_CI_CIVALUEKLASS_HPP