Transmit mapping table to runtime
Pass the <native offset,dalvik offset> mapping table to the
runtime. Also update the MonitorEnter/Exit stubs to optionally
take the thread pointer.
Change-Id: Ie1345fbafc6c0477deed44297bba1c566e6301f6
diff --git a/src/object.h b/src/object.h
index bbd8acf..c0e725c 100644
--- a/src/object.h
+++ b/src/object.h
@@ -216,11 +216,13 @@
SetFieldPtr(OFFSET_OF_OBJECT_MEMBER(Object, monitor_), monitor, false);
}
- void MonitorEnter() {
+ void MonitorEnter(Thread* thread = NULL) {
+ // TODO: use thread to get lock id
GetMonitor()->Enter();
}
- void MonitorExit() {
+ void MonitorExit(Thread* thread = NULL) {
+ // TODO: use thread to get lock id
GetMonitor()->Exit();
}
@@ -856,7 +858,8 @@
return GetCode() != NULL;
}
- void SetCode(ByteArray* code_array, InstructionSet instruction_set);
+ void SetCode(ByteArray* code_array, InstructionSet instruction_set,
+ ByteArray* mapping_table = NULL);
static MemberOffset GetCodeOffset() {
return OFFSET_OF_OBJECT_MEMBER(Method, code_);
@@ -1057,6 +1060,9 @@
// Storage for code_
const ByteArray* code_array_;
+ // Storage for mapping_table_
+ const ByteArray* mapping_table_;
+
// Compiled code associated with this method for callers from managed code.
// May be compiled managed code or a bridge for invoking a native method.
const void* code_;