Added method fields for register map. Populated by verifier.
The register map consists of 2 ByteArrays, 1 for the header and 1 for
the actual data.
Change-Id: Ibd7455a2eff7572587dabff7dd67fd810ce21f84
diff --git a/src/object.h b/src/object.h
index 5e09f2e..3e154e4 100644
--- a/src/object.h
+++ b/src/object.h
@@ -636,6 +636,14 @@
void SetName(String* new_name);
+ ByteArray* GetRegisterMapData() const;
+
+ void SetRegisterMapData(ByteArray* new_data);
+
+ ByteArray* GetRegisterMapHeader() const;
+
+ void SetRegisterMapHeader(ByteArray* new_header);
+
String* GetShorty() const;
void SetShorty(String* new_shorty);
@@ -1012,6 +1020,10 @@
// Storage for mapping_table_
const ByteArray* mapping_table_;
+ // Byte arrays that hold data for the register maps
+ const ByteArray* register_map_data_;
+ const ByteArray* register_map_header_;
+
// The short-form method descriptor string.
String* shorty_;
@@ -2515,6 +2527,26 @@
}
+inline ByteArray* Method::GetRegisterMapData() const {
+ return GetFieldObject<ByteArray*>(
+ OFFSET_OF_OBJECT_MEMBER(Method, register_map_data_), false);
+}
+
+inline void Method::SetRegisterMapData(ByteArray* new_data) {
+ SetFieldObject(OFFSET_OF_OBJECT_MEMBER(Method, register_map_data_),
+ new_data, false);
+}
+
+inline ByteArray* Method::GetRegisterMapHeader() const {
+ return GetFieldObject<ByteArray*>(
+ OFFSET_OF_OBJECT_MEMBER(Method, register_map_header_), false);
+}
+
+inline void Method::SetRegisterMapHeader(ByteArray* new_header) {
+ SetFieldObject(OFFSET_OF_OBJECT_MEMBER(Method, register_map_header_),
+ new_header, false);
+}
+
inline String* Method::GetShorty() const {
DCHECK(GetDeclaringClass()->IsLoaded());
return GetFieldObject<String*>(