diff options
| author | Mathieu Chartier <mathieuc@google.com> | 2014-05-18 20:00:29 +0000 |
|---|---|---|
| committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-05-18 20:00:29 +0000 |
| commit | e9bcf0fa76cd9a96d36fe9e190bd2947e842fbf8 (patch) | |
| tree | 44f6b91098639c6ebc438b4ec998d0dc128cef9a /runtime/interpreter | |
| parent | 8f0776768712b2021aa8fb649b51017b9f0fc7a9 (diff) | |
| parent | f832284dd847ff077577bb5712225430bbbb3b67 (diff) | |
| download | android_art-e9bcf0fa76cd9a96d36fe9e190bd2947e842fbf8.tar.gz android_art-e9bcf0fa76cd9a96d36fe9e190bd2947e842fbf8.tar.bz2 android_art-e9bcf0fa76cd9a96d36fe9e190bd2947e842fbf8.zip | |
Merge "Delete ClassHelper and fix compaction bug in GetDirectInterface"
Diffstat (limited to 'runtime/interpreter')
| -rw-r--r-- | runtime/interpreter/interpreter.cc | 3 | ||||
| -rw-r--r-- | runtime/interpreter/interpreter_common.cc | 4 | ||||
| -rw-r--r-- | runtime/interpreter/interpreter_common.h | 6 | ||||
| -rw-r--r-- | runtime/interpreter/interpreter_goto_table_impl.cc | 6 | ||||
| -rw-r--r-- | runtime/interpreter/interpreter_switch_impl.cc | 6 |
5 files changed, 13 insertions, 12 deletions
diff --git a/runtime/interpreter/interpreter.cc b/runtime/interpreter/interpreter.cc index 20e2b8da19..478c74cd25 100644 --- a/runtime/interpreter/interpreter.cc +++ b/runtime/interpreter/interpreter.cc @@ -49,7 +49,8 @@ static void UnstartedRuntimeJni(Thread* self, ArtMethod* method, value.SetJ((static_cast<uint64_t>(args[1]) << 32) | args[0]); result->SetD(log(value.GetD())); } else if (name == "java.lang.String java.lang.Class.getNameNative()") { - result->SetL(receiver->AsClass()->ComputeName()); + StackHandleScope<1> hs(self); + result->SetL(mirror::Class::ComputeName(hs.NewHandle(receiver->AsClass()))); } else if (name == "int java.lang.Float.floatToRawIntBits(float)") { result->SetI(args[0]); } else if (name == "float java.lang.Float.intBitsToFloat(int)") { diff --git a/runtime/interpreter/interpreter_common.cc b/runtime/interpreter/interpreter_common.cc index c5fb0d84cd..418aff51dc 100644 --- a/runtime/interpreter/interpreter_common.cc +++ b/runtime/interpreter/interpreter_common.cc @@ -117,8 +117,8 @@ bool DoCall(ArtMethod* method, Thread* self, ShadowFrame& shadow_frame, "Ljava/lang/VirtualMachineError;", "Invoking %s with bad arg %d, type '%s' not instance of '%s'", mh.GetName(), shorty_pos, - ClassHelper(o->GetClass()).GetDescriptor(), - ClassHelper(arg_type).GetDescriptor()); + o->GetClass()->GetDescriptor().c_str(), + arg_type->GetDescriptor().c_str()); return false; } } diff --git a/runtime/interpreter/interpreter_common.h b/runtime/interpreter/interpreter_common.h index 9b03334b62..0c7c8a9fce 100644 --- a/runtime/interpreter/interpreter_common.h +++ b/runtime/interpreter/interpreter_common.h @@ -345,9 +345,9 @@ static inline bool DoFieldPut(Thread* self, const ShadowFrame& shadow_frame, self->ThrowNewExceptionF(self->GetCurrentLocationForThrow(), "Ljava/lang/VirtualMachineError;", "Put '%s' that is not instance of field '%s' in '%s'", - ClassHelper(reg->GetClass()).GetDescriptor(), - ClassHelper(field_class).GetDescriptor(), - ClassHelper(f->GetDeclaringClass()).GetDescriptor()); + reg->GetClass()->GetDescriptor().c_str(), + field_class->GetDescriptor().c_str(), + f->GetDeclaringClass()->GetDescriptor().c_str()); return false; } } diff --git a/runtime/interpreter/interpreter_goto_table_impl.cc b/runtime/interpreter/interpreter_goto_table_impl.cc index 5b7dee1df4..e0f9e5f958 100644 --- a/runtime/interpreter/interpreter_goto_table_impl.cc +++ b/runtime/interpreter/interpreter_goto_table_impl.cc @@ -342,8 +342,8 @@ JValue ExecuteGotoImpl(Thread* self, MethodHelper& mh, const DexFile::CodeItem* self->ThrowNewExceptionF(self->GetCurrentLocationForThrow(), "Ljava/lang/VirtualMachineError;", "Returning '%s' that is not instance of return type '%s'", - ClassHelper(obj_result->GetClass()).GetDescriptor(), - ClassHelper(return_type).GetDescriptor()); + obj_result->GetClass()->GetDescriptor().c_str(), + return_type->GetDescriptor().c_str()); HANDLE_PENDING_EXCEPTION(); } } @@ -614,7 +614,7 @@ JValue ExecuteGotoImpl(Thread* self, MethodHelper& mh, const DexFile::CodeItem* self->ThrowNewExceptionF(self->GetCurrentLocationForThrow(), "Ljava/lang/VirtualMachineError;", "Throwing '%s' that is not instance of Throwable", - ClassHelper(exception->GetClass()).GetDescriptor()); + exception->GetClass()->GetDescriptor().c_str()); } else { self->SetException(shadow_frame.GetCurrentLocationForThrow(), exception->AsThrowable()); } diff --git a/runtime/interpreter/interpreter_switch_impl.cc b/runtime/interpreter/interpreter_switch_impl.cc index 859cfc47c9..c1d24f5a5f 100644 --- a/runtime/interpreter/interpreter_switch_impl.cc +++ b/runtime/interpreter/interpreter_switch_impl.cc @@ -258,8 +258,8 @@ JValue ExecuteSwitchImpl(Thread* self, MethodHelper& mh, const DexFile::CodeItem self->ThrowNewExceptionF(self->GetCurrentLocationForThrow(), "Ljava/lang/VirtualMachineError;", "Returning '%s' that is not instance of return type '%s'", - ClassHelper(obj_result->GetClass()).GetDescriptor(), - ClassHelper(return_type).GetDescriptor()); + obj_result->GetClass()->GetDescriptor().c_str(), + return_type->GetDescriptor().c_str()); HANDLE_PENDING_EXCEPTION(); } } @@ -528,7 +528,7 @@ JValue ExecuteSwitchImpl(Thread* self, MethodHelper& mh, const DexFile::CodeItem self->ThrowNewExceptionF(self->GetCurrentLocationForThrow(), "Ljava/lang/VirtualMachineError;", "Throwing '%s' that is not instance of Throwable", - ClassHelper(exception->GetClass()).GetDescriptor()); + exception->GetClass()->GetDescriptor().c_str()); } else { self->SetException(shadow_frame.GetCurrentLocationForThrow(), exception->AsThrowable()); } |
