summaryrefslogtreecommitdiff
path: root/openjdkjvmti/ti_stack.cc
diff options
context:
space:
mode:
author Mathieu Chartier <mathieuc@google.com> 2017-12-15 11:19:33 -0800
committer Mathieu Chartier <mathieuc@google.com> 2017-12-22 09:41:17 -0800
commit808c7a57bb913b13c22884f57cdacd59bf1fdb3f (patch)
treed7f0d7cabaac5a7646c25bae584a82a9aa279cc0 /openjdkjvmti/ti_stack.cc
parent64bae9fb677aa0e2406d13ea9f8ebaa92e16f978 (diff)
Make CodeItem fields private
Make code item fields private and use accessors. Added a hand full of friend classes to reduce the size of the change. Changed default to be nullable and removed CreateNullable. CreateNullable was a bad API since it defaulted to the unsafe, may add a CreateNonNullable if it's important for performance. Motivation: Have a different layout for code items in cdex. Bug: 63756964 Test: test-art-host-gtest Test: test/testrunner/testrunner.py --host Test: art/tools/run-jdwp-tests.sh '--mode=host' '--variant=X32' --debug Change-Id: I42bc7435e20358682075cb6de52713b595f95bf9
Diffstat (limited to 'openjdkjvmti/ti_stack.cc')
-rw-r--r--openjdkjvmti/ti_stack.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/openjdkjvmti/ti_stack.cc b/openjdkjvmti/ti_stack.cc
index b43eaa0286..17b4243377 100644
--- a/openjdkjvmti/ti_stack.cc
+++ b/openjdkjvmti/ti_stack.cc
@@ -44,6 +44,7 @@
#include "base/bit_utils.h"
#include "base/enums.h"
#include "base/mutex.h"
+#include "code_item_accessors-inl.h"
#include "dex_file.h"
#include "dex_file_annotations.h"
#include "dex_file_types.h"
@@ -1044,7 +1045,7 @@ jvmtiError StackUtil::NotifyFramePop(jvmtiEnv* env, jthread thread, jint depth)
if (shadow_frame == nullptr) {
needs_instrument = true;
const size_t frame_id = visitor.GetFrameId();
- const uint16_t num_regs = method->GetCodeItem()->registers_size_;
+ const uint16_t num_regs = art::CodeItemDataAccessor(method).RegistersSize();
shadow_frame = target->FindOrCreateDebuggerShadowFrame(frame_id,
num_regs,
method,