summaryrefslogtreecommitdiffstats
path: root/runtime/stack.cc
diff options
context:
space:
mode:
authorMathieu Chartier <mathieuc@google.com>2014-05-07 15:43:14 -0700
committerMathieu Chartier <mathieuc@google.com>2014-05-13 14:45:54 -0700
commiteb8167a4f4d27fce0530f6724ab8032610cd146b (patch)
treebcfeaf13ad78f2dd68466bbd0e20c71944f7e854 /runtime/stack.cc
parent6fb66a2bc4e1c0b7931101153e58714991237af7 (diff)
downloadart-eb8167a4f4d27fce0530f6724ab8032610cd146b.zip
art-eb8167a4f4d27fce0530f6724ab8032610cd146b.tar.gz
art-eb8167a4f4d27fce0530f6724ab8032610cd146b.tar.bz2
Add Handle/HandleScope and delete SirtRef.
Delete SirtRef and replaced it with Handle. Handles are value types which wrap around StackReference*. Renamed StackIndirectReferenceTable to HandleScope. Added a scoped handle wrapper which wraps around an Object** and restores it in its destructor. Renamed Handle::get -> Get. Bug: 8473721 Change-Id: Idbfebd4f35af629f0f43931b7c5184b334822c7a
Diffstat (limited to 'runtime/stack.cc')
-rw-r--r--runtime/stack.cc10
1 files changed, 4 insertions, 6 deletions
diff --git a/runtime/stack.cc b/runtime/stack.cc
index fd31ec6..e0189e9 100644
--- a/runtime/stack.cc
+++ b/runtime/stack.cc
@@ -111,11 +111,9 @@ mirror::Object* StackVisitor::GetThisObject() const {
return NULL;
} else if (m->IsNative()) {
if (cur_quick_frame_ != NULL) {
- StackIndirectReferenceTable* sirt =
- reinterpret_cast<StackIndirectReferenceTable*>(
- reinterpret_cast<char*>(cur_quick_frame_) +
- m->GetSirtOffsetInBytes());
- return sirt->GetReference(0);
+ HandleScope* hs = reinterpret_cast<HandleScope*>(
+ reinterpret_cast<char*>(cur_quick_frame_) + m->GetHandleScopeOffsetInBytes());
+ return hs->GetReference(0);
} else {
return cur_shadow_frame_->GetVRegReference(0);
}
@@ -277,7 +275,7 @@ void StackVisitor::SanityCheckFrame() const {
CHECK_NE(frame_size, 0u);
// A rough guess at an upper size we expect to see for a frame.
// 256 registers
- // 2 words Sirt overhead
+ // 2 words HandleScope overhead
// 3+3 register spills
// TODO: this seems architecture specific for the case of JNI frames.
// TODO: 083-compiler-regressions ManyFloatArgs shows this estimate is wrong.