Implement local setting.
I've also worked out how to test CreateString and CreateObject, but
not CreateArrayObject yet.
Also stop saying "cnt".
Change-Id: I26569ff6c4fa356fb91e6c22cbf8ced95094fabd
diff --git a/src/stack.cc b/src/stack.cc
index 9589b57..542ac47 100644
--- a/src/stack.cc
+++ b/src/stack.cc
@@ -52,6 +52,13 @@
return *reinterpret_cast<uint32_t*>(vreg_addr);
}
+void Frame::SetVReg(Method* method, int vreg, uint32_t new_value) {
+ DCHECK(method == GetMethod());
+ int offset = oatVRegOffsetFromMethod(method, vreg);
+ byte* vreg_addr = reinterpret_cast<byte*>(sp_) + offset;
+ *reinterpret_cast<uint32_t*>(vreg_addr) = new_value;
+}
+
uintptr_t Frame::LoadCalleeSave(int num) const {
// Callee saves are held at the top of the frame
Method* method = GetMethod();