Rename abstract method code_ to entry_point_from_compiled_code_.

Change-Id: I9b02d2df95bbeafa6e6387b461f574c57337a61e
diff --git a/src/asm_support.h b/src/asm_support.h
index bda0b7c..8ea4adf 100644
--- a/src/asm_support.h
+++ b/src/asm_support.h
@@ -27,8 +27,8 @@
 #define STRING_OFFSET_OFFSET 20
 #define STRING_DATA_OFFSET 12
 
-// Offset of field Method::code_
-#define METHOD_CODE_OFFSET 32
+// Offset of field Method::entry_point_from_compiled_code_
+#define METHOD_CODE_OFFSET 40
 
 #if defined(__arm__)
 // Register holding suspend check count down.
diff --git a/src/class_linker.cc b/src/class_linker.cc
index 759bc0c..08b26e4 100644
--- a/src/class_linker.cc
+++ b/src/class_linker.cc
@@ -1040,13 +1040,13 @@
   if (obj->IsMethod()) {
     mirror::AbstractMethod* method = obj->AsMethod();
     // Install entry point from interpreter.
-    if (method->GetCode() == NULL && !method->IsNative() && !method->IsProxyMethod()) {
+    if (method->GetEntryPointFromCompiledCode() == NULL && !method->IsNative() && !method->IsProxyMethod()) {
       method->SetEntryPointFromInterpreter(interpreter::EnterInterpreterFromInterpreter);
     } else {
       method->SetEntryPointFromInterpreter(artInterpreterToQuickEntry);
     }
-    if (method->GetCode() == NULL) {
-      method->SetCode(GetResolutionTrampoline());
+    if (method->GetEntryPointFromCompiledCode() == NULL) {
+      method->SetEntryPointFromCompiledCode(GetResolutionTrampoline());
     }
   }
 }
@@ -1600,14 +1600,15 @@
                      uint32_t method_index)
     SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
   // Method shouldn't have already been linked.
-  DCHECK(method->GetCode() == NULL);
+  DCHECK(method->GetEntryPointFromCompiledCode() == NULL);
   // Every kind of method should at least get an invoke stub from the oat_method.
   // non-abstract methods also get their code pointers.
   const OatFile::OatMethod oat_method = oat_class->GetOatMethod(method_index);
   oat_method.LinkMethod(method.get());
 
   // Install entry point from interpreter.
-  if (method->GetCode() == NULL && !method->IsNative() && !method->IsProxyMethod()) {
+  if (method->GetEntryPointFromCompiledCode() == NULL && !method->IsNative() &&
+      !method->IsProxyMethod()) {
     method->SetEntryPointFromInterpreter(interpreter::EnterInterpreterFromInterpreter);
   } else {
     method->SetEntryPointFromInterpreter(artInterpreterToQuickEntry);
@@ -1615,13 +1616,13 @@
 
   Runtime* runtime = Runtime::Current();
   if (method->IsAbstract()) {
-    method->SetCode(GetAbstractMethodErrorStub());
+    method->SetEntryPointFromCompiledCode(GetAbstractMethodErrorStub());
     return;
   }
 
   if (method->IsStatic() && !method->IsConstructor()) {
     // For static methods excluding the class initializer, install the trampoline.
-    method->SetCode(GetResolutionTrampoline());
+    method->SetEntryPointFromCompiledCode(GetResolutionTrampoline());
   }
 
   if (method->IsNative()) {
@@ -1629,13 +1630,14 @@
     method->UnregisterNative(Thread::Current());
   }
 
-  if (method->GetCode() == NULL) {
+  if (method->GetEntryPointFromCompiledCode() == NULL) {
     // No code? You must mean to go into the interpreter.
-    method->SetCode(GetInterpreterEntryPoint());
+    method->SetEntryPointFromCompiledCode(GetInterpreterEntryPoint());
   }
 
   // Allow instrumentation its chance to hijack code.
-  runtime->GetInstrumentation()->UpdateMethodsCode(method.get(), method->GetCode());
+  runtime->GetInstrumentation()->UpdateMethodsCode(method.get(),
+                                                   method->GetEntryPointFromCompiledCode());
 }
 
 void ClassLinker::LoadClass(const DexFile& dex_file,
@@ -2562,9 +2564,9 @@
   method->SetFpSpillMask(refs_and_args->GetFpSpillMask());
   method->SetFrameSizeInBytes(refs_and_args->GetFrameSizeInBytes());
 #if !defined(ART_USE_PORTABLE_COMPILER)
-  method->SetCode(reinterpret_cast<void*>(art_quick_proxy_invoke_handler));
+  method->SetEntryPointFromCompiledCode(reinterpret_cast<void*>(art_quick_proxy_invoke_handler));
 #else
-  method->SetCode(reinterpret_cast<void*>(art_portable_proxy_invoke_handler));
+  method->SetEntryPointFromCompiledCode(reinterpret_cast<void*>(art_portable_proxy_invoke_handler));
 #endif
   method->SetEntryPointFromInterpreter(artInterpreterToQuickEntry);
 
diff --git a/src/class_linker_test.cc b/src/class_linker_test.cc
index 94ea9d7..73bdc61 100644
--- a/src/class_linker_test.cc
+++ b/src/class_linker_test.cc
@@ -471,19 +471,19 @@
     offsets.push_back(CheckOffset(OFFSETOF_MEMBER(AbstractMethod, dex_cache_strings_),                    "dexCacheStrings"));
 
     // alphabetical 32-bit
-    offsets.push_back(CheckOffset(OFFSETOF_MEMBER(AbstractMethod, access_flags_),                 "accessFlags"));
-    offsets.push_back(CheckOffset(OFFSETOF_MEMBER(AbstractMethod, code_),                         "code"));
-    offsets.push_back(CheckOffset(OFFSETOF_MEMBER(AbstractMethod, code_item_offset_),             "codeItemOffset"));
-    offsets.push_back(CheckOffset(OFFSETOF_MEMBER(AbstractMethod, core_spill_mask_),              "coreSpillMask"));
-    offsets.push_back(CheckOffset(OFFSETOF_MEMBER(AbstractMethod, entry_point_from_interpreter_), "entryPointFromInterpreter"));
-    offsets.push_back(CheckOffset(OFFSETOF_MEMBER(AbstractMethod, fp_spill_mask_),                "fpSpillMask"));
-    offsets.push_back(CheckOffset(OFFSETOF_MEMBER(AbstractMethod, frame_size_in_bytes_),          "frameSizeInBytes"));
-    offsets.push_back(CheckOffset(OFFSETOF_MEMBER(AbstractMethod, gc_map_),                       "gcMap"));
-    offsets.push_back(CheckOffset(OFFSETOF_MEMBER(AbstractMethod, mapping_table_),                "mappingTable"));
-    offsets.push_back(CheckOffset(OFFSETOF_MEMBER(AbstractMethod, method_dex_index_),             "methodDexIndex"));
-    offsets.push_back(CheckOffset(OFFSETOF_MEMBER(AbstractMethod, method_index_),                 "methodIndex"));
-    offsets.push_back(CheckOffset(OFFSETOF_MEMBER(AbstractMethod, native_method_),                "nativeMethod"));
-    offsets.push_back(CheckOffset(OFFSETOF_MEMBER(AbstractMethod, vmap_table_),                   "vmapTable"));
+    offsets.push_back(CheckOffset(OFFSETOF_MEMBER(AbstractMethod, access_flags_),                   "accessFlags"));
+    offsets.push_back(CheckOffset(OFFSETOF_MEMBER(AbstractMethod, code_item_offset_),               "codeItemOffset"));
+    offsets.push_back(CheckOffset(OFFSETOF_MEMBER(AbstractMethod, core_spill_mask_),                "coreSpillMask"));
+    offsets.push_back(CheckOffset(OFFSETOF_MEMBER(AbstractMethod, entry_point_from_compiled_code_), "entryPointFromCompiledCode"));
+    offsets.push_back(CheckOffset(OFFSETOF_MEMBER(AbstractMethod, entry_point_from_interpreter_),   "entryPointFromInterpreter"));
+    offsets.push_back(CheckOffset(OFFSETOF_MEMBER(AbstractMethod, fp_spill_mask_),                  "fpSpillMask"));
+    offsets.push_back(CheckOffset(OFFSETOF_MEMBER(AbstractMethod, frame_size_in_bytes_),            "frameSizeInBytes"));
+    offsets.push_back(CheckOffset(OFFSETOF_MEMBER(AbstractMethod, gc_map_),                         "gcMap"));
+    offsets.push_back(CheckOffset(OFFSETOF_MEMBER(AbstractMethod, mapping_table_),                  "mappingTable"));
+    offsets.push_back(CheckOffset(OFFSETOF_MEMBER(AbstractMethod, method_dex_index_),               "methodDexIndex"));
+    offsets.push_back(CheckOffset(OFFSETOF_MEMBER(AbstractMethod, method_index_),                   "methodIndex"));
+    offsets.push_back(CheckOffset(OFFSETOF_MEMBER(AbstractMethod, native_method_),                  "nativeMethod"));
+    offsets.push_back(CheckOffset(OFFSETOF_MEMBER(AbstractMethod, vmap_table_),                     "vmapTable"));
   };
 };
 
diff --git a/src/compiler/dex/quick/gen_invoke.cc b/src/compiler/dex/quick/gen_invoke.cc
index efacff0..49fb93a 100644
--- a/src/compiler/dex/quick/gen_invoke.cc
+++ b/src/compiler/dex/quick/gen_invoke.cc
@@ -384,7 +384,7 @@
       if (cu->instruction_set != kX86) {
         if (direct_code == 0) {
           cg->LoadWordDisp(cg->TargetReg(kArg0),
-                           mirror::AbstractMethod::GetCodeOffset().Int32Value(),
+                           mirror::AbstractMethod::GetEntryPointFromCompiledCodeOffset().Int32Value(),
                            cg->TargetReg(kInvokeTgt));
         }
         break;
@@ -437,7 +437,7 @@
     case 4: // Get the compiled code address [uses kArg0, sets kInvokeTgt]
       if (cu->instruction_set != kX86) {
         cg->LoadWordDisp(cg->TargetReg(kArg0),
-                         mirror::AbstractMethod::GetCodeOffset().Int32Value(),
+                         mirror::AbstractMethod::GetEntryPointFromCompiledCodeOffset().Int32Value(),
                          cg->TargetReg(kInvokeTgt));
         break;
       }
@@ -1379,7 +1379,7 @@
   } else {
     if (fast_path && info->type != kInterface) {
       call_inst = OpMem(kOpBlx, TargetReg(kArg0),
-                        mirror::AbstractMethod::GetCodeOffset().Int32Value());
+                        mirror::AbstractMethod::GetEntryPointFromCompiledCodeOffset().Int32Value());
     } else {
       int trampoline = 0;
       switch (info->type) {
diff --git a/src/compiler/driver/compiler_driver.cc b/src/compiler/driver/compiler_driver.cc
index 6b7d9e6..6985172 100644
--- a/src/compiler/driver/compiler_driver.cc
+++ b/src/compiler/driver/compiler_driver.cc
@@ -809,7 +809,7 @@
     if (Runtime::Current()->GetHeap()->FindSpaceFromObject(method)->IsImageSpace()) {
       direct_method = reinterpret_cast<uintptr_t>(method);
     }
-    direct_code = reinterpret_cast<uintptr_t>(method->GetCode());
+    direct_code = reinterpret_cast<uintptr_t>(method->GetEntryPointFromCompiledCode());
   }
 }
 
diff --git a/src/compiler/driver/compiler_driver_test.cc b/src/compiler/driver/compiler_driver_test.cc
index aef3a33..c87fefd 100644
--- a/src/compiler/driver/compiler_driver_test.cc
+++ b/src/compiler/driver/compiler_driver_test.cc
@@ -115,7 +115,7 @@
     EXPECT_TRUE(method != NULL) << "method_idx=" << i
                                 << " " << dex->GetMethodDeclaringClassDescriptor(dex->GetMethodId(i))
                                 << " " << dex->GetMethodName(dex->GetMethodId(i));
-    EXPECT_TRUE(method->GetCode() != NULL) << "method_idx=" << i
+    EXPECT_TRUE(method->GetEntryPointFromCompiledCode() != NULL) << "method_idx=" << i
                                            << " "
                                            << dex->GetMethodDeclaringClassDescriptor(dex->GetMethodId(i))
                                            << " " << dex->GetMethodName(dex->GetMethodId(i));
diff --git a/src/compiler/jni/jni_compiler_test.cc b/src/compiler/jni/jni_compiler_test.cc
index ef532f2..560a146 100644
--- a/src/compiler/jni/jni_compiler_test.cc
+++ b/src/compiler/jni/jni_compiler_test.cc
@@ -58,11 +58,11 @@
       method = c->FindVirtualMethod(method_name, method_sig);
     }
     ASSERT_TRUE(method != NULL) << method_name << " " << method_sig;
-    if (method->GetCode() != NULL) {
+    if (method->GetEntryPointFromCompiledCode() != NULL) {
       return;
     }
     CompileMethod(method);
-    ASSERT_TRUE(method->GetCode() != NULL) << method_name << " " << method_sig;
+    ASSERT_TRUE(method->GetEntryPointFromCompiledCode() != NULL) << method_name << " " << method_sig;
   }
 
   void SetUpForTest(bool direct, const char* method_name, const char* method_sig,
diff --git a/src/compiler/llvm/gbc_expander.cc b/src/compiler/llvm/gbc_expander.cc
index c1e35a6..99c8fd5 100644
--- a/src/compiler/llvm/gbc_expander.cc
+++ b/src/compiler/llvm/gbc_expander.cc
@@ -852,7 +852,7 @@
   } else {
     code_addr =
         irb_.LoadFromObjectOffset(callee_method_object_addr,
-                                  art::mirror::AbstractMethod::GetCodeOffset().Int32Value(),
+                                  art::mirror::AbstractMethod::GetEntryPointFromCompiledCodeOffset().Int32Value(),
                                   func_type->getPointerTo(), kTBAARuntimeInfo);
   }
 
@@ -1200,7 +1200,7 @@
 
   llvm::Value* code_addr =
     irb_.LoadFromObjectOffset(callee_method_object_addr,
-                              art::mirror::AbstractMethod::GetCodeOffset().Int32Value(),
+                              art::mirror::AbstractMethod::GetEntryPointFromCompiledCodeOffset().Int32Value(),
                               callee_method_type->getPointerTo(),
                               kTBAARuntimeInfo);
 
diff --git a/src/compiler/llvm/runtime_support_llvm.cc b/src/compiler/llvm/runtime_support_llvm.cc
index d6c8181..bd6b01b 100644
--- a/src/compiler/llvm/runtime_support_llvm.cc
+++ b/src/compiler/llvm/runtime_support_llvm.cc
@@ -339,7 +339,7 @@
     }
   }
   DCHECK(!thread->IsExceptionPending());
-  const void* code = method->GetCode();
+  const void* code = method->GetEntryPointFromCompiledCode();
 
   // When we return, the caller will branch to this address, so it had better not be 0!
   if (UNLIKELY(code == NULL)) {
diff --git a/src/exception_test.cc b/src/exception_test.cc
index 0cd8123..54341e3 100644
--- a/src/exception_test.cc
+++ b/src/exception_test.cc
@@ -73,7 +73,7 @@
     method_f_ = my_klass_->FindVirtualMethod("f", "()I");
     ASSERT_TRUE(method_f_ != NULL);
     method_f_->SetFrameSizeInBytes(kStackAlignment);
-    method_f_->SetCode(CompiledMethod::CodePointer(&fake_code_[sizeof(code_size)], kThumb2));
+    method_f_->SetEntryPointFromCompiledCode(CompiledMethod::CodePointer(&fake_code_[sizeof(code_size)], kThumb2));
     method_f_->SetMappingTable(&fake_mapping_data_[0]);
     method_f_->SetVmapTable(&fake_vmap_table_data_[0]);
     method_f_->SetNativeGcMap(&fake_gc_map_[0]);
@@ -81,7 +81,7 @@
     method_g_ = my_klass_->FindVirtualMethod("g", "(I)V");
     ASSERT_TRUE(method_g_ != NULL);
     method_g_->SetFrameSizeInBytes(kStackAlignment);
-    method_g_->SetCode(CompiledMethod::CodePointer(&fake_code_[sizeof(code_size)], kThumb2));
+    method_g_->SetEntryPointFromCompiledCode(CompiledMethod::CodePointer(&fake_code_[sizeof(code_size)], kThumb2));
     method_g_->SetMappingTable(&fake_mapping_data_[0]);
     method_g_->SetVmapTable(&fake_vmap_table_data_[0]);
     method_g_->SetNativeGcMap(&fake_gc_map_[0]);
diff --git a/src/image_writer.cc b/src/image_writer.cc
index d9e4353..7e82d6d 100644
--- a/src/image_writer.cc
+++ b/src/image_writer.cc
@@ -476,18 +476,18 @@
   // Here we readjust to a pointer relative to oat_begin_
   if (orig->IsAbstract()) {
     // Code for abstract methods is set to the abstract method error stub when we load the image.
-    copy->SetCode(NULL);
+    copy->SetEntryPointFromCompiledCode(NULL);
     return;
   }
 
   if (orig == Runtime::Current()->GetResolutionMethod()) {
     // The resolution method's code is set to the resolution trampoline when we load the image.
-    copy->SetCode(NULL);
+    copy->SetEntryPointFromCompiledCode(NULL);
     return;
   }
 
   // Non-abstract methods have code
-  copy->SetCode(GetOatAddress(orig->GetOatCodeOffset()));
+  copy->SetEntryPointFromCompiledCode(GetOatAddress(orig->GetOatCodeOffset()));
 
   if (orig->IsNative()) {
     // The native method's pointer is set to a stub to lookup via dlsym when we load the image.
diff --git a/src/instrumentation.cc b/src/instrumentation.cc
index 43bab53..39fd377 100644
--- a/src/instrumentation.cc
+++ b/src/instrumentation.cc
@@ -71,7 +71,7 @@
           new_code = GetInterpreterEntryPoint();
         }
       }
-      method->SetCode(new_code);
+      method->SetEntryPointFromCompiledCode(new_code);
     }
   }
   for (size_t i = 0; i < klass->NumVirtualMethods(); i++) {
@@ -87,7 +87,7 @@
           new_code = GetInterpreterEntryPoint();
         }
       }
-      method->SetCode(new_code);
+      method->SetEntryPointFromCompiledCode(new_code);
     }
   }
   return true;
@@ -371,14 +371,14 @@
 
 void Instrumentation::UpdateMethodsCode(mirror::AbstractMethod* method, const void* code) const {
   if (LIKELY(!instrumentation_stubs_installed_)) {
-    method->SetCode(code);
+    method->SetEntryPointFromCompiledCode(code);
   }
 }
 
 const void* Instrumentation::GetQuickCodeFor(const mirror::AbstractMethod* method) const {
   Runtime* runtime = Runtime::Current();
   if (LIKELY(!instrumentation_stubs_installed_)) {
-    const void* code = method->GetCode();
+    const void* code = method->GetEntryPointFromCompiledCode();
     DCHECK(code != NULL);
     if (LIKELY(code != GetResolutionTrampoline())) {
       return code;
diff --git a/src/mirror/abstract_method-inl.h b/src/mirror/abstract_method-inl.h
index a420714..d4f0f2c 100644
--- a/src/mirror/abstract_method-inl.h
+++ b/src/mirror/abstract_method-inl.h
@@ -76,7 +76,7 @@
 
 inline uint32_t AbstractMethod::GetCodeSize() const {
   DCHECK(!IsRuntimeMethod() && !IsProxyMethod()) << PrettyMethod(this);
-  uintptr_t code = reinterpret_cast<uintptr_t>(GetCode());
+  uintptr_t code = reinterpret_cast<uintptr_t>(GetEntryPointFromCompiledCode());
   if (code == 0) {
     return 0;
   }
@@ -114,27 +114,27 @@
   if (IsNative() || IsRuntimeMethod() || IsProxyMethod()) {
     return;
   }
-  if (GetCode() == GetInterpreterEntryPoint()) {
+  if (GetEntryPointFromCompiledCode() == GetInterpreterEntryPoint()) {
     return;
   }
-  if (GetCode() == GetResolutionTrampoline()) {
+  if (GetEntryPointFromCompiledCode() == GetResolutionTrampoline()) {
       return;
   }
   DCHECK(IsWithinCode(pc))
       << PrettyMethod(this)
       << " pc=" << std::hex << pc
-      << " code=" << GetCode()
+      << " code=" << GetEntryPointFromCompiledCode()
       << " size=" << GetCodeSize();
 }
 
 inline uint32_t AbstractMethod::GetOatCodeOffset() const {
   DCHECK(!Runtime::Current()->IsStarted());
-  return reinterpret_cast<uint32_t>(GetCode());
+  return reinterpret_cast<uint32_t>(GetEntryPointFromCompiledCode());
 }
 
 inline void AbstractMethod::SetOatCodeOffset(uint32_t code_offset) {
   DCHECK(!Runtime::Current()->IsStarted());
-  SetCode(reinterpret_cast<void*>(code_offset));
+  SetEntryPointFromCompiledCode(reinterpret_cast<void*>(code_offset));
 }
 
 inline uint32_t AbstractMethod::GetOatMappingTableOffset() const {
diff --git a/src/mirror/abstract_method.cc b/src/mirror/abstract_method.cc
index c351ce8..5258795 100644
--- a/src/mirror/abstract_method.cc
+++ b/src/mirror/abstract_method.cc
@@ -271,10 +271,10 @@
     bool interpret = runtime->GetInstrumentation()->InterpretOnly() && !IsNative() &&
         !IsProxyMethod();
     const bool kLogInvocationStartAndReturn = false;
-    if (GetCode() != NULL) {
+    if (GetEntryPointFromCompiledCode() != NULL) {
       if (!interpret) {
         if (kLogInvocationStartAndReturn) {
-          LOG(INFO) << StringPrintf("Invoking '%s' code=%p", PrettyMethod(this).c_str(), GetCode());
+          LOG(INFO) << StringPrintf("Invoking '%s' code=%p", PrettyMethod(this).c_str(), GetEntryPointFromCompiledCode());
         }
 #ifdef ART_USE_PORTABLE_COMPILER
         (*art_portable_invoke_stub)(this, args, args_size, self, result, result_type);
@@ -292,7 +292,7 @@
           interpreter::EnterInterpreterFromDeoptimize(self, shadow_frame, result);
         }
         if (kLogInvocationStartAndReturn) {
-          LOG(INFO) << StringPrintf("Returned '%s' code=%p", PrettyMethod(this).c_str(), GetCode());
+          LOG(INFO) << StringPrintf("Returned '%s' code=%p", PrettyMethod(this).c_str(), GetEntryPointFromCompiledCode());
         }
       } else {
         if (kLogInvocationStartAndReturn) {
@@ -310,7 +310,7 @@
       }
     } else {
       LOG(INFO) << "Not invoking '" << PrettyMethod(this)
-          << "' code=" << reinterpret_cast<const void*>(GetCode());
+          << "' code=" << reinterpret_cast<const void*>(GetEntryPointFromCompiledCode());
       if (result != NULL) {
         result->SetJ(0);
       }
diff --git a/src/mirror/abstract_method.h b/src/mirror/abstract_method.h
index e955376..8f8038f 100644
--- a/src/mirror/abstract_method.h
+++ b/src/mirror/abstract_method.h
@@ -50,8 +50,8 @@
     return MemberOffset(OFFSETOF_MEMBER(AbstractMethod, declaring_class_));
   }
 
-  static MemberOffset CodeOffset() {
-    return MemberOffset(OFFSETOF_MEMBER(AbstractMethod, code_));
+  static MemberOffset EntryPointFromCompiledCodeOffset() {
+    return MemberOffset(OFFSETOF_MEMBER(AbstractMethod, entry_point_from_compiled_code_));
   }
 
   uint32_t GetAccessFlags() const;
@@ -200,19 +200,19 @@
     SetFieldPtr<EntryPointFromInterpreter*>(OFFSET_OF_OBJECT_MEMBER(AbstractMethod, entry_point_from_interpreter_), entry_point_from_interpreter, false);
   }
 
-  const void* GetCode() const {
-    return GetFieldPtr<const void*>(OFFSET_OF_OBJECT_MEMBER(AbstractMethod, code_), false);
+  const void* GetEntryPointFromCompiledCode() const {
+    return GetFieldPtr<const void*>(OFFSET_OF_OBJECT_MEMBER(AbstractMethod, entry_point_from_compiled_code_), false);
   }
 
-  void SetCode(const void* code) {
-    SetFieldPtr<const void*>(OFFSET_OF_OBJECT_MEMBER(AbstractMethod, code_), code, false);
+  void SetEntryPointFromCompiledCode(const void* entry_point_from_compiled_code) {
+    SetFieldPtr<const void*>(OFFSET_OF_OBJECT_MEMBER(AbstractMethod, entry_point_from_compiled_code_), entry_point_from_compiled_code, false);
   }
 
   uint32_t GetCodeSize() const SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
 
   bool IsWithinCode(uintptr_t pc) const
       SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
-    uintptr_t code = reinterpret_cast<uintptr_t>(GetCode());
+    uintptr_t code = reinterpret_cast<uintptr_t>(GetEntryPointFromCompiledCode());
     if (code == 0) {
       return pc == 0;
     }
@@ -231,8 +231,8 @@
 
   void SetOatCodeOffset(uint32_t code_offset);
 
-  static MemberOffset GetCodeOffset() {
-    return OFFSET_OF_OBJECT_MEMBER(AbstractMethod, code_);
+  static MemberOffset GetEntryPointFromCompiledCodeOffset() {
+    return OFFSET_OF_OBJECT_MEMBER(AbstractMethod, entry_point_from_compiled_code_);
   }
 
   const uint32_t* GetMappingTable() const {
@@ -432,17 +432,17 @@
   // Access flags; low 16 bits are defined by spec.
   uint32_t access_flags_;
 
-  // Compiled code associated with this method for callers from managed code.
-  // May be compiled managed code or a bridge for invoking a native method.
-  // TODO: Break apart this into portable and quick.
-  const void* code_;
-
   // Offset to the CodeItem.
   uint32_t code_item_offset_;
 
   // Architecture-dependent register spill mask
   uint32_t core_spill_mask_;
 
+  // Compiled code associated with this method for callers from managed code.
+  // May be compiled managed code or a bridge for invoking a native method.
+  // TODO: Break apart this into portable and quick.
+  const void* entry_point_from_compiled_code_;
+
   // Called by the interpreter to execute this method.
   EntryPointFromInterpreter* entry_point_from_interpreter_;
 
diff --git a/src/mirror/object_test.cc b/src/mirror/object_test.cc
index 5c7ec11..8e9032d 100644
--- a/src/mirror/object_test.cc
+++ b/src/mirror/object_test.cc
@@ -75,7 +75,7 @@
   ASSERT_EQ(STRING_OFFSET_OFFSET, String::OffsetOffset().Int32Value());
   ASSERT_EQ(STRING_DATA_OFFSET, Array::DataOffset(sizeof(uint16_t)).Int32Value());
 
-  ASSERT_EQ(METHOD_CODE_OFFSET, AbstractMethod::CodeOffset().Int32Value());
+  ASSERT_EQ(METHOD_CODE_OFFSET, AbstractMethod::EntryPointFromCompiledCodeOffset().Int32Value());
 }
 
 TEST_F(ObjectTest, IsInSamePackage) {
diff --git a/src/oat/runtime/support_invoke.cc b/src/oat/runtime/support_invoke.cc
index 6cad527..369858e 100644
--- a/src/oat/runtime/support_invoke.cc
+++ b/src/oat/runtime/support_invoke.cc
@@ -119,7 +119,7 @@
       return 0;  // Failure.
     }
   }
-  const void* code = method->GetCode();
+  const void* code = method->GetEntryPointFromCompiledCode();
 
 #ifndef NDEBUG
   // When we return, the caller will branch to this address, so it had better not be 0!
@@ -153,7 +153,7 @@
     }
   }
   DCHECK(!self->IsExceptionPending());
-  const void* code = method->GetCode();
+  const void* code = method->GetEntryPointFromCompiledCode();
 
 #ifndef NDEBUG
   // When we return, the caller will branch to this address, so it had better not be 0!
diff --git a/src/oat/runtime/support_stubs.cc b/src/oat/runtime/support_stubs.cc
index 3c98ae7..161a7b2 100644
--- a/src/oat/runtime/support_stubs.cc
+++ b/src/oat/runtime/support_stubs.cc
@@ -82,7 +82,7 @@
     mirror::Class* called_class = called->GetDeclaringClass();
     linker->EnsureInitialized(called_class, true, true);
     if (LIKELY(called_class->IsInitialized())) {
-      code = called->GetCode();
+      code = called->GetEntryPointFromCompiledCode();
       // TODO: remove this after we solve the link issue.
       { // for lazy link.
         if (code == NULL) {
@@ -96,7 +96,7 @@
         code = linker->GetOatCodeFor(called);
       } else {
         // No trampoline for non-static methods.
-        code = called->GetCode();
+        code = called->GetEntryPointFromCompiledCode();
         // TODO: remove this after we solve the link issue.
         { // for lazy link.
           if (code == NULL) {
@@ -303,7 +303,7 @@
     mirror::Class* called_class = called->GetDeclaringClass();
     linker->EnsureInitialized(called_class, true, true);
     if (LIKELY(called_class->IsInitialized())) {
-      code = called->GetCode();
+      code = called->GetEntryPointFromCompiledCode();
     } else if (called_class->IsInitializing()) {
       if (invoke_type == kStatic) {
         // Class is still initializing, go to oat and grab code (trampoline must be left in place
@@ -311,7 +311,7 @@
         code = linker->GetOatCodeFor(called);
       } else {
         // No trampoline for non-static methods.
-        code = called->GetCode();
+        code = called->GetEntryPointFromCompiledCode();
       }
     } else {
       DCHECK(called_class->IsErroneous());
diff --git a/src/oat_file.cc b/src/oat_file.cc
index 3cc07bf..414813c 100644
--- a/src/oat_file.cc
+++ b/src/oat_file.cc
@@ -409,7 +409,7 @@
 
 void OatFile::OatMethod::LinkMethod(mirror::AbstractMethod* method) const {
   CHECK(method != NULL);
-  method->SetCode(GetCode());
+  method->SetEntryPointFromCompiledCode(GetCode());
   method->SetFrameSizeInBytes(frame_size_in_bytes_);
   method->SetCoreSpillMask(core_spill_mask_);
   method->SetFpSpillMask(fp_spill_mask_);
diff --git a/src/oat_writer.cc b/src/oat_writer.cc
index e529654..8acbfe9 100644
--- a/src/oat_writer.cc
+++ b/src/oat_writer.cc
@@ -369,7 +369,7 @@
         method->GetDeclaringClass()->IsInitialized()) {
       method->SetOatCodeOffset(code_offset);
     } else {
-      method->SetCode(NULL);
+      method->SetEntryPointFromCompiledCode(NULL);
     }
     method->SetOatVmapTableOffset(vmap_table_offset);
     method->SetOatNativeGcMapOffset(gc_map_offset);
diff --git a/src/oatdump.cc b/src/oatdump.cc
index 353abca..7a99f8d 100644
--- a/src/oatdump.cc
+++ b/src/oatdump.cc
@@ -879,7 +879,7 @@
 
   const void* GetOatCodeBegin(mirror::AbstractMethod* m)
       SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
-    const void* code = m->GetCode();
+    const void* code = m->GetEntryPointFromCompiledCode();
     if (code == GetResolutionTrampoline()) {
       code = oat_dumper_->GetOatCode(m);
     }
@@ -990,7 +990,7 @@
         if (first_occurrence) {
           state->stats_.native_to_managed_code_bytes += oat_code_size;
         }
-        if (oat_code != method->GetCode()) {
+        if (oat_code != method->GetEntryPointFromCompiledCode()) {
           indent_os << StringPrintf("OAT CODE: %p\n", oat_code);
         }
       } else if (method->IsAbstract() || method->IsCalleeSaveMethod() ||
@@ -998,7 +998,7 @@
         DCHECK(method->GetNativeGcMap() == NULL) << PrettyMethod(method);
         DCHECK(method->GetMappingTable() == NULL) << PrettyMethod(method);
       } else {
-        CHECK((method->GetCode() == NULL) || (method->GetNativeGcMap() != NULL));
+        CHECK((method->GetEntryPointFromCompiledCode() == NULL) || (method->GetNativeGcMap() != NULL));
 
         const DexFile::CodeItem* code_item = MethodHelper(method).GetCodeItem();
         size_t dex_instruction_bytes = code_item->insns_size_in_code_units_ * 2;
diff --git a/src/runtime.cc b/src/runtime.cc
index 17f283b..45d2988 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -1109,7 +1109,7 @@
   // TODO: use a special method for resolution method saves
   method->SetDexMethodIndex(DexFile::kDexNoIndex16);
   // When compiling, the code pointer will get set later when the image is loaded.
-  method->SetCode(Runtime::Current()->IsCompiler() ? NULL : GetResolutionTrampoline());
+  method->SetEntryPointFromCompiledCode(Runtime::Current()->IsCompiler() ? NULL : GetResolutionTrampoline());
   return method.get();
 }
 
@@ -1122,7 +1122,7 @@
   method->SetDeclaringClass(method_class);
   // TODO: use a special method for callee saves
   method->SetDexMethodIndex(DexFile::kDexNoIndex16);
-  method->SetCode(NULL);
+  method->SetEntryPointFromCompiledCode(NULL);
   if ((instruction_set == kThumb2) || (instruction_set == kArm)) {
     uint32_t ref_spills = (1 << art::arm::R5) | (1 << art::arm::R6)  | (1 << art::arm::R7) |
                           (1 << art::arm::R8) | (1 << art::arm::R10) | (1 << art::arm::R11);