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/gbc_expander.cc | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/compiler_llvm/gbc_expander.cc') diff --git a/src/compiler_llvm/gbc_expander.cc b/src/compiler_llvm/gbc_expander.cc index d482526621..bcca08d654 100644 --- a/src/compiler_llvm/gbc_expander.cc +++ b/src/compiler_llvm/gbc_expander.cc @@ -655,7 +655,7 @@ llvm::Value* GBCExpanderPass::EmitLoadDexCacheAddr(art::MemberOffset offset) { llvm::Value* GBCExpanderPass::EmitLoadDexCacheStaticStorageFieldAddr(uint32_t type_idx) { llvm::Value* static_storage_dex_cache_addr = - EmitLoadDexCacheAddr(art::Method::DexCacheInitializedStaticStorageOffset()); + EmitLoadDexCacheAddr(art::AbstractMethod::DexCacheInitializedStaticStorageOffset()); llvm::Value* type_idx_value = irb_.getPtrEquivInt(type_idx); @@ -665,7 +665,7 @@ GBCExpanderPass::EmitLoadDexCacheStaticStorageFieldAddr(uint32_t type_idx) { llvm::Value* GBCExpanderPass::EmitLoadDexCacheResolvedTypeFieldAddr(uint32_t type_idx) { llvm::Value* resolved_type_dex_cache_addr = - EmitLoadDexCacheAddr(art::Method::DexCacheResolvedTypesOffset()); + EmitLoadDexCacheAddr(art::AbstractMethod::DexCacheResolvedTypesOffset()); llvm::Value* type_idx_value = irb_.getPtrEquivInt(type_idx); @@ -675,7 +675,7 @@ GBCExpanderPass::EmitLoadDexCacheResolvedTypeFieldAddr(uint32_t type_idx) { llvm::Value* GBCExpanderPass:: EmitLoadDexCacheResolvedMethodFieldAddr(uint32_t method_idx) { llvm::Value* resolved_method_dex_cache_addr = - EmitLoadDexCacheAddr(art::Method::DexCacheResolvedMethodsOffset()); + EmitLoadDexCacheAddr(art::AbstractMethod::DexCacheResolvedMethodsOffset()); llvm::Value* method_idx_value = irb_.getPtrEquivInt(method_idx); @@ -685,7 +685,7 @@ EmitLoadDexCacheResolvedMethodFieldAddr(uint32_t method_idx) { llvm::Value* GBCExpanderPass:: EmitLoadDexCacheStringFieldAddr(uint32_t string_idx) { llvm::Value* string_dex_cache_addr = - EmitLoadDexCacheAddr(art::Method::DexCacheStringsOffset()); + EmitLoadDexCacheAddr(art::AbstractMethod::DexCacheStringsOffset()); llvm::Value* string_idx_value = irb_.getPtrEquivInt(string_idx); @@ -983,7 +983,7 @@ void GBCExpanderPass::Expand_SPutFast(llvm::Value* static_storage_addr, llvm::Value* GBCExpanderPass::Expand_LoadDeclaringClassSSB(llvm::Value* method_object_addr) { return irb_.LoadFromObjectOffset(method_object_addr, - art::Method::DeclaringClassOffset().Int32Value(), + art::AbstractMethod::DeclaringClassOffset().Int32Value(), irb_.getJObjectTy(), kTBAAConstJObject); } @@ -1035,7 +1035,7 @@ llvm::Value* GBCExpanderPass::Expand_Invoke(llvm::CallInst& call_inst) { llvm::Value* code_addr = irb_.LoadFromObjectOffset(callee_method_object_addr, - art::Method::GetCodeOffset().Int32Value(), + art::AbstractMethod::GetCodeOffset().Int32Value(), callee_method_type->getPointerTo(), kTBAAJRuntime); @@ -1710,7 +1710,7 @@ llvm::Value* GBCExpanderPass::Expand_HLSget(llvm::CallInst& call_inst, static_storage_addr = irb_.LoadFromObjectOffset(method_object_addr, - art::Method::DeclaringClassOffset().Int32Value(), + art::AbstractMethod::DeclaringClassOffset().Int32Value(), irb_.getJObjectTy(), kTBAAConstJObject); } else { @@ -1791,7 +1791,7 @@ void GBCExpanderPass::Expand_HLSput(llvm::CallInst& call_inst, static_storage_addr = irb_.LoadFromObjectOffset(method_object_addr, - art::Method::DeclaringClassOffset().Int32Value(), + art::AbstractMethod::DeclaringClassOffset().Int32Value(), irb_.getJObjectTy(), kTBAAConstJObject); } else { @@ -2168,7 +2168,7 @@ llvm::Value* GBCExpanderPass::Expand_HLInvoke(llvm::CallInst& call_inst) { } else { code_addr = irb_.LoadFromObjectOffset(callee_method_object_addr, - art::Method::GetCodeOffset().Int32Value(), + art::AbstractMethod::GetCodeOffset().Int32Value(), GetFunctionType(callee_method_idx, is_static)->getPointerTo(), kTBAAJRuntime); } -- cgit v1.2.3-59-g8ed1b