summaryrefslogtreecommitdiffstats
path: root/compiler/driver/dex_compilation_unit.h
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 /compiler/driver/dex_compilation_unit.h
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 'compiler/driver/dex_compilation_unit.h')
-rw-r--r--compiler/driver/dex_compilation_unit.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/driver/dex_compilation_unit.h b/compiler/driver/dex_compilation_unit.h
index 465139b..3df50ff 100644
--- a/compiler/driver/dex_compilation_unit.h
+++ b/compiler/driver/dex_compilation_unit.h
@@ -36,7 +36,7 @@ class DexCompilationUnit {
DexCompilationUnit(CompilationUnit* cu, jobject class_loader, ClassLinker* class_linker,
const DexFile& dex_file, const DexFile::CodeItem* code_item,
- uint32_t class_def_idx, uint32_t method_idx, uint32_t access_flags);
+ uint16_t class_def_idx, uint32_t method_idx, uint32_t access_flags);
CompilationUnit* GetCompilationUnit() const {
return cu_;
@@ -54,7 +54,7 @@ class DexCompilationUnit {
return dex_file_;
}
- uint32_t GetClassDefIndex() const {
+ uint16_t GetClassDefIndex() const {
return class_def_idx_;
}
@@ -108,7 +108,7 @@ class DexCompilationUnit {
const DexFile* const dex_file_;
const DexFile::CodeItem* const code_item_;
- const uint32_t class_def_idx_;
+ const uint16_t class_def_idx_;
const uint32_t dex_method_idx_;
const uint32_t access_flags_;