Merge "Remove remaining code related to compiled invoke and proxy stubs." into dalvik-dev
diff --git a/build/Android.libart-compiler.mk b/build/Android.libart-compiler.mk
index 95c5ea0..95f8fee 100644
--- a/build/Android.libart-compiler.mk
+++ b/build/Android.libart-compiler.mk
@@ -52,7 +52,6 @@
src/compiler/dex/ssa_transformation.cc \
src/compiler/dex/write_elf.cc \
src/compiler/driver/dex_compilation_unit.cc \
- src/compiler/invoke_stubs/portable/stub_compiler.cc \
src/compiler/jni/portable/jni_compiler.cc \
src/compiler/jni/quick/arm/calling_convention_arm.cc \
src/compiler/jni/quick/mips/calling_convention_mips.cc \
diff --git a/src/common_test.h b/src/common_test.h
index 731e1af..4f91717 100644
--- a/src/common_test.h
+++ b/src/common_test.h
@@ -197,9 +197,6 @@
reinterpret_cast<uint32_t>(mapping_table),
reinterpret_cast<uint32_t>(vmap_table),
reinterpret_cast<uint32_t>(gc_map)
-#if defined(ART_USE_PORTABLE_COMPILER)
- , 0
-#endif
);
}
diff --git a/src/compiled_method.cc b/src/compiled_method.cc
index 36c4eea..0981412 100644
--- a/src/compiled_method.cc
+++ b/src/compiled_method.cc
@@ -154,13 +154,4 @@
frame_size_in_bytes_(frame_size_in_bytes),
core_spill_mask_(core_spill_mask), fp_spill_mask_(fp_spill_mask) {}
-CompiledInvokeStub::CompiledInvokeStub(InstructionSet instruction_set,
- const std::vector<uint8_t>& code)
- : CompiledCode(instruction_set, code) {}
-
-CompiledInvokeStub::CompiledInvokeStub(InstructionSet instruction_set,
- const std::string& elf_object,
- const std::string& symbol)
- : CompiledCode(instruction_set, elf_object, symbol) {}
-
} // namespace art
diff --git a/src/compiled_method.h b/src/compiled_method.h
index d665338..25fc33a 100644
--- a/src/compiled_method.h
+++ b/src/compiled_method.h
@@ -168,20 +168,6 @@
std::vector<uint8_t> native_gc_map_;
};
-class CompiledInvokeStub : public CompiledCode {
- public:
- // Used by Quick to provide a blob of code.
- explicit CompiledInvokeStub(InstructionSet instruction_set,
- const std::vector<uint8_t>& code);
-
- // Used by Portable to provide ELF object.
- explicit CompiledInvokeStub(InstructionSet instruction_set,
- const std::string& elf_object,
- const std::string& symbol);
-
- ~CompiledInvokeStub() {}
-};
-
} // namespace art
#endif // ART_SRC_COMPILED_METHOD_H_
diff --git a/src/compiler/driver/compiler_driver.cc b/src/compiler/driver/compiler_driver.cc
index a839be7..700936c 100644
--- a/src/compiler/driver/compiler_driver.cc
+++ b/src/compiler/driver/compiler_driver.cc
@@ -292,7 +292,6 @@
freezing_constructor_lock_("freezing constructor lock"),
compiled_classes_lock_("compiled classes lock"),
compiled_methods_lock_("compiled method lock"),
- compiled_proxy_stubs_lock_("compiled proxy stubs lock"),
image_(image),
thread_count_(thread_count),
support_debugging_(support_debugging),
@@ -338,11 +337,6 @@
jni_compiler_ = FindFunction<JniCompilerFn>(compiler_so_name, compiler_library_, "ArtQuickJniCompileMethod");
}
- if (compiler_backend_ == kPortable) {
- create_proxy_stub_ = FindFunction<CreateProxyStubFn>(
- compiler_so_name, compiler_library_, "ArtCreateProxyStub");
- }
-
CHECK(!Runtime::Current()->IsStarted());
if (!image_) {
CHECK(image_classes_ == NULL);
@@ -360,10 +354,6 @@
STLDeleteValues(&compiled_methods_);
}
{
- MutexLock mu(self, compiled_proxy_stubs_lock_);
- STLDeleteValues(&compiled_proxy_stubs_);
- }
- {
MutexLock mu(self, compiled_methods_lock_);
STLDeleteElements(&code_to_patch_);
}
@@ -1658,19 +1648,6 @@
DCHECK(GetCompiledMethod(ref) != NULL) << PrettyMethod(method_idx, dex_file);
}
- uint32_t shorty_len;
- const char* shorty = dex_file.GetMethodShorty(dex_file.GetMethodId(method_idx), &shorty_len);
- bool is_static = (access_flags & kAccStatic) != 0;
-
- if ((compiler_backend_ == kPortable) && !is_static) {
- CompiledInvokeStub* compiled_proxy_stub = FindProxyStub(shorty);
- if (compiled_proxy_stub == NULL) {
- compiled_proxy_stub = (*create_proxy_stub_)(*this, shorty, shorty_len);
- CHECK(compiled_proxy_stub != NULL);
- InsertProxyStub(shorty, compiled_proxy_stub);
- }
- }
-
if (self->IsExceptionPending()) {
ScopedObjectAccess soa(self);
LOG(FATAL) << "Unexpected exception compiling: " << PrettyMethod(method_idx, dex_file) << "\n"
@@ -1678,28 +1655,6 @@
}
}
-CompiledInvokeStub* CompilerDriver::FindProxyStub(const char* shorty) const {
- MutexLock mu(Thread::Current(), compiled_proxy_stubs_lock_);
- ProxyStubTable::const_iterator it = compiled_proxy_stubs_.find(shorty);
- if (it == compiled_proxy_stubs_.end()) {
- return NULL;
- } else {
- DCHECK(it->second != NULL);
- return it->second;
- }
-}
-
-void CompilerDriver::InsertProxyStub(const char* shorty, CompiledInvokeStub* compiled_proxy_stub) {
- MutexLock mu(Thread::Current(), compiled_proxy_stubs_lock_);
- InvokeStubTable::iterator it = compiled_proxy_stubs_.find(shorty);
- if (it != compiled_proxy_stubs_.end()) {
- // Someone else won the race.
- delete compiled_proxy_stub;
- } else {
- compiled_proxy_stubs_.Put(shorty, compiled_proxy_stub);
- }
-}
-
CompiledClass* CompilerDriver::GetCompiledClass(ClassReference ref) const {
MutexLock mu(Thread::Current(), compiled_classes_lock_);
ClassTable::const_iterator it = compiled_classes_.find(ref);
diff --git a/src/compiler/driver/compiler_driver.h b/src/compiler/driver/compiler_driver.h
index af04cbf..385bc00 100644
--- a/src/compiler/driver/compiler_driver.h
+++ b/src/compiler/driver/compiler_driver.h
@@ -123,8 +123,6 @@
CompiledMethod* GetCompiledMethod(MethodReference ref) const
LOCKS_EXCLUDED(compiled_methods_lock_);
- CompiledInvokeStub* FindProxyStub(const char* shorty) const;
-
void AddRequiresConstructorBarrier(Thread* self, const DexFile* dex_file, size_t class_def_index);
bool RequiresConstructorBarrier(Thread* self, const DexFile* dex_file, size_t class_def_index);
@@ -318,8 +316,6 @@
static void CompileClass(const ParallelCompilationManager* context, size_t class_def_index)
LOCKS_EXCLUDED(Locks::mutator_lock_);
- void InsertProxyStub(const char* shorty, CompiledInvokeStub* compiled_proxy_stub);
-
std::vector<const PatchInformation*> code_to_patch_;
std::vector<const PatchInformation*> methods_to_patch_;
@@ -341,12 +337,6 @@
mutable Mutex compiled_methods_lock_ DEFAULT_MUTEX_ACQUIRED_AFTER;
MethodTable compiled_methods_ GUARDED_BY(compiled_methods_lock_);
- typedef SafeMap<std::string, CompiledInvokeStub*> InvokeStubTable;
- typedef SafeMap<std::string, CompiledInvokeStub*> ProxyStubTable;
- // Proxy stubs created for proxy invocation delegation
- mutable Mutex compiled_proxy_stubs_lock_ DEFAULT_MUTEX_ACQUIRED_AFTER;
- ProxyStubTable compiled_proxy_stubs_ GUARDED_BY(compiled_proxy_stubs_lock_);
-
bool image_;
size_t thread_count_;
bool support_debugging_;
@@ -380,10 +370,6 @@
pthread_key_t tls_key_;
- typedef CompiledInvokeStub* (*CreateProxyStubFn)
- (CompilerDriver& driver, const char* shorty, uint32_t shorty_len);
- CreateProxyStubFn create_proxy_stub_;
-
typedef void (*CompilerEnableAutoElfLoadingFn)(CompilerDriver& driver);
CompilerEnableAutoElfLoadingFn compiler_enable_auto_elf_loading_;
diff --git a/src/compiler/invoke_stubs/portable/stub_compiler.cc b/src/compiler/invoke_stubs/portable/stub_compiler.cc
deleted file mode 100644
index 01a43db..0000000
--- a/src/compiler/invoke_stubs/portable/stub_compiler.cc
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "stub_compiler.h"
-
-#include "base/logging.h"
-#include "compiled_method.h"
-#include "compiler/driver/compiler_driver.h"
-#include "compiler/llvm/compiler_llvm.h"
-#include "compiler/llvm/ir_builder.h"
-#include "compiler/llvm/llvm_compilation_unit.h"
-#include "compiler/llvm/runtime_support_func.h"
-#include "compiler/llvm/utils_llvm.h"
-#include "mirror/abstract_method.h"
-
-#include <llvm/IR/BasicBlock.h>
-#include <llvm/IR/Function.h>
-#include <llvm/IR/GlobalVariable.h>
-#include <llvm/IR/Intrinsics.h>
-
-#include <string>
-#include <string.h>
-
-namespace art {
-namespace llvm {
-
-using namespace runtime_support;
-
-
-StubCompiler::StubCompiler(LlvmCompilationUnit* cunit, const CompilerDriver& driver)
-: cunit_(cunit), driver_(&driver), module_(cunit_->GetModule()),
- context_(cunit_->GetLLVMContext()), irb_(*cunit_->GetIRBuilder()) {
-}
-
-
-CompiledInvokeStub* StubCompiler::CreateProxyStub(const char* shorty) {
- CHECK(shorty != NULL);
- size_t shorty_size = strlen(shorty);
-
- // Function name
- std::string func_name(StringPrintf("proxy_stub_%s", shorty));
-
- // Accurate function type
- ::llvm::Type* accurate_ret_type = irb_.getJType(shorty[0]);
-
- std::vector< ::llvm::Type*> accurate_arg_types;
- accurate_arg_types.push_back(irb_.getJObjectTy()); // method
- accurate_arg_types.push_back(irb_.getJObjectTy()); // this
-
- for (size_t i = 1; i < shorty_size; ++i) {
- accurate_arg_types.push_back(irb_.getJType(shorty[i]));
- }
-
- ::llvm::FunctionType* accurate_func_type =
- ::llvm::FunctionType::get(accurate_ret_type, accurate_arg_types, false);
-
- // Create function
- ::llvm::Function* func =
- ::llvm::Function::Create(accurate_func_type, ::llvm::Function::InternalLinkage,
- func_name, module_);
- switch(shorty[0]) {
- case 'Z':
- case 'C':
- func->addAttribute(0, ::llvm::Attribute::ZExt);
- break;
-
- case 'B':
- case 'S':
- func->addAttribute(0, ::llvm::Attribute::SExt);
- break;
-
- default: break;
- }
-
- // Create basic block for the body of this function
- ::llvm::BasicBlock* block_body =
- ::llvm::BasicBlock::Create(*context_, "proxy", func);
- irb_.SetInsertPoint(block_body);
-
- // JValue for proxy return
- ::llvm::AllocaInst* jvalue_temp = irb_.CreateAlloca(irb_.getJValueTy());
-
- // Load actual arguments
- ::llvm::Function::arg_iterator arg_iter = func->arg_begin();
-
- std::vector< ::llvm::Value*> args;
- args.push_back(arg_iter++); // method
- args.push_back(arg_iter++); // this
- args.push_back(irb_.Runtime().EmitGetCurrentThread()); // thread
-
- for (size_t i = 1; i < shorty_size; ++i) {
- args.push_back(arg_iter++);
- }
-
- if (shorty[0] != 'V') {
- args.push_back(jvalue_temp);
- }
-
- // Call ProxyInvokeHandler
- // TODO: Partial inline ProxyInvokeHandler, don't use VarArg.
- irb_.CreateCall(irb_.GetRuntime(ProxyInvokeHandler), args);
-
- if (shorty[0] != 'V') {
- ::llvm::Value* result_addr =
- irb_.CreateBitCast(jvalue_temp, accurate_ret_type->getPointerTo());
- ::llvm::Value* retval = irb_.CreateLoad(result_addr, kTBAAStackTemp);
- irb_.CreateRet(retval);
- } else {
- irb_.CreateRetVoid();
- }
-
- // Verify the generated function
- VERIFY_LLVM_FUNCTION(*func);
-
- cunit_->Materialize();
-
- return new CompiledInvokeStub(cunit_->GetInstructionSet(),
- cunit_->GetElfObject(),
- func_name);
-}
-
-
-} // namespace llvm
-} // namespace art
diff --git a/src/compiler/invoke_stubs/portable/stub_compiler.h b/src/compiler/invoke_stubs/portable/stub_compiler.h
deleted file mode 100644
index b48620b..0000000
--- a/src/compiler/invoke_stubs/portable/stub_compiler.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ART_SRC_COMPILER_LLVM_STUB_COMPILER_H_
-#define ART_SRC_COMPILER_LLVM_STUB_COMPILER_H_
-
-#include <stdint.h>
-
-namespace art {
- class CompiledInvokeStub;
- class CompiledProxyStub;
- class CompilerDriver;
-}
-
-namespace llvm {
- class LLVMContext;
- class Module;
-}
-
-namespace art {
-namespace llvm {
-
-class LlvmCompilationUnit;
-class CompilerLLVM;
-class IRBuilder;
-
-class StubCompiler {
- public:
- StubCompiler(LlvmCompilationUnit* cunit, const CompilerDriver& compiler);
-
- CompiledInvokeStub* CreateProxyStub(const char* shorty);
-
- private:
- LlvmCompilationUnit* cunit_;
- const CompilerDriver* const driver_;
- ::llvm::Module* module_;
- ::llvm::LLVMContext* context_;
- IRBuilder& irb_;
-};
-
-
-} // namespace llvm
-} // namespace art
-
-
-#endif // ART_SRC_COMPILER_LLVM_STUB_COMPILER_H_
diff --git a/src/compiler/llvm/compiler_llvm.cc b/src/compiler/llvm/compiler_llvm.cc
index 347a4db..dfd0e32 100644
--- a/src/compiler/llvm/compiler_llvm.cc
+++ b/src/compiler/llvm/compiler_llvm.cc
@@ -22,7 +22,6 @@
#include "compiled_method.h"
#include "compiler/driver/compiler_driver.h"
#include "compiler/driver/dex_compilation_unit.h"
-#include "compiler/invoke_stubs/portable/stub_compiler.h"
#include "compiler/jni/portable/jni_compiler.h"
#include "globals.h"
#include "ir_builder.h"
@@ -173,15 +172,6 @@
}
-CompiledInvokeStub* CompilerLLVM::CreateProxyStub(char const *shorty) {
- UniquePtr<LlvmCompilationUnit> cunit(AllocateCompilationUnit());
-
- UniquePtr<StubCompiler> stub_compiler(
- new StubCompiler(cunit.get(), *compiler_driver_));
-
- return stub_compiler->CreateProxyStub(shorty);
-}
-
} // namespace llvm
} // namespace art
@@ -243,14 +233,6 @@
return result;
}
-extern "C" art::CompiledInvokeStub* ArtCreateProxyStub(art::CompilerDriver& driver,
- const char* shorty,
- uint32_t shorty_len) {
- art::llvm::CompilerLLVM* compiler_llvm = ContextOf(driver);
- art::CompiledInvokeStub* result = compiler_llvm->CreateProxyStub(shorty);
- return result;
-}
-
extern "C" void compilerLLVMSetBitcodeFileName(art::CompilerDriver& driver,
std::string const& filename) {
ContextOf(driver)->SetBitcodeFileName(filename);
diff --git a/src/compiler/llvm/compiler_llvm.h b/src/compiler/llvm/compiler_llvm.h
index 772864c..e7717a3 100644
--- a/src/compiler/llvm/compiler_llvm.h
+++ b/src/compiler/llvm/compiler_llvm.h
@@ -30,7 +30,6 @@
#include <vector>
namespace art {
- class CompiledInvokeStub;
class CompiledMethod;
class CompilerDriver;
class DexCompilationUnit;
@@ -82,8 +81,6 @@
CompiledMethod* CompileNativeMethod(DexCompilationUnit* dex_compilation_unit);
- CompiledInvokeStub* CreateProxyStub(const char *shorty);
-
private:
LlvmCompilationUnit* AllocateCompilationUnit();
diff --git a/src/elf_writer.cc b/src/elf_writer.cc
index e0dafbb..7647da9 100644
--- a/src/elf_writer.cc
+++ b/src/elf_writer.cc
@@ -235,19 +235,11 @@
while (it.HasNext()) {
const DexFile& dex_file = it.GetDexFile();
uint32_t method_idx = it.GetMemberIndex();
- InvokeType invoke_type = it.GetInvokeType();
- const char* shorty = dex_file.GetMethodShorty(dex_file.GetMethodId(method_idx));
const CompiledMethod* compiled_method =
compiler_driver_->GetCompiledMethod(CompilerDriver::MethodReference(&dex_file, method_idx));
if (compiled_method != NULL) {
AddCompiledCodeInput(*compiled_method);
}
- if (invoke_type != kStatic) {
- const CompiledInvokeStub* compiled_proxy_stub = compiler_driver_->FindProxyStub(shorty);
- if (compiled_proxy_stub != NULL) {
- AddCompiledCodeInput(*compiled_proxy_stub);
- }
- }
it.Next();
}
added_symbols_.clear();
@@ -364,7 +356,6 @@
const DexFile& dex_file = it.GetDexFile();
uint32_t method_idx = it.GetMemberIndex();
InvokeType invoke_type = it.GetInvokeType();
- const char* shorty = dex_file.GetMethodShorty(dex_file.GetMethodId(method_idx));
mirror::AbstractMethod* method = NULL;
if (compiler_driver_->IsImage()) {
ClassLinker* linker = Runtime::Current()->GetClassLinker();
@@ -386,12 +377,6 @@
method->SetOatCodeOffset(offset);
}
}
- if (invoke_type != kStatic) {
- const CompiledInvokeStub* compiled_proxy_stub = compiler_driver_->FindProxyStub(shorty);
- if (compiled_proxy_stub != NULL) {
- FixupCompiledCodeOffset(*elf_file.get(), oatdata_address, *compiled_proxy_stub);
- }
- }
it.Next();
}
symbol_to_compiled_code_offset_.clear();
diff --git a/src/oat.cc b/src/oat.cc
index 16c9705..4eb97f5 100644
--- a/src/oat.cc
+++ b/src/oat.cc
@@ -22,7 +22,7 @@
namespace art {
const uint8_t OatHeader::kOatMagic[] = { 'o', 'a', 't', '\n' };
-const uint8_t OatHeader::kOatVersion[] = { '0', '0', '4', '\0' };
+const uint8_t OatHeader::kOatVersion[] = { '0', '0', '5', '\0' };
OatHeader::OatHeader() {
memset(this, 0, sizeof(*this));
@@ -141,9 +141,6 @@
mapping_table_offset_(0),
vmap_table_offset_(0),
gc_map_offset_(0)
-#if defined(ART_USE_PORTABLE_COMPILER)
- , proxy_stub_offset_(0)
-#endif
{}
OatMethodOffsets::OatMethodOffsets(uint32_t code_offset,
@@ -153,9 +150,6 @@
uint32_t mapping_table_offset,
uint32_t vmap_table_offset,
uint32_t gc_map_offset
-#if defined(ART_USE_PORTABLE_COMPILER)
- , uint32_t proxy_stub_offset
-#endif
)
: code_offset_(code_offset),
frame_size_in_bytes_(frame_size_in_bytes),
@@ -164,9 +158,6 @@
mapping_table_offset_(mapping_table_offset),
vmap_table_offset_(vmap_table_offset),
gc_map_offset_(gc_map_offset)
-#if defined(ART_USE_PORTABLE_COMPILER)
- , proxy_stub_offset_(proxy_stub_offset)
-#endif
{}
OatMethodOffsets::~OatMethodOffsets() {}
diff --git a/src/oat.h b/src/oat.h
index c76a09b..cf98891 100644
--- a/src/oat.h
+++ b/src/oat.h
@@ -82,9 +82,6 @@
uint32_t mapping_table_offset,
uint32_t vmap_table_offset,
uint32_t gc_map_offset
-#if defined(ART_USE_PORTABLE_COMPILER)
- , uint32_t proxy_stub_offset
-#endif
);
~OatMethodOffsets();
@@ -96,10 +93,6 @@
uint32_t mapping_table_offset_;
uint32_t vmap_table_offset_;
uint32_t gc_map_offset_;
-
-#if defined(ART_USE_PORTABLE_COMPILER)
- uint32_t proxy_stub_offset_;
-#endif
};
} // namespace art
diff --git a/src/oat_file.cc b/src/oat_file.cc
index 92ebae3..3cc07bf 100644
--- a/src/oat_file.cc
+++ b/src/oat_file.cc
@@ -347,9 +347,6 @@
oat_method_offsets.mapping_table_offset_,
oat_method_offsets.vmap_table_offset_,
oat_method_offsets.gc_map_offset_
-#if defined(ART_USE_PORTABLE_COMPILER)
- , oat_method_offsets.proxy_stub_offset_
-#endif
);
}
@@ -361,9 +358,6 @@
const uint32_t mapping_table_offset,
const uint32_t vmap_table_offset,
const uint32_t gc_map_offset
-#if defined(ART_USE_PORTABLE_COMPILER)
- , const uint32_t proxy_stub_offset
-#endif
)
: begin_(base),
code_offset_(code_offset),
@@ -373,9 +367,6 @@
mapping_table_offset_(mapping_table_offset),
vmap_table_offset_(vmap_table_offset),
native_gc_map_offset_(gc_map_offset)
-#if defined(ART_USE_PORTABLE_COMPILER)
- , proxy_stub_offset_(proxy_stub_offset)
-#endif
{
#ifndef NDEBUG
if (mapping_table_offset_ != 0) { // implies non-native, non-stub code
@@ -416,12 +407,6 @@
#endif
}
-#if defined(ART_USE_PORTABLE_COMPILER)
-const void* OatFile::OatMethod::GetProxyStub() const {
- return GetOatPointer<const void*>(proxy_stub_offset_);
-}
-#endif
-
void OatFile::OatMethod::LinkMethod(mirror::AbstractMethod* method) const {
CHECK(method != NULL);
method->SetCode(GetCode());
diff --git a/src/oat_file.h b/src/oat_file.h
index 1814f19..c0bf21f 100644
--- a/src/oat_file.h
+++ b/src/oat_file.h
@@ -105,10 +105,6 @@
return GetOatPointer<const uint8_t*>(native_gc_map_offset_);
}
-#if defined(ART_USE_PORTABLE_COMPILER)
- const void* GetProxyStub() const;
-#endif
-
~OatMethod();
// Create an OatMethod with offsets relative to the given base address
@@ -120,9 +116,6 @@
const uint32_t mapping_table_offset,
const uint32_t vmap_table_offset,
const uint32_t gc_map_offset
-#if defined(ART_USE_PORTABLE_COMPILER)
- , const uint32_t proxy_stub_offset
-#endif
);
private:
@@ -144,10 +137,6 @@
uint32_t vmap_table_offset_;
uint32_t native_gc_map_offset_;
-#if defined(ART_USE_PORTABLE_COMPILER)
- uint32_t proxy_stub_offset_;
-#endif
-
friend class OatClass;
};
diff --git a/src/oat_test.cc b/src/oat_test.cc
index 78a2e9a..75a9dbb 100644
--- a/src/oat_test.cc
+++ b/src/oat_test.cc
@@ -143,12 +143,7 @@
// If this test is failing and you have to update these constants,
// it is time to update OatHeader::kOatVersion
EXPECT_EQ(36U, sizeof(OatHeader));
-#if !defined(ART_USE_PORTABLE_COMPILER)
EXPECT_EQ(28U, sizeof(OatMethodOffsets));
-#else
- // ART-LLVM has a extra 4 bytes field: proxy_stub_offset_
- EXPECT_EQ(32U, sizeof(OatMethodOffsets));
-#endif
}
TEST_F(OatTest, OatHeaderIsValid) {
diff --git a/src/oat_writer.cc b/src/oat_writer.cc
index eb7b286..a8a8295 100644
--- a/src/oat_writer.cc
+++ b/src/oat_writer.cc
@@ -244,9 +244,6 @@
uint32_t mapping_table_offset = 0;
uint32_t vmap_table_offset = 0;
uint32_t gc_map_offset = 0;
-#if defined(ART_USE_PORTABLE_COMPILER)
- uint32_t proxy_stub_offset = 0;
-#endif
OatClass* oat_class = oat_classes_[oat_class_index];
#if defined(ART_USE_PORTABLE_COMPILER)
@@ -345,17 +342,6 @@
}
}
-#if defined(ART_USE_PORTABLE_COMPILER)
- if (invoke_type != kStatic) {
- const char* shorty = dex_file->GetMethodShorty(dex_file->GetMethodId(method_idx));
- CompiledInvokeStub* compiled_proxy_stub = compiler_driver_->FindProxyStub(shorty);
- if (compiled_proxy_stub != NULL) {
- compiled_proxy_stub->AddOatdataOffsetToCompliledCodeOffset(
- oat_method_offsets_offset + OFFSETOF_MEMBER(OatMethodOffsets, proxy_stub_offset_));
- }
- }
-#endif
-
oat_class->method_offsets_[class_def_method_index]
= OatMethodOffsets(code_offset,
frame_size_in_bytes,
@@ -364,9 +350,6 @@
mapping_table_offset,
vmap_table_offset,
gc_map_offset
-#if defined(ART_USE_PORTABLE_COMPILER)
- , proxy_stub_offset
-#endif
);
if (compiler_driver_->IsImage()) {