summaryrefslogtreecommitdiffstats
path: root/runtime/runtime.cc
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2013-09-19 02:56:49 -0700
committerIan Rogers <irogers@google.com>2013-09-21 22:00:10 -0700
commitee39a10e45a6a0880e8b829525c40d6055818560 (patch)
tree88cf2b0765ffc8cc96aa2f895254fbf799d0eb40 /runtime/runtime.cc
parent7d690ba929a2a02e2b6344749561d49e2c0d55d2 (diff)
downloadart-ee39a10e45a6a0880e8b829525c40d6055818560.zip
art-ee39a10e45a6a0880e8b829525c40d6055818560.tar.gz
art-ee39a10e45a6a0880e8b829525c40d6055818560.tar.bz2
Use class def index from java.lang.Class.
Bug: 10244719 This removes the computation of the dex file index, when necessary this is computed by searching the dex file. Its only necessary in dalvik.system.DexFile.defineClassNative and DexFile::FindInClassPath, the latter not showing up significantly in profiling with this change. (cherry-picked from 8b2c0b9abc3f520495f4387ea040132ba85cae69) Change-Id: I20c73a3b17d86286428ab0fd21bc13f51f36c85c
Diffstat (limited to 'runtime/runtime.cc')
-rw-r--r--runtime/runtime.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/runtime/runtime.cc b/runtime/runtime.cc
index 657735a..09d1447 100644
--- a/runtime/runtime.cc
+++ b/runtime/runtime.cc
@@ -1001,6 +1001,7 @@ void Runtime::RegisterRuntimeNativeMethods(JNIEnv* env) {
REGISTER(register_dalvik_system_VMStack);
REGISTER(register_dalvik_system_Zygote);
REGISTER(register_java_lang_Class);
+ REGISTER(register_java_lang_DexCache);
REGISTER(register_java_lang_Object);
REGISTER(register_java_lang_Runtime);
REGISTER(register_java_lang_String);
@@ -1164,7 +1165,7 @@ mirror::ArtMethod* Runtime::CreateResolutionMethod() {
method(self, down_cast<mirror::ArtMethod*>(method_class->AllocObject(self)));
method->SetDeclaringClass(method_class);
// TODO: use a special method for resolution method saves
- method->SetDexMethodIndex(DexFile::kDexNoIndex16);
+ method->SetDexMethodIndex(DexFile::kDexNoIndex);
// When compiling, the code pointer will get set later when the image is loaded.
Runtime* r = Runtime::Current();
ClassLinker* cl = r->GetClassLinker();
@@ -1180,7 +1181,7 @@ mirror::ArtMethod* Runtime::CreateCalleeSaveMethod(InstructionSet instruction_se
method(self, down_cast<mirror::ArtMethod*>(method_class->AllocObject(self)));
method->SetDeclaringClass(method_class);
// TODO: use a special method for callee saves
- method->SetDexMethodIndex(DexFile::kDexNoIndex16);
+ method->SetDexMethodIndex(DexFile::kDexNoIndex);
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) |