From 4717175e40a19e79af904dfb7b7dd13f046debd7 Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Mon, 31 Aug 2020 15:03:20 +0100 Subject: Move code item to the data pointer and remove code_item_offset. This saves 4 bytes on 32bit and 8 bytes on 64bit on ArtMethod. Also update nterp to directly fetch the code item from the data pointer. Test: test.py Bug: 112676029 Change-Id: Ic01f43c7ccf2cbce1ec517478e81362232d36371 --- compiler/optimizing/optimizing_compiler.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/optimizing/optimizing_compiler.cc') diff --git a/compiler/optimizing/optimizing_compiler.cc b/compiler/optimizing/optimizing_compiler.cc index 392aaddaa6..3c168bad65 100644 --- a/compiler/optimizing/optimizing_compiler.cc +++ b/compiler/optimizing/optimizing_compiler.cc @@ -1238,7 +1238,7 @@ bool OptimizingCompiler::JitCompile(Thread* self, const DexFile* dex_file = method->GetDexFile(); const uint16_t class_def_idx = method->GetClassDefIndex(); - const dex::CodeItem* code_item = dex_file->GetCodeItem(method->GetCodeItemOffset()); + const dex::CodeItem* code_item = method->GetCodeItem(); const uint32_t method_idx = method->GetDexMethodIndex(); const uint32_t access_flags = method->GetAccessFlags(); -- cgit v1.2.3-59-g8ed1b