Add a fast path for nterp entrypoint to avoid fetching the shorty.
When all parameters are references, we don't need to look at the shorty.
Use the 0x00100000 flag in the modifiers which is free for non-native
methods.
Test: test.py
Bug: 112676029
Change-Id: Ied9a253f7f7230045dd13188a5b806fb1d6d019d
diff --git a/libdexfile/dex/modifiers.h b/libdexfile/dex/modifiers.h
index 7b15cca..5fad46c 100644
--- a/libdexfile/dex/modifiers.h
+++ b/libdexfile/dex/modifiers.h
@@ -97,6 +97,9 @@
// virtual call.
static constexpr uint32_t kAccSingleImplementation = 0x08000000; // method (runtime)
+// Whether nterp can take a fast path when entering this method (runtime; non-native)
+static constexpr uint32_t kAccNterpEntryPointFastPathFlag = 0x00100000;
+
static constexpr uint32_t kAccPublicApi = 0x10000000; // field, method
static constexpr uint32_t kAccCorePlatformApi = 0x20000000; // field, method