mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 03:24:38 +02:00
6924259: Remove String.count/String.offset
Allow a version of String class that doesn't have count and offset fields. Reviewed-by: never, coleenp
This commit is contained in:
parent
17b26a6a0c
commit
eb4a860bc3
12 changed files with 365 additions and 191 deletions
|
@ -78,8 +78,8 @@ public:
|
|||
void do_oop(oop* p) {
|
||||
if (p != NULL) {
|
||||
oop obj = *p;
|
||||
if (obj->klass() == SystemDictionary::String_klass()) {
|
||||
|
||||
if (obj->klass() == SystemDictionary::String_klass() &&
|
||||
java_lang_String::has_hash_field()) {
|
||||
int hash = java_lang_String::hash_string(obj);
|
||||
obj->int_field_put(hash_offset, hash);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue