Use frame info from CodeInfo.
Still keep the other copy around for verification.
Test: test-art-host-gtest
Change-Id: Iae4672e52d7ff3006d8f2b6238aecfac6101a1d8
diff --git a/runtime/oat_quick_method_header.h b/runtime/oat_quick_method_header.h
index 3d5be36..1e4ca3e 100644
--- a/runtime/oat_quick_method_header.h
+++ b/runtime/oat_quick_method_header.h
@@ -22,6 +22,7 @@
#include "base/utils.h"
#include "method_info.h"
#include "quick/quick_method_frame_info.h"
+#include "stack_map.h"
namespace art {
@@ -62,9 +63,9 @@
return GetCodeSize() != 0 && vmap_table_offset_ != 0;
}
- const void* GetOptimizedCodeInfoPtr() const {
+ const uint8_t* GetOptimizedCodeInfoPtr() const {
DCHECK(IsOptimized());
- return reinterpret_cast<const void*>(code_ - vmap_table_offset_);
+ return code_ - vmap_table_offset_;
}
uint8_t* GetOptimizedCodeInfoPtr() {
@@ -158,7 +159,12 @@
}
QuickMethodFrameInfo GetFrameInfo() const {
- return frame_info_;
+ DCHECK(IsOptimized());
+ QuickMethodFrameInfo frame_info = CodeInfo::DecodeFrameInfo(GetOptimizedCodeInfoPtr());
+ DCHECK_EQ(frame_info.FrameSizeInBytes(), frame_info_.FrameSizeInBytes());
+ DCHECK_EQ(frame_info.CoreSpillMask(), frame_info_.CoreSpillMask());
+ DCHECK_EQ(frame_info.FpSpillMask(), frame_info_.FpSpillMask());
+ return frame_info;
}
uintptr_t ToNativeQuickPc(ArtMethod* method,