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.cc b/src/object.cc
index edc5bdd..d7b6024 100644
--- a/src/object.cc
+++ b/src/object.cc
@@ -453,10 +453,12 @@
           this->GetSignature()->Equals(that->GetSignature()));
 }
 
-void Method::SetCode(ByteArray* code_array,
-                     InstructionSet instruction_set) {
+void Method::SetCode(ByteArray* code_array, InstructionSet instruction_set,
+                     ByteArray* mapping_table) {
   CHECK(!HasCode() || IsNative());
   SetFieldPtr<ByteArray*>(OFFSET_OF_OBJECT_MEMBER(Method, code_array_), code_array, false);
+  SetFieldPtr<ByteArray*>(OFFSET_OF_OBJECT_MEMBER(Method, mapping_table_),
+       mapping_table, false);
   int8_t* code = code_array->GetData();
   uintptr_t address = reinterpret_cast<uintptr_t>(code);
   if (instruction_set == kThumb2) {