summaryrefslogtreecommitdiff
path: root/tools/cpp-define-generator/art_method.def
diff options
context:
space:
mode:
authorNicolas Geoffray <ngeoffray@google.com>2021-03-10 15:09:19 +0000
committerNicolas Geoffray <ngeoffray@google.com>2021-03-24 16:47:38 +0000
commit43c9cd7938a53265ea9899a604b409ce070cc2c5 (patch)
treedb084fcc115d6a68de25662bf1a5fae030bcf152 /tools/cpp-define-generator/art_method.def
parent443fc8962db219177c34cd047d2071b5ee775468 (diff)
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
Diffstat (limited to 'tools/cpp-define-generator/art_method.def')
-rw-r--r--tools/cpp-define-generator/art_method.def12
1 files changed, 8 insertions, 4 deletions
diff --git a/tools/cpp-define-generator/art_method.def b/tools/cpp-define-generator/art_method.def
index 5e09565df1..a73bbedc8a 100644
--- a/tools/cpp-define-generator/art_method.def
+++ b/tools/cpp-define-generator/art_method.def
@@ -23,14 +23,18 @@ ASM_DEFINE(ART_METHOD_ACCESS_FLAGS_OFFSET,
art::ArtMethod::AccessFlagsOffset().Int32Value())
ASM_DEFINE(ART_METHOD_IS_STATIC_FLAG,
art::kAccStatic)
-ASM_DEFINE(ART_METHOD_NTERP_ENTRY_POINT_FAST_PATH_FLAG,
- art::kAccNterpEntryPointFastPathFlag)
-ASM_DEFINE(ART_METHOD_IMT_MASK,
- art::ImTable::kSizeTruncToPowerOfTwo - 1)
ASM_DEFINE(ART_METHOD_IS_STATIC_FLAG_BIT,
art::MostSignificantBit(art::kAccStatic))
+ASM_DEFINE(ART_METHOD_NTERP_INVOKE_FAST_PATH_FLAG,
+ art::kAccNterpInvokeFastPathFlag)
+ASM_DEFINE(ART_METHOD_NTERP_INVOKE_FAST_PATH_FLAG_BIT,
+ art::MostSignificantBit(art::kAccNterpInvokeFastPathFlag))
+ASM_DEFINE(ART_METHOD_NTERP_ENTRY_POINT_FAST_PATH_FLAG,
+ art::kAccNterpEntryPointFastPathFlag)
ASM_DEFINE(ART_METHOD_NTERP_ENTRY_POINT_FAST_PATH_FLAG_BIT,
art::MostSignificantBit(art::kAccNterpEntryPointFastPathFlag))
+ASM_DEFINE(ART_METHOD_IMT_MASK,
+ art::ImTable::kSizeTruncToPowerOfTwo - 1)
ASM_DEFINE(ART_METHOD_DECLARING_CLASS_OFFSET,
art::ArtMethod::DeclaringClassOffset().Int32Value())
ASM_DEFINE(ART_METHOD_JNI_OFFSET_32,