From 468532ea115657709bc32ee498e701a4c71762d4 Mon Sep 17 00:00:00 2001 From: Ian Rogers Date: Mon, 5 Aug 2013 10:56:33 -0700 Subject: Entry point clean up. Create set of entry points needed for image methods to avoid fix-up at load time: - interpreter - bridge to interpreter, bridge to compiled code - jni - dlsym lookup - quick - resolution and bridge to interpreter - portable - resolution and bridge to interpreter Fix JNI work around to use JNI work around argument rewriting code that'd been accidentally disabled. Remove abstact method error stub, use interpreter bridge instead. Consolidate trampoline (previously stub) generation in generic helper. Simplify trampolines to jump directly into assembly code, keeps stack crawlable. Dex: replace use of int with ThreadOffset for values that are thread offsets. Tidy entry point routines between interpreter, jni, quick and portable. Change-Id: I52a7c2bbb1b7e0ff8a3c3100b774212309d0828e (cherry picked from commit 848871b4d8481229c32e0d048a9856e5a9a17ef9) --- compiler/driver/compiler_driver.h | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) (limited to 'compiler/driver/compiler_driver.h') diff --git a/compiler/driver/compiler_driver.h b/compiler/driver/compiler_driver.h index 18f852dc6f..b5222c99b8 100644 --- a/compiler/driver/compiler_driver.h +++ b/compiler/driver/compiler_driver.h @@ -48,6 +48,17 @@ enum CompilerBackend { kNoBackend }; +enum EntryPointCallingConvention { + // ABI of invocations to a method's interpreter entry point. + kInterpreterAbi, + // ABI of calls to a method's native code, only used for native methods. + kJniAbi, + // ABI of calls to a method's portable code entry point. + kPortableAbi, + // ABI of calls to a method's quick code entry point. + kQuickAbi +}; + enum DexToDexCompilationLevel { kDontDexToDexCompile, // Only meaning wrt image time interpretation. kRequired, // Dex-to-dex compilation required for correctness. @@ -110,13 +121,19 @@ class CompilerDriver { CompilerTls* GetTls(); // Generate the trampolines that are invoked by unresolved direct methods. + const std::vector* CreateInterpreterToInterpreterBridge() const + SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); + const std::vector* CreateInterpreterToCompiledCodeBridge() const + SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); + const std::vector* CreateJniDlsymLookup() const + SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); const std::vector* CreatePortableResolutionTrampoline() const SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); - const std::vector* CreateQuickResolutionTrampoline() const + const std::vector* CreatePortableToInterpreterBridge() const SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); - const std::vector* CreateInterpreterToInterpreterEntry() const + const std::vector* CreateQuickResolutionTrampoline() const SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); - const std::vector* CreateInterpreterToQuickEntry() const + const std::vector* CreateQuickToInterpreterBridge() const SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); CompiledClass* GetCompiledClass(ClassReference ref) const -- cgit v1.2.3-59-g8ed1b