This commit is contained in:
Mikael Vidstedt 2020-07-15 21:24:39 -07:00
commit 1f5e21a16e
1091 changed files with 1920 additions and 2277 deletions

View File

@ -648,4 +648,5 @@ b58fc60580550a4a587cab729d8fd87223ad6932 jdk-15+29
e2622818f0bd30e736252eba101fe7d2c27f400b jdk-16+4
a32f58c6b8be81877411767de7ba9c4cf087c1b5 jdk-15+31
143e258f64af490010eb7e0bacc1cfaeceff0993 jdk-16+5
2dad000726b8d5db9f3df647fb4949d88f269dd4 jdk-15+32
4a8fd81d64bafa523cddb45f82805536edace106 jdk-16+6

View File

@ -530,7 +530,7 @@ JDWP "Java(tm) Debug Wire Protocol"
"returned for each class. "
"Generic signatures are described in the signature attribute "
"section in "
"<cite>The Java&trade; Virtual Machine Specification</cite>. "
"<cite>The Java Virtual Machine Specification</cite>. "
"Since JDWP version 1.5."
(Out
)
@ -643,7 +643,7 @@ JDWP "Java(tm) Debug Wire Protocol"
)
(Reply
(int modBits "Modifier bits as defined in Chapter 4 of "
"<cite>The Java&trade; Virtual Machine Specification</cite>")
"<cite>The Java Virtual Machine Specification</cite>")
)
(ErrorSet
(Error INVALID_CLASS "refType is not the ID of a reference "
@ -671,7 +671,7 @@ JDWP "Java(tm) Debug Wire Protocol"
"which provide additional information on the "
"field declaration. Individual flag values are "
"defined in Chapter 4 of "
"<cite>The Java&trade; Virtual Machine Specification</cite>. "
"<cite>The Java Virtual Machine Specification</cite>. "
"In addition, The <code>0xf0000000</code> bit identifies "
"the field as synthetic, if the synthetic attribute "
"<a href=\"#JDWP_VirtualMachine_Capabilities\">capability</a> is available.")
@ -706,7 +706,7 @@ JDWP "Java(tm) Debug Wire Protocol"
"which provide additional information on the "
"method declaration. Individual flag values are "
"defined in Chapter 4 of "
"<cite>The Java&trade; Virtual Machine Specification</cite>. "
"<cite>The Java Virtual Machine Specification</cite>. "
"In addition, The <code>0xf0000000</code> bit identifies "
"the method as synthetic, if the synthetic attribute "
"<a href=\"#JDWP_VirtualMachine_Capabilities\">capability</a> is available.")
@ -793,7 +793,7 @@ JDWP "Java(tm) Debug Wire Protocol"
"Returns the current status of the reference type. The status "
"indicates the extent to which the reference type has been "
"initialized, as described in section 2.1.6 of "
"<cite>The Java&trade; Virtual Machine Specification</cite>. "
"<cite>The Java Virtual Machine Specification</cite>. "
"If the class is linked the PREPARED and VERIFIED bits in the returned status bits "
"will be set. If the class is initialized the INITIALIZED bit in the returned "
"status bits will be set. If an error occured during initialization then the "
@ -872,7 +872,7 @@ JDWP "Java(tm) Debug Wire Protocol"
"generic signature if there is one. "
"Generic signatures are described in the signature attribute "
"section in "
"<cite>The Java&trade; Virtual Machine Specification</cite>. "
"<cite>The Java Virtual Machine Specification</cite>. "
"Since JDWP version 1.5."
(Out
(referenceType refType "The reference type ID.")
@ -900,7 +900,7 @@ JDWP "Java(tm) Debug Wire Protocol"
"Fields are returned in the order they occur in the class file. "
"Generic signatures are described in the signature attribute "
"section in "
"<cite>The Java&trade; Virtual Machine Specification</cite>. "
"<cite>The Java Virtual Machine Specification</cite>. "
"Since JDWP version 1.5."
(Out
(referenceType refType "The reference type ID.")
@ -917,7 +917,7 @@ JDWP "Java(tm) Debug Wire Protocol"
"which provide additional information on the "
"field declaration. Individual flag values are "
"defined in Chapter 4 of "
"<cite>The Java&trade; Virtual Machine Specification</cite>. "
"<cite>The Java Virtual Machine Specification</cite>. "
"In addition, The <code>0xf0000000</code> bit identifies "
"the field as synthetic, if the synthetic attribute "
"<a href=\"#JDWP_VirtualMachine_Capabilities\">capability</a> is available.")
@ -942,7 +942,7 @@ JDWP "Java(tm) Debug Wire Protocol"
"Methods are returned in the order they occur in the class file. "
"Generic signatures are described in the signature attribute "
"section in "
"<cite>The Java&trade; Virtual Machine Specification</cite>. "
"<cite>The Java Virtual Machine Specification</cite>. "
"Since JDWP version 1.5."
(Out
(referenceType refType "The reference type ID.")
@ -959,7 +959,7 @@ JDWP "Java(tm) Debug Wire Protocol"
"which provide additional information on the "
"method declaration. Individual flag values are "
"defined in Chapter 4 of "
"<cite>The Java&trade; Virtual Machine Specification</cite>. "
"<cite>The Java Virtual Machine Specification</cite>. "
"In addition, The <code>0xf0000000</code> bit identifies "
"the method as synthetic, if the synthetic attribute "
"<a href=\"#JDWP_VirtualMachine_Capabilities\">capability</a> is available.")
@ -1022,7 +1022,7 @@ JDWP "Java(tm) Debug Wire Protocol"
(Command ConstantPool=18
"Return the raw bytes of the constant pool in the format of the "
"constant_pool item of the Class File Format in "
"<cite>The Java&trade; Virtual Machine Specification</cite>. "
"<cite>The Java Virtual Machine Specification</cite>. "
"<p>Since JDWP version 1.6. Requires canGetConstantPool capability - see "
"<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>.""
(Out
@ -1032,7 +1032,7 @@ JDWP "Java(tm) Debug Wire Protocol"
(int count "Total number of constant pool entries plus one. This "
"corresponds to the constant_pool_count item of the "
"Class File Format in "
"<cite>The Java&trade; Virtual Machine Specification</cite>. ")
"<cite>The Java Virtual Machine Specification</cite>. ")
(Repeat bytes
(byte cpbytes "Raw bytes of constant pool")
)
@ -1435,7 +1435,7 @@ JDWP "Java(tm) Debug Wire Protocol"
)
(Command Bytecodes=3
"Retrieve the method's bytecodes as defined in "
"<cite>The Java&trade; Virtual Machine Specification</cite>. "
"<cite>The Java Virtual Machine Specification</cite>. "
"Requires canGetBytecodes capability - see "
"<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>."
(Out
@ -1491,7 +1491,7 @@ JDWP "Java(tm) Debug Wire Protocol"
"table. Also, synthetic variables may be present. "
"Generic signatures are described in the signature attribute "
"section in "
"<cite>The Java&trade; Virtual Machine Specification</cite>. "
"<cite>The Java Virtual Machine Specification</cite>. "
"Since JDWP version 1.5."
(Out
(referenceType refType "The class.")
@ -2082,7 +2082,7 @@ JDWP "Java(tm) Debug Wire Protocol"
"The method which will return early is referred to as the "
"called method. The called method is the current method (as "
"defined by the Frames section in "
"<cite>The Java&trade; Virtual Machine Specification</cite>) "
"<cite>The Java Virtual Machine Specification</cite>) "
"for the specified thread at the time this command "
"is received. "
"<p>"

View File

@ -568,26 +568,13 @@ const char* JVMCIEnv::as_utf8_string(JVMCIObject str) {
} else {
JNIAccessMark jni(this);
int length = jni()->GetStringLength(str.as_jstring());
char* result = NEW_RESOURCE_ARRAY(char, length + 1);
int utf8_length = jni()->GetStringUTFLength(str.as_jstring());
char* result = NEW_RESOURCE_ARRAY(char, utf8_length + 1);
jni()->GetStringUTFRegion(str.as_jstring(), 0, length, result);
return result;
}
}
char* JVMCIEnv::as_utf8_string(JVMCIObject str, char* buf, int buflen) {
if (is_hotspot()) {
return java_lang_String::as_utf8_string(HotSpotJVMCI::resolve(str), buf, buflen);
} else {
JNIAccessMark jni(this);
int length = jni()->GetStringLength(str.as_jstring());
if (length >= buflen) {
length = buflen;
}
jni()->GetStringUTFRegion(str.as_jstring(), 0, length, buf);
return buf;
}
}
#define DO_THROW(name) \
void JVMCIEnv::throw_##name(const char* msg) { \
if (is_hotspot()) { \

View File

@ -255,7 +255,6 @@ public:
JVMCIObject create_box(BasicType type, jvalue* value, JVMCI_TRAPS);
const char* as_utf8_string(JVMCIObject str);
char* as_utf8_string(JVMCIObject str, char* buf, int buflen);
JVMCIObject create_string(Symbol* str, JVMCI_TRAPS) {
JVMCIObject s = create_string(str->as_C_string(), JVMCI_CHECK_(JVMCIObject()));

View File

@ -234,6 +234,8 @@ macro(NegF)
macro(NeverBranch)
macro(OnSpinWait)
macro(Opaque1)
macro(OpaqueLoopInit)
macro(OpaqueLoopStride)
macro(Opaque2)
macro(Opaque3)
macro(Opaque4)

View File

@ -1800,7 +1800,17 @@ void Compile::remove_opaque4_nodes(PhaseIterGVN &igvn) {
for (int i = opaque4_count(); i > 0; i--) {
Node* opaq = opaque4_node(i-1);
assert(opaq->Opcode() == Op_Opaque4, "Opaque4 only");
// With Opaque4 nodes, the expectation is that the test of input 1
// is always equal to the constant value of input 2. So we can
// remove the Opaque4 and replace it by input 2. In debug builds,
// leave the non constant test in instead to sanity check that it
// never fails (if it does, that subgraph was constructed so, at
// runtime, a Halt node is executed).
#ifdef ASSERT
igvn.replace_node(opaq, opaq->in(1));
#else
igvn.replace_node(opaq, opaq->in(2));
#endif
}
assert(opaque4_count() == 0, "should be empty");
}

View File

@ -1255,8 +1255,9 @@ ProjNode* PhaseIdealLoop::insert_initial_skeleton_predicate(IfNode* iff, IdealLo
Node* init, Node* limit, jint stride,
Node* rng, bool &overflow,
Deoptimization::DeoptReason reason) {
// First predicate for the initial value on first loop iteration
assert(proj->_con && predicate_proj->_con, "not a range check?");
Node* opaque_init = new Opaque1Node(C, init);
Node* opaque_init = new OpaqueLoopInitNode(C, init);
register_new_node(opaque_init, upper_bound_proj);
BoolNode* bol = rc_predicate(loop, upper_bound_proj, scale, offset, opaque_init, limit, stride, rng, (stride > 0) != (scale > 0), overflow);
Node* opaque_bol = new Opaque4Node(C, bol, _igvn.intcon(1)); // This will go away once loop opts are over
@ -1264,6 +1265,24 @@ ProjNode* PhaseIdealLoop::insert_initial_skeleton_predicate(IfNode* iff, IdealLo
ProjNode* new_proj = create_new_if_for_predicate(predicate_proj, NULL, reason, overflow ? Op_If : iff->Opcode());
_igvn.replace_input_of(new_proj->in(0), 1, opaque_bol);
assert(opaque_init->outcnt() > 0, "should be used");
// Second predicate for init + (current stride - initial stride)
// This is identical to the previous predicate initially but as
// unrolling proceeds current stride is updated.
Node* init_stride = loop->_head->as_CountedLoop()->stride();
Node* opaque_stride = new OpaqueLoopStrideNode(C, init_stride);
register_new_node(opaque_stride, new_proj);
Node* max_value = new SubINode(opaque_stride, init_stride);
register_new_node(max_value, new_proj);
max_value = new AddINode(opaque_init, max_value);
register_new_node(max_value, new_proj);
bol = rc_predicate(loop, new_proj, scale, offset, max_value, limit, stride, rng, (stride > 0) != (scale > 0), overflow);
opaque_bol = new Opaque4Node(C, bol, _igvn.intcon(1));
register_new_node(opaque_bol, new_proj);
new_proj = create_new_if_for_predicate(predicate_proj, NULL, reason, overflow ? Op_If : iff->Opcode());
_igvn.replace_input_of(new_proj->in(0), 1, opaque_bol);
assert(max_value->outcnt() > 0, "should be used");
return new_proj;
}

View File

@ -1141,7 +1141,7 @@ void PhaseIdealLoop::ensure_zero_trip_guard_proj(Node* node, bool is_main_loop)
// CastII/ConvI2L nodes cause some data paths to die. For consistency,
// the control paths must die too but the range checks were removed by
// predication. The range checks that we add here guarantee that they do.
void PhaseIdealLoop::copy_skeleton_predicates_to_main_loop_helper(Node* predicate, Node* start, Node* end,
void PhaseIdealLoop::copy_skeleton_predicates_to_main_loop_helper(Node* predicate, Node* init, Node* stride,
IdealLoopTree* outer_loop, LoopNode* outer_main_head,
uint dd_main_head, const uint idx_before_pre_post,
const uint idx_after_post_before_pre, Node* zero_trip_guard_proj_main,
@ -1159,6 +1159,11 @@ void PhaseIdealLoop::copy_skeleton_predicates_to_main_loop_helper(Node* predicat
predicate = iff->in(0);
Node* current_proj = outer_main_head->in(LoopNode::EntryControl);
Node* prev_proj = current_proj;
Node* opaque_init = new OpaqueLoopInitNode(C, init);
register_new_node(opaque_init, outer_main_head->in(LoopNode::EntryControl));
Node* opaque_stride = new OpaqueLoopStrideNode(C, stride);
register_new_node(opaque_stride, outer_main_head->in(LoopNode::EntryControl));
while (predicate != NULL && predicate->is_Proj() && predicate->in(0)->is_If()) {
iff = predicate->in(0)->as_If();
uncommon_proj = iff->proj_out(1 - predicate->as_Proj()->_con);
@ -1169,10 +1174,11 @@ void PhaseIdealLoop::copy_skeleton_predicates_to_main_loop_helper(Node* predicat
// Clone the skeleton predicate twice and initialize one with the initial
// value of the loop induction variable. Leave the other predicate
// to be initialized when increasing the stride during loop unrolling.
prev_proj = clone_skeleton_predicate(iff, start, predicate, uncommon_proj, current_proj, outer_loop, prev_proj);
assert(skeleton_predicate_has_opaque(prev_proj->in(0)->as_If()) == (start->Opcode() == Op_Opaque1), "");
prev_proj = clone_skeleton_predicate(iff, end, predicate, uncommon_proj, current_proj, outer_loop, prev_proj);
assert(skeleton_predicate_has_opaque(prev_proj->in(0)->as_If()) == (end->Opcode() == Op_Opaque1), "");
prev_proj = clone_skeleton_predicate(iff, opaque_init, NULL, predicate, uncommon_proj, current_proj, outer_loop, prev_proj);
assert(skeleton_predicate_has_opaque(prev_proj->in(0)->as_If()), "");
prev_proj = clone_skeleton_predicate(iff, init, stride, predicate, uncommon_proj, current_proj, outer_loop, prev_proj);
assert(!skeleton_predicate_has_opaque(prev_proj->in(0)->as_If()), "");
// Rewire any control inputs from the cloned skeleton predicates down to the main and post loop for data nodes that are part of the
// main loop (and were cloned to the pre and post loop).
@ -1238,14 +1244,14 @@ bool PhaseIdealLoop::skeleton_predicate_has_opaque(IfNode* iff) {
}
continue;
}
if (op == Op_Opaque1) {
if (n->is_Opaque1()) {
return true;
}
}
return false;
}
Node* PhaseIdealLoop::clone_skeleton_predicate(Node* iff, Node* value, Node* predicate, Node* uncommon_proj,
Node* PhaseIdealLoop::clone_skeleton_predicate(Node* iff, Node* new_init, Node* new_stride, Node* predicate, Node* uncommon_proj,
Node* current_proj, IdealLoopTree* outer_loop, Node* prev_proj) {
Node_Stack to_clone(2);
to_clone.push(iff->in(1), 1);
@ -1265,12 +1271,19 @@ Node* PhaseIdealLoop::clone_skeleton_predicate(Node* iff, Node* value, Node* pre
to_clone.push(m, 1);
continue;
}
if (op == Op_Opaque1) {
if (m->is_Opaque1()) {
if (n->_idx < current) {
n = n->clone();
register_new_node(n, current_proj);
}
if (op == Op_OpaqueLoopInit) {
n->set_req(i, new_init);
} else {
assert(op == Op_OpaqueLoopStride, "unexpected opaque node");
if (new_stride != NULL) {
n->set_req(i, new_stride);
}
}
n->set_req(i, value);
register_new_node(n, current_proj);
to_clone.set_node(n);
}
for (;;) {
@ -1320,7 +1333,7 @@ Node* PhaseIdealLoop::clone_skeleton_predicate(Node* iff, Node* value, Node* pre
return proj;
}
void PhaseIdealLoop::copy_skeleton_predicates_to_main_loop(CountedLoopNode* pre_head, Node* start, Node* end,
void PhaseIdealLoop::copy_skeleton_predicates_to_main_loop(CountedLoopNode* pre_head, Node* init, Node* stride,
IdealLoopTree* outer_loop, LoopNode* outer_main_head,
uint dd_main_head, const uint idx_before_pre_post,
const uint idx_after_post_before_pre, Node* zero_trip_guard_proj_main,
@ -1340,10 +1353,10 @@ void PhaseIdealLoop::copy_skeleton_predicates_to_main_loop(CountedLoopNode* pre_
}
}
predicate = find_predicate_insertion_point(entry, Deoptimization::Reason_predicate);
copy_skeleton_predicates_to_main_loop_helper(predicate, start, end, outer_loop, outer_main_head, dd_main_head,
copy_skeleton_predicates_to_main_loop_helper(predicate, init, stride, outer_loop, outer_main_head, dd_main_head,
idx_before_pre_post, idx_after_post_before_pre, zero_trip_guard_proj_main,
zero_trip_guard_proj_post, old_new);
copy_skeleton_predicates_to_main_loop_helper(profile_predicate, start, end, outer_loop, outer_main_head, dd_main_head,
copy_skeleton_predicates_to_main_loop_helper(profile_predicate, init, stride, outer_loop, outer_main_head, dd_main_head,
idx_before_pre_post, idx_after_post_before_pre, zero_trip_guard_proj_main,
zero_trip_guard_proj_post, old_new);
}
@ -1493,10 +1506,8 @@ void PhaseIdealLoop::insert_pre_post_loops(IdealLoopTree *loop, Node_List &old_n
// CastII for the main loop:
Node* castii = cast_incr_before_loop(pre_incr, min_taken, main_head);
assert(castii != NULL, "no castII inserted");
Node* opaque_castii = new Opaque1Node(C, castii);
register_new_node(opaque_castii, outer_main_head->in(LoopNode::EntryControl));
assert(post_head->in(1)->is_IfProj(), "must be zero-trip guard If node projection of the post loop");
copy_skeleton_predicates_to_main_loop(pre_head, castii, opaque_castii, outer_loop, outer_main_head, dd_main_head,
copy_skeleton_predicates_to_main_loop(pre_head, castii, stride, outer_loop, outer_main_head, dd_main_head,
idx_before_pre_post, idx_after_post_before_pre, min_taken, post_head->in(1), old_new);
// Step B4: Shorten the pre-loop to run only 1 iteration (for now).
@ -1788,6 +1799,13 @@ void PhaseIdealLoop::update_main_loop_skeleton_predicates(Node* ctrl, CountedLoo
Node* prev_proj = ctrl;
LoopNode* outer_loop_head = loop_head->skip_strip_mined();
IdealLoopTree* outer_loop = get_loop(outer_loop_head);
// Compute the value of the loop induction variable at the end of the
// first iteration of the unrolled loop: init + new_stride_con - init_inc
int new_stride_con = stride_con * 2;
Node* max_value = _igvn.intcon(new_stride_con);
set_ctrl(max_value, C->root());
while (entry != NULL && entry->is_Proj() && entry->in(0)->is_If()) {
IfNode* iff = entry->in(0)->as_If();
ProjNode* proj = iff->proj_out(1 - entry->as_Proj()->_con);
@ -1803,18 +1821,8 @@ void PhaseIdealLoop::update_main_loop_skeleton_predicates(Node* ctrl, CountedLoo
// tell. Kill it in any case.
_igvn.replace_input_of(iff, 1, iff->in(1)->in(2));
} else {
// Add back the predicate for the value at the beginning of the first entry
prev_proj = clone_skeleton_predicate(iff, init, entry, proj, ctrl, outer_loop, prev_proj);
assert(!skeleton_predicate_has_opaque(prev_proj->in(0)->as_If()), "unexpected");
// Compute the value of the loop induction variable at the end of the
// first iteration of the unrolled loop: init + new_stride_con - init_inc
int init_inc = stride_con/loop_head->unrolled_count();
assert(init_inc != 0, "invalid loop increment");
int new_stride_con = stride_con * 2;
Node* max_value = _igvn.intcon(new_stride_con - init_inc);
max_value = new AddINode(init, max_value);
register_new_node(max_value, get_ctrl(iff->in(1)));
prev_proj = clone_skeleton_predicate(iff, max_value, entry, proj, ctrl, outer_loop, prev_proj);
// Add back predicates updated for the new stride.
prev_proj = clone_skeleton_predicate(iff, init, max_value, entry, proj, ctrl, outer_loop, prev_proj);
assert(!skeleton_predicate_has_opaque(prev_proj->in(0)->as_If()), "unexpected");
}
}
@ -2667,22 +2675,26 @@ int PhaseIdealLoop::do_range_check(IdealLoopTree *loop, Node_List &old_new) {
// (0-offset)/scale could be outside of loop iterations range.
conditional_rc = true;
Node* init = cl->init_trip();
Node* opaque_init = new Opaque1Node(C, init);
Node* opaque_init = new OpaqueLoopInitNode(C, init);
register_new_node(opaque_init, predicate_proj);
// template predicate so it can be updated on next unrolling
predicate_proj = add_range_check_predicate(loop, cl, predicate_proj, scale_con, offset, limit, stride_con, opaque_init);
assert(skeleton_predicate_has_opaque(predicate_proj->in(0)->as_If()), "unexpected");
// predicate on first value of first iteration
predicate_proj = add_range_check_predicate(loop, cl, predicate_proj, scale_con, offset, limit, stride_con, init);
assert(!skeleton_predicate_has_opaque(predicate_proj->in(0)->as_If()), "unexpected");
int init_inc = stride_con/cl->unrolled_count();
assert(init_inc != 0, "invalid loop increment");
Node* max_value = _igvn.intcon(stride_con - init_inc);
max_value = new AddINode(init, max_value);
// template predicate so it can be updated on next unrolling
predicate_proj = add_range_check_predicate(loop, cl, predicate_proj, scale_con, offset, limit, stride_con, opaque_init);
assert(skeleton_predicate_has_opaque(predicate_proj->in(0)->as_If()), "unexpected");
Node* opaque_stride = new OpaqueLoopStrideNode(C, cl->stride());
register_new_node(opaque_stride, predicate_proj);
Node* max_value = new SubINode(opaque_stride, cl->stride());
register_new_node(max_value, predicate_proj);
max_value = new AddINode(opaque_init, max_value);
register_new_node(max_value, predicate_proj);
// predicate on last value of first iteration (in case unrolling has already happened)
predicate_proj = add_range_check_predicate(loop, cl, predicate_proj, scale_con, offset, limit, stride_con, max_value);
assert(!skeleton_predicate_has_opaque(predicate_proj->in(0)->as_If()), "unexpected");
assert(skeleton_predicate_has_opaque(predicate_proj->in(0)->as_If()), "unexpected");
} else {
if (PrintOpto) {
tty->print_cr("missed RCE opportunity");

View File

@ -2580,7 +2580,7 @@ uint IdealLoopTree::est_loop_clone_sz(uint factor) const {
uint const bc = 13;
uint const cc = 17;
uint const sz = _body.size() + (_body.size() + 7) / 8;
uint const sz = _body.size() + (_body.size() + 7) / 2;
uint estimate = factor * (sz + bc) + cc;
assert((estimate - cc) / factor == sz + bc, "overflow");

View File

@ -788,13 +788,13 @@ private:
#ifdef ASSERT
void ensure_zero_trip_guard_proj(Node* node, bool is_main_loop);
#endif
void copy_skeleton_predicates_to_main_loop_helper(Node* predicate, Node* start, Node* end, IdealLoopTree* outer_loop, LoopNode* outer_main_head,
void copy_skeleton_predicates_to_main_loop_helper(Node* predicate, Node* init, Node* stride, IdealLoopTree* outer_loop, LoopNode* outer_main_head,
uint dd_main_head, const uint idx_before_pre_post, const uint idx_after_post_before_pre,
Node* zero_trip_guard_proj_main, Node* zero_trip_guard_proj_post, const Node_List &old_new);
void copy_skeleton_predicates_to_main_loop(CountedLoopNode* pre_head, Node* start, Node* end, IdealLoopTree* outer_loop, LoopNode* outer_main_head,
void copy_skeleton_predicates_to_main_loop(CountedLoopNode* pre_head, Node* init, Node* stride, IdealLoopTree* outer_loop, LoopNode* outer_main_head,
uint dd_main_head, const uint idx_before_pre_post, const uint idx_after_post_before_pre,
Node* zero_trip_guard_proj_main, Node* zero_trip_guard_proj_post, const Node_List &old_new);
Node* clone_skeleton_predicate(Node* iff, Node* value, Node* predicate, Node* uncommon_proj,
Node* clone_skeleton_predicate(Node* iff, Node* new_init, Node* new_stride, Node* predicate, Node* uncommon_proj,
Node* current_proj, IdealLoopTree* outer_loop, Node* prev_proj);
bool skeleton_predicate_has_opaque(IfNode* iff);
void update_main_loop_skeleton_predicates(Node* ctrl, CountedLoopNode* loop_head, Node* init, int stride_con);

View File

@ -952,29 +952,43 @@ void PhaseIdealLoop::try_move_store_after_loop(Node* n) {
Node *PhaseIdealLoop::split_if_with_blocks_pre( Node *n ) {
// Cloning these guys is unlikely to win
int n_op = n->Opcode();
if( n_op == Op_MergeMem ) return n;
if( n->is_Proj() ) return n;
if (n_op == Op_MergeMem) {
return n;
}
if (n->is_Proj()) {
return n;
}
// Do not clone-up CmpFXXX variations, as these are always
// followed by a CmpI
if( n->is_Cmp() ) return n;
// Attempt to use a conditional move instead of a phi/branch
if( ConditionalMoveLimit > 0 && n_op == Op_Region ) {
Node *cmov = conditional_move( n );
if( cmov ) return cmov;
}
if( n->is_CFG() || n->is_LoadStore() )
if (n->is_Cmp()) {
return n;
if( n_op == Op_Opaque1 || // Opaque nodes cannot be mod'd
n_op == Op_Opaque2 ) {
if( !C->major_progress() ) // If chance of no more loop opts...
}
// Attempt to use a conditional move instead of a phi/branch
if (ConditionalMoveLimit > 0 && n_op == Op_Region) {
Node *cmov = conditional_move( n );
if (cmov) {
return cmov;
}
}
if (n->is_CFG() || n->is_LoadStore()) {
return n;
}
if (n->is_Opaque1() || // Opaque nodes cannot be mod'd
n_op == Op_Opaque2) {
if (!C->major_progress()) { // If chance of no more loop opts...
_igvn._worklist.push(n); // maybe we'll remove them
}
return n;
}
if( n->is_Con() ) return n; // No cloning for Con nodes
if (n->is_Con()) {
return n; // No cloning for Con nodes
}
Node *n_ctrl = get_ctrl(n);
if( !n_ctrl ) return n; // Dead node
if (!n_ctrl) {
return n; // Dead node
}
Node* res = try_move_store_before_loop(n, n_ctrl);
if (res != NULL) {

View File

@ -2636,9 +2636,10 @@ void PhaseMacroExpand::eliminate_macro_nodes() {
break;
case Node::Class_SubTypeCheck:
break;
case Node::Class_Opaque1:
break;
default:
assert(n->Opcode() == Op_LoopLimit ||
n->Opcode() == Op_Opaque1 ||
n->Opcode() == Op_Opaque2 ||
n->Opcode() == Op_Opaque3 ||
BarrierSet::barrier_set()->barrier_set_c2()->is_gc_barrier_node(n),
@ -2674,7 +2675,7 @@ bool PhaseMacroExpand::expand_macro_nodes() {
C->remove_macro_node(n);
_igvn._worklist.push(n);
success = true;
} else if (n->Opcode() == Op_Opaque1 || n->Opcode() == Op_Opaque2) {
} else if (n->is_Opaque1() || n->Opcode() == Op_Opaque2) {
_igvn.replace_node(n, n->in(1));
success = true;
#if INCLUDE_RTM_OPT

View File

@ -116,6 +116,7 @@ class MulNode;
class MultiNode;
class MultiBranchNode;
class NeverBranchNode;
class Opaque1Node;
class OuterStripMinedLoopNode;
class OuterStripMinedLoopEndNode;
class Node;
@ -609,9 +610,9 @@ public:
// This enum is used only for C2 ideal and mach nodes with is_<node>() methods
// so that it's values fits into 16 bits.
enum NodeClasses {
Bit_Node = 0x0000,
Class_Node = 0x0000,
ClassMask_Node = 0xFFFF,
Bit_Node = 0x00000000,
Class_Node = 0x00000000,
ClassMask_Node = 0xFFFFFFFF,
DEFINE_CLASS_ID(Multi, Node, 0)
DEFINE_CLASS_ID(SafePoint, Multi, 0)
@ -716,6 +717,7 @@ public:
DEFINE_CLASS_ID(Vector, Node, 13)
DEFINE_CLASS_ID(ClearArray, Node, 14)
DEFINE_CLASS_ID(Halt, Node, 15)
DEFINE_CLASS_ID(Opaque1, Node, 16)
_max_classes = ClassMask_Halt
};
@ -744,14 +746,14 @@ public:
class PD;
private:
jushort _class_id;
juint _class_id;
jushort _flags;
static juint max_flags();
protected:
// These methods should be called from constructors only.
void init_class_id(jushort c) {
void init_class_id(juint c) {
_class_id = c; // cast out const
}
void init_flags(uint fl) {
@ -764,7 +766,7 @@ protected:
}
public:
const jushort class_id() const { return _class_id; }
const juint class_id() const { return _class_id; }
const jushort flags() const { return _flags; }
@ -865,6 +867,7 @@ public:
DEFINE_CLASS_QUERY(Mul)
DEFINE_CLASS_QUERY(Multi)
DEFINE_CLASS_QUERY(MultiBranch)
DEFINE_CLASS_QUERY(Opaque1)
DEFINE_CLASS_QUERY(OuterStripMinedLoop)
DEFINE_CLASS_QUERY(OuterStripMinedLoopEnd)
DEFINE_CLASS_QUERY(Parm)

View File

@ -38,6 +38,7 @@ class Opaque1Node : public Node {
Opaque1Node(Compile* C, Node *n) : Node(NULL, n) {
// Put it on the Macro nodes list to removed during macro nodes expansion.
init_flags(Flag_is_macro);
init_class_id(Class_Opaque1);
C->add_macro_node(this);
}
// Special version for the pre-loop to hold the original loop limit
@ -45,6 +46,7 @@ class Opaque1Node : public Node {
Opaque1Node(Compile* C, Node *n, Node* orig_limit) : Node(NULL, n, orig_limit) {
// Put it on the Macro nodes list to removed during macro nodes expansion.
init_flags(Flag_is_macro);
init_class_id(Class_Opaque1);
C->add_macro_node(this);
}
Node* original_loop_limit() { return req()==3 ? in(2) : NULL; }
@ -53,6 +55,21 @@ class Opaque1Node : public Node {
virtual Node* Identity(PhaseGVN* phase);
};
// Opaque nodes specific to range check elimination handling
class OpaqueLoopInitNode : public Opaque1Node {
public:
OpaqueLoopInitNode(Compile* C, Node *n) : Opaque1Node(C, n) {
}
virtual int Opcode() const;
};
class OpaqueLoopStrideNode : public Opaque1Node {
public:
OpaqueLoopStrideNode(Compile* C, Node *n) : Opaque1Node(C, n) {
}
virtual int Opcode() const;
};
//------------------------------Opaque2Node------------------------------------
// A node to prevent unwanted optimizations. Allows constant folding. Stops
// value-numbering, most Ideal calls or Identity functions. This Node is

View File

@ -918,7 +918,7 @@ typedef HashtableEntry<InstanceKlass*, mtClass> KlassHashtableEntry;
c2_nonstatic_field(Node, _outcnt, node_idx_t) \
c2_nonstatic_field(Node, _outmax, node_idx_t) \
c2_nonstatic_field(Node, _idx, const node_idx_t) \
c2_nonstatic_field(Node, _class_id, jushort) \
c2_nonstatic_field(Node, _class_id, juint) \
c2_nonstatic_field(Node, _flags, jushort) \
\
c2_nonstatic_field(Compile, _root, RootNode*) \

View File

@ -152,7 +152,7 @@ public final class Console implements Flushable
* extra arguments are ignored. The number of arguments is
* variable and may be zero. The maximum number of arguments is
* limited by the maximum dimension of a Java array as defined by
* <cite>The Java&trade; Virtual Machine Specification</cite>.
* <cite>The Java Virtual Machine Specification</cite>.
* The behaviour on a
* {@code null} argument depends on the <a
* href="../util/Formatter.html#syntax">conversion</a>.
@ -192,7 +192,7 @@ public final class Console implements Flushable
* extra arguments are ignored. The number of arguments is
* variable and may be zero. The maximum number of arguments is
* limited by the maximum dimension of a Java array as defined by
* <cite>The Java&trade; Virtual Machine Specification</cite>.
* <cite>The Java Virtual Machine Specification</cite>.
* The behaviour on a
* {@code null} argument depends on the <a
* href="../util/Formatter.html#syntax">conversion</a>.
@ -225,7 +225,7 @@ public final class Console implements Flushable
* string. If there are more arguments than format specifiers, the
* extra arguments are ignored. The maximum number of arguments is
* limited by the maximum dimension of a Java array as defined by
* <cite>The Java&trade; Virtual Machine Specification</cite>.
* <cite>The Java Virtual Machine Specification</cite>.
*
* @throws IllegalFormatException
* If a format string contains an illegal syntax, a format
@ -289,7 +289,7 @@ public final class Console implements Flushable
* string. If there are more arguments than format specifiers, the
* extra arguments are ignored. The maximum number of arguments is
* limited by the maximum dimension of a Java array as defined by
* <cite>The Java&trade; Virtual Machine Specification</cite>.
* <cite>The Java Virtual Machine Specification</cite>.
*
* @throws IllegalFormatException
* If a format string contains an illegal syntax, a format

View File

@ -1080,7 +1080,7 @@ public class PrintStream extends FilterOutputStream
* extra arguments are ignored. The number of arguments is
* variable and may be zero. The maximum number of arguments is
* limited by the maximum dimension of a Java array as defined by
* <cite>The Java&trade; Virtual Machine Specification</cite>.
* <cite>The Java Virtual Machine Specification</cite>.
* The behaviour on a
* {@code null} argument depends on the <a
* href="../util/Formatter.html#syntax">conversion</a>.
@ -1132,7 +1132,7 @@ public class PrintStream extends FilterOutputStream
* extra arguments are ignored. The number of arguments is
* variable and may be zero. The maximum number of arguments is
* limited by the maximum dimension of a Java array as defined by
* <cite>The Java&trade; Virtual Machine Specification</cite>.
* <cite>The Java Virtual Machine Specification</cite>.
* The behaviour on a
* {@code null} argument depends on the <a
* href="../util/Formatter.html#syntax">conversion</a>.
@ -1177,7 +1177,7 @@ public class PrintStream extends FilterOutputStream
* extra arguments are ignored. The number of arguments is
* variable and may be zero. The maximum number of arguments is
* limited by the maximum dimension of a Java array as defined by
* <cite>The Java&trade; Virtual Machine Specification</cite>.
* <cite>The Java Virtual Machine Specification</cite>.
* The behaviour on a
* {@code null} argument depends on the <a
* href="../util/Formatter.html#syntax">conversion</a>.
@ -1236,7 +1236,7 @@ public class PrintStream extends FilterOutputStream
* extra arguments are ignored. The number of arguments is
* variable and may be zero. The maximum number of arguments is
* limited by the maximum dimension of a Java array as defined by
* <cite>The Java&trade; Virtual Machine Specification</cite>.
* <cite>The Java Virtual Machine Specification</cite>.
* The behaviour on a
* {@code null} argument depends on the <a
* href="../util/Formatter.html#syntax">conversion</a>.

View File

@ -863,7 +863,7 @@ public class PrintWriter extends Writer {
* extra arguments are ignored. The number of arguments is
* variable and may be zero. The maximum number of arguments is
* limited by the maximum dimension of a Java array as defined by
* <cite>The Java&trade; Virtual Machine Specification</cite>.
* <cite>The Java Virtual Machine Specification</cite>.
* The behaviour on a
* {@code null} argument depends on the <a
* href="../util/Formatter.html#syntax">conversion</a>.
@ -916,7 +916,7 @@ public class PrintWriter extends Writer {
* extra arguments are ignored. The number of arguments is
* variable and may be zero. The maximum number of arguments is
* limited by the maximum dimension of a Java array as defined by
* <cite>The Java&trade; Virtual Machine Specification</cite>.
* <cite>The Java Virtual Machine Specification</cite>.
* The behaviour on a
* {@code null} argument depends on the <a
* href="../util/Formatter.html#syntax">conversion</a>.
@ -960,7 +960,7 @@ public class PrintWriter extends Writer {
* extra arguments are ignored. The number of arguments is
* variable and may be zero. The maximum number of arguments is
* limited by the maximum dimension of a Java array as defined by
* <cite>The Java&trade; Virtual Machine Specification</cite>.
* <cite>The Java Virtual Machine Specification</cite>.
* The behaviour on a
* {@code null} argument depends on the <a
* href="../util/Formatter.html#syntax">conversion</a>.
@ -1020,7 +1020,7 @@ public class PrintWriter extends Writer {
* extra arguments are ignored. The number of arguments is
* variable and may be zero. The maximum number of arguments is
* limited by the maximum dimension of a Java array as defined by
* <cite>The Java&trade; Virtual Machine Specification</cite>.
* <cite>The Java Virtual Machine Specification</cite>.
* The behaviour on a
* {@code null} argument depends on the <a
* href="../util/Formatter.html#syntax">conversion</a>.

View File

@ -35,7 +35,7 @@ package java.lang;
* </pre>
* has as its detail message the <i>string conversion</i> of
* <i>expression</i> (as defined in section 15.18.1.1 of
* <cite>The Java&trade; Language Specification</cite>),
* <cite>The Java Language Specification</cite>),
* regardless of the type of <i>expression</i>.
*
* @since 1.4
@ -63,7 +63,7 @@ public class AssertionError extends Error {
* Constructs an AssertionError with its detail message derived
* from the specified object, which is converted to a string as
* defined in section 15.18.1.1 of
* <cite>The Java&trade; Language Specification</cite>.
* <cite>The Java Language Specification</cite>.
*<p>
* If the specified object is an instance of {@code Throwable}, it
* becomes the <i>cause</i> of the newly constructed assertion error.
@ -81,7 +81,7 @@ public class AssertionError extends Error {
* Constructs an AssertionError with its detail message derived
* from the specified {@code boolean}, which is converted to
* a string as defined in section 15.18.1.1 of
* <cite>The Java&trade; Language Specification</cite>.
* <cite>The Java Language Specification</cite>.
*
* @param detailMessage value to be used in constructing detail message
*/
@ -93,7 +93,7 @@ public class AssertionError extends Error {
* Constructs an AssertionError with its detail message derived
* from the specified {@code char}, which is converted to a
* string as defined in section 15.18.1.1 of
* <cite>The Java&trade; Language Specification</cite>.
* <cite>The Java Language Specification</cite>.
*
* @param detailMessage value to be used in constructing detail message
*/
@ -105,7 +105,7 @@ public class AssertionError extends Error {
* Constructs an AssertionError with its detail message derived
* from the specified {@code int}, which is converted to a
* string as defined in section 15.18.1.1 of
* <cite>The Java&trade; Language Specification</cite>.
* <cite>The Java Language Specification</cite>.
*
* @param detailMessage value to be used in constructing detail message
*/
@ -117,7 +117,7 @@ public class AssertionError extends Error {
* Constructs an AssertionError with its detail message derived
* from the specified {@code long}, which is converted to a
* string as defined in section 15.18.1.1 of
* <cite>The Java&trade; Language Specification</cite>.
* <cite>The Java Language Specification</cite>.
*
* @param detailMessage value to be used in constructing detail message
*/
@ -129,7 +129,7 @@ public class AssertionError extends Error {
* Constructs an AssertionError with its detail message derived
* from the specified {@code float}, which is converted to a
* string as defined in section 15.18.1.1 of
* <cite>The Java&trade; Language Specification</cite>.
* <cite>The Java Language Specification</cite>.
*
* @param detailMessage value to be used in constructing detail message
*/
@ -141,7 +141,7 @@ public class AssertionError extends Error {
* Constructs an AssertionError with its detail message derived
* from the specified {@code double}, which is converted to a
* string as defined in section 15.18.1.1 of
* <cite>The Java&trade; Language Specification</cite>.
* <cite>The Java Language Specification</cite>.
*
* @param detailMessage value to be used in constructing detail message
*/

View File

@ -290,7 +290,7 @@ public final class Byte extends Number implements Comparable<Byte>, Constable {
*
* <i>DecimalNumeral</i>, <i>HexDigits</i>, and <i>OctalDigits</i>
* are as defined in section 3.10.1 of
* <cite>The Java&trade; Language Specification</cite>,
* <cite>The Java Language Specification</cite>,
* except that underscores are not accepted between digits.
*
* <p>The sequence of characters following an optional

View File

@ -413,7 +413,7 @@ public final class Class<T> implements java.io.Serializable,
*
* Note that this method throws errors related to loading, linking
* or initializing as specified in Sections {@jls 12.2}, {@jls
* 12.3}, and {@jls 12.4} of <cite>The Java&trade; Language
* 12.3}, and {@jls 12.4} of <cite>The Java Language
* Specification</cite>.
* Note that this method does not check whether the requested class
* is accessible to its caller.
@ -422,7 +422,7 @@ public final class Class<T> implements java.io.Serializable,
* @param initialize if {@code true} the class will be initialized
* (which implies linking). See Section {@jls
* 12.4} of <cite>The Java&trade; Language
* 12.4} of <cite>The Java Language
* Specification</cite>.
* @param loader class loader from which the class must be loaded
* @return class object representing the desired class
@ -700,7 +700,7 @@ public final class Class<T> implements java.io.Serializable,
* <p> Specifically, this method tests whether the type represented by the
* specified {@code Class} parameter can be converted to the type
* represented by this {@code Class} object via an identity conversion
* or via a widening reference conversion. See <cite>The Java&trade; Language
* or via a widening reference conversion. See <cite>The Java Language
* Specification</cite>, sections {@jls 5.1.1} and {@jls 5.1.4},
* for details.
*
@ -952,7 +952,7 @@ public final class Class<T> implements java.io.Serializable,
* @throws java.lang.reflect.GenericSignatureFormatError if the generic
* signature of this generic declaration does not conform to
* the format specified in section {@jvms 4.7.9} of
* <cite>The Java&trade; Virtual Machine Specification</cite>
* <cite>The Java Virtual Machine Specification</cite>
* @since 1.5
*/
@SuppressWarnings("unchecked")
@ -1000,7 +1000,7 @@ public final class Class<T> implements java.io.Serializable,
*
* @throws java.lang.reflect.GenericSignatureFormatError if the generic
* class signature does not conform to the format specified in
* section {@jvms 4.7.9} of <cite>The Java&trade; Virtual
* section {@jvms 4.7.9} of <cite>The Java Virtual
* Machine Specification</cite>
* @throws TypeNotPresentException if the generic superclass
* refers to a non-existent type declaration
@ -1197,7 +1197,7 @@ public final class Class<T> implements java.io.Serializable,
* @throws java.lang.reflect.GenericSignatureFormatError
* if the generic class signature does not conform to the
* format specified in section {@jvms 4.7.9} of <cite>The
* Java&trade; Virtual Machine Specification</cite>
* Java Virtual Machine Specification</cite>
* @throws TypeNotPresentException if any of the generic
* superinterfaces refers to a non-existent type declaration
* @throws java.lang.reflect.MalformedParameterizedTypeException
@ -1269,7 +1269,7 @@ public final class Class<T> implements java.io.Serializable,
* by this specification.
*
* <p> The modifier encodings are defined in section {@jvms 4.1}
* of <cite>The Java&trade; Virtual Machine Specification</cite>.
* of <cite>The Java Virtual Machine Specification</cite>.
*
* @return the {@code int} representing the modifiers for this class
* @see java.lang.reflect.Modifier
@ -1678,7 +1678,7 @@ public final class Class<T> implements java.io.Serializable,
/**
* Returns the canonical name of the underlying class as
* defined by <cite>The Java&trade; Language Specification</cite>.
* defined by <cite>The Java Language Specification</cite>.
* Returns {@code null} if the underlying class does not have a canonical
* name. Classes without canonical names include:
* <ul>
@ -2478,7 +2478,7 @@ public final class Class<T> implements java.io.Serializable,
* object represents an interface, a primitive type, an array class, or
* void.
*
* <p> See <cite>The Java&trade; Language Specification</cite>,
* <p> See <cite>The Java Language Specification</cite>,
* section {@jls 8.2}.
*
* @return the array of {@code Constructor} objects representing all the

View File

@ -207,7 +207,7 @@ import sun.security.util.SecurityConstants;
*
* <p> Any class name provided as a {@code String} parameter to methods in
* {@code ClassLoader} must be a binary name as defined by
* <cite>The Java&trade; Language Specification</cite>.
* <cite>The Java Language Specification</cite>.
*
* <p> Examples of valid class names include:
* <blockquote><pre>
@ -220,7 +220,7 @@ import sun.security.util.SecurityConstants;
* <p> Any package name provided as a {@code String} parameter to methods in
* {@code ClassLoader} must be either the empty string (denoting an unnamed package)
* or a fully qualified name as defined by
* <cite>The Java&trade; Language Specification</cite>.
* <cite>The Java Language Specification</cite>.
*
* @jls 6.7 Fully Qualified Names
* @jls 13.1 The Form of a Binary
@ -765,7 +765,7 @@ public abstract class ClassLoader {
* The bytes that make up the class data. The bytes in positions
* {@code off} through {@code off+len-1} should have the format
* of a valid class file as defined by
* <cite>The Java&trade; Virtual Machine Specification</cite>.
* <cite>The Java Virtual Machine Specification</cite>.
*
* @param off
* The start offset in {@code b} of the class data
@ -838,7 +838,7 @@ public abstract class ClassLoader {
* The bytes that make up the class data. The bytes in positions
* {@code off} through {@code off+len-1} should have the format
* of a valid class file as defined by
* <cite>The Java&trade; Virtual Machine Specification</cite>.
* <cite>The Java Virtual Machine Specification</cite>.
*
* @param off
* The start offset in {@code b} of the class data
@ -972,7 +972,7 @@ public abstract class ClassLoader {
* The bytes that make up the class data. The bytes in positions
* {@code off} through {@code off+len-1} should have the format
* of a valid class file as defined by
* <cite>The Java&trade; Virtual Machine Specification</cite>.
* <cite>The Java Virtual Machine Specification</cite>.
*
* @param off
* The start offset in {@code b} of the class data
@ -1056,7 +1056,7 @@ public abstract class ClassLoader {
* The bytes that make up the class data. The bytes from positions
* {@code b.position()} through {@code b.position() + b.limit() -1
* } should have the format of a valid class file as defined by
* <cite>The Java&trade; Virtual Machine Specification</cite>.
* <cite>The Java Virtual Machine Specification</cite>.
*
* @param protectionDomain
* The {@code ProtectionDomain} of the class, or {@code null}.
@ -1213,7 +1213,7 @@ public abstract class ClassLoader {
* used by a class loader to link a class. If the class {@code c} has
* already been linked, then this method simply returns. Otherwise, the
* class is linked as described in the "Execution" chapter of
* <cite>The Java&trade; Language Specification</cite>.
* <cite>The Java Language Specification</cite>.
*
* @param c
* The class to link
@ -2532,7 +2532,7 @@ public abstract class ClassLoader {
* is to be set. A {@code null} value indicates the unnamed
* package that is "current"
* (see section 7.4.2 of
* <cite>The Java&trade; Language Specification</cite>.)
* <cite>The Java Language Specification</cite>.)
*
* @param enabled
* {@code true} if classes loaded by this classloader and

View File

@ -403,7 +403,7 @@ public final class Double extends Number
* <i>HexNumeral</i>, <i>HexDigits</i>, <i>SignedInteger</i> and
* <i>FloatTypeSuffix</i> are as defined in the lexical structure
* sections of
* <cite>The Java&trade; Language Specification</cite>,
* <cite>The Java Language Specification</cite>,
* except that underscores are not accepted between digits.
* If {@code s} does not have the form of
* a <i>FloatValue</i>, then a {@code NumberFormatException}

View File

@ -44,7 +44,7 @@ import static java.util.Objects.requireNonNull;
*
* More information about enums, including descriptions of the
* implicitly declared methods synthesized by the compiler, can be
* found in section {@jls 8.9} of <cite>The Java&trade; Language
* found in section {@jls 8.9} of <cite>The Java Language
* Specification</cite>.
*
* Enumeration types are all serializable and receive special handling

View File

@ -362,7 +362,7 @@ public final class Float extends Number
* <i>HexNumeral</i>, <i>HexDigits</i>, <i>SignedInteger</i> and
* <i>FloatTypeSuffix</i> are as defined in the lexical structure
* sections of
* <cite>The Java&trade; Language Specification</cite>,
* <cite>The Java Language Specification</cite>,
* except that underscores are not accepted between digits.
* If {@code s} does not have the form of
* a <i>FloatValue</i>, then a {@code NumberFormatException}

View File

@ -1377,7 +1377,7 @@ public final class Integer extends Number
*
* <i>DecimalNumeral</i>, <i>HexDigits</i>, and <i>OctalDigits</i>
* are as defined in section 3.10.1 of
* <cite>The Java&trade; Language Specification</cite>,
* <cite>The Java Language Specification</cite>,
* except that underscores are not accepted between digits.
*
* <p>The sequence of characters following an optional

View File

@ -1229,7 +1229,7 @@ public final class Long extends Number
*
* <i>DecimalNumeral</i>, <i>HexDigits</i>, and <i>OctalDigits</i>
* are as defined in section 3.10.1 of
* <cite>The Java&trade; Language Specification</cite>,
* <cite>The Java Language Specification</cite>,
* except that underscores are not accepted between digits.
*
* <p>The sequence of characters following an optional

View File

@ -85,7 +85,7 @@ import sun.security.util.SecurityConstants;
*
* <p> The package names that are parameters or returned by methods defined in
* this class are the fully-qualified names of the packages as defined in
* section 6.5.3 of <cite>The Java&trade; Language Specification</cite>, for
* section 6.5.3 of <cite>The Java Language Specification</cite>, for
* example, {@code "java.lang"}. </p>
*
* <p> Unless otherwise specified, passing a {@code null} argument to a method
@ -672,7 +672,7 @@ public final class Module implements AnnotatedElement {
* <p> This method has no effect if the package is already exported (or
* <em>open</em>) to the given module. </p>
*
* @apiNote As specified in section 5.4.3 of the <cite>The Java&trade;
* @apiNote As specified in section 5.4.3 of the <cite>The Java
* Virtual Machine Specification </cite>, if an attempt to resolve a
* symbolic reference fails because of a linkage error, then subsequent
* attempts to resolve the reference always fail with the same error that

View File

@ -70,6 +70,27 @@ public class NullPointerException extends RuntimeException {
super(s);
}
// 0: no backtrace filled in, no message computed.
// 1: backtrace filled in, no message computed.
// 2: message computed
private transient int extendedMessageState;
private transient String extendedMessage;
/**
* {@inheritDoc}
*/
public synchronized Throwable fillInStackTrace() {
// If the stack trace is changed the extended NPE algorithm
// will compute a wrong message. So compute it beforehand.
if (extendedMessageState == 0) {
extendedMessageState = 1;
} else if (extendedMessageState == 1) {
extendedMessage = getExtendedNPEMessage();
extendedMessageState = 2;
}
return super.fillInStackTrace();
}
/**
* Returns the detail message string of this throwable.
*
@ -89,7 +110,15 @@ public class NullPointerException extends RuntimeException {
public String getMessage() {
String message = super.getMessage();
if (message == null) {
return getExtendedNPEMessage();
synchronized(this) {
if (extendedMessageState == 1) {
// Only the original stack trace was filled in. Message will
// compute correctly.
extendedMessage = getExtendedNPEMessage();
extendedMessageState = 2;
}
return extendedMessage;
}
}
return message;
}

View File

@ -37,7 +37,7 @@ package java.lang;
*
* For platform classes, the conversion is often analogous to a
* narrowing primitive conversion or a widening primitive conversion
* as defined in <cite>The Java&trade; Language Specification</cite>
* as defined in <cite>The Java Language Specification</cite>
* for converting between primitive types. Therefore, conversions may
* lose information about the overall magnitude of a numeric value, may
* lose precision, and may even return a result of a different sign

View File

@ -462,7 +462,7 @@ public class Object {
* system resources or to perform other cleanup.
* <p>
* The general contract of {@code finalize} is that it is invoked
* if and when the Java&trade; virtual
* if and when the Java virtual
* machine has determined that there is no longer any
* means by which this object can be accessed by any thread that has
* not yet died, except as a result of an action taken by the

View File

@ -122,7 +122,7 @@ public class Package extends NamedPackage implements java.lang.reflect.Annotated
* Return the name of this package.
*
* @return The fully-qualified name of this package as defined in section 6.5.3 of
* <cite>The Java&trade; Language Specification</cite>,
* <cite>The Java Language Specification</cite>,
* for example, {@code java.lang}
*/
public String getName() {

View File

@ -38,10 +38,10 @@ package java.lang;
* <p>More information about records, including descriptions of the
* implicitly declared methods synthesized by the compiler, can be
* found in section 8.10 of
* <cite>The Java&trade; Language Specification</cite>.
* <cite>The Java Language Specification</cite>.
*
* <p>A <em>record class</em> is a shallowly immutable, transparent carrier for
* a fixed set of values, called the <em>record components</em>. The Java&trade;
* a fixed set of values, called the <em>record components</em>. The Java
* language provides concise syntax for declaring record classes, whereby the
* record components are declared in the record header. The list of record
* components declared in the record header form the <em>record descriptor</em>.

View File

@ -295,7 +295,7 @@ public final class Short extends Number implements Comparable<Short>, Constable
*
* <i>DecimalNumeral</i>, <i>HexDigits</i>, and <i>OctalDigits</i>
* are as defined in section 3.10.1 of
* <cite>The Java&trade; Language Specification</cite>,
* <cite>The Java Language Specification</cite>,
* except that underscores are not accepted between digits.
*
* <p>The sequence of characters following an optional

View File

@ -90,7 +90,7 @@ import static java.util.function.Predicate.not;
* The Java language provides special support for the string
* concatenation operator (&nbsp;+&nbsp;), and for conversion of
* other objects to strings. For additional information on string
* concatenation and conversion, see <i>The Java&trade; Language Specification</i>.
* concatenation and conversion, see <i>The Java Language Specification</i>.
*
* <p> Unless otherwise noted, passing a {@code null} argument to a constructor
* or method in this class will cause a {@link NullPointerException} to be
@ -113,7 +113,7 @@ import static java.util.function.Predicate.not;
*
* @implNote The implementation of the string concatenation operator is left to
* the discretion of a Java compiler, as long as the compiler ultimately conforms
* to <i>The Java&trade; Language Specification</i>. For example, the {@code javac} compiler
* to <i>The Java Language Specification</i>. For example, the {@code javac} compiler
* may implement the operator with {@code StringBuffer}, {@code StringBuilder},
* or {@code java.lang.invoke.StringConcatFactory} depending on the JDK version. The
* implementation of string conversion is typically through the method {@code toString},
@ -3269,7 +3269,7 @@ public final class String
* extra arguments are ignored. The number of arguments is
* variable and may be zero. The maximum number of arguments is
* limited by the maximum dimension of a Java array as defined by
* <cite>The Java&trade; Virtual Machine Specification</cite>.
* <cite>The Java Virtual Machine Specification</cite>.
* The behaviour on a
* {@code null} argument depends on the <a
* href="../util/Formatter.html#syntax">conversion</a>.
@ -3310,7 +3310,7 @@ public final class String
* extra arguments are ignored. The number of arguments is
* variable and may be zero. The maximum number of arguments is
* limited by the maximum dimension of a Java array as defined by
* <cite>The Java&trade; Virtual Machine Specification</cite>.
* <cite>The Java Virtual Machine Specification</cite>.
* The behaviour on a
* {@code null} argument depends on the
* <a href="../util/Formatter.html#syntax">conversion</a>.
@ -3534,7 +3534,7 @@ public final class String
* <p>
* All literal strings and string-valued constant expressions are
* interned. String literals are defined in section 3.10.5 of the
* <cite>The Java&trade; Language Specification</cite>.
* <cite>The Java Language Specification</cite>.
*
* @return a string that has the same contents as this string, but is
* guaranteed to be from a pool of unique strings.

View File

@ -32,7 +32,7 @@ package java.lang.annotation;
* define an annotation type.
*
* More information about annotation types can be found in section {@jls 9.6} of
* <cite>The Java&trade; Language Specification</cite>.
* <cite>The Java Language Specification</cite>.
*
* The {@link java.lang.reflect.AnnotatedElement} interface discusses
* compatibility concerns when evolving an annotation type from being

View File

@ -1489,7 +1489,7 @@ public class ModuleDescriptor
* <p> The module names, package names, and class names that are parameters
* specified to the builder methods are the module names, package names,
* and qualified names of classes (in named packages) as defined in the
* <cite>The Java&trade; Language Specification</cite>. </p>
* <cite>The Java Language Specification</cite>. </p>
*
* <p> Example usage: </p>
* <pre>{@code ModuleDescriptor descriptor = ModuleDescriptor.newModule("stats.core")

View File

@ -419,7 +419,7 @@ public abstract class Reference<T> {
* facilities are not possible or do not provide the desired control. This
* method is applicable only when reclamation may have visible effects,
* which is possible for objects with finalizers (See Section 12.6
* of <cite>The Java&trade; Language Specification</cite>) that
* of <cite>The Java Language Specification</cite>) that
* are implemented in ways that rely on ordering control for
* correctness.
*

View File

@ -440,7 +440,7 @@ public class AccessibleObject implements AnnotatedElement {
* <p> This method returns {@code true} if the {@code accessible} flag
* is set to {@code true}, i.e. the checks for Java language access control
* are suppressed, or if the caller can access the member as
* specified in <cite>The Java&trade; Language Specification</cite>,
* specified in <cite>The Java Language Specification</cite>,
* with the variation noted in the class description. </p>
*
* @param obj an instance object of the declaring class of this reflected

View File

@ -45,7 +45,7 @@ import sun.reflect.annotation.AnnotationType;
* element are on a <em>declaration</em>, whereas annotations on a
* type are on a specific <em>use</em> of a type name.
*
* As defined by <cite>The Java&trade; Language Specification</cite>
* As defined by <cite>The Java Language Specification</cite>
* section {@jls 9.7.4}, an annotation on an element is a
* <em>declaration annotation</em> and an annotation on a type is a
* <em>type annotation</em>.

View File

@ -437,7 +437,7 @@ public final class Constructor<T> extends Executable {
* <p>If the constructor's declaring class is an inner class in a
* non-static context, the first argument to the constructor needs
* to be the enclosing instance; see section 15.9.3 of
* <cite>The Java&trade; Language Specification</cite>.
* <cite>The Java Language Specification</cite>.
*
* <p>If the required access and argument checks succeed and the
* instantiation will proceed, the constructor's declaring class

View File

@ -217,7 +217,7 @@ public abstract class Executable extends AccessibleObject
* @throws GenericSignatureFormatError if the generic
* signature of this generic declaration does not conform to
* the format specified in
* <cite>The Java&trade; Virtual Machine Specification</cite>
* <cite>The Java Virtual Machine Specification</cite>
*/
public abstract TypeVariable<?>[] getTypeParameters();
@ -276,7 +276,7 @@ public abstract class Executable extends AccessibleObject
* @throws GenericSignatureFormatError
* if the generic method signature does not conform to the format
* specified in
* <cite>The Java&trade; Virtual Machine Specification</cite>
* <cite>The Java Virtual Machine Specification</cite>
* @throws TypeNotPresentException if any of the parameter
* types of the underlying executable refers to a non-existent type
* declaration
@ -474,7 +474,7 @@ public abstract class Executable extends AccessibleObject
* @throws GenericSignatureFormatError
* if the generic method signature does not conform to the format
* specified in
* <cite>The Java&trade; Virtual Machine Specification</cite>
* <cite>The Java Virtual Machine Specification</cite>
* @throws TypeNotPresentException if the underlying executable's
* {@code throws} clause refers to a non-existent type declaration
* @throws MalformedParameterizedTypeException if
@ -515,7 +515,7 @@ public abstract class Executable extends AccessibleObject
*
* @return true if and only if this executable is a synthetic
* construct as defined by
* <cite>The Java&trade; Language Specification</cite>.
* <cite>The Java Language Specification</cite>.
* @jls 13.1 The Form of a Binary
*/
public boolean isSynthetic() {

View File

@ -255,7 +255,7 @@ class Field extends AccessibleObject implements Member {
* the field represented by this {@code Field} object
* @throws GenericSignatureFormatError if the generic field
* signature does not conform to the format specified in
* <cite>The Java&trade; Virtual Machine Specification</cite>
* <cite>The Java Virtual Machine Specification</cite>
* @throws TypeNotPresentException if the generic type
* signature of the underlying field refers to a non-existent
* type declaration

View File

@ -43,7 +43,7 @@ public interface GenericDeclaration extends AnnotatedElement {
* @throws GenericSignatureFormatError if the generic
* signature of this generic declaration does not conform to
* the format specified in
* <cite>The Java&trade; Virtual Machine Specification</cite>
* <cite>The Java Virtual Machine Specification</cite>
*/
public TypeVariable<?>[] getTypeParameters();
}

View File

@ -277,7 +277,7 @@ public final class Method extends Executable {
* @throws GenericSignatureFormatError
* if the generic method signature does not conform to the format
* specified in
* <cite>The Java&trade; Virtual Machine Specification</cite>
* <cite>The Java Virtual Machine Specification</cite>
* @throws TypeNotPresentException if the underlying method's
* return type refers to a non-existent type declaration
* @throws MalformedParameterizedTypeException if the

View File

@ -33,7 +33,7 @@ import java.util.StringJoiner;
* modifiers are represented as integers with distinct bit positions
* representing different modifiers. The values for the constants
* representing the modifiers are taken from the tables in sections 4.1, 4.4, 4.5, and 4.7 of
* <cite>The Java&trade; Virtual Machine Specification</cite>.
* <cite>The Java Virtual Machine Specification</cite>.
*
* @see Class#getModifiers()
* @see Member#getModifiers()
@ -201,7 +201,7 @@ public class Modifier {
* </pre></blockquote>
* The modifier names are returned in an order consistent with the
* suggested modifier orderings given in sections 8.1.1, 8.3.1, 8.4.3, 8.8.3, and 9.1.1 of
* <cite>The Java&trade; Language Specification</cite>.
* <cite>The Java Language Specification</cite>.
* The full modifier ordering used by this method is:
* <blockquote> {@code
* public protected private abstract static final transient
@ -247,7 +247,7 @@ public class Modifier {
/*
* Access modifier flag constants from tables 4.1, 4.4, 4.5, and 4.7 of
* <cite>The Java&trade; Virtual Machine Specification</cite>
* <cite>The Java Virtual Machine Specification</cite>
*/
/**

View File

@ -112,7 +112,7 @@ public final class Parameter implements AnnotatedElement {
/**
* Returns a string describing this parameter. The format is the
* modifiers for the parameter, if any, in canonical order as
* recommended by <cite>The Java&trade; Language
* recommended by <cite>The Java Language
* Specification</cite>, followed by the fully-qualified type of
* the parameter (excluding the last [] if the parameter is
* variable arity), followed by "..." if the parameter is variable
@ -247,7 +247,7 @@ public final class Parameter implements AnnotatedElement {
* in source code; returns {@code false} otherwise.
*
* @return true if and only if this parameter is implicitly
* declared as defined by <cite>The Java&trade; Language
* declared as defined by <cite>The Java Language
* Specification</cite>.
*/
public boolean isImplicit() {
@ -262,7 +262,7 @@ public final class Parameter implements AnnotatedElement {
* @jls 13.1 The Form of a Binary
* @return true if and only if this parameter is a synthetic
* construct as defined by
* <cite>The Java&trade; Language Specification</cite>.
* <cite>The Java Language Specification</cite>.
*/
public boolean isSynthetic() {
return Modifier.isSynthetic(getModifiers());

View File

@ -120,7 +120,7 @@ public final class RecordComponent implements AnnotatedElement {
* this record component
* @throws GenericSignatureFormatError if the generic record component
* signature does not conform to the format specified in
* <cite>The Java&trade; Virtual Machine Specification</cite>
* <cite>The Java Virtual Machine Specification</cite>
* @throws TypeNotPresentException if the generic type
* signature of the underlying record component refers to a non-existent
* type declaration

View File

@ -48,7 +48,7 @@ import java.util.Objects;
* Bootstrap methods for state-driven implementations of core methods,
* including {@link Object#equals(Object)}, {@link Object#hashCode()}, and
* {@link Object#toString()}. These methods may be used, for example, by
* Java&trade; compiler implementations to implement the bodies of {@link Object}
* Java compiler implementations to implement the bodies of {@link Object}
* methods for record classes.
*
* @since 14

View File

@ -3455,7 +3455,7 @@ public class BigDecimal extends Number implements Comparable<BigDecimal> {
* This conversion is analogous to the
* <i>narrowing primitive conversion</i> from {@code double} to
* {@code long} as defined in
* <cite>The Java&trade; Language Specification</cite>:
* <cite>The Java Language Specification</cite>:
* any fractional part of this
* {@code BigDecimal} will be discarded. Note that this
* conversion can lose information about the precision of the
@ -3493,7 +3493,7 @@ public class BigDecimal extends Number implements Comparable<BigDecimal> {
* This conversion is analogous to the
* <i>narrowing primitive conversion</i> from {@code double} to
* {@code short} as defined in
* <cite>The Java&trade; Language Specification</cite>:
* <cite>The Java Language Specification</cite>:
* any fractional part of this
* {@code BigDecimal} will be discarded, and if the resulting
* "{@code BigInteger}" is too big to fit in a
@ -3591,7 +3591,7 @@ public class BigDecimal extends Number implements Comparable<BigDecimal> {
* This conversion is analogous to the
* <i>narrowing primitive conversion</i> from {@code double} to
* {@code short} as defined in
* <cite>The Java&trade; Language Specification</cite>:
* <cite>The Java Language Specification</cite>:
* any fractional part of this
* {@code BigDecimal} will be discarded, and if the resulting
* "{@code BigInteger}" is too big to fit in an
@ -3675,7 +3675,7 @@ public class BigDecimal extends Number implements Comparable<BigDecimal> {
* This conversion is similar to the
* <i>narrowing primitive conversion</i> from {@code double} to
* {@code float} as defined in
* <cite>The Java&trade; Language Specification</cite>:
* <cite>The Java Language Specification</cite>:
* if this {@code BigDecimal} has too great a
* magnitude to represent as a {@code float}, it will be
* converted to {@link Float#NEGATIVE_INFINITY} or {@link
@ -3720,7 +3720,7 @@ public class BigDecimal extends Number implements Comparable<BigDecimal> {
* This conversion is similar to the
* <i>narrowing primitive conversion</i> from {@code double} to
* {@code float} as defined in
* <cite>The Java&trade; Language Specification</cite>:
* <cite>The Java Language Specification</cite>:
* if this {@code BigDecimal} has too great a
* magnitude represent as a {@code double}, it will be
* converted to {@link Double#NEGATIVE_INFINITY} or {@link

View File

@ -54,7 +54,7 @@ import jdk.internal.vm.annotation.ForceInline;
* and a few other miscellaneous operations.
*
* <p>Semantics of arithmetic operations exactly mimic those of Java's integer
* arithmetic operators, as defined in <i>The Java&trade; Language Specification</i>.
* arithmetic operators, as defined in <i>The Java Language Specification</i>.
* For example, division by zero throws an {@code ArithmeticException}, and
* division of a negative by a positive yields a negative (or zero) remainder.
*
@ -4152,7 +4152,7 @@ public class BigInteger extends Number implements Comparable<BigInteger> {
* conversion is analogous to a
* <i>narrowing primitive conversion</i> from {@code long} to
* {@code int} as defined in
* <cite>The Java&trade; Language Specification</cite>:
* <cite>The Java Language Specification</cite>:
* if this BigInteger is too big to fit in an
* {@code int}, only the low-order 32 bits are returned.
* Note that this conversion can lose information about the
@ -4174,7 +4174,7 @@ public class BigInteger extends Number implements Comparable<BigInteger> {
* conversion is analogous to a
* <i>narrowing primitive conversion</i> from {@code long} to
* {@code int} as defined in
* <cite>The Java&trade; Language Specification</cite>:
* <cite>The Java Language Specification</cite>:
* if this BigInteger is too big to fit in a
* {@code long}, only the low-order 64 bits are returned.
* Note that this conversion can lose information about the
@ -4198,7 +4198,7 @@ public class BigInteger extends Number implements Comparable<BigInteger> {
* conversion is similar to the
* <i>narrowing primitive conversion</i> from {@code double} to
* {@code float} as defined in
* <cite>The Java&trade; Language Specification</cite>:
* <cite>The Java Language Specification</cite>:
* if this BigInteger has too great a magnitude
* to represent as a {@code float}, it will be converted to
* {@link Float#NEGATIVE_INFINITY} or {@link
@ -4283,7 +4283,7 @@ public class BigInteger extends Number implements Comparable<BigInteger> {
* conversion is similar to the
* <i>narrowing primitive conversion</i> from {@code double} to
* {@code float} as defined in
* <cite>The Java&trade; Language Specification</cite>:
* <cite>The Java Language Specification</cite>:
* if this BigInteger has too great a magnitude
* to represent as a {@code double}, it will be converted to
* {@link Double#NEGATIVE_INFINITY} or {@link

View File

@ -128,7 +128,7 @@ public class SecureClassLoader extends ClassLoader {
* @param b the bytes that make up the class data. The bytes in
* positions {@code off} through {@code off+len-1}
* should have the format of a valid class file as defined by
* <cite>The Java&trade; Virtual Machine Specification</cite>.
* <cite>The Java Virtual Machine Specification</cite>.
* @param off the start offset in {@code b} of the class data
* @param len the length of the class data
* @param cs the associated CodeSource, or {@code null} if none
@ -165,7 +165,7 @@ public class SecureClassLoader extends ClassLoader {
* @param b the bytes that make up the class data. The bytes from positions
* {@code b.position()} through {@code b.position() + b.limit() -1}
* should have the format of a valid class file as defined by
* <cite>The Java&trade; Virtual Machine Specification</cite>.
* <cite>The Java Virtual Machine Specification</cite>.
* @param cs the associated CodeSource, or {@code null} if none
* @return the {@code Class} object created from the data,
* and optional CodeSource.

View File

@ -1898,7 +1898,7 @@ import sun.util.locale.provider.ResourceBundleBasedAdapter;
*
* <p> The maximum number of arguments is limited by the maximum dimension of a
* Java array as defined by
* <cite>The Java&trade; Virtual Machine Specification</cite>.
* <cite>The Java Virtual Machine Specification</cite>.
* If the argument index does not correspond to an
* available argument, then a {@link MissingFormatArgumentException} is thrown.
*
@ -2589,7 +2589,7 @@ public final class Formatter implements Closeable, Flushable {
* string. If there are more arguments than format specifiers, the
* extra arguments are ignored. The maximum number of arguments is
* limited by the maximum dimension of a Java array as defined by
* <cite>The Java&trade; Virtual Machine Specification</cite>.
* <cite>The Java Virtual Machine Specification</cite>.
*
* @throws IllegalFormatException
* If a format string contains an illegal syntax, a format
@ -2628,7 +2628,7 @@ public final class Formatter implements Closeable, Flushable {
* string. If there are more arguments than format specifiers, the
* extra arguments are ignored. The maximum number of arguments is
* limited by the maximum dimension of a Java array as defined by
* <cite>The Java&trade; Virtual Machine Specification</cite>.
* <cite>The Java Virtual Machine Specification</cite>.
*
* @throws IllegalFormatException
* If a format string contains an illegal syntax, a format

View File

@ -95,7 +95,7 @@ import jdk.internal.util.xml.PropertiesDefaultHandler;
* the input/output stream is encoded in ISO 8859-1 character encoding.
* Characters that cannot be directly represented in this encoding can be written using
* Unicode escapes as defined in section 3.3 of
* <cite>The Java&trade; Language Specification</cite>;
* <cite>The Java Language Specification</cite>;
* only a single 'u' character is allowed in an escape
* sequence.
*
@ -337,7 +337,7 @@ public class Properties extends Hashtable<Object,Object> {
* Characters in keys and elements can be represented in escape
* sequences similar to those used for character and string literals
* (see sections 3.3 and 3.10.6 of
* <cite>The Java&trade; Language Specification</cite>).
* <cite>The Java Language Specification</cite>).
*
* The differences from the character escape sequences and Unicode
* escapes used for characters and strings are:
@ -391,7 +391,7 @@ public class Properties extends Hashtable<Object,Object> {
* character. Characters not in Latin1, and certain special characters,
* are represented in keys and elements using Unicode escapes as defined in
* section 3.3 of
* <cite>The Java&trade; Language Specification</cite>.
* <cite>The Java Language Specification</cite>.
* <p>
* The specified stream remains open after this method returns.
*

View File

@ -120,7 +120,7 @@ import sun.util.ResourceBundleEnumeration;
* and throws the exception if it encounters an invalid sequence.
* If "ISO-8859-1" is specified, characters that cannot be represented in
* ISO-8859-1 encoding must be represented by Unicode Escapes as defined in section
* 3.3 of <cite>The Java&trade; Language Specification</cite>
* 3.3 of <cite>The Java Language Specification</cite>
* whereas the other constructor which takes a {@code Reader} does not have that limitation.
* Other encoding values are ignored for this system property.
* The system property is read and evaluated when initializing this class.

View File

@ -123,7 +123,7 @@ import java.util.concurrent.TimeUnit;
* memory synchronization semantics as provided by the built-in monitor
* lock, as described in
* Chapter 17 of
* <cite>The Java&trade; Language Specification</cite>:
* <cite>The Java Language Specification</cite>:
* <ul>
* <li>A successful {@code lock} operation has the same memory
* synchronization effects as a successful <em>Lock</em> action.

View File

@ -132,7 +132,7 @@ import jdk.internal.vm.annotation.ReservedStackAccess;
* <p><b>Memory Synchronization.</b> Methods with the effect of
* successfully locking in any mode have the same memory
* synchronization effects as a <em>Lock</em> action, as described in
* Chapter 17 of <cite>The Java&trade; Language Specification</cite>.
* Chapter 17 of <cite>The Java Language Specification</cite>.
* Methods successfully unlocking in write mode have the same memory
* synchronization effects as an <em>Unlock</em> action. In optimistic
* read usages, actions prior to the most recent write mode unlock action

View File

@ -227,7 +227,7 @@
* <h2 id="MemoryVisibility">Memory Consistency Properties</h2>
*
* Chapter 17 of
* <cite>The Java&trade; Language Specification</cite> defines the
* <cite>The Java Language Specification</cite> defines the
* <i>happens-before</i> relation on memory operations such as reads and
* writes of shared variables. The results of a write by one thread are
* guaranteed to be visible to a read by another thread only if the write

View File

@ -53,7 +53,7 @@ framework is based on more than a dozen collection interfaces. It
includes implementations of these interfaces and algorithms to
manipulate them.</p>
<p>The documents in this section are non-normative portions of
the Java&trade; Platform, Standard Edition API Specification.</p>
the Java Platform, Standard Edition API Specification.</p>
<ul>
<li><b><a href="coll-overview.html">Overview</a></b> - An overview of
the collections framework.</li>

View File

@ -395,7 +395,7 @@ import jdk.internal.util.ArraysSupport;
*
* <p> Backslashes within string literals in Java source code are interpreted
* as required by
* <cite>The Java&trade; Language Specification</cite>
* <cite>The Java Language Specification</cite>
* as either Unicode escapes (section 3.3) or other character escapes (section 3.10.6)
* It is therefore necessary to double backslashes in string
* literals that represent regular expressions to protect them from
@ -544,7 +544,7 @@ import jdk.internal.util.ArraysSupport;
* <p>
* <b>Unicode escape sequences</b> such as <code>&#92;u2014</code> in Java source code
* are processed as described in section 3.3 of
* <cite>The Java&trade; Language Specification</cite>.
* <cite>The Java Language Specification</cite>.
* Such escape sequences are also implemented directly by the regular-expression
* parser so that Unicode escapes can be used in expressions that are read from
* files or from the keyboard. Thus the strings <code>"&#92;u2014"</code> and

View File

@ -32,7 +32,7 @@
*
* <ul>
* <li><a href="{@docRoot}/../specs/security/standard-names.html">
* <b>Java&trade; Security Standard Algorithm Names Specification
* <b>Java Security Standard Algorithm Names Specification
* </b></a></li>
* </ul>
*

View File

@ -29,7 +29,7 @@
*
* <ul>
* <li><a href="{@docRoot}/../specs/security/standard-names.html">
* <b>Java&trade; Security Standard Algorithm Names Specification
* <b>Java Security Standard Algorithm Names Specification
* </b></a></li>
* </ul>
*

View File

@ -56,7 +56,7 @@ import jdk.internal.access.SharedSecrets;
* code that need to link to supporting classes.
*
* The parameters that are package names in this API are the fully-qualified
* names of the packages as defined in section 6.5.3 of <cite>The Java&trade;
* names of the packages as defined in section 6.5.3 of <cite>The Java
* Language Specification </cite>, for example, {@code "java.lang"}.
*/

View File

@ -286,7 +286,7 @@ public interface Processor {
* </blockquote>
*
* where <i>TypeName</i> and <i>ModuleName</i> are as defined in
* <cite>The Java&trade; Language Specification</cite>
* <cite>The Java Language Specification</cite>
* ({@jls 6.5 Determining the Meaning of a Name}).
*
* @apiNote When running in an environment which supports modules,

View File

@ -39,7 +39,7 @@ import javax.lang.model.type.*;
* are on a <em>declaration</em>, whereas annotations on a type are on
* a specific <em>use</em> of a type name.
*
* As defined by <cite>The Java&trade; Language Specification</cite>
* As defined by <cite>The Java Language Specification</cite>
* section {@jls 9.7.4}, an annotation on an element is a
* <em>declaration annotation</em> and an annotation on a type is a
* <em>type annotation</em>.
@ -74,7 +74,7 @@ import javax.lang.model.type.*;
* down to affiliated mandated members. Type annotations modifying the
* type of a record component can be also propagated to mandated
* members. Propagation of the annotations to mandated members is
* governed by rules given in the <cite>The Java&trade; Language
* governed by rules given in the <cite>The Java Language
* Specification</cite>.
*
* If there are multiple annotations of type <i>AT</i> present on

View File

@ -30,10 +30,10 @@ import java.util.Set;
import java.util.HashSet;
/**
* Source versions of the Java&trade; programming language.
* Source versions of the Java programming language.
*
* See the appropriate edition of
* <cite>The Java&trade; Language Specification</cite>
* <cite>The Java Language Specification</cite>
* for information about a particular source version.
*
* <p>Note that additional source version constants will be added to
@ -69,7 +69,7 @@ public enum SourceVersion {
* The original version.
*
* The language described in
* <cite>The Java&trade; Language Specification, First Edition</cite>.
* <cite>The Java Language Specification, First Edition</cite>.
*/
RELEASE_0,
@ -77,7 +77,7 @@ public enum SourceVersion {
* The version recognized by the Java Platform 1.1.
*
* The language is {@code RELEASE_0} augmented with nested classes as described in the 1.1 update to
* <cite>The Java&trade; Language Specification, First Edition</cite>.
* <cite>The Java Language Specification, First Edition</cite>.
*/
RELEASE_1,
@ -86,7 +86,7 @@ public enum SourceVersion {
* v 1.2.
*
* The language described in
* <cite>The Java&trade; Language Specification,
* <cite>The Java Language Specification,
* Second Edition</cite>, which includes the {@code
* strictfp} modifier.
*/
@ -113,7 +113,7 @@ public enum SourceVersion {
* Edition 5.0.
*
* The language described in
* <cite>The Java&trade; Language Specification,
* <cite>The Java Language Specification,
* Third Edition</cite>. First release to support
* generics, annotations, autoboxing, var-args, enhanced {@code
* for} loop, and hexadecimal floating-point literals.

View File

@ -51,7 +51,7 @@ import javax.lang.model.util.*;
* @apiNote
* <strong>WARNING:</strong> It is possible that methods will be added
* to this interface to accommodate new, currently unknown, language
* structures added to future versions of the Java&trade; programming
* structures added to future versions of the Java programming
* language.
*
* Such additions have already occurred in another visitor interface in

View File

@ -30,7 +30,7 @@ package javax.lang.model.element;
*
* <p>Note that it is possible additional element kinds will be added
* to accommodate new, currently unknown, language structures added to
* future versions of the Java&trade; programming language.
* future versions of the Java programming language.
*
* @author Joseph D. Darcy
* @author Scott Seligman

View File

@ -43,7 +43,7 @@ import javax.lang.model.util.*;
* @apiNote
* <strong>WARNING:</strong> It is possible that methods will be added
* to this interface to accommodate new, currently unknown, language
* structures added to future versions of the Java&trade; programming
* structures added to future versions of the Java programming
* language.
*
* Such additions have already occurred to support language features

View File

@ -107,7 +107,7 @@ public enum Modifier {
/**
* Returns this modifier's name as defined in <cite>The
* Java&trade; Language Specification</cite>.
* Java Language Specification</cite>.
* The modifier name is the {@linkplain #name() name of the enum
* constant} in lowercase and with any underscores ("{@code _}")
* replaced with hyphens ("{@code -}").

View File

@ -134,7 +134,7 @@ public interface ModuleElement extends Element, QualifiedNameable {
*
* <p>Note that it is possible additional directive kinds will be added
* to accommodate new, currently unknown, language structures added to
* future versions of the Java&trade; programming language.
* future versions of the Java programming language.
*
* @since 9
* @spec JPMS
@ -213,7 +213,7 @@ public interface ModuleElement extends Element, QualifiedNameable {
*
* <p> <b>WARNING:</b> It is possible that methods will be added to
* this interface to accommodate new, currently unknown, language
* structures added to future versions of the Java&trade; programming
* structures added to future versions of the Java programming
* language. Methods to accommodate new language constructs will
* be added in a source <em>compatible</em> way using
* <em>default methods</em>.

View File

@ -31,7 +31,7 @@ package javax.lang.model.type;
*
* <p>Note that it is possible additional type kinds will be added to
* accommodate new, currently unknown, language structures added to
* future versions of the Java&trade; programming language.
* future versions of the Java programming language.
*
* @author Joseph D. Darcy
* @author Scott Seligman

View File

@ -39,7 +39,7 @@ import javax.lang.model.util.Types;
* A type variable may also be declared implicitly, as by
* the capture conversion of a wildcard type argument
* (see chapter {@jls 5} of
* <cite>The Java&trade; Language Specification</cite>).
* <cite>The Java Language Specification</cite>).
*
* @author Joseph D. Darcy
* @author Scott Seligman

View File

@ -44,7 +44,7 @@ import javax.lang.model.util.*;
* @apiNote
* <strong>WARNING:</strong> It is possible that methods will be added
* to this interface to accommodate new, currently unknown, language
* structures added to future versions of the Java&trade; programming
* structures added to future versions of the Java programming
* language.
*
* Such additions have already occurred to support language features

View File

@ -42,7 +42,7 @@ import javax.annotation.processing.SupportedSourceVersion;
* AnnotationValueVisitor} interface implemented by this class may
* have methods added to it in the future to accommodate new,
* currently unknown, language structures added to future versions of
* the Java&trade; programming language. Therefore, methods whose
* the Java programming language. Therefore, methods whose
* names begin with {@code "visit"} may be added to this class in the
* future; to avoid incompatibilities, classes and subclasses which
* extend this class should not declare any instance methods with

View File

@ -41,7 +41,7 @@ import static javax.lang.model.SourceVersion.*;
* ElementVisitor} interface implemented by this class may have
* methods added to it in the future to accommodate new, currently
* unknown, language structures added to future versions of the
* Java&trade; programming language. Therefore, methods whose names
* Java programming language. Therefore, methods whose names
* begin with {@code "visit"} may be added to this class in the
* future; to avoid incompatibilities, classes and subclasses which
* extend this class should not declare any instance methods with

View File

@ -39,7 +39,7 @@ import static javax.lang.model.SourceVersion.*;
* <p id=note_for_subclasses><strong>WARNING:</strong> The {@code
* TypeVisitor} interface implemented by this class may have methods
* added to it in the future to accommodate new, currently unknown,
* language structures added to future versions of the Java&trade;
* language structures added to future versions of the Java
* programming language. Therefore, methods whose names begin with
* {@code "visit"} may be added to this class in the future; to avoid
* incompatibilities, classes and subclasses which extend this class

View File

@ -52,7 +52,7 @@ import javax.lang.model.SourceVersion;
* methods added to it or the {@link ElementKind ElementKind enum}
* used in this class may have constants added to it in the future to
* accommodate new, currently unknown, language structures added to
* future versions of the Java&trade; programming language.
* future versions of the Java programming language.
* Therefore, methods whose names begin with {@code "visit"} may be
* added to this class in the future; to avoid incompatibilities,
* classes and subclasses which extend this class should not declare

View File

@ -63,7 +63,7 @@ import static javax.lang.model.SourceVersion.*;
* <p id=note_for_subclasses><strong>WARNING:</strong> The {@code ElementVisitor} interface
* implemented by this class may have methods added to it in the
* future to accommodate new, currently unknown, language structures
* added to future versions of the Java&trade; programming language.
* added to future versions of the Java programming language.
* Therefore, methods whose names begin with {@code "visit"} may be
* added to this class in the future; to avoid incompatibilities,
* classes which extend this class should not declare any instance

View File

@ -49,7 +49,7 @@ import javax.annotation.processing.SupportedSourceVersion;
* AnnotationValueVisitor} interface implemented by this class may
* have methods added to it in the future to accommodate new,
* currently unknown, language structures added to future versions of
* the Java&trade; programming language. Therefore, methods whose
* the Java programming language. Therefore, methods whose
* names begin with {@code "visit"} may be added to this class in the
* future; to avoid incompatibilities, classes and subclasses which
* extend this class should not declare any instance methods with

View File

@ -52,7 +52,7 @@ import static javax.lang.model.SourceVersion.*;
* ElementVisitor} interface implemented by this class may have
* methods added to it in the future to accommodate new, currently
* unknown, language structures added to future versions of the
* Java&trade; programming language. Therefore, methods whose names
* Java programming language. Therefore, methods whose names
* begin with {@code "visit"} may be added to this class in the
* future; to avoid incompatibilities, classes and subclasses which
* extend this class should not declare any instance methods with

View File

@ -50,7 +50,7 @@ import static javax.lang.model.SourceVersion.*;
* <p id=note_for_subclasses><strong>WARNING:</strong> The {@code
* TypeVisitor} interface implemented by this class may have methods
* added to it in the future to accommodate new, currently unknown,
* language structures added to future versions of the Java&trade;
* language structures added to future versions of the Java
* programming language. Therefore, methods whose names begin with
* {@code "visit"} may be added to this class in the future; to avoid
* incompatibilities, classes and subclasses which extend this class

View File

@ -50,7 +50,7 @@ import static javax.lang.model.SourceVersion.*;
* added to it or the {@link TypeKind TypeKind enum} used in this
* class may have constants added to it in the future to accommodate
* new, currently unknown, language structures added to future
* versions of the Java&trade; programming language. Therefore,
* versions of the Java programming language. Therefore,
* methods whose names begin with {@code "visit"} may be added to this
* class in the future; to avoid incompatibilities, classes and
* subclasses which extend this class should not declare any instance

View File

@ -71,7 +71,7 @@ public interface Diagnostic<S> {
WARNING,
/**
* Problem similar to a warning, but is mandated by the tool's
* specification. For example, the Java&trade; Language
* specification. For example, the Java Language
* Specification mandates warnings on certain
* unchecked operations and the use of deprecated methods.
*/

View File

@ -31,7 +31,7 @@ import java.util.Locale;
import java.util.concurrent.Callable;
/**
* Interface to invoke Java&trade; programming language documentation tools from
* Interface to invoke Java programming language documentation tools from
* programs.
*
* @since 1.8

View File

@ -32,7 +32,7 @@ import java.util.concurrent.Callable;
import javax.annotation.processing.Processor;
/**
* Interface to invoke Java&trade; programming language compilers from
* Interface to invoke Java programming language compilers from
* programs.
*
* <p>The compiler might generate diagnostics during compilation (for
@ -56,9 +56,9 @@ import javax.annotation.processing.Processor;
* #getStandardFileManager getStandardFileManager}.
*
* <p>An instance implementing this interface must conform to
* <cite>The Java&trade; Language Specification</cite>
* <cite>The Java Language Specification</cite>
* and generate class files conforming to
* <cite>The Java&trade; Virtual Machine Specification</cite>.
* <cite>The Java Virtual Machine Specification</cite>.
* The versions of these
* specifications are defined in the {@linkplain Tool} interface.
*

View File

@ -35,7 +35,7 @@ import java.util.Set;
import static javax.tools.JavaFileObject.Kind;
/**
* File manager for tools operating on Java&trade; programming language
* File manager for tools operating on Java programming language
* source and class files. In this context, <em>file</em> means an
* abstraction of regular files and other sources of data.
*
@ -52,14 +52,14 @@ import static javax.tools.JavaFileObject.Kind;
* fully qualified class and interface names. For convenience '.'
* and '/' are interchangeable. The internal form is defined in
* chapter four of
* <cite>The Java&trade; Virtual Machine Specification</cite>.
* <cite>The Java Virtual Machine Specification</cite>.
* <blockquote><p>
* <i>Discussion:</i> this means that the names
* "java/lang.package-info", "java/lang/package-info",
* "java.lang.package-info", are valid and equivalent. Compare to
* binary name as defined in
* <cite>The Java&trade; Language Specification</cite>,
* <cite>The Java Language Specification</cite>,
* section 13.1 "The Form of a Binary".
* </p></blockquote>
*
@ -222,7 +222,7 @@ public interface JavaFileManager extends Closeable, Flushable, OptionChecker {
/**
* Infers a binary name of a file object based on a package-oriented location.
* The binary name returned might not be a valid binary name according to
* <cite>The Java&trade; Language Specification</cite>.
* <cite>The Java Language Specification</cite>.
*
* @param location a location
* @param file a file object

View File

@ -30,7 +30,7 @@ import javax.lang.model.element.Modifier;
import java.util.Objects;
/**
* File abstraction for tools operating on Java&trade; programming language
* File abstraction for tools operating on Java programming language
* source and class files.
*
* <p>All methods in this interface might throw a SecurityException if
@ -94,7 +94,7 @@ public interface JavaFileObject extends FileObject {
* Checks if this file object is compatible with the specified
* simple name and kind. A simple name is a single identifier
* (not qualified) as defined in
* <cite>The Java&trade; Language Specification</cite>,
* <cite>The Java Language Specification</cite>,
* section 6.2 "Names and Identifiers".
*
* @param simpleName a simple name of a class

View File

@ -76,7 +76,7 @@ public interface Tool {
int run(InputStream in, OutputStream out, OutputStream err, String... arguments);
/**
* Returns the source versions of the Java&trade; programming language
* Returns the source versions of the Java programming language
* supported by this tool.
* @return a set of supported source versions
*/

View File

@ -51,7 +51,7 @@ public class ToolProvider {
public ToolProvider() {}
/**
* Returns the Java&trade; programming language compiler provided
* Returns the Java programming language compiler provided
* with this platform.
* <p>The file manager returned by calling
* {@link JavaCompiler#getStandardFileManager getStandardFileManager}
@ -72,7 +72,7 @@ public class ToolProvider {
private static final String systemDocumentationToolName = "jdk.javadoc.internal.api.JavadocTool";
/**
* Returns the Java&trade; programming language documentation tool provided
* Returns the Java programming language documentation tool provided
* with this platform.
* <p>The file manager returned by calling
* {@link DocumentationTool#getStandardFileManager getStandardFileManager}

View File

@ -28,7 +28,7 @@
* for example, compilers.
*
* <p>These interfaces and classes are required as part of the
* Java&trade; Platform, Standard Edition (Java SE),
* Java Platform, Standard Edition (Java SE),
* but there is no requirement to provide any tools implementing them.
*
* <p>Unless explicitly allowed, all methods in this package might

View File

@ -224,7 +224,7 @@ public final class TypeResolver {
* Converts the given {@code type} to the corresponding class.
* This method implements the concept of type erasure,
* that is described in section 4.6 of
* <cite>The Java&trade; Language Specification</cite>.
* <cite>The Java Language Specification</cite>.
*
* @param type the array of types to convert
* @return a corresponding class

View File

@ -185,6 +185,21 @@ class GTKPainter extends SynthPainter {
}
}
//This is workaround used to draw the highlight
// when the MENU or MenuItem is selected on some platforms
//This should be properly fixed by reading color from css
private void paintComponentBackground(SynthContext context,
Graphics g, int x, int y,
int w, int h) {
GTKStyle style = (GTKStyle) context.getStyle();
Color highlightColor =
style.getGTKColor(GTKEngine.WidgetType.TEXT_AREA.ordinal(),
GTKLookAndFeel.synthStateToGTKStateType(SynthConstants.SELECTED).ordinal(),
ColorType.BACKGROUND.getID());
g.setColor(highlightColor);
g.fillRect(x, y, w, h);
}
//
// RADIO_BUTTON_MENU_ITEM
//
@ -196,6 +211,10 @@ class GTKPainter extends SynthPainter {
int gtkState = GTKLookAndFeel.synthStateToGTKState(
id, context.getComponentState());
if (gtkState == SynthConstants.MOUSE_OVER) {
if (GTKLookAndFeel.is3()) {
paintComponentBackground(context, g, x, y, w, h);
return;
}
synchronized (UNIXToolkit.GTK_LOCK) {
if (! ENGINE.paintCachedImage(g, x, y, w, h, id)) {
ShadowType shadow = (GTKLookAndFeel.is2_2() ?
@ -535,34 +554,6 @@ class GTKPainter extends SynthPainter {
}
}
private int getBrightness(Color c) {
return Math.max(c.getRed(), Math.max(c.getGreen(), c.getBlue()));
}
private int getMaxColorDiff(Color c1, Color c2) {
return Math.max(Math.abs(c1.getRed() - c2.getRed()),
Math.max(Math.abs(c1.getGreen() - c2.getGreen()),
Math.abs(c1.getBlue() - c2.getBlue())));
}
private int scaleColorComponent(int color, double scaleFactor) {
return (int)(color + color * scaleFactor);
}
private Color deriveColor(Color originalColor, int originalBrightness,
int targetBrightness) {
int r, g, b;
if (originalBrightness == 0) {
r = g = b = targetBrightness;
} else {
double scaleFactor = (targetBrightness - originalBrightness)
/ originalBrightness ;
r = scaleColorComponent(originalColor.getRed(), scaleFactor);
g = scaleColorComponent(originalColor.getGreen(), scaleFactor);
b = scaleColorComponent(originalColor.getBlue(), scaleFactor);
}
return new Color(r, g, b);
}
//
// MENU
//
@ -579,56 +570,9 @@ class GTKPainter extends SynthPainter {
int gtkState = GTKLookAndFeel.synthStateToGTKState(
context.getRegion(), context.getComponentState());
if (gtkState == SynthConstants.MOUSE_OVER) {
if (GTKLookAndFeel.is3() && context.getRegion() == Region.MENU) {
GTKStyle style = (GTKStyle)context.getStyle();
Color highlightColor = style.getGTKColor(
GTKEngine.WidgetType.MENU_ITEM.ordinal(),
gtkState, ColorType.BACKGROUND.getID());
Color backgroundColor = style.getGTKColor(
GTKEngine.WidgetType.MENU_BAR.ordinal(),
SynthConstants.ENABLED, ColorType.BACKGROUND.getID());
int minBrightness = 0, maxBrightness = 255;
int minBrightnessDifference = 100;
int actualBrightnessDifference =
getMaxColorDiff(highlightColor, backgroundColor);
if (actualBrightnessDifference < minBrightnessDifference) {
int highlightBrightness =
getBrightness(highlightColor);
int backgroundBrightness =
getBrightness(backgroundColor);
int originalHighlightBrightness =
highlightBrightness;
if (highlightBrightness >= backgroundBrightness) {
if (backgroundBrightness + minBrightnessDifference <=
maxBrightness) {
highlightBrightness =
backgroundBrightness +
minBrightnessDifference;
} else {
highlightBrightness =
backgroundBrightness -
minBrightnessDifference;
}
} else {
if (backgroundBrightness - minBrightnessDifference >=
minBrightness) {
highlightBrightness =
backgroundBrightness -
minBrightnessDifference;
} else {
highlightBrightness =
backgroundBrightness +
minBrightnessDifference;
}
}
g.setColor(deriveColor(highlightColor,
originalHighlightBrightness,
highlightBrightness));
g.fillRect(x, y, w, h);
return;
}
if (GTKLookAndFeel.is3()) {
paintComponentBackground(context, g, x, y, w, h);
return;
}
Region id = Region.MENU_ITEM;
synchronized (UNIXToolkit.GTK_LOCK) {

View File

@ -160,7 +160,7 @@ public abstract class GraphicsDevice {
* {@code GraphicsEnvironment}. Although there is
* no public method to set this {@code String}, a programmer can
* use the {@code String} for debugging purposes. Vendors of
* the Java&trade; Runtime Environment can
* the Java Runtime Environment can
* format the return value of the {@code String}. To determine
* how to interpret the value of the {@code String}, contact the
* vendor of your Java Runtime. To find out who the vendor is, from

View File

@ -47,7 +47,7 @@ newly added listener is only notified on subsequent key events.
<h2>Auto-shutdown</h2>
According to
<cite>The Java&trade; Virtual Machine Specification</cite>,
<cite>The Java Virtual Machine Specification</cite>,
sections 2.17.9 and 2.19,
the Java virtual machine (JVM) initially starts up with a single non-daemon
thread, which typically calls the <code>main</code> method of some class.
@ -190,7 +190,7 @@ non-daemon thread that blocks forever.
&lt;...&gt;
</pre>
<cite>The Java&trade; Virtual Machine Specification</cite>
<cite>The Java Virtual Machine Specification</cite>
guarantees
that the JVM doesn't exit until this thread terminates.
</div>

View File

@ -36,7 +36,7 @@ import sun.reflect.misc.*;
* is the delegate used by default for classes about
* which no information is available. The {@code DefaultPersistenceDelegate}
* provides, version resilient, public API-based persistence for
* classes that follow the JavaBeans&trade; conventions without any class specific
* classes that follow the JavaBeans conventions without any class specific
* configuration.
* <p>
* The key assumptions are that the class has a nullary constructor

View File

@ -31,7 +31,7 @@ package java.beans;
* of java.beans.beancontext.BeanContext, in order to propagate to its nested hierarchy
* of java.beans.beancontext.BeanContextChild instances, the current "designTime" property.
* <p>
* The JavaBeans&trade; specification defines the notion of design time as is a
* The JavaBeans specification defines the notion of design time as is a
* mode in which JavaBeans instances should function during their composition
* and customization in a interactive design, composition or construction tool,
* as opposed to runtime when the JavaBean is part of an applet, application,

View File

@ -26,7 +26,7 @@ package java.beans;
/**
* An "IndexedPropertyChange" event gets delivered whenever a component that
* conforms to the JavaBeans&trade; specification (a "bean") changes a bound
* conforms to the JavaBeans specification (a "bean") changes a bound
* indexed property. This class is an extension of {@code PropertyChangeEvent}
* but contains the index of the property that has changed.
* <P>

View File

@ -87,7 +87,7 @@ import sun.reflect.misc.ReflectUtil;
* <p>
* For more information about introspection and design patterns, please
* consult the
* <a href="http://www.oracle.com/technetwork/java/javase/documentation/spec-136004.html">JavaBeans&trade; specification</a>.
* <a href="http://www.oracle.com/technetwork/java/javase/documentation/spec-136004.html">JavaBeans specification</a>.
*
* @since 1.1
*/
@ -1122,7 +1122,7 @@ public class Introspector {
try {
type = ClassFinder.findClass(name, type.getClassLoader());
// Each customizer should inherit java.awt.Component and implement java.beans.Customizer
// according to the section 9.3 of JavaBeans&trade; specification
// according to the section 9.3 of JavaBeans specification
if (Component.class.isAssignableFrom(type) && Customizer.class.isAssignableFrom(type)) {
return type;
}

View File

@ -41,7 +41,7 @@ import java.util.Map.Entry;
* or for a property specified by name.
* <p>
* Here is an example of {@code PropertyChangeSupport} usage that follows
* the rules and recommendations laid out in the JavaBeans&trade; specification:
* the rules and recommendations laid out in the JavaBeans specification:
* <pre>
* public class MyBean {
* private final PropertyChangeSupport pcs = new PropertyChangeSupport(this);

Some files were not shown because too many files have changed in this diff Show More