Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
39971d3
First step: creation of refArrayKlass for references arrays
fparain May 9, 2025
460b45b
More fixes for RefArrayKlass
fparain May 14, 2025
b6a098b
Fix aarch64 build
fparain May 14, 2025
275033a
More fixes related to RefArrayKlass
fparain May 21, 2025
6f280b7
Merge remote-tracking branch 'upstream/lworld' into array_klasses
fparain May 22, 2025
ccb5c9b
Repurpose objArrayOop as an abstraction layer
fparain May 30, 2025
19460e9
Reparenting of FlatArrayKlass and cleanup of ObjArrayKlass
fparain Jun 11, 2025
a663392
Split array meta-data for regular object arrays
fparain Jun 26, 2025
4e75990
Move special arrays to new array framework
fparain Jul 1, 2025
787ee0d
Fix the multiple Java mirrors issue
fparain Jul 3, 2025
65199b5
Enable full flattening and fixing tests
fparain Jul 3, 2025
5b4ba85
Untabiby refArrayKlass.hpp
fparain Jul 7, 2025
8e80376
Fix indentation
fparain Jul 7, 2025
2d4c1f3
Untabify again
fparain Jul 7, 2025
332f004
Compiler tests fixes from @TobiHartmann
fparain Jul 7, 2025
9920fdd
Remove obsolete Unsage.isFlatArray API
fparain Jul 7, 2025
c00f61f
Fix copy of zero-length null-restricted arrays
fparain Jul 9, 2025
d199084
Fix microbenchmark using obsolete API
fparain Jul 9, 2025
901ef0d
Revert InstanceKlass::_array_klasses to ObjArrayKlass
fparain Jul 28, 2025
bcbba86
JIT support for new array metadata
TobiHartmann Jul 30, 2025
e0a0cfe
Check for arrays before calling is_identity_class()
fparain Jul 30, 2025
c3b4a34
Some more fixes
TobiHartmann Jul 31, 2025
3e2ff09
Merge branch 'array_klasses' of github.com:fparain/valhalla into arra…
TobiHartmann Jul 31, 2025
864a602
Fix assertion
fparain Jul 31, 2025
8144142
Merge branch 'array_klasses' of https://github.com/fparain/valhalla i…
fparain Jul 31, 2025
d3596f4
Fix arrays layout helper tags
fparain Jul 31, 2025
ec674fd
Fix duplicated field
fparain Aug 8, 2025
10457af
Fix array var handles compilation and invoke tests
liach Aug 11, 2025
efb5111
Merge pull request #3 from liach/fix/parain-array-vh
TobiHartmann Aug 13, 2025
cd068e6
Fixed building CDS in non-preview mode
matias9927 Aug 13, 2025
a4d6a4d
Many more fixes of JIT code
TobiHartmann Aug 14, 2025
eb0e5b9
Removed unnecessary comment
matias9927 Aug 14, 2025
2dd1fa3
Coleen's CDS changes
TobiHartmann Aug 19, 2025
73e10bb
Disabled CDS in preview mode
matias9927 Aug 19, 2025
fb62328
Disable CDS with no_shared_spaces
matias9927 Aug 20, 2025
78f321a
Merge commit 'refs/pull/1452/head' of github.com:openjdk/valhalla int…
matias9927 Aug 20, 2025
285d732
Avoid creating mirror for refined array klasses
matias9927 Aug 21, 2025
29fbe68
Merge pull request #4 from matias9927/array_klasses_cds
TobiHartmann Aug 22, 2025
2268012
Deopt fixes
TobiHartmann Aug 26, 2025
c23fe38
Cleanup
TobiHartmann Aug 26, 2025
09a20e2
Fix misidentification of array kind
fparain Aug 26, 2025
3718e27
Enabled CDS in preview mode
matias9927 Aug 27, 2025
80a9477
Restore flattening flags behavior and other small fixes
fparain Aug 27, 2025
486411a
More JIT fixes
TobiHartmann Aug 28, 2025
0b7ee21
Merge branch 'array_klasses' of github.com:fparain/valhalla into arra…
TobiHartmann Aug 28, 2025
a8e7401
Merge with lworld
TobiHartmann Aug 28, 2025
dadf734
More fixes
TobiHartmann Aug 28, 2025
166c496
Fix zero build
TobiHartmann Aug 28, 2025
0a85987
Avoid archiving arrays in dynamic archive
matias9927 Aug 28, 2025
d41388c
Merge branch 'array_klasses' into dynamic_cds_fix
matias9927 Aug 28, 2025
fb8b5f0
Merge pull request #5 from matias9927/dynamic_cds_fix
TobiHartmann Aug 29, 2025
c80bd78
More JIT fixes
TobiHartmann Aug 29, 2025
d6e766e
More JIT fixes, more cleanups, more tests
TobiHartmann Aug 29, 2025
1755fd4
Test fix
TobiHartmann Aug 29, 2025
9042b4c
More JIT fixes
TobiHartmann Sep 1, 2025
e58be30
EnableValhalla by default
TobiHartmann Sep 1, 2025
670e161
Problem listing due to 8366440
TobiHartmann Sep 1, 2025
7058bb6
Fix for isAssignableFrom + tests
TobiHartmann Sep 2, 2025
8f1cfc7
Multidim array fix
TobiHartmann Sep 2, 2025
fc409a2
Linked TODOs to JDK-8366668
TobiHartmann Sep 2, 2025
308687b
Cleanup T_FLAT_ELEMENT related code
fparain Sep 2, 2025
746ad76
Merge branch 'array_klasses' of github.com:fparain/valhalla into arra…
fparain Sep 2, 2025
810a36f
Moved get_Klass() back to protected and updated usages
TobiHartmann Sep 2, 2025
6087dbd
Small cleanup
TobiHartmann Sep 2, 2025
9b254f2
Forgot a TODO
TobiHartmann Sep 2, 2025
94f8fd9
Merge remote-tracking branch 'upstream/lworld' into array_klasses
fparain Sep 3, 2025
527a17b
Merge branch 'array_klasses' of github.com:fparain/valhalla into arra…
fparain Sep 3, 2025
c3327d6
Address comments from reviewers
fparain Sep 4, 2025
b27def5
Remove commented code
fparain Sep 5, 2025
ca75bab
Fix style
fparain Sep 5, 2025
0e8cd32
More fixes from reviewers comments
fparain Sep 5, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions make/modules/java.base/gensrc/GensrcVarHandles.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,12 @@ define GenerateVarHandle
$1_ARGS += -KReference
$1_ARGS += -KNonPlainAccess
$1_ARGS += -KStatic
$1_ARGS += -KArray
endif

ifeq ($$($1_InputType), NonAtomicReference)
$1_ARGS += -KReference
$1_ARGS += -KStatic
$1_Type := Reference
$1_ARGS += -KArray
endif

ifeq ($$($1_InputType), FlatValue)
Expand Down
1 change: 1 addition & 0 deletions make/test/BuildMicrobenchmark.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ $(eval $(call SetupJavaCompilation, BUILD_JDK_MICROBENCHMARK, \
--add-exports java.base/jdk.internal.foreign=ALL-UNNAMED \
--add-exports java.base/jdk.internal.misc=ALL-UNNAMED \
--add-exports java.base/jdk.internal.util=ALL-UNNAMED \
--add-exports java.base/jdk.internal.value=ALL-UNNAMED \
--add-exports java.base/jdk.internal.vm=ALL-UNNAMED \
--add-exports java.base/sun.invoke.util=ALL-UNNAMED \
--add-exports java.base/sun.security.util=ALL-UNNAMED \
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/cpu/aarch64/c1_LIRAssembler_aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1248,7 +1248,7 @@ void LIR_Assembler::emit_alloc_array(LIR_OpAllocArray* op) {
Register len = op->len()->as_register();
__ uxtw(len, len);

if (UseSlowPath || op->is_null_free() ||
if (UseSlowPath || op->always_slow_path() ||
(!UseFastNewObjectArray && is_reference_type(op->type())) ||
(!UseFastNewTypeArray && !is_reference_type(op->type()))) {
__ b(*op->stub()->entry());
Expand Down
14 changes: 8 additions & 6 deletions src/hotspot/cpu/aarch64/c1_LIRGenerator_aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1204,14 +1204,19 @@ void LIRGenerator::do_NewObjectArray(NewObjectArray* x) {
length.load_item_force(FrameMap::r19_opr);
LIR_Opr len = length.result();

ciKlass* obj = (ciKlass*) x->exact_type();
CodeStub* slow_path = new NewObjectArrayStub(klass_reg, len, reg, info, x->is_null_free());
ciKlass* obj = ciArrayKlass::make(x->klass(), false, true, true);

// TODO 8265122 Implement a fast path for this
bool is_flat = obj->is_loaded() && obj->is_flat_array_klass();
bool is_null_free = obj->is_loaded() && obj->as_array_klass()->is_elem_null_free();

CodeStub* slow_path = new NewObjectArrayStub(klass_reg, len, reg, info, is_null_free);
if (obj == ciEnv::unloaded_ciobjarrayklass()) {
BAILOUT("encountered unloaded_ciobjarrayklass due to out of memory error");
}

klass2reg_with_patching(klass_reg, obj, patching_info);
__ allocate_array(reg, len, tmp1, tmp2, tmp3, tmp4, T_OBJECT, klass_reg, slow_path, true, x->is_null_free());
__ allocate_array(reg, len, tmp1, tmp2, tmp3, tmp4, T_OBJECT, klass_reg, slow_path, true, is_null_free || is_flat);

LIR_Opr result = rlock_result(x);
__ move(reg, result);
Expand Down Expand Up @@ -1287,9 +1292,6 @@ void LIRGenerator::do_CheckCast(CheckCast* x) {
CodeEmitInfo* info_for_exception =
(x->needs_exception_state() ? state_for(x) :
state_for(x, x->state_before(), true /*ignore_xhandler*/));
if (x->is_null_free()) {
__ null_check(obj.result(), new CodeEmitInfo(info_for_exception));
}

CodeStub* stub;
if (x->is_incompatible_class_change_check()) {
Expand Down
8 changes: 4 additions & 4 deletions src/hotspot/cpu/aarch64/c1_Runtime1_aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -747,16 +747,16 @@ OopMapSet* Runtime1::generate_code_for(C1StubId id, StubAssembler* sasm) {
__ stop("assert(is a type array klass)");
break;
case C1StubId::new_object_array_id:
__ cmpw(t0, Klass::_lh_array_tag_obj_value); // new "[Ljava/lang/Object;"
__ cmpw(t0, Klass::_lh_array_tag_ref_value); // new "[Ljava/lang/Object;"
__ br(Assembler::EQ, ok);
__ cmpw(t0, Klass::_lh_array_tag_vt_value); // new "[LVT;"
__ cmpw(t0, Klass::_lh_array_tag_flat_value); // new "[LVT;"
__ br(Assembler::EQ, ok);
__ stop("assert(is an object or inline type array klass)");
break;
case C1StubId::new_null_free_array_id:
__ cmpw(t0, Klass::_lh_array_tag_vt_value); // the array can be a flat array.
__ cmpw(t0, Klass::_lh_array_tag_flat_value); // the array can be a flat array.
__ br(Assembler::EQ, ok);
__ cmpw(t0, Klass::_lh_array_tag_obj_value); // the array cannot be a flat array (due to InlineArrayElementMaxFlatSize, etc)
__ cmpw(t0, Klass::_lh_array_tag_ref_value); // the array cannot be a flat array (due to the InlineArrayElementMaxFlatSize, etc.)
__ br(Assembler::EQ, ok);
__ stop("assert(is an object or inline type array klass)");
break;
Expand Down
6 changes: 0 additions & 6 deletions src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2265,12 +2265,6 @@ void MacroAssembler::test_markword_is_inline_type(Register markword, Label& is_i
br(Assembler::EQ, is_inline_type);
}

void MacroAssembler::test_klass_is_inline_type(Register klass, Register temp_reg, Label& is_inline_type) {
ldrh(temp_reg, Address(klass, Klass::access_flags_offset()));
andr(temp_reg, temp_reg, JVM_ACC_IDENTITY);
cbz(temp_reg, is_inline_type);
}

void MacroAssembler::test_oop_is_not_inline_type(Register object, Register tmp, Label& not_inline_type, bool can_be_null) {
assert_different_registers(tmp, rscratch1);
if (can_be_null) {
Expand Down
1 change: 0 additions & 1 deletion src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,6 @@ class MacroAssembler: public Assembler {
void test_markword_is_inline_type(Register markword, Label& is_inline_type);

// inlineKlass queries, kills temp_reg
void test_klass_is_inline_type(Register klass, Register temp_reg, Label& is_inline_type);
void test_oop_is_not_inline_type(Register object, Register tmp, Label& not_inline_type, bool can_be_null = true);

void test_field_is_null_free_inline_type(Register flags, Register temp_reg, Label& is_null_free);
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/cpu/ppc/c1_Runtime1_ppc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ OopMapSet* Runtime1::generate_code_for(C1StubId id, StubAssembler* sasm) {
#ifdef ASSERT
// Assert object type is really an array of the proper kind.
{
int tag = (id == C1StubId::new_type_array_id) ? Klass::_lh_array_tag_type_value : Klass::_lh_array_tag_obj_value;
int tag = (id == C1StubId::new_type_array_id) ? Klass::_lh_array_tag_type_value : Klass::_lh_array_tag_ref_value;
Label ok;
__ lwz(R0, in_bytes(Klass::layout_helper_offset()), R4_ARG2);
__ srawi(R0, R0, Klass::_lh_array_tag_shift);
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/cpu/riscv/c1_Runtime1_riscv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@ OopMapSet* Runtime1::generate_code_for(C1StubId id, StubAssembler* sasm) {
Register tmp = obj;
__ lwu(tmp, Address(klass, Klass::layout_helper_offset()));
__ sraiw(tmp, tmp, Klass::_lh_array_tag_shift);
int tag = ((id == C1StubId::new_type_array_id) ? Klass::_lh_array_tag_type_value : Klass::_lh_array_tag_obj_value);
int tag = ((id == C1StubId::new_type_array_id) ? Klass::_lh_array_tag_type_value : Klass::_lh_array_tag_ref_value);
__ mv(t0, tag);
__ beq(t0, tmp, ok);
__ stop("assert(is an array klass)");
Expand Down
3 changes: 1 addition & 2 deletions src/hotspot/cpu/s390/c1_Runtime1_s390.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -396,8 +396,7 @@ OopMapSet* Runtime1::generate_code_for(C1StubId id, StubAssembler* sasm) {
__ mem2reg_opt(t0, Address(klass, Klass::layout_helper_offset()), false);
__ z_sra(t0, Klass::_lh_array_tag_shift);
int tag = ((id == C1StubId::new_type_array_id)
? Klass::_lh_array_tag_type_value
: Klass::_lh_array_tag_obj_value);
? Klass::_lh_array_tag_type_value : Klass::_lh_array_tag_ref_value);
__ compare32_and_branch(t0, tag, Assembler::bcondEqual, ok);
__ stop("assert(is an array klass)");
__ should_not_reach_here();
Expand Down
4 changes: 3 additions & 1 deletion src/hotspot/cpu/x86/c1_LIRAssembler_x86.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1275,7 +1275,7 @@ void LIR_Assembler::emit_alloc_array(LIR_OpAllocArray* op) {
Register len = op->len()->as_register();
__ movslq(len, len);

if (UseSlowPath || op->is_null_free() ||
if (UseSlowPath || op->always_slow_path() ||
(!UseFastNewObjectArray && is_reference_type(op->type())) ||
(!UseFastNewTypeArray && !is_reference_type(op->type()))) {
__ jmp(*op->stub()->entry());
Expand Down Expand Up @@ -1410,6 +1410,7 @@ void LIR_Assembler::emit_typecheck_helper(LIR_OpTypeCheck *op, Label* success, L
__ verify_oop(obj);

if (op->fast_check()) {
// TODO 8366668 Is this correct? I don't think so. Probably we now always go to the slow path here. Same on AArch64.
// get object class
// not a safepoint as obj null check happens earlier
if (UseCompressedClassPointers) {
Expand Down Expand Up @@ -2866,6 +2867,7 @@ void LIR_Assembler::emit_arraycopy(LIR_OpArrayCopy* op) {
// subtype which we can't check or src is the same array as dst
// but not necessarily exactly of type default_type.
Label known_ok, halt;

__ mov_metadata(tmp, default_type->constant_encoding());
if (UseCompressedClassPointers) {
__ encode_klass_not_null(tmp, rscratch1);
Expand Down
15 changes: 8 additions & 7 deletions src/hotspot/cpu/x86/c1_LIRGenerator_x86.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1213,13 +1213,18 @@ void LIRGenerator::do_NewObjectArray(NewObjectArray* x) {
length.load_item_force(FrameMap::rbx_opr);
LIR_Opr len = length.result();

ciKlass* obj = (ciKlass*) x->exact_type();
CodeStub* slow_path = new NewObjectArrayStub(klass_reg, len, reg, info, x->is_null_free());
ciKlass* obj = ciArrayKlass::make(x->klass(), false, true, true);

// TODO 8265122 Implement a fast path for this
bool is_flat = obj->is_loaded() && obj->is_flat_array_klass();
bool is_null_free = obj->is_loaded() && obj->as_array_klass()->is_elem_null_free();

CodeStub* slow_path = new NewObjectArrayStub(klass_reg, len, reg, info, is_null_free);
if (obj == ciEnv::unloaded_ciobjarrayklass()) {
BAILOUT("encountered unloaded_ciobjarrayklass due to out of memory error");
}
klass2reg_with_patching(klass_reg, obj, patching_info);
__ allocate_array(reg, len, tmp1, tmp2, tmp3, tmp4, T_OBJECT, klass_reg, slow_path, true, x->is_null_free());
__ allocate_array(reg, len, tmp1, tmp2, tmp3, tmp4, T_OBJECT, klass_reg, slow_path, true, is_null_free || is_flat);

LIR_Opr result = rlock_result(x);
__ move(reg, result);
Expand Down Expand Up @@ -1298,10 +1303,6 @@ void LIRGenerator::do_CheckCast(CheckCast* x) {
(x->needs_exception_state() ? state_for(x) :
state_for(x, x->state_before(), true /*ignore_xhandler*/));

if (x->is_null_free()) {
__ null_check(obj.result(), new CodeEmitInfo(info_for_exception));
}

CodeStub* stub;
if (x->is_incompatible_class_change_check()) {
assert(patching_info == nullptr, "can't patch this");
Expand Down
8 changes: 4 additions & 4 deletions src/hotspot/cpu/x86/c1_Runtime1_x86.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -911,16 +911,16 @@ OopMapSet* Runtime1::generate_code_for(C1StubId id, StubAssembler* sasm) {
__ stop("assert(is a type array klass)");
break;
case C1StubId::new_object_array_id:
__ cmpl(t0, Klass::_lh_array_tag_obj_value); // new "[Ljava/lang/Object;"
__ cmpl(t0, (Klass::_lh_array_tag_ref_value)); // new "[Ljava/lang/Object;"
__ jcc(Assembler::equal, ok);
__ cmpl(t0, Klass::_lh_array_tag_vt_value); // new "[LVT;"
__ cmpl(t0, Klass::_lh_array_tag_flat_value); // new "[LVT;"
__ jcc(Assembler::equal, ok);
__ stop("assert(is an object or inline type array klass)");
break;
case C1StubId::new_null_free_array_id:
__ cmpl(t0, Klass::_lh_array_tag_vt_value); // the array can be a flat array.
__ cmpl(t0, Klass::_lh_array_tag_flat_value); // the array can be a flat array.
__ jcc(Assembler::equal, ok);
__ cmpl(t0, Klass::_lh_array_tag_obj_value); // the array cannot be a flat array (due to InlineArrayElementMaxFlatSize, etc)
__ cmpl(t0, (Klass::_lh_array_tag_ref_value)); // the array cannot be a flat array (due to InlineArrayElementMaxFlatSize, etc)
__ jcc(Assembler::equal, ok);
__ stop("assert(is an object or inline type array klass)");
break;
Expand Down
6 changes: 0 additions & 6 deletions src/hotspot/cpu/x86/macroAssembler_x86.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2370,12 +2370,6 @@ void MacroAssembler::test_markword_is_inline_type(Register markword, Label& is_i
jcc(Assembler::equal, is_inline_type);
}

void MacroAssembler::test_klass_is_inline_type(Register klass, Register temp_reg, Label& is_inline_type) {
load_unsigned_short(temp_reg, Address(klass, Klass::access_flags_offset()));
testl(temp_reg, JVM_ACC_IDENTITY);
jcc(Assembler::zero, is_inline_type);
}

void MacroAssembler::test_oop_is_not_inline_type(Register object, Register tmp, Label& not_inline_type, bool can_be_null) {
if (can_be_null) {
testptr(object, object);
Expand Down
1 change: 0 additions & 1 deletion src/hotspot/cpu/x86/macroAssembler_x86.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ class MacroAssembler: public Assembler {
void test_markword_is_inline_type(Register markword, Label& is_inline_type);

// inlineKlass queries, kills temp_reg
void test_klass_is_inline_type(Register klass, Register temp_reg, Label& is_inline_type);
void test_oop_is_not_inline_type(Register object, Register tmp, Label& not_inline_type, bool can_be_null = true);

void test_field_is_null_free_inline_type(Register flags, Register temp_reg, Label& is_null_free);
Expand Down
7 changes: 3 additions & 4 deletions src/hotspot/share/c1/c1_GraphBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1074,7 +1074,7 @@ void GraphBuilder::load_indexed(BasicType type) {
LoadIndexed* load_indexed = nullptr;
Instruction* result = nullptr;
if (array->is_loaded_flat_array()) {
// TODO 8350865 This is currently dead code
// TODO 8350865 This is currently dead code. Can we use set_null_free on the result here if the array is null-free?
ciType* array_type = array->declared_type();
ciInlineKlass* elem_klass = array_type->as_flat_array_klass()->element_klass()->as_inline_klass();

Expand Down Expand Up @@ -3514,8 +3514,7 @@ ValueStack* GraphBuilder::state_at_entry() {
int idx = 0;
if (!method()->is_static()) {
// we should always see the receiver
state->store_local(idx, new Local(method()->holder(), objectType, idx,
/*receiver*/ true, /*null_free*/ method()->holder()->is_flat_array_klass()));
state->store_local(idx, new Local(method()->holder(), objectType, idx, true));
idx = 1;
}

Expand All @@ -3527,7 +3526,7 @@ ValueStack* GraphBuilder::state_at_entry() {
// don't allow T_ARRAY to propagate into locals types
if (is_reference_type(basic_type)) basic_type = T_OBJECT;
ValueType* vt = as_ValueType(basic_type);
state->store_local(idx, new Local(type, vt, idx, false, false));
state->store_local(idx, new Local(type, vt, idx, false));
idx += type->size();
}

Expand Down
5 changes: 2 additions & 3 deletions src/hotspot/share/c1/c1_Instruction.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ class Instruction: public CompilationResourceObj {

enum InstructionFlag {
NeedsNullCheckFlag = 0,
NeverNullFlag, // For "Q" signatures
NeverNullFlag,
CanTrapFlag,
DirectCompareFlag,
IsSafepointFlag,
Expand Down Expand Up @@ -712,13 +712,12 @@ LEAF(Local, Instruction)
ciType* _declared_type;
public:
// creation
Local(ciType* declared, ValueType* type, int index, bool receiver, bool null_free)
Local(ciType* declared, ValueType* type, int index, bool receiver)
: Instruction(type)
, _java_index(index)
, _is_receiver(receiver)
, _declared_type(declared)
{
set_null_free(null_free);
NOT_PRODUCT(set_printable_bci(-1));
}

Expand Down
4 changes: 2 additions & 2 deletions src/hotspot/share/c1/c1_LIR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1506,7 +1506,7 @@ void LIR_List::allocate_object(LIR_Opr dst, LIR_Opr t1, LIR_Opr t2, LIR_Opr t3,
stub));
}

void LIR_List::allocate_array(LIR_Opr dst, LIR_Opr len, LIR_Opr t1,LIR_Opr t2, LIR_Opr t3,LIR_Opr t4, BasicType type, LIR_Opr klass, CodeStub* stub, bool zero_array, bool is_null_free) {
void LIR_List::allocate_array(LIR_Opr dst, LIR_Opr len, LIR_Opr t1,LIR_Opr t2, LIR_Opr t3,LIR_Opr t4, BasicType type, LIR_Opr klass, CodeStub* stub, bool zero_array, bool always_slow_path) {
append(new LIR_OpAllocArray(
klass,
len,
Expand All @@ -1518,7 +1518,7 @@ void LIR_List::allocate_array(LIR_Opr dst, LIR_Opr len, LIR_Opr t1,LIR_Opr t2, L
type,
stub,
zero_array,
is_null_free));
always_slow_path));
}

void LIR_List::shift_left(LIR_Opr value, LIR_Opr count, LIR_Opr dst, LIR_Opr tmp) {
Expand Down
12 changes: 6 additions & 6 deletions src/hotspot/share/c1/c1_LIR.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1817,10 +1817,10 @@ class LIR_OpAllocArray : public LIR_Op {
CodeStub* _stub;
BasicType _type;
bool _zero_array;
bool _is_null_free;
bool _always_slow_path;

public:
LIR_OpAllocArray(LIR_Opr klass, LIR_Opr len, LIR_Opr result, LIR_Opr t1, LIR_Opr t2, LIR_Opr t3, LIR_Opr t4, BasicType type, CodeStub* stub, bool zero_array, bool is_null_free)
LIR_OpAllocArray(LIR_Opr klass, LIR_Opr len, LIR_Opr result, LIR_Opr t1, LIR_Opr t2, LIR_Opr t3, LIR_Opr t4, BasicType type, CodeStub* stub, bool zero_array, bool always_slow_path)
: LIR_Op(lir_alloc_array, result, nullptr)
, _klass(klass)
, _len(len)
Expand All @@ -1831,7 +1831,7 @@ class LIR_OpAllocArray : public LIR_Op {
, _stub(stub)
, _type(type)
, _zero_array(zero_array)
, _is_null_free(is_null_free) {}
, _always_slow_path(always_slow_path) {}

LIR_Opr klass() const { return _klass; }
LIR_Opr len() const { return _len; }
Expand All @@ -1842,8 +1842,8 @@ class LIR_OpAllocArray : public LIR_Op {
LIR_Opr tmp4() const { return _tmp4; }
BasicType type() const { return _type; }
CodeStub* stub() const { return _stub; }
bool zero_array() const { return _zero_array; }
bool is_null_free() const { return _is_null_free;}
bool zero_array() const { return _zero_array; }
bool always_slow_path() const { return _always_slow_path; }

virtual void emit_code(LIR_Assembler* masm);
virtual LIR_OpAllocArray * as_OpAllocArray () { return this; }
Expand Down Expand Up @@ -2407,7 +2407,7 @@ class LIR_List: public CompilationResourceObj {
void irem(LIR_Opr left, int right, LIR_Opr res, LIR_Opr tmp, CodeEmitInfo* info);

void allocate_object(LIR_Opr dst, LIR_Opr t1, LIR_Opr t2, LIR_Opr t3, LIR_Opr t4, int header_size, int object_size, LIR_Opr klass, bool init_check, CodeStub* stub);
void allocate_array(LIR_Opr dst, LIR_Opr len, LIR_Opr t1,LIR_Opr t2, LIR_Opr t3,LIR_Opr t4, BasicType type, LIR_Opr klass, CodeStub* stub, bool zero_array = true, bool is_null_free = false);
void allocate_array(LIR_Opr dst, LIR_Opr len, LIR_Opr t1,LIR_Opr t2, LIR_Opr t3,LIR_Opr t4, BasicType type, LIR_Opr klass, CodeStub* stub, bool zero_array = true, bool always_slow_path = false);

// jump is an unconditional branch
void jump(BlockBegin* block) {
Expand Down
Loading