Cleanup proxy stub compiler code.
Change-Id: I2a5815cc2a38f5cea9e9c36e5e6db92c1a861eaa
diff --git a/src/compiler.h b/src/compiler.h
index c0732aa..5ae46d5 100644
--- a/src/compiler.h
+++ b/src/compiler.h
@@ -94,6 +94,10 @@
const CompiledInvokeStub* FindInvokeStub(bool is_static, const char* shorty) const;
const CompiledInvokeStub* FindInvokeStub(const std::string& key) const;
+#if defined(ART_USE_LLVM_COMPILER)
+ const CompiledInvokeStub* FindProxyStub(const char* shorty) const;
+#endif
+
// Callbacks from OAT/ART compiler to see what runtime checks must be generated
bool CanAssumeTypeIsPresentInDexCache(const DexCache* dex_cache, uint32_t type_idx);
@@ -281,6 +285,10 @@
void InsertInvokeStub(const std::string& key, const CompiledInvokeStub* compiled_invoke_stub);
+#if defined(ART_USE_LLVM_COMPILER)
+ void InsertProxyStub(const char* shorty, const CompiledInvokeStub* compiled_proxy_stub);
+#endif
+
std::vector<const PatchInformation*> code_to_patch_;
std::vector<const PatchInformation*> methods_to_patch_;
@@ -301,6 +309,13 @@
mutable Mutex compiled_invoke_stubs_lock_;
InvokeStubTable compiled_invoke_stubs_;
+#if defined(ART_USE_LLVM_COMPILER)
+ typedef SafeMap<std::string, const CompiledInvokeStub*> ProxyStubTable;
+ // Proxy stubs created for proxy invocation delegation
+ mutable Mutex compiled_proxy_stubs_lock_;
+ ProxyStubTable compiled_proxy_stubs_;
+#endif
+
bool image_;
size_t thread_count_;
bool support_debugging_;
@@ -338,6 +353,10 @@
CreateInvokeStubFn create_invoke_stub_;
#if defined(ART_USE_LLVM_COMPILER)
+ typedef CompiledInvokeStub* (*CreateProxyStubFn)
+ (Compiler& compiler, const char* shorty, uint32_t shorty_len);
+ CreateProxyStubFn create_proxy_stub_;
+
typedef void (*CompilerEnableAutoElfLoadingFn)(Compiler& compiler);
CompilerEnableAutoElfLoadingFn compiler_enable_auto_elf_loading_;