From 66f19258f9728d4ffe026074d8fd429d639802fa Mon Sep 17 00:00:00 2001 From: Mathieu Chartier Date: Tue, 18 Sep 2012 08:57:04 -0700 Subject: Change dex cache to be java object instead of array, add pointer to dex file in dex cache. Generic clean up to facilitate having GDB macros for Pretty* helper functions. Improved cleanliness of DexCache since having it as an object array was not the best solution. Fixed a bug in InOrderWalk caused by ResolveType sometimes allocating classes. Rename C++ Method to AbstractMethod and add two new classes Constructor, Method which both inherit from AbstractMethod. Rename done to have the C++ code be closer to the java code. Change-Id: I4995b4c5e47a3822192b08afa24a639d3b1f4da9 --- src/compiler_llvm/method_compiler.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/compiler_llvm/method_compiler.cc') diff --git a/src/compiler_llvm/method_compiler.cc b/src/compiler_llvm/method_compiler.cc index a74a6a4588..61fffbe238 100644 --- a/src/compiler_llvm/method_compiler.cc +++ b/src/compiler_llvm/method_compiler.cc @@ -2547,7 +2547,7 @@ void MethodCompiler::EmitInsn_SGet(uint32_t dex_pc, static_storage_addr = irb_.LoadFromObjectOffset(method_object_addr, - Method::DeclaringClassOffset().Int32Value(), + AbstractMethod::DeclaringClassOffset().Int32Value(), irb_.getJObjectTy(), kTBAAConstJObject); } else { @@ -2626,7 +2626,7 @@ void MethodCompiler::EmitInsn_SPut(uint32_t dex_pc, static_storage_addr = irb_.LoadFromObjectOffset(method_object_addr, - Method::DeclaringClassOffset().Int32Value(), + AbstractMethod::DeclaringClassOffset().Int32Value(), irb_.getJObjectTy(), kTBAAConstJObject); } else { @@ -2815,7 +2815,7 @@ void MethodCompiler::EmitInsn_Invoke(uint32_t dex_pc, } else { code_addr = irb_.LoadFromObjectOffset(callee_method_object_addr, - Method::GetCodeOffset().Int32Value(), + AbstractMethod::GetCodeOffset().Int32Value(), GetFunctionType(callee_method_idx, is_static)->getPointerTo(), kTBAAJRuntime); } @@ -3479,7 +3479,7 @@ llvm::Value* MethodCompiler::EmitLoadDexCacheAddr(MemberOffset offset) { llvm::Value* MethodCompiler:: EmitLoadDexCacheStaticStorageFieldAddr(uint32_t type_idx) { llvm::Value* static_storage_dex_cache_addr = - EmitLoadDexCacheAddr(Method::DexCacheInitializedStaticStorageOffset()); + EmitLoadDexCacheAddr(AbstractMethod::DexCacheInitializedStaticStorageOffset()); llvm::Value* type_idx_value = irb_.getPtrEquivInt(type_idx); @@ -3490,7 +3490,7 @@ EmitLoadDexCacheStaticStorageFieldAddr(uint32_t type_idx) { llvm::Value* MethodCompiler:: EmitLoadDexCacheResolvedTypeFieldAddr(uint32_t type_idx) { llvm::Value* resolved_type_dex_cache_addr = - EmitLoadDexCacheAddr(Method::DexCacheResolvedTypesOffset()); + EmitLoadDexCacheAddr(AbstractMethod::DexCacheResolvedTypesOffset()); llvm::Value* type_idx_value = irb_.getPtrEquivInt(type_idx); @@ -3501,7 +3501,7 @@ EmitLoadDexCacheResolvedTypeFieldAddr(uint32_t type_idx) { llvm::Value* MethodCompiler:: EmitLoadDexCacheResolvedMethodFieldAddr(uint32_t method_idx) { llvm::Value* resolved_method_dex_cache_addr = - EmitLoadDexCacheAddr(Method::DexCacheResolvedMethodsOffset()); + EmitLoadDexCacheAddr(AbstractMethod::DexCacheResolvedMethodsOffset()); llvm::Value* method_idx_value = irb_.getPtrEquivInt(method_idx); @@ -3512,7 +3512,7 @@ EmitLoadDexCacheResolvedMethodFieldAddr(uint32_t method_idx) { llvm::Value* MethodCompiler:: EmitLoadDexCacheStringFieldAddr(uint32_t string_idx) { llvm::Value* string_dex_cache_addr = - EmitLoadDexCacheAddr(Method::DexCacheStringsOffset()); + EmitLoadDexCacheAddr(AbstractMethod::DexCacheStringsOffset()); llvm::Value* string_idx_value = irb_.getPtrEquivInt(string_idx); -- cgit v1.2.3-59-g8ed1b