From 3946844c34ad965515f677084b07d663d70ad1b8 Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Tue, 2 Sep 2014 15:17:15 +0100 Subject: Runtime support for the new stack maps for the opt compiler. Now most of the methods supported by the compiler can be optimized, instead of using the baseline. Change-Id: I80ab36a34913fa4e7dd576c7bf55af63594dc1fa --- runtime/stack.cc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'runtime/stack.cc') diff --git a/runtime/stack.cc b/runtime/stack.cc index 2d0060e..b8b10d2 100644 --- a/runtime/stack.cc +++ b/runtime/stack.cc @@ -115,18 +115,22 @@ uint32_t StackVisitor::GetDexPc(bool abort_on_failure) const { mirror::Object* StackVisitor::GetThisObject() const { mirror::ArtMethod* m = GetMethod(); if (m->IsStatic()) { - return NULL; + return nullptr; } else if (m->IsNative()) { - if (cur_quick_frame_ != NULL) { + if (cur_quick_frame_ != nullptr) { HandleScope* hs = reinterpret_cast( reinterpret_cast(cur_quick_frame_) + m->GetHandleScopeOffsetInBytes()); return hs->GetReference(0); } else { return cur_shadow_frame_->GetVRegReference(0); } + } else if (m->IsOptimized()) { + // TODO: Implement, currently only used for exceptions when jdwp is enabled. + LOG(WARNING) << "StackVisitor::GetThisObject is unimplemented with the optimizing compiler"; + return nullptr; } else { const DexFile::CodeItem* code_item = m->GetCodeItem(); - if (code_item == NULL) { + if (code_item == nullptr) { UNIMPLEMENTED(ERROR) << "Failed to determine this object of abstract or proxy method: " << PrettyMethod(m); return nullptr; -- cgit v1.1