mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8141132: JEP 254: Compact Strings
Adopt a more space-efficient internal representation for strings. Co-authored-by: Brent Christian <brent.christian@oracle.com> Co-authored-by: Vivek Deshpande <vivek.r.deshpande@intel.com> Co-authored-by: Charlie Hunt <charlie.hunt@oracle.com> Co-authored-by: Vladimir Kozlov <vladimir.kozlov@oracle.com> Co-authored-by: Roger Riggs <roger.riggs@oracle.com> Co-authored-by: Xueming Shen <xueming.shen@oracle.com> Co-authored-by: Aleksey Shipilev <aleksey.shipilev@oracle.com> Co-authored-by: Sandhya Viswanathan <sandhya.viswanathan@intel.com> Reviewed-by: alanb, bdelsart, coleenp, iklam, jiangli, jrose, kevinw, naoto, pliden, roland, smarks, twisti
This commit is contained in:
parent
4e24e2cc6c
commit
7af927f9c1
74 changed files with 4838 additions and 1683 deletions
|
@ -2921,12 +2921,10 @@ void InstanceKlass::oop_print_on(oop obj, outputStream* st) {
|
|||
|
||||
if (this == SystemDictionary::String_klass()) {
|
||||
typeArrayOop value = java_lang_String::value(obj);
|
||||
juint offset = java_lang_String::offset(obj);
|
||||
juint length = java_lang_String::length(obj);
|
||||
if (value != NULL &&
|
||||
value->is_typeArray() &&
|
||||
offset <= (juint) value->length() &&
|
||||
offset + length <= (juint) value->length()) {
|
||||
length <= (juint) value->length()) {
|
||||
st->print(BULLET"string: ");
|
||||
java_lang_String::print(obj, st);
|
||||
st->cr();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue