--- a/src/hotspot/share/opto/callnode.cpp Thu Oct 17 20:27:44 2019 +0100
+++ b/src/hotspot/share/opto/callnode.cpp Thu Oct 17 20:53:35 2019 +0100
@@ -1397,6 +1397,18 @@
_is_allocation_MemBar_redundant = true;
}
}
+Node *AllocateNode::make_ideal_mark(PhaseGVN *phase, Node* obj, Node* control, Node* mem) {
+ Node* mark_node = NULL;
+ // For now only enable fast locking for non-array types
+ if (UseBiasedLocking && Opcode() == Op_Allocate) {
+ Node* klass_node = in(AllocateNode::KlassNode);
+ Node* proto_adr = phase->transform(new AddPNode(klass_node, klass_node, phase->MakeConX(in_bytes(Klass::prototype_header_offset()))));
+ mark_node = LoadNode::make(*phase, control, mem, proto_adr, TypeRawPtr::BOTTOM, TypeX_X, TypeX_X->basic_type(), MemNode::unordered);
+ } else {
+ mark_node = phase->MakeConX(markWord::prototype().value());
+ }
+ return mark_node;
+}
//=============================================================================
Node* AllocateArrayNode::Ideal(PhaseGVN *phase, bool can_reshape) {
@@ -1431,7 +1443,7 @@
Node *frame = new ParmNode( phase->C->start(), TypeFunc::FramePtr );
frame = phase->transform(frame);
// Halt & Catch Fire
- Node *halt = new HaltNode( nproj, frame );
+ Node* halt = new HaltNode(nproj, frame, "unexpected negative array length");
phase->C->root()->add_req(halt);
phase->transform(halt);