Improve nterp -> compiled code transitions.
Use an unused bit in the access flags of an ArtMethod (0x00200000) to store
the information a method only takes ints or references and returns an
int, a reference, or a long. This avoids the need to fetch the shorty in nterp
when doing a call.
Test: test.py
Test: 821-many-args
Bug: 112676029
Change-Id: Ie657ccf69c17c1097dc2a97f18e3093ef3be391b
diff --git a/libdexfile/dex/modifiers.h b/libdexfile/dex/modifiers.h
index 5fad46c..60141df 100644
--- a/libdexfile/dex/modifiers.h
+++ b/libdexfile/dex/modifiers.h
@@ -99,6 +99,9 @@
// Whether nterp can take a fast path when entering this method (runtime; non-native)
static constexpr uint32_t kAccNterpEntryPointFastPathFlag = 0x00100000;
+// Set by the class linker to mark that a method does not have floating points
+// or longs in its shorty.
+static constexpr uint32_t kAccNterpInvokeFastPathFlag = 0x00200000; // method (runtime)
static constexpr uint32_t kAccPublicApi = 0x10000000; // field, method
static constexpr uint32_t kAccCorePlatformApi = 0x20000000; // field, method