Revert^2 "Use frame info from CodeInfo."
This reverts commit cba94faf17f9446f57e1ad2848703944970e51da.
Change-Id: I15eae55987a8c56400282da08b4ad282dddc8af9
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,