summaryrefslogtreecommitdiffstats
path: root/runtime/handle_scope-inl.h
diff options
context:
space:
mode:
authorMathieu Chartier <mathieuc@google.com>2014-06-03 15:37:03 -0700
committerMathieu Chartier <mathieuc@google.com>2014-06-04 09:58:05 -0700
commitbc56fc3242ea2fad6630abdee1657f444eee8d30 (patch)
tree9a50948145747c557d1da1e0f25192573d81e0f1 /runtime/handle_scope-inl.h
parent32640daf36acda331719766956b25661647e2461 (diff)
downloadart-bc56fc3242ea2fad6630abdee1657f444eee8d30.zip
art-bc56fc3242ea2fad6630abdee1657f444eee8d30.tar.gz
art-bc56fc3242ea2fad6630abdee1657f444eee8d30.tar.bz2
Fix compiler warnings.
Added GetReference, GetHandle to StackHandleScope to prevent the compiler from optimizing away these loads/stores from inline functions. Change-Id: I4db02dd3194665d844292e74e3a7d7c80e730e06
Diffstat (limited to 'runtime/handle_scope-inl.h')
-rw-r--r--runtime/handle_scope-inl.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/runtime/handle_scope-inl.h b/runtime/handle_scope-inl.h
index 634f2be..62c7614 100644
--- a/runtime/handle_scope-inl.h
+++ b/runtime/handle_scope-inl.h
@@ -28,8 +28,7 @@ template<size_t kNumReferences>
inline StackHandleScope<kNumReferences>::StackHandleScope(Thread* self)
: HandleScope(kNumReferences), self_(self), pos_(0) {
// TODO: Figure out how to use a compile assert.
- DCHECK_EQ(OFFSETOF_MEMBER(HandleScope, references_),
- OFFSETOF_MEMBER(StackHandleScope<1>, references_storage_));
+ DCHECK_EQ(&references_[0], &references_storage_[0]);
for (size_t i = 0; i < kNumReferences; ++i) {
SetReference(i, nullptr);
}