summaryrefslogtreecommitdiff
path: root/runtime/stack.h
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/stack.h')
-rw-r--r--runtime/stack.h20
1 files changed, 15 insertions, 5 deletions
diff --git a/runtime/stack.h b/runtime/stack.h
index 963983a7a6..2e32f51343 100644
--- a/runtime/stack.h
+++ b/runtime/stack.h
@@ -306,6 +306,11 @@ class ShadowFrame {
return method_;
}
+ mirror::ArtMethod** GetMethodAddress() SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
+ DCHECK(method_ != nullptr);
+ return &method_;
+ }
+
mirror::Object* GetThisObject() const SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
mirror::Object* GetThisObject(uint16_t num_ins) const SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
@@ -389,12 +394,7 @@ class ShadowFrame {
#endif
// Link to previous shadow frame or NULL.
ShadowFrame* link_;
-#if defined(ART_USE_PORTABLE_COMPILER)
- // TODO: make const in the portable case.
mirror::ArtMethod* method_;
-#else
- mirror::ArtMethod* const method_;
-#endif
uint32_t dex_pc_;
uint32_t vregs_[0];
@@ -518,6 +518,16 @@ class StackVisitor {
}
}
+ mirror::ArtMethod** GetMethodAddress() const SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
+ if (cur_shadow_frame_ != nullptr) {
+ return cur_shadow_frame_->GetMethodAddress();
+ } else if (cur_quick_frame_ != nullptr) {
+ return cur_quick_frame_;
+ } else {
+ return nullptr;
+ }
+ }
+
bool IsShadowFrame() const {
return cur_shadow_frame_ != nullptr;
}