提交 9fb9e887 编写于 作者: S stefank

8035648: Don't use Handle in java_lang_String::print

Reviewed-by: coleenp, pliden
上级 c667a7a4
......@@ -463,12 +463,11 @@ bool java_lang_String::equals(oop str1, oop str2) {
return true;
}
void java_lang_String::print(Handle java_string, outputStream* st) {
oop obj = java_string();
assert(obj->klass() == SystemDictionary::String_klass(), "must be java_string");
typeArrayOop value = java_lang_String::value(obj);
int offset = java_lang_String::offset(obj);
int length = java_lang_String::length(obj);
void java_lang_String::print(oop java_string, outputStream* st) {
assert(java_string->klass() == SystemDictionary::String_klass(), "must be java_string");
typeArrayOop value = java_lang_String::value(java_string);
int offset = java_lang_String::offset(java_string);
int length = java_lang_String::length(java_string);
int end = MIN2(length, 100);
if (value == NULL) {
......
......@@ -208,7 +208,7 @@ class java_lang_String : AllStatic {
}
// Debugging
static void print(Handle java_string, outputStream* st);
static void print(oop java_string, outputStream* st);
friend class JavaClasses;
};
......
......@@ -3042,8 +3042,7 @@ void InstanceKlass::oop_print_on(oop obj, outputStream* st) {
offset <= (juint) value->length() &&
offset + length <= (juint) value->length()) {
st->print(BULLET"string: ");
Handle h_obj(obj);
java_lang_String::print(h_obj, st);
java_lang_String::print(obj, st);
st->cr();
if (!WizardMode) return; // that is enough
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册