Add StackVisitor::SetVRegReference().
Avoid converting ObjPtr<>s to uint32_t and back.
Test: m test-art-host-gtest
Test: testrunner.py --host --interpreter
Test: run-jdwp-tests.sh --mode=host --variant=X64
Test: run-jdwp-tests.sh --mode=host --variant=X64 --debug
Bug: 31113334
Change-Id: I4e5c1577930de58772b35179aa4281ae4bbca300
diff --git a/runtime/stack.h b/runtime/stack.h
index 1f305d2..4bc0fc8 100644
--- a/runtime/stack.h
+++ b/runtime/stack.h
@@ -22,6 +22,7 @@
#include "base/locks.h"
#include "base/macros.h"
+#include "obj_ptr.h"
#include "quick/quick_method_frame_info.h"
#include "stack_map.h"
@@ -236,6 +237,11 @@
// Values will be set in debugger shadow frames. Debugger will make sure deoptimization
// is triggered to make the values effective.
+ bool SetVRegReference(ArtMethod* m, uint16_t vreg, ObjPtr<mirror::Object> new_value)
+ REQUIRES_SHARED(Locks::mutator_lock_);
+
+ // Values will be set in debugger shadow frames. Debugger will make sure deoptimization
+ // is triggered to make the values effective.
bool SetVRegPair(ArtMethod* m,
uint16_t vreg,
uint64_t new_value,
@@ -328,6 +334,9 @@
uint64_t* val) const
REQUIRES_SHARED(Locks::mutator_lock_);
+ ShadowFrame* PrepareSetVReg(ArtMethod* m, uint16_t vreg, bool wide)
+ REQUIRES_SHARED(Locks::mutator_lock_);
+
void SanityCheckFrame() const REQUIRES_SHARED(Locks::mutator_lock_);
Thread* const thread_;