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-19 15:17:12 -0700
commit8b2c0b9abc3f520495f4387ea040132ba85cae69 (patch)
tree13ea7e5c4e3d1804ec8d420d36f7ea5ab18f6ac0 /runtime/runtime.cc
parent5712d5d04640925970db9c98938ffaf806b3962c (diff)
downloadart-8b2c0b9abc3f520495f4387ea040132ba85cae69.zip
art-8b2c0b9abc3f520495f4387ea040132ba85cae69.tar.gz
art-8b2c0b9abc3f520495f4387ea040132ba85cae69.tar.bz2
Use class def index from java.lang.Class.
Bug: 10244719 Depends on: https://googleplex-android-review.git.corp.google.com/362363 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. 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 c37b783..05f4566 100644
--- a/runtime/runtime.cc
+++ b/runtime/runtime.cc
@@ -1007,6 +1007,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);
@@ -1175,7 +1176,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();
@@ -1191,7 +1192,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) |