diff options
author | Elliott Hughes <enh@google.com> | 2011-02-16 14:30:45 -0800 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2011-02-16 14:35:49 -0800 |
commit | 69ee8f605ad4139c8b9a39821fd7a4cadb9d9337 (patch) | |
tree | b18fac11b7271edf686ce6503758716131848e42 /vm/InlineNative.h | |
parent | 856993fd8ceeb64e2f36f2e18b8a97109cff8420 (diff) | |
download | android_dalvik-69ee8f605ad4139c8b9a39821fd7a4cadb9d9337.tar.gz android_dalvik-69ee8f605ad4139c8b9a39821fd7a4cadb9d9337.tar.bz2 android_dalvik-69ee8f605ad4139c8b9a39821fd7a4cadb9d9337.zip |
Ensure we always call inline natives.
Even though execute-inline is now a mandatory optimization, you can't be sure
the inline natives will be invoked that way. There's reflection and JNI, for
example, and there's the special case of String.equals that might be invoked
as Object.equals. This patch adds a regular native method corresponding to
each inline native, so that a corresponding libcore patch can drop its
implementations. (For example, despite the fact that we all believed last week
that the Java implementation of String.equals is never used, that turned out
not to be true: every HashMap lookup will have used it. This pair of patches
brings reality in line with our existing belief.)
Change-Id: I19e64c23bea83e91696206ca40ce4e3faf853040
Diffstat (limited to 'vm/InlineNative.h')
-rw-r--r-- | vm/InlineNative.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/vm/InlineNative.h b/vm/InlineNative.h index fc8602759..280f6af02 100644 --- a/vm/InlineNative.h +++ b/vm/InlineNative.h @@ -52,7 +52,11 @@ typedef struct InlineOperation { const char* methodSignature; } InlineOperation; -/* Must be kept in sync w/ gDvmInlineOpsTable in InlineNative.c */ +/* + * Must be kept in sync w/ gDvmInlineOpsTable in InlineNative.c + * + * You should also add a test to libcore's IntrinsicTest. + */ typedef enum NativeInlineOps { INLINE_EMPTYINLINEMETHOD = 0, INLINE_STRING_CHARAT = 1, |